tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
marp-cli: init at 3.2.0
Guillaume Desforges
2 years ago
189923f3
3e01b043
+78
2 changed files
expand all
collapse all
unified
split
pkgs
tools
typesetting
marp
default.nix
top-level
all-packages.nix
+76
pkgs/tools/typesetting/marp/default.nix
···
1
1
+
{ lib
2
2
+
, stdenv
3
3
+
, fetchFromGitHub
4
4
+
, fetchYarnDeps
5
5
+
, makeWrapper
6
6
+
, nodejs
7
7
+
, prefetch-yarn-deps
8
8
+
, yarn
9
9
+
}:
10
10
+
11
11
+
stdenv.mkDerivation (finalAttrs: {
12
12
+
pname = "marp-cli";
13
13
+
version = "3.2.0";
14
14
+
15
15
+
src = fetchFromGitHub {
16
16
+
owner = "marp-team";
17
17
+
repo = "marp-cli";
18
18
+
rev = "v${finalAttrs.version}";
19
19
+
hash = "sha256-bx5mq5KI85qUct/9Hr6mby6dWmRkmpVbiIw+M8PZas8=";
20
20
+
};
21
21
+
22
22
+
offlineCache = fetchYarnDeps {
23
23
+
yarnLock = "${finalAttrs.src}/yarn.lock";
24
24
+
hash = "sha256-BogCt7ezmWxv2YfhljHYoBf47/FHR0qLZosjnoQhqgs=";
25
25
+
};
26
26
+
27
27
+
nativeBuildInputs = [
28
28
+
makeWrapper
29
29
+
nodejs
30
30
+
prefetch-yarn-deps
31
31
+
yarn
32
32
+
];
33
33
+
34
34
+
configurePhase = ''
35
35
+
runHook preConfigure
36
36
+
37
37
+
export HOME=$(mktemp -d)
38
38
+
yarn config --offline set yarn-offline-mirror $offlineCache
39
39
+
fixup-yarn-lock yarn.lock
40
40
+
yarn --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive install
41
41
+
patchShebangs node_modules
42
42
+
43
43
+
runHook postConfigure
44
44
+
'';
45
45
+
46
46
+
buildPhase = ''
47
47
+
runHook preBuild
48
48
+
49
49
+
yarn --offline build
50
50
+
51
51
+
runHook postBuild
52
52
+
'';
53
53
+
54
54
+
installPhase = ''
55
55
+
runHook preInstall
56
56
+
57
57
+
yarn --offline --production install
58
58
+
59
59
+
mkdir -p $out/lib/node_modules/@marp-team/marp-cli
60
60
+
cp -r lib node_modules marp-cli.js $out/lib/node_modules/@marp-team/marp-cli/
61
61
+
62
62
+
makeWrapper "${nodejs}/bin/node" "$out/bin/marp" \
63
63
+
--add-flags "$out/lib/node_modules/@marp-team/marp-cli/marp-cli.js"
64
64
+
65
65
+
runHook postInstall
66
66
+
'';
67
67
+
68
68
+
meta = with lib; {
69
69
+
description = "About A CLI interface for Marp and Marpit based converters";
70
70
+
homepage = "https://github.com/marp-team/marp-cli";
71
71
+
license = licenses.mit;
72
72
+
maintainers = with maintainers; [ GuillaumeDesforges ];
73
73
+
platforms = nodejs.meta.platforms;
74
74
+
mainProgram = "marp";
75
75
+
};
76
76
+
})
+2
pkgs/top-level/all-packages.nix
···
5732
5732
5733
5733
marlin-calc = callPackage ../tools/misc/marlin-calc { };
5734
5734
5735
5735
+
marp-cli = callPackage ../tools/typesetting/marp { };
5736
5736
+
5735
5737
masscan = callPackage ../tools/security/masscan { };
5736
5738
5737
5739
massren = callPackage ../tools/misc/massren { };