Commit aadaa919 authored by Robert Schütz's avatar Robert Schütz
Browse files

shepherd: use fetchYarnDeps

parent 1f0e8ac1
Loading
Loading
Loading
Loading
+77 −0
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, fetchYarnDeps
, makeWrapper
, nodejs
, prefetch-yarn-deps
, yarn
}:

stdenv.mkDerivation rec {
  pname = "shepherd";
  version = "1.16.0";

  src = fetchFromGitHub {
    owner = "NerdWalletOSS";
    repo = "shepherd";
    rev = "v${version}";
    hash = "sha256-LY8Vde4YpGuKnQ5UnSOpsQDY7AOyZRziUrfZb5dRiX4=";
  };

  offlineCache = fetchYarnDeps {
    yarnLock = "${src}/yarn.lock";
    hash = "sha256-tJXJ8ePr5ArAV+0JcuJsTo/B2PUcgsXfZrSDCpna/9k=";
  };

  nativeBuildInputs  = [
    makeWrapper
    nodejs
    prefetch-yarn-deps
    yarn
  ];

  configurePhase = ''
    runHook preConfigure

    export HOME=$(mktemp -d)
    yarn config --offline set yarn-offline-mirror "$offlineCache"
    fixup-yarn-lock yarn.lock
    yarn --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive install
    patchShebangs node_modules

    runHook postConfigure
  '';

  buildPhase = ''
    runHook preBuild

    yarn --offline build

    runHook postBuild
  '';

  installPhase = ''
    runHook preInstall

    yarn --offline --production install

    mkdir -p "$out/lib/node_modules/@nerdwallet/shepherd"
    cp -r . "$out/lib/node_modules/@nerdwallet/shepherd"

    makeWrapper "${nodejs}/bin/node" "$out/bin/shepherd" \
      --add-flags "$out/lib/node_modules/@nerdwallet/shepherd/lib/cli.js"

    runHook postInstall
  '';

  meta = {
    changelog = "https://github.com/NerdWalletOSS/shepherd/blob/${src.rev}/CHANGELOG.md";
    description = "A utility for applying code changes across many repositories";
    homepage = "https://github.com/NerdWalletOSS/shepherd";
    license = lib.licenses.asl20;
    mainProgram = "shepherd";
    maintainers = with lib.maintainers; [ dbirks ];
    platforms = lib.platforms.all;
  };
}
+1 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ mapAliases {
  "@google/clasp" = pkgs.google-clasp; # Added 2023-05-07
  "@maizzle/cli" = pkgs.maizzle; # added 2023-08-17
  "@medable/mdctl-cli" = throw "@medable/mdctl-cli was removed because it was broken"; # added 2023-08-21
  "@nerdwallet/shepherd" = pkgs.shepherd; # added 2023-09-30
  "@nestjs/cli" = pkgs.nest-cli; # Added 2023-05-06
  alloy = pkgs.titanium-alloy; # added 2023-08-17
  antennas = pkgs.antennas; # added 2023-07-30
+0 −1
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@
  "@commitlint/cli" = "commitlint";
  "@gitbeaker/cli" = "gitbeaker";
  "@mermaid-js/mermaid-cli" = "mmdc";
  "@nerdwallet/shepherd" = "shepherd";
  "@prisma/language-server" = "prisma-language-server";
  "@tailwindcss/language-server" = "tailwindcss-language-server";
  "@uppy/companion" = "companion";
+0 −1
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@
, "@commitlint/config-conventional"
, "@mermaid-js/mermaid-cli"
, "@microsoft/rush"
, "@nerdwallet/shepherd"
, "@shopify/cli"
, "@tailwindcss/aspect-ratio"
, "@tailwindcss/forms"
+0 −113
Original line number Diff line number Diff line
@@ -63686,119 +63686,6 @@ in
    bypassCache = true;
    reconstructLock = true;
  };
  "@nerdwallet/shepherd" = nodeEnv.buildNodePackage {
    name = "_at_nerdwallet_slash_shepherd";
    packageName = "@nerdwallet/shepherd";
    version = "1.16.0";
    src = fetchurl {
      url = "https://registry.npmjs.org/@nerdwallet/shepherd/-/shepherd-1.16.0.tgz";
      sha512 = "wNbAzVF3G4zjGkxATccYtiSgiWXseDRacra71ozH5JOUX4L3RRbd1iaqKRwILLKzcyxsvsOWbV47CSBRR6bK5g==";
    };
    dependencies = [
      sources."@hapi/hoek-9.3.0"
      sources."@hapi/topo-5.1.0"
      sources."@kwsites/file-exists-1.1.1"
      sources."@kwsites/promise-deferred-1.1.1"
      sources."@octokit/auth-token-2.5.0"
      sources."@octokit/core-3.6.0"
      sources."@octokit/endpoint-6.0.12"
      sources."@octokit/graphql-4.8.0"
      sources."@octokit/openapi-types-12.11.0"
      sources."@octokit/plugin-paginate-rest-2.21.3"
      sources."@octokit/plugin-request-log-1.0.4"
      sources."@octokit/plugin-rest-endpoint-methods-5.16.2"
      sources."@octokit/plugin-retry-3.0.9"
      sources."@octokit/plugin-throttling-3.7.0"
      sources."@octokit/request-5.6.3"
      sources."@octokit/request-error-2.1.0"
      sources."@octokit/rest-18.12.0"
      sources."@octokit/types-6.41.0"
      sources."@sideway/address-4.1.4"
      sources."@sideway/formula-3.0.1"
      sources."@sideway/pinpoint-2.0.0"
      sources."@types/js-yaml-3.12.8"
      sources."ansi-regex-5.0.1"
      sources."ansi-styles-4.3.0"
      sources."argparse-1.0.10"
      sources."at-least-node-1.0.0"
      sources."base64-js-1.5.1"
      sources."before-after-hook-2.2.3"
      sources."bl-4.1.0"
      sources."bottleneck-2.19.5"
      sources."buffer-5.7.1"
      sources."chalk-4.1.2"
      sources."child-process-promise-2.2.1"
      sources."cli-cursor-3.1.0"
      sources."cli-spinners-2.9.1"
      sources."clone-1.0.4"
      sources."color-convert-2.0.1"
      sources."color-name-1.1.4"
      sources."commander-6.2.1"
      sources."cross-spawn-4.0.2"
      sources."debug-4.3.4"
      sources."defaults-1.0.4"
      sources."deprecation-2.3.1"
      sources."encoding-0.1.13"
      sources."esprima-4.0.1"
      sources."fs-extra-9.1.0"
      sources."graceful-fs-4.2.11"
      sources."has-flag-4.0.0"
      sources."iconv-lite-0.6.3"
      sources."ieee754-1.2.1"
      sources."inherits-2.0.4"
      sources."is-interactive-1.0.0"
      sources."is-plain-object-5.0.0"
      sources."is-unicode-supported-0.1.0"
      sources."isexe-2.0.0"
      sources."joi-17.10.2"
      sources."js-yaml-3.14.1"
      sources."jsonfile-6.1.0"
      sources."lodash-4.17.21"
      sources."log-symbols-4.1.0"
      sources."lru-cache-4.1.5"
      sources."mimic-fn-2.1.0"
      sources."ms-2.1.2"
      sources."netrc-0.1.4"
      sources."node-fetch-2.7.0"
      sources."node-version-1.2.0"
      sources."once-1.4.0"
      sources."onetime-5.1.2"
      sources."ora-5.4.1"
      sources."preferences-2.0.2"
      sources."promise-polyfill-6.1.0"
      sources."pseudomap-1.0.2"
      sources."readable-stream-3.6.2"
      sources."restore-cursor-3.1.0"
      sources."safe-buffer-5.2.1"
      sources."safer-buffer-2.1.2"
      sources."signal-exit-3.0.7"
      sources."simple-git-2.48.0"
      sources."sprintf-js-1.0.3"
      sources."string_decoder-1.3.0"
      sources."strip-ansi-6.0.1"
      sources."supports-color-7.2.0"
      sources."tr46-0.0.3"
      sources."universal-user-agent-6.0.0"
      sources."universalify-2.0.0"
      sources."util-deprecate-1.0.2"
      sources."wcwidth-1.0.1"
      sources."webidl-conversions-3.0.1"
      sources."whatwg-url-5.0.0"
      sources."which-1.3.1"
      sources."wrappy-1.0.2"
      sources."yallist-2.1.2"
      sources."yaml-1.10.2"
    ];
    buildInputs = globalBuildInputs;
    meta = {
      description = "A utility for applying code changes across many repositories";
      homepage = "https://github.com/NerdWalletOSS/shepherd#readme";
      license = "Apache-2.0";
    };
    production = true;
    bypassCache = true;
    reconstructLock = true;
  };
  "@shopify/cli" = nodeEnv.buildNodePackage {
    name = "_at_shopify_slash_cli";
    packageName = "@shopify/cli";
Loading