# Do not use overrides in this file to add `meta.mainProgram` to packges. Use `./main-programs.nix` # instead. { pkgs, nodejs }: let inherit (pkgs) stdenv lib callPackage fetchFromGitHub fetchurl nixosTests; since = version: lib.versionAtLeast nodejs.version version; before = version: lib.versionOlder nodejs.version version; in final: prev: { "@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 ]; }; "@medable/mdctl-cli" = prev."@medable/mdctl-cli".override { nativeBuildInputs = with pkgs; with darwin.apple_sdk.frameworks; [ glib libsecret pkg-config ] ++ lib.optionals stdenv.isDarwin [ AppKit Security ]; buildInputs = [ final.node-gyp-build final.node-pre-gyp nodejs ]; }; mdctl-cli = final."@medable/mdctl-cli"; 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; }; }); balanceofsatoshis = prev.balanceofsatoshis.override { nativeBuildInputs = [ pkgs.installShellFiles ]; postInstall = '' installShellCompletion --cmd bos\ --bash <($out/bin/bos completion bash)\ --zsh <($out/bin/bos completion zsh)\ --fish <($out/bin/bos completion fish) ''; }; bitwarden-cli = prev."@bitwarden/cli".override { name = "bitwarden-cli"; }; 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 ''; }; carbon-now-cli = prev.carbon-now-cli.override { nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ]; prePatch = '' export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 ''; postInstall = '' wrapProgram $out/bin/carbon-now \ --set PUPPETEER_EXECUTABLE_PATH ${pkgs.chromium.outPath}/bin/chromium ''; }; coc-imselect = prev.coc-imselect.override (oldAttrs: { meta = oldAttrs.meta // { broken = since "10"; }; }); dat = prev.dat.override (oldAttrs: { buildInputs = [ final.node-gyp-build pkgs.libtool pkgs.autoconf pkgs.automake ]; meta = oldAttrs.meta // { broken = since "12"; }; }); deltachat-desktop = prev."deltachat-desktop-../../applications/networking/instant-messengers/deltachat-desktop".override (oldAttrs: { meta = oldAttrs.meta // { broken = true; }; # use the top-level package instead }); eask = prev."@emacs-eask/cli".override { name = "eask"; }; # NOTE: this is a stub package to fetch npm dependencies for # ../../applications/video/epgstation epgstation = prev."epgstation-../../applications/video/epgstation".override (oldAttrs: { buildInputs = [ final.node-pre-gyp final.node-gyp-build ]; meta = oldAttrs.meta // { platforms = lib.platforms.none; }; }); # NOTE: this is a stub package to fetch npm dependencies for # ../../applications/video/epgstation/client epgstation-client = prev."epgstation-client-../../applications/video/epgstation/client".override (oldAttrs: { meta = oldAttrs.meta // { platforms = lib.platforms.none; }; }); 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 ''; }; flood = prev.flood.override { buildInputs = [ final.node-pre-gyp ]; }; git-ssb = prev.git-ssb.override (oldAttrs: { buildInputs = [ final.node-gyp-build ]; meta = oldAttrs.meta // { broken = since "10"; }; }); 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 ]; buildInputs = with pkgs; [ # required by sharp # https://sharp.pixelplumbing.com/install vips libsecret final.node-gyp-build final.node-pre-gyp ] ++ 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 < $out/lib/node_modules/thelounge/.thelounge_home patch -d $out/lib/node_modules/thelounge -p1 < ${./thelounge-packages-path.patch} ''; passthru.tests = { inherit (nixosTests) thelounge; }; meta = oldAttrs.meta // { maintainers = with lib.maintainers; [ winter ]; }; }); thelounge-plugin-closepms = prev.thelounge-plugin-closepms.override { nativeBuildInputs = [ final.node-pre-gyp ]; }; thelounge-plugin-giphy = prev.thelounge-plugin-giphy.override { nativeBuildInputs = [ final.node-pre-gyp ]; }; thelounge-theme-flat-blue = prev.thelounge-theme-flat-blue.override { nativeBuildInputs = [ final.node-pre-gyp ]; }; thelounge-theme-flat-dark = prev.thelounge-theme-flat-dark.override { nativeBuildInputs = [ final.node-pre-gyp ]; }; triton = prev.triton.override { nativeBuildInputs = [ pkgs.installShellFiles ]; postInstall = '' installShellCompletion --cmd triton --bash <($out/bin/triton completion) ''; }; ts-node = prev.ts-node.override { nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ]; postInstall = '' wrapProgram "$out/bin/ts-node" \ --prefix NODE_PATH : ${final.typescript}/lib/node_modules ''; }; tsun = prev.tsun.override { nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ]; postInstall = '' wrapProgram "$out/bin/tsun" \ --prefix NODE_PATH : ${final.typescript}/lib/node_modules ''; }; typescript-language-server = prev.typescript-language-server.override { nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ]; postInstall = '' wrapProgram "$out/bin/typescript-language-server" \ --suffix PATH : ${lib.makeBinPath [ final.typescript ]} ''; }; uppy-companion = prev."@uppy/companion".override { name = "uppy-companion"; }; vega-cli = prev.vega-cli.override { nativeBuildInputs = [ pkgs.pkg-config ]; buildInputs = with pkgs; [ final.node-pre-gyp pixman cairo pango libjpeg ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreText ]; }; vega-lite = prev.vega-lite.override { postInstall = '' cd node_modules for dep in ${final.vega-cli}/lib/node_modules/vega-cli/node_modules/*; do if [[ ! -d ''${dep##*/} ]]; then ln -s "${final.vega-cli}/lib/node_modules/vega-cli/node_modules/''${dep##*/}" fi done ''; passthru.tests = { simple-execution = callPackage ./package-tests/vega-lite.nix { inherit (final) vega-lite; }; }; }; wavedrom-cli = prev.wavedrom-cli.override { nativeBuildInputs = [ pkgs.pkg-config final.node-pre-gyp ]; # These dependencies are required by # https://github.com/Automattic/node-canvas. buildInputs = with pkgs; [ pixman cairo pango ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreText ]; }; webtorrent-cli = prev.webtorrent-cli.override { buildInputs = [ final.node-gyp-build ]; }; wrangler = prev.wrangler.override (oldAttrs: { dontNpmInstall = true; nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ]; postInstall = '' makeWrapper "$out/lib/node_modules/wrangler/bin/wrangler.js" "$out/bin/wrangler" \ --inherit-argv0 ''; meta = oldAttrs.meta // { broken = before "16.13"; }; }); yaml-language-server = prev.yaml-language-server.override { nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ]; postInstall = '' wrapProgram "$out/bin/yaml-language-server" \ --prefix NODE_PATH : ${final.prettier}/lib/node_modules ''; }; }