-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconcurrently.nix
77 lines (65 loc) · 1.68 KB
/
concurrently.nix
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch2
, makeWrapper
, nodejs
, pnpm_8
,
}:
let
pnpm = pnpm_8;
in
stdenv.mkDerivation (finalAttrs: {
pname = "concurrently";
version = "8.2.2";
src = fetchFromGitHub {
owner = "open-cli-tools";
repo = "concurrently";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-VoyVYBOBMguFKnG2VItk1L5BbF72nO7bYJpb7adqICs=";
};
pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs)
pname
version
src
patches
;
hash = "sha256-F1teWIABkK0mqZcK3RdGNKmexI/C59QWSrrD1jYbHt0=";
};
patches = [
(fetchpatch2 {
name = "use-pnpm-8.patch";
url = "https://github.com/open-cli-tools/concurrently/commit/0b67a1a5a335396340f4347886fb9d0968a57555.patch";
hash = "sha256-mxid2Yl9S6+mpN7OLUCrJ1vS0bQ/UwNiGJ0DL6Zn//Q=";
})
];
nativeBuildInputs = [
makeWrapper
nodejs
pnpm.configHook
];
buildPhase = ''
runHook preBuild
pnpm build
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p "$out/bin" "$out/lib/concurrently"
cp -r dist node_modules "$out/lib/concurrently"
makeWrapper "${lib.getExe nodejs}" "$out/bin/concurrently" \
--add-flags "$out/lib/concurrently/dist/bin/concurrently.js"
ln -s "$out/bin/concurrently" "$out/bin/con"
runHook postInstall
'';
meta = {
changelog = "https://github.com/open-cli-tools/concurrently/releases/tag/v${finalAttrs.version}";
description = "Run commands concurrently";
homepage = "https://github.com/open-cli-tools/concurrently";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ jpetrucciani ];
mainProgram = "concurrently";
};
})