Unverified Commit 7ea24a0f authored by Robert Schütz's avatar Robert Schütz Committed by GitHub
Browse files

Merge pull request #258262 from dotlambda/aws-azure-login-fetchYarnDeps

aws-azure-login: use fetchYarnDeps
parents 4047ba29 9c3b9200
Loading
Loading
Loading
Loading
+76 −0
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, fetchYarnDeps
, makeWrapper
, nodejs
, prefetch-yarn-deps
, yarn
}:

stdenv.mkDerivation rec {
  pname = "aws-azure-login";
  version = "3.6.1";

  src = fetchFromGitHub {
    owner = "aws-azure-login";
    repo = "aws-azure-login";
    rev = "v${version}";
    hash = "sha256-PvPnqaKD98h3dCjEOwF+Uc86xCJzn2b9XNHHn13h/2Y=";
  };

  offlineCache = fetchYarnDeps {
    yarnLock = "${src}/yarn.lock";
    hash = "sha256-SXQPRzF6b1FJl5HkyXNm3kGoNSDXux+0RYXBX93mOts=";
  };

  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/aws-azure-login"
    cp -r . "$out/lib/node_modules/aws-azure-login"

    makeWrapper "${nodejs}/bin/node" "$out/bin/aws-azure-login" \
      --add-flags "$out/lib/node_modules/aws-azure-login/lib/index.js"

    runHook postInstall
  '';

  meta = {
    description = "Use Azure AD SSO to log into the AWS via CLI";
    homepage = "https://github.com/aws-azure-login/aws-azure-login";
    license = lib.licenses.mit;
    mainProgram = "aws-azure-login";
    maintainers = with lib.maintainers; [ yurrriq ];
    platforms = lib.platforms.all;
  };
}
+1 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ mapAliases {
  alloy = pkgs.titanium-alloy; # added 2023-08-17
  antennas = pkgs.antennas; # added 2023-07-30
  inherit (pkgs) asar; # added 2023-08-26
  inherit (pkgs) aws-azure-login; # added 2023-09-30
  balanceofsatoshis = pkgs.balanceofsatoshis; # added 2023-07-31
  bibtex-tidy = pkgs.bibtex-tidy; # added 2023-07-30
  bitwarden-cli = pkgs.bitwarden-cli; # added 2023-07-25
+0 −1
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@
, "audiosprite"
, "autoprefixer"
, "auto-changelog"
, "aws-azure-login"
, "aws-cdk"
, "awesome-lint"
, "bash-language-server"
+0 −242
Original line number Diff line number Diff line
@@ -67649,248 +67649,6 @@ in
    bypassCache = true;
    reconstructLock = true;
  };
  aws-azure-login = nodeEnv.buildNodePackage {
    name = "aws-azure-login";
    packageName = "aws-azure-login";
    version = "3.6.1";
    src = fetchurl {
      url = "https://registry.npmjs.org/aws-azure-login/-/aws-azure-login-3.6.1.tgz";
      sha512 = "wIUVyYY5XNksGeRJZjDKW6kQ17lUzCMsfKh2o9O8kYjfxvNF7DA+6iWX8m4eq8eVMjnEFIzxoq5yWLn4qFYcGg==";
    };
    dependencies = [
      sources."@tootallnate/once-1.1.2"
      sources."@types/node-20.6.5"
      sources."@types/yauzl-2.10.1"
      sources."acorn-8.10.0"
      sources."acorn-walk-8.2.0"
      sources."agent-base-6.0.2"
      sources."ansi-escapes-4.3.2"
      sources."ansi-regex-5.0.1"
      sources."ansi-styles-4.3.0"
      sources."ast-types-0.13.4"
      sources."available-typed-arrays-1.0.5"
      (sources."aws-sdk-2.1463.0" // {
        dependencies = [
          sources."uuid-8.0.0"
        ];
      })
      sources."balanced-match-1.0.2"
      sources."base64-js-1.5.1"
      (sources."bl-4.1.0" // {
        dependencies = [
          sources."buffer-5.7.1"
        ];
      })
      sources."bluebird-3.7.2"
      sources."boolbase-1.0.0"
      sources."brace-expansion-1.1.11"
      sources."buffer-4.9.2"
      sources."buffer-crc32-0.2.13"
      sources."bufferutil-4.0.7"
      sources."bytes-3.1.2"
      sources."call-bind-1.0.2"
      sources."chalk-4.1.2"
      sources."chardet-0.7.0"
      sources."cheerio-1.0.0-rc.12"
      sources."cheerio-select-2.1.0"
      sources."chownr-1.1.4"
      sources."cli-cursor-3.1.0"
      sources."cli-spinners-2.9.1"
      sources."cli-width-3.0.0"
      sources."clone-1.0.4"
      sources."color-convert-2.0.1"
      sources."color-name-1.1.4"
      sources."commander-9.5.0"
      sources."concat-map-0.0.1"
      sources."core-util-is-1.0.3"
      sources."cross-fetch-3.1.5"
      sources."css-select-5.1.0"
      sources."css-what-6.1.0"
      sources."data-uri-to-buffer-3.0.1"
      sources."debug-4.3.4"
      sources."deep-is-0.1.4"
      sources."defaults-1.0.4"
      sources."degenerator-3.0.4"
      sources."depd-2.0.0"
      sources."devtools-protocol-0.0.981744"
      sources."dom-serializer-2.0.0"
      sources."domelementtype-2.3.0"
      sources."domhandler-5.0.3"
      sources."domutils-3.1.0"
      sources."emoji-regex-8.0.0"
      (sources."encoding-0.1.13" // {
        dependencies = [
          sources."iconv-lite-0.6.3"
        ];
      })
      sources."end-of-stream-1.4.4"
      sources."entities-4.5.0"
      sources."escape-string-regexp-1.0.5"
      sources."escodegen-1.14.3"
      sources."esprima-4.0.1"
      sources."estraverse-4.3.0"
      sources."esutils-2.0.3"
      sources."events-1.1.1"
      sources."external-editor-3.1.0"
      sources."extract-zip-2.0.1"
      sources."fast-levenshtein-2.0.6"
      sources."fd-slicer-1.1.0"
      sources."figures-3.2.0"
      sources."file-uri-to-path-2.0.0"
      sources."find-up-4.1.0"
      sources."for-each-0.3.3"
      sources."fs-constants-1.0.0"
      sources."fs-extra-8.1.0"
      sources."fs.realpath-1.0.0"
      (sources."ftp-0.3.10" // {
        dependencies = [
          sources."isarray-0.0.1"
          sources."readable-stream-1.1.14"
          sources."string_decoder-0.10.31"
        ];
      })
      sources."function-bind-1.1.1"
      sources."get-intrinsic-1.2.1"
      sources."get-stream-5.2.0"
      sources."get-uri-3.0.2"
      sources."glob-7.2.3"
      sources."gopd-1.0.1"
      sources."graceful-fs-4.2.11"
      sources."has-1.0.3"
      sources."has-flag-4.0.0"
      sources."has-proto-1.0.1"
      sources."has-symbols-1.0.3"
      sources."has-tostringtag-1.0.0"
      sources."htmlparser2-8.0.2"
      sources."http-errors-2.0.0"
      sources."http-proxy-agent-4.0.1"
      sources."https-proxy-agent-5.0.1"
      sources."iconv-lite-0.4.24"
      sources."ieee754-1.1.13"
      sources."inflight-1.0.6"
      sources."inherits-2.0.4"
      sources."ini-3.0.1"
      sources."inquirer-8.2.6"
      sources."ip-1.1.8"
      sources."is-arguments-1.1.1"
      sources."is-callable-1.2.7"
      sources."is-fullwidth-code-point-3.0.0"
      sources."is-generator-function-1.0.10"
      sources."is-interactive-1.0.0"
      sources."is-typed-array-1.1.12"
      sources."is-unicode-supported-0.1.0"
      sources."isarray-1.0.0"
      sources."jmespath-0.16.0"
      sources."jsonfile-4.0.0"
      sources."levn-0.3.0"
      sources."locate-path-5.0.0"
      sources."lodash-4.17.21"
      sources."log-symbols-4.1.0"
      sources."lru-cache-5.1.1"
      sources."mimic-fn-2.1.0"
      sources."minimatch-3.1.2"
      sources."mkdirp-1.0.4"
      sources."mkdirp-classic-0.5.3"
      sources."ms-2.1.2"
      sources."mute-stream-0.0.8"
      sources."netmask-2.0.2"
      sources."node-fetch-2.6.7"
      sources."node-gyp-build-4.6.1"
      sources."nth-check-2.1.1"
      sources."once-1.4.0"
      sources."onetime-5.1.2"
      sources."optionator-0.8.3"
      sources."ora-5.4.1"
      sources."os-tmpdir-1.0.2"
      sources."p-limit-2.3.0"
      sources."p-locate-4.1.0"
      sources."p-try-2.2.0"
      sources."pac-proxy-agent-5.0.0"
      sources."pac-resolver-5.0.1"
      sources."parse5-7.1.2"
      sources."parse5-htmlparser2-tree-adapter-7.0.0"
      sources."path-exists-4.0.0"
      sources."path-is-absolute-1.0.1"
      sources."pend-1.2.0"
      sources."pkg-dir-4.2.0"
      sources."prelude-ls-1.1.2"
      sources."progress-2.0.3"
      sources."proxy-agent-5.0.0"
      sources."proxy-from-env-1.1.0"
      sources."pump-3.0.0"
      sources."punycode-1.3.2"
      sources."puppeteer-13.7.0"
      sources."querystring-0.2.0"
      sources."raw-body-2.5.2"
      sources."readable-stream-3.6.2"
      sources."restore-cursor-3.1.0"
      sources."rimraf-3.0.2"
      sources."run-async-2.4.1"
      sources."rxjs-7.8.1"
      sources."safe-buffer-5.2.1"
      sources."safer-buffer-2.1.2"
      sources."sax-1.2.1"
      sources."setprototypeof-1.2.0"
      sources."signal-exit-3.0.7"
      sources."smart-buffer-4.2.0"
      (sources."socks-2.7.1" // {
        dependencies = [
          sources."ip-2.0.0"
        ];
      })
      sources."socks-proxy-agent-5.0.1"
      sources."source-map-0.6.1"
      sources."statuses-2.0.1"
      sources."string-width-4.2.3"
      sources."string_decoder-1.3.0"
      sources."strip-ansi-6.0.1"
      sources."supports-color-7.2.0"
      sources."tar-fs-2.1.1"
      sources."tar-stream-2.2.0"
      sources."through-2.3.8"
      sources."tmp-0.0.33"
      sources."toidentifier-1.0.1"
      sources."tr46-0.0.3"
      sources."tslib-2.6.2"
      sources."type-check-0.3.2"
      sources."type-fest-0.21.3"
      (sources."unbzip2-stream-1.4.3" // {
        dependencies = [
          sources."buffer-5.7.1"
        ];
      })
      sources."universalify-0.1.2"
      sources."unpipe-1.0.0"
      sources."url-0.10.3"
      sources."utf-8-validate-5.0.10"
      sources."util-0.12.5"
      sources."util-deprecate-1.0.2"
      sources."uuid-8.3.2"
      sources."vm2-3.9.19"
      sources."wcwidth-1.0.1"
      sources."webidl-conversions-3.0.1"
      sources."whatwg-url-5.0.0"
      sources."which-typed-array-1.1.11"
      sources."word-wrap-1.2.5"
      sources."wrap-ansi-6.2.0"
      sources."wrappy-1.0.2"
      sources."ws-8.5.0"
      sources."xml2js-0.5.0"
      sources."xmlbuilder-11.0.1"
      sources."xregexp-2.0.0"
      sources."yallist-3.1.1"
      sources."yauzl-2.10.0"
    ];
    buildInputs = globalBuildInputs;
    meta = {
      description = "Use Azure AD SSO to log into the AWS CLI.";
      homepage = "https://github.com/aws-azure-login/aws-azure-login#readme";
      license = "MIT";
    };
    production = true;
    bypassCache = true;
    reconstructLock = true;
  };
  aws-cdk = nodeEnv.buildNodePackage {
    name = "aws-cdk";
    packageName = "aws-cdk";
+0 −12
Original line number Diff line number Diff line
@@ -40,18 +40,6 @@ final: prev: {
    };
  };

  aws-azure-login = prev.aws-azure-login.override (oldAttrs: {
    nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ];
    prePatch = ''
      export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1
    '';
    postInstall = ''
      wrapProgram $out/bin/aws-azure-login \
          --set PUPPETEER_EXECUTABLE_PATH ${pkgs.chromium}/bin/chromium
    '';
    meta = oldAttrs.meta // { platforms = lib.platforms.linux; };
  });

  bower2nix = prev.bower2nix.override {
    nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ];
    postInstall = ''