Merge pull request #259098 from dotlambda/vercel-pkg-fetchYarnDeps

vercel-pkg: use fetchYarnDeps

authored by

Robert Schütz and committed by
GitHub
369f974d f688137f

+77 -169
+76
pkgs/by-name/ve/vercel-pkg/package.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , fetchYarnDeps 5 + , makeWrapper 6 + , nodejs 7 + , prefetch-yarn-deps 8 + , yarn 9 + }: 10 + 11 + stdenv.mkDerivation rec { 12 + pname = "pkg"; 13 + version = "5.8.1"; 14 + 15 + src = fetchFromGitHub { 16 + owner = "vercel"; 17 + repo = "pkg"; 18 + rev = version; 19 + hash = "sha256-h3rHR3JE9hVcd3oiE7VL2daYXGTQo7NcOHGC6pmE/xs="; 20 + }; 21 + 22 + offlineCache = fetchYarnDeps { 23 + yarnLock = "${src}/yarn.lock"; 24 + hash = "sha256-KesP3X7LwZ7KSIxcCPXdn/sWcX9TJlwT9z/SdotS2ZQ="; 25 + }; 26 + 27 + nativeBuildInputs = [ 28 + makeWrapper 29 + nodejs 30 + prefetch-yarn-deps 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 prepare 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/pkg" 60 + cp -r . "$out/lib/node_modules/pkg" 61 + 62 + makeWrapper "${nodejs}/bin/node" "$out/bin/pkg" \ 63 + --add-flags "$out/lib/node_modules/pkg/lib-es5/bin.js" 64 + 65 + runHook postInstall 66 + ''; 67 + 68 + meta = { 69 + description = "Package your Node.js project into an executable"; 70 + homepage = "https://github.com/vercel/pkg"; 71 + license = lib.licenses.mit; 72 + mainProgram = "pkg"; 73 + maintainers = with lib.maintainers; [ cmcdragonkai ]; 74 + platforms = lib.platforms.all; 75 + }; 76 + }
+1
pkgs/development/node-packages/aliases.nix
··· 106 106 inherit (pkgs) npm-check-updates; # added 2023-08-22 107 107 ocaml-language-server = throw "ocaml-language-server was removed because it was abandoned upstream"; # added 2023-09-04 108 108 parcel-bundler = parcel; # added 2023-09-04 109 + pkg = pkgs.vercel-pkg; # added 2023-10-04 109 110 prettier_d_slim = pkgs.prettier-d-slim; # added 2023-09-14 110 111 inherit (pkgs) pxder; # added 2023-09-26 111 112 inherit (pkgs) quicktype; # added 2023-09-09
-1
pkgs/development/node-packages/node-packages.json
··· 188 188 , "peerflix" 189 189 , "peerflix-server" 190 190 , {"pgrok-build-deps": "../../tools/networking/pgrok/build-deps"} 191 - , "pkg" 192 191 , "pm2" 193 192 , "pnpm" 194 193 , "poor-mans-t-sql-formatter-cli"
-168
pkgs/development/node-packages/node-packages.nix
··· 90646 90646 bypassCache = true; 90647 90647 reconstructLock = true; 90648 90648 }; 90649 - pkg = nodeEnv.buildNodePackage { 90650 - name = "pkg"; 90651 - packageName = "pkg"; 90652 - version = "5.8.1"; 90653 - src = fetchurl { 90654 - url = "https://registry.npmjs.org/pkg/-/pkg-5.8.1.tgz"; 90655 - sha512 = "CjBWtFStCfIiT4Bde9QpJy0KeH19jCfwZRJqHFDFXfhUklCx8JoFmMj3wgnEYIwGmZVNkhsStPHEOnrtrQhEXA=="; 90656 - }; 90657 - dependencies = [ 90658 - sources."@babel/generator-7.18.2" 90659 - sources."@babel/helper-string-parser-7.22.5" 90660 - sources."@babel/helper-validator-identifier-7.22.20" 90661 - sources."@babel/parser-7.18.4" 90662 - sources."@babel/types-7.19.0" 90663 - sources."@jridgewell/gen-mapping-0.3.3" 90664 - sources."@jridgewell/resolve-uri-3.1.1" 90665 - sources."@jridgewell/set-array-1.1.2" 90666 - sources."@jridgewell/sourcemap-codec-1.4.15" 90667 - sources."@jridgewell/trace-mapping-0.3.19" 90668 - sources."@nodelib/fs.scandir-2.1.5" 90669 - sources."@nodelib/fs.stat-2.0.5" 90670 - sources."@nodelib/fs.walk-1.2.8" 90671 - sources."agent-base-6.0.2" 90672 - sources."ansi-regex-5.0.1" 90673 - sources."ansi-styles-4.3.0" 90674 - sources."array-union-2.1.0" 90675 - sources."at-least-node-1.0.0" 90676 - sources."base64-js-1.5.1" 90677 - (sources."bl-4.1.0" // { 90678 - dependencies = [ 90679 - sources."readable-stream-3.6.2" 90680 - ]; 90681 - }) 90682 - sources."braces-3.0.2" 90683 - sources."buffer-5.7.1" 90684 - sources."chalk-4.1.2" 90685 - sources."chownr-1.1.4" 90686 - sources."cliui-7.0.4" 90687 - sources."color-convert-2.0.1" 90688 - sources."color-name-1.1.4" 90689 - sources."core-util-is-1.0.3" 90690 - sources."debug-4.3.4" 90691 - sources."decompress-response-6.0.0" 90692 - sources."deep-extend-0.6.0" 90693 - sources."detect-libc-2.0.2" 90694 - sources."dir-glob-3.0.1" 90695 - sources."emoji-regex-8.0.0" 90696 - sources."encoding-0.1.13" 90697 - sources."end-of-stream-1.4.4" 90698 - sources."escalade-3.1.1" 90699 - sources."expand-template-2.0.3" 90700 - sources."fast-glob-3.3.1" 90701 - sources."fastq-1.15.0" 90702 - sources."fill-range-7.0.1" 90703 - sources."from2-2.3.0" 90704 - sources."fs-constants-1.0.0" 90705 - sources."fs-extra-9.1.0" 90706 - sources."function-bind-1.1.1" 90707 - sources."get-caller-file-2.0.5" 90708 - sources."github-from-package-0.0.0" 90709 - sources."glob-parent-5.1.2" 90710 - sources."globby-11.1.0" 90711 - sources."graceful-fs-4.2.11" 90712 - sources."growly-1.3.0" 90713 - sources."has-1.0.3" 90714 - sources."has-flag-4.0.0" 90715 - sources."https-proxy-agent-5.0.1" 90716 - sources."iconv-lite-0.6.3" 90717 - sources."ieee754-1.2.1" 90718 - sources."ignore-5.2.4" 90719 - sources."inherits-2.0.4" 90720 - sources."ini-1.3.8" 90721 - sources."into-stream-6.0.0" 90722 - sources."is-core-module-2.9.0" 90723 - sources."is-docker-2.2.1" 90724 - sources."is-extglob-2.1.1" 90725 - sources."is-fullwidth-code-point-3.0.0" 90726 - sources."is-glob-4.0.3" 90727 - sources."is-number-7.0.0" 90728 - sources."is-wsl-2.2.0" 90729 - sources."isarray-1.0.0" 90730 - sources."isexe-2.0.0" 90731 - sources."jsesc-2.5.2" 90732 - sources."jsonfile-6.1.0" 90733 - sources."lru-cache-6.0.0" 90734 - sources."merge2-1.4.1" 90735 - sources."micromatch-4.0.5" 90736 - sources."mimic-response-3.1.0" 90737 - sources."minimist-1.2.8" 90738 - sources."mkdirp-classic-0.5.3" 90739 - sources."ms-2.1.2" 90740 - (sources."multistream-4.1.0" // { 90741 - dependencies = [ 90742 - sources."readable-stream-3.6.2" 90743 - ]; 90744 - }) 90745 - sources."napi-build-utils-1.0.2" 90746 - sources."node-abi-3.47.0" 90747 - sources."node-fetch-2.7.0" 90748 - sources."node-notifier-10.0.1" 90749 - sources."once-1.4.0" 90750 - sources."p-is-promise-3.0.0" 90751 - sources."path-parse-1.0.7" 90752 - sources."path-type-4.0.0" 90753 - sources."picomatch-2.3.1" 90754 - sources."pkg-fetch-3.4.2" 90755 - sources."prebuild-install-7.1.1" 90756 - sources."process-nextick-args-2.0.1" 90757 - sources."progress-2.0.3" 90758 - sources."pump-3.0.0" 90759 - sources."queue-microtask-1.2.3" 90760 - sources."rc-1.2.8" 90761 - sources."readable-stream-2.3.8" 90762 - sources."require-directory-2.1.1" 90763 - (sources."resolve-1.22.6" // { 90764 - dependencies = [ 90765 - sources."is-core-module-2.13.0" 90766 - ]; 90767 - }) 90768 - sources."reusify-1.0.4" 90769 - sources."run-parallel-1.2.0" 90770 - sources."safe-buffer-5.1.2" 90771 - sources."safer-buffer-2.1.2" 90772 - sources."semver-7.5.4" 90773 - sources."shellwords-0.1.1" 90774 - sources."simple-concat-1.0.1" 90775 - sources."simple-get-4.0.1" 90776 - sources."slash-3.0.0" 90777 - sources."stream-meter-1.0.4" 90778 - sources."string-width-4.2.3" 90779 - sources."string_decoder-1.1.1" 90780 - sources."strip-ansi-6.0.1" 90781 - sources."strip-json-comments-2.0.1" 90782 - sources."supports-color-7.2.0" 90783 - sources."supports-preserve-symlinks-flag-1.0.0" 90784 - sources."tar-fs-2.1.1" 90785 - (sources."tar-stream-2.2.0" // { 90786 - dependencies = [ 90787 - sources."readable-stream-3.6.2" 90788 - ]; 90789 - }) 90790 - sources."to-fast-properties-2.0.0" 90791 - sources."to-regex-range-5.0.1" 90792 - sources."tr46-0.0.3" 90793 - sources."tunnel-agent-0.6.0" 90794 - sources."universalify-2.0.0" 90795 - sources."util-deprecate-1.0.2" 90796 - sources."uuid-8.3.2" 90797 - sources."webidl-conversions-3.0.1" 90798 - sources."whatwg-url-5.0.0" 90799 - sources."which-2.0.2" 90800 - sources."wrap-ansi-7.0.0" 90801 - sources."wrappy-1.0.2" 90802 - sources."y18n-5.0.8" 90803 - sources."yallist-4.0.0" 90804 - sources."yargs-16.2.0" 90805 - sources."yargs-parser-20.2.9" 90806 - ]; 90807 - buildInputs = globalBuildInputs; 90808 - meta = { 90809 - description = "Package your Node.js project into an executable"; 90810 - homepage = "https://github.com/vercel/pkg#readme"; 90811 - license = "MIT"; 90812 - }; 90813 - production = true; 90814 - bypassCache = true; 90815 - reconstructLock = true; 90816 - }; 90817 90649 pm2 = nodeEnv.buildNodePackage { 90818 90650 name = "pm2"; 90819 90651 packageName = "pm2";