# Do not use overrides in this file to add `meta.mainProgram` to packages. Use `./main-programs.nix` # instead. { pkgs, nodejs }: let inherit (pkgs) stdenv lib callPackage fetchFromGitHub fetchurl fetchpatch nixosTests; since = version: lib.versionAtLeast nodejs.version version; before = version: lib.versionOlder nodejs.version version; in final: prev: { inherit nodejs; "@angular/cli" = prev."@angular/cli".override { prePatch = '' export NG_CLI_ANALYTICS=false ''; }; "@electron-forge/cli" = prev."@electron-forge/cli".override { buildInputs = [ final.node-gyp-build ]; }; "@forge/cli" = prev."@forge/cli".override { nativeBuildInputs = [ pkgs.pkg-config ]; buildInputs = with pkgs; [ libsecret final.node-gyp-build final.node-pre-gyp ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.Security ]; }; autoprefixer = prev.autoprefixer.override { nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ]; postInstall = '' wrapProgram "$out/bin/autoprefixer" \ --prefix NODE_PATH : ${final.postcss}/lib/node_modules ''; passthru.tests = { simple-execution = callPackage ./package-tests/autoprefixer.nix { inherit (final) autoprefixer; }; }; }; 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 = '' for prog in bower2nix fetch-bower; do wrapProgram "$out/bin/$prog" --prefix PATH : ${lib.makeBinPath [ pkgs.git pkgs.nix ]} done ''; }; expo-cli = prev."expo-cli".override (oldAttrs: { # The traveling-fastlane-darwin optional dependency aborts build on Linux. dependencies = builtins.filter (d: d.packageName != "@expo/traveling-fastlane-${if stdenv.isLinux then "darwin" else "linux"}") oldAttrs.dependencies; }); fast-cli = prev.fast-cli.override { nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ]; prePatch = '' export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 ''; postInstall = '' wrapProgram $out/bin/fast \ --set PUPPETEER_EXECUTABLE_PATH ${pkgs.chromium.outPath}/bin/chromium ''; }; fauna-shell = prev.fauna-shell.override { # printReleaseNotes just pulls them from GitHub which is not allowed in sandbox preRebuild = '' sed -i 's|"node ./tools/printReleaseNotes"|"true"|' node_modules/faunadb/package.json ''; }; graphite-cli = prev."@withgraphite/graphite-cli".override { name = "graphite-cli"; nativeBuildInputs = with pkgs; [ installShellFiles pkg-config ]; buildInputs = with pkgs; [ cairo pango pixman ]; # 'gt completion' auto-detects zshell from environment variables: # https://github.com/yargs/yargs/blob/2b6ba3139396b2e623aed404293f467f16590039/lib/completion.ts#L45 postInstall = '' installShellCompletion --cmd gt \ --bash <($out/bin/gt completion) \ --zsh <(ZSH_NAME=zsh $out/bin/gt completion) ''; }; graphql-language-service-cli = prev.graphql-language-service-cli.override { nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ]; postInstall = '' wrapProgram "$out/bin/graphql-lsp" \ --prefix NODE_PATH : ${final.graphql}/lib/node_modules ''; }; hsd = prev.hsd.override { buildInputs = [ final.node-gyp-build pkgs.unbound ]; }; ijavascript = prev.ijavascript.override (oldAttrs: { preRebuild = '' export npm_config_zmq_external=true ''; buildInputs = oldAttrs.buildInputs ++ [ final.node-gyp-build pkgs.zeromq ]; }); insect = prev.insect.override (oldAttrs: { nativeBuildInputs = oldAttrs.nativeBuildInputs or [] ++ [ pkgs.psc-package final.pulp ]; }); intelephense = prev.intelephense.override (oldAttrs: { meta = oldAttrs.meta // { license = lib.licenses.unfree; }; }); joplin = prev.joplin.override { nativeBuildInputs = [ pkgs.pkg-config ] ++ lib.optionals stdenv.isDarwin [ pkgs.xcbuild ]; buildInputs = with pkgs; [ # required by sharp # https://sharp.pixelplumbing.com/install vips libsecret final.node-gyp-build final.node-pre-gyp pixman cairo pango ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.Security ]; }; jsonplaceholder = prev.jsonplaceholder.override { buildInputs = [ nodejs ]; postInstall = '' exe=$out/bin/jsonplaceholder mkdir -p $out/bin cat >$exe <