-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
41 lines (36 loc) · 837 Bytes
/
default.nix
File metadata and controls
41 lines (36 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{
pkgs ? import <nixpkgs> {},
delveBinary ? "",
doCheck ? true
}:
with pkgs;
let
client = (import ./client { inherit pkgs; }).package.overrideAttrs (oldAttrs: {
buildInputs = oldAttrs.buildInputs ++ [ delveBinary ];
buildPhase = oldAttrs.installPhase;
checkPhase = ''
mkdir home
export HOME=$PWD/home
delve server &
PID=$!
sleep 15s
npm run test || (kill -9 $PID && exit 1)
echo "Shutting down delve server. Pid: $PID"
kill -9 $PID
'';
installPhase = ''
echo "Doing nothing..."
'';
inherit doCheck;
});
in
stdenv.mkDerivation rec {
name = "delve-javascript-client-sdk-${version}";
version = "1.1.3";
src = ./.;
installPhase = ''
mkdir -p $out/{client,docs}
cp -rv ${client}/* $out/client
cp -rv docs/* $out/docs
'';
}