11 stdenv.mkDerivation rec {
15 src = fetchFromGitHub {
19 hash = "sha256-h3rHR3JE9hVcd3oiE7VL2daYXGTQo7NcOHGC6pmE/xs=";
22 offlineCache = fetchYarnDeps {
23 yarnLock = "${src}/yarn.lock";
24 hash = "sha256-KesP3X7LwZ7KSIxcCPXdn/sWcX9TJlwT9z/SdotS2ZQ=";
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
49 yarn --offline prepare
57 yarn --offline --production install
59 mkdir -p "$out/lib/node_modules/pkg"
60 cp -r . "$out/lib/node_modules/pkg"
62 makeWrapper "${nodejs}/bin/node" "$out/bin/pkg" \
63 --add-flags "$out/lib/node_modules/pkg/lib-es5/bin.js"
69 description = "Package your Node.js project into an executable";
70 homepage = "https://github.com/vercel/pkg";
71 license = lib.licenses.mit;
73 maintainers = with lib.maintainers; [ cmcdragonkai ];
74 platforms = lib.platforms.all;