File tree Expand file tree Collapse file tree 1 file changed +15
-58
lines changed
Expand file tree Collapse file tree 1 file changed +15
-58
lines changed Original file line number Diff line number Diff line change 1- { lib
2- , stdenv
3- , fetchFromGitHub
4- , fetchYarnDeps
5- , makeWrapper
6- , nodejs
7- , fixup-yarn-lock
8- , yarn
1+ {
2+ lib ,
3+ buildNpmPackage ,
4+ fetchFromGitHub ,
5+ nodejs ,
96} :
107
11- stdenv . mkDerivation ( finalAttrs : {
8+ buildNpmPackage rec {
129 pname = "marp-cli" ;
13- version = "3. 4.0" ;
10+ version = "4.0.3 " ;
1411
1512 src = fetchFromGitHub {
1613 owner = "marp-team" ;
17- repo = "marp-cli" ;
18- rev = "v${ finalAttrs . version } " ;
19- hash = "sha256-azscuPkQ9/xcQtBg+5pJigXSQQVtBGvbd7ZwiLwU7Qo =" ;
14+ repo = pname ;
15+ rev = "v${ version } " ;
16+ hash = "sha256-HiLhFRQBCrDqMDX04gI7KolphA1ogTxdj1ehpL1D9e4 =" ;
2017 } ;
2118
22- offlineCache = fetchYarnDeps {
23- yarnLock = "${ finalAttrs . src } /yarn.lock" ;
24- hash = "sha256-b/JyhsfXEbmM6+ajrjL65WhX9u9MEH+m1NHE6cTyf2g=" ;
25- } ;
26-
27- nativeBuildInputs = [
28- makeWrapper
29- nodejs
30- fixup-yarn-lock
31- yarn
32- ] ;
33-
34- configurePhase = ''
35- runHook preConfigure
36-
37- export HOME=$(mktemp -d)
38- yarn config --offline set yarn-offline-mirror $offlineCache
39- fixup-yarn-lock yarn.lock
40- yarn --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive install
41- patchShebangs node_modules
42-
43- runHook postConfigure
44- '' ;
45-
46- buildPhase = ''
47- runHook preBuild
48-
49- yarn --offline build
50-
51- runHook postBuild
52- '' ;
53-
54- installPhase = ''
55- runHook preInstall
56-
57- yarn --offline --production install
58-
59- mkdir -p $out/lib/node_modules/@marp-team/marp-cli
60- cp -r lib node_modules marp-cli.js $out/lib/node_modules/@marp-team/marp-cli/
61-
62- makeWrapper "${ nodejs } /bin/node" "$out/bin/marp" \
63- --add-flags "$out/lib/node_modules/@marp-team/marp-cli/marp-cli.js"
19+ npmDepsHash = "sha256-8IN3MJBtq3Nu4T/WMcvg9QnckyigYhItBoGoSYOImTY=" ;
20+ npmPackFlags = [ "--ignore-scripts" ] ;
21+ makeCacheWritable = true ;
6422
65- runHook postInstall
66- '' ;
23+ doCheck = false ;
6724
6825 meta = with lib ; {
6926 description = "About A CLI interface for Marp and Marpit based converters" ;
@@ -73,4 +30,4 @@ stdenv.mkDerivation (finalAttrs: {
7330 platforms = nodejs . meta . platforms ;
7431 mainProgram = "marp" ;
7532 } ;
76- } )
33+ }
You can’t perform that action at this time.
0 commit comments