diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md index 5c281d6d8600..9cd80b938542 100644 --- a/doc/languages-frameworks/python.section.md +++ b/doc/languages-frameworks/python.section.md @@ -411,7 +411,7 @@ with import {}; version = "0.10.0"; format = "setuptools"; - src = python311.pkgs.fetchPypi { + src = fetchPypi { inherit pname version; hash = "sha256-CP3V73yWSArRHBLUct4hrNMjWZlvaaUlkpm1QP66RWA="; }; @@ -1229,7 +1229,7 @@ with import {}; packageOverrides = self: super: { pandas = super.pandas.overridePythonAttrs(old: rec { version = "0.19.1"; - src = super.fetchPypi { + src = fetchPypi { pname = "pandas"; inherit version; hash = "sha256-JQn+rtpy/OA2deLszSKEuxyttqBzcAil50H+JDHUdCE="; @@ -1286,6 +1286,7 @@ specifying an interpreter version), like this: ```nix { lib , python3 +, fetchPypi }: python3.pkgs.buildPythonApplication rec { @@ -1293,7 +1294,7 @@ python3.pkgs.buildPythonApplication rec { version = "2.7.9"; format = "setuptools"; - src = python3.pkgs.fetchPypi { + src = fetchPypi { inherit pname version; hash = "sha256-Pe229rT0aHwA98s+nTHQMEFKZPo/yw6sot8MivFDvAw="; }; diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 98b75f8867ea..f639dc7ab21f 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4609,6 +4609,12 @@ githubId = 18535642; name = "Emily"; }; + emilylange = { + email = "nix@emilylange.de"; + github = "emilylange"; + githubId = 55066419; + name = "Emily Lange"; + }; emilytrau = { name = "Emily Trau"; email = "nix@angus.ws"; @@ -6775,12 +6781,6 @@ githubId = 36667224; name = "Yingchi Long"; }; - indeednotjames = { - email = "nix@indeednotjames.com"; - github = "IndeedNotJames"; - githubId = 55066419; - name = "Emily Lange"; - }; indexyz = { email = "indexyz@pm.me"; github = "5aaee9"; @@ -7942,6 +7942,12 @@ githubId = 1792886; name = "Julien Malka"; }; + juliusrickert = { + email = "nixpkgs@juliusrickert.de"; + github = "juliusrickert"; + githubId = 5007494; + name = "Julius Rickert"; + }; julm = { email = "julm+nixpkgs@sourcephile.fr"; github = "ju1m"; diff --git a/nixos/doc/manual/release-notes/rl-2305.section.md b/nixos/doc/manual/release-notes/rl-2305.section.md index 4fd7d455df08..ca4e5dca4605 100644 --- a/nixos/doc/manual/release-notes/rl-2305.section.md +++ b/nixos/doc/manual/release-notes/rl-2305.section.md @@ -563,6 +563,8 @@ In addition to numerous new and upgraded packages, this release has the followin - `make-disk-image` handles `contents` arguments that are directories better, fixing a bug where it used to put them in a subdirectory of the intended `target`. +- The option `services.jitsi-videobridge.apis` has been renamed to `colibriRestApi` and turned into a boolean. Setting it to `true` will enable the private rest API, useful for monitoring using `services.prometheus.exporters.jitsi.enable`. Learn more about the API: "[The COLIBRI control interface (/colibri/)](https://github.com/jitsi/jitsi-videobridge/blob/v2.3/doc/rest.md)". + ## Detailed migration information {#sec-release-23.05-migration} ### Pipewire configuration overrides {#sec-release-23.05-migration-pipewire} diff --git a/nixos/modules/services/network-filesystems/kubo.nix b/nixos/modules/services/network-filesystems/kubo.nix index 2537bb1b8d80..a5c370b5be89 100644 --- a/nixos/modules/services/network-filesystems/kubo.nix +++ b/nixos/modules/services/network-filesystems/kubo.nix @@ -172,8 +172,8 @@ in emptyRepo = mkOption { type = types.bool; - default = false; - description = lib.mdDoc "If set to true, the repo won't be initialized with help files"; + default = true; + description = lib.mdDoc "If set to false, the repo will be initialized with help files"; }; settings = mkOption { @@ -331,7 +331,7 @@ in preStart = '' if [[ ! -f "$IPFS_PATH/config" ]]; then - ipfs init ${optionalString cfg.emptyRepo "-e"} + ipfs init --empty-repo=${lib.boolToString cfg.emptyRepo} else # After an unclean shutdown this file may exist which will cause the config command to attempt to talk to the daemon. This will hang forever if systemd is holding our sockets open. rm -vf "$IPFS_PATH/api" diff --git a/nixos/modules/services/networking/jitsi-videobridge.nix b/nixos/modules/services/networking/jitsi-videobridge.nix index 09f2ddf92c5c..37b0b1e5bf50 100644 --- a/nixos/modules/services/networking/jitsi-videobridge.nix +++ b/nixos/modules/services/networking/jitsi-videobridge.nix @@ -43,6 +43,7 @@ let muc_nickname = xmppConfig.mucNickname; disable_certificate_verification = xmppConfig.disableCertificateVerification; }); + apis.rest.enabled = cfg.colibriRestApi; }; }; @@ -50,6 +51,11 @@ let jvbConfig = recursiveUpdate defaultJvbConfig cfg.config; in { + imports = [ + (mkRemovedOptionModule [ "services" "jitsi-videobridge" "apis" ] + "services.jitsi-videobridge.apis was broken and has been migrated into the boolean option services.jitsi-videobridge.colibriRestApi. It is set to false by default, setting it to true will correctly enable the private /colibri rest API." + ) + ]; options.services.jitsi-videobridge = with types; { enable = mkEnableOption (lib.mdDoc "Jitsi Videobridge, a WebRTC compatible video router"); @@ -192,14 +198,13 @@ in ''; }; - apis = mkOption { - type = with types; listOf str; + colibriRestApi = mkOption { + type = bool; description = lib.mdDoc '' - What is passed as --apis= parameter. If this is empty, "none" is passed. - Needed for monitoring jitsi. + Whether to enable the private rest API for the COLIBRI control interface. + Needed for monitoring jitsi, enabling scraping of the /colibri/stats endpoint. ''; - default = []; - example = literalExpression "[ \"colibri\" \"rest\" ]"; + default = false; }; }; @@ -233,7 +238,7 @@ in "export ${toVarName name}=$(cat ${xmppConfig.passwordFile})\n" ) cfg.xmppConfigs)) + '' - ${pkgs.jitsi-videobridge}/bin/jitsi-videobridge --apis=${if (cfg.apis == []) then "none" else concatStringsSep "," cfg.apis} + ${pkgs.jitsi-videobridge}/bin/jitsi-videobridge ''; serviceConfig = { diff --git a/nixos/modules/services/security/vault-agent.nix b/nixos/modules/services/security/vault-agent.nix index 244004f7c913..17b8ff83592e 100644 --- a/nixos/modules/services/security/vault-agent.nix +++ b/nixos/modules/services/security/vault-agent.nix @@ -123,6 +123,6 @@ in }) [ "consul-template" "vault-agent" ]); - meta.maintainers = with maintainers; [ indeednotjames tcheronneau ]; + meta.maintainers = with maintainers; [ emilylange tcheronneau ]; } diff --git a/nixos/modules/services/video/epgstation/default.nix b/nixos/modules/services/video/epgstation/default.nix index 3d1d7a27c216..a395294ec142 100644 --- a/nixos/modules/services/video/epgstation/default.nix +++ b/nixos/modules/services/video/epgstation/default.nix @@ -264,6 +264,9 @@ in description = "EPGStation user"; group = config.users.groups.epgstation.name; isSystemUser = true; + + # NPM insists on creating ~/.npm + home = "/var/cache/epgstation"; }; users.groups.epgstation = { }; @@ -318,11 +321,14 @@ in ++ lib.optional config.services.mirakurun.enable "mirakurun.service" ++ lib.optional config.services.mysql.enable "mysql.service"; + environment.NODE_ENV = "production"; + serviceConfig = { ExecStart = "${cfg.package}/bin/epgstation start"; ExecStartPre = "+${preStartScript}"; User = username; Group = groupname; + CacheDirectory = "epgstation"; StateDirectory = "epgstation"; LogsDirectory = "epgstation"; ConfigurationDirectory = "epgstation"; diff --git a/nixos/tests/gitea.nix b/nixos/tests/gitea.nix index 4e6f9c79a6f9..2285bb5a4252 100644 --- a/nixos/tests/gitea.nix +++ b/nixos/tests/gitea.nix @@ -26,7 +26,7 @@ let supportedDbTypes = [ "mysql" "postgres" "sqlite3" ]; makeGiteaTest = type: nameValuePair type (makeTest { name = "${giteaPackage.pname}-${type}"; - meta.maintainers = with maintainers; [ aanderse indeednotjames kolaente ma27 ]; + meta.maintainers = with maintainers; [ aanderse emilylange kolaente ma27 ]; nodes = { server = { config, pkgs, ... }: { diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix index bb87f1a3df9b..1e5a974933c6 100644 --- a/nixos/tests/prometheus-exporters.nix +++ b/nixos/tests/prometheus-exporters.nix @@ -328,7 +328,7 @@ let systemd.services.prometheus-jitsi-exporter.after = [ "jitsi-videobridge2.service" ]; services.jitsi-videobridge = { enable = true; - apis = [ "colibri" "rest" ]; + colibriRestApi = true; }; }; exporterTest = '' @@ -1198,13 +1198,15 @@ let wait_for_unit("prometheus-statsd-exporter.service") wait_for_open_port(9102) succeed("curl http://localhost:9102/metrics | grep 'statsd_exporter_build_info{'") - succeed( - "echo 'test.udp:1|c' > /dev/udp/localhost/9125", - "curl http://localhost:9102/metrics | grep 'test_udp 1'", + wait_until_succeeds( + "echo 'test.udp:1|c' > /dev/udp/localhost/9125 && \ + curl http://localhost:9102/metrics | grep 'test_udp 1'", + timeout=10 ) - succeed( - "echo 'test.tcp:1|c' > /dev/tcp/localhost/9125", - "curl http://localhost:9102/metrics | grep 'test_tcp 1'", + wait_until_succeeds( + "echo 'test.tcp:1|c' > /dev/tcp/localhost/9125 && \ + curl http://localhost:9102/metrics | grep 'test_tcp 1'", + timeout=10 ) ''; }; diff --git a/pkgs/applications/blockchains/ton/default.nix b/pkgs/applications/blockchains/ton/default.nix index d181493f7b32..8978eb860417 100644 --- a/pkgs/applications/blockchains/ton/default.nix +++ b/pkgs/applications/blockchains/ton/default.nix @@ -13,13 +13,13 @@ stdenv.mkDerivation rec { pname = "ton"; - version = "2023.04"; + version = "2023.05"; src = fetchFromGitHub { owner = "ton-blockchain"; repo = "ton"; rev = "v${version}"; - sha256 = "sha256-3HQF0wKk0iRV5fKzuCTv7X7MC+snMDrodgqScCZQVY4="; + sha256 = "sha256-EuFKoqOzKoaBCiVAsb8K053kAL4bw1WqmmybVJX2Fmo="; fetchSubmodules = true; }; diff --git a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/color-theme-solarized/default.nix b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/color-theme-solarized/default.nix index 1ac8b2f70768..07322879b5be 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/color-theme-solarized/default.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/color-theme-solarized/default.nix @@ -1,7 +1,6 @@ { lib , trivialBuild , fetchFromGitHub -, emacs , color-theme }: @@ -16,23 +15,12 @@ trivialBuild { hash = "sha256-oxX0lo6sxotEiR3nPrKPE9H01HKB3ohB/p8eEHFTp5k="; }; - buildInputs = [ emacs ]; - propagatedUserEnvPkgs = [ color-theme ]; - - buildPhase = '' - runHook preBuild - - emacs -L . -L ${color-theme}/share/emacs/site-lisp/elpa/color-theme-* \ - --batch -f batch-byte-compile *.el - - runHook postBuild - ''; + packageRequires = [ color-theme ]; meta = with lib; { homepage = "http://ethanschoonover.com/solarized"; description = "Precision colors for machines and people; Emacs implementation"; license = licenses.mit; maintainers = with maintainers; [ samuelrivas AndersonTorres ]; - inherit (emacs.meta) platforms; }; } diff --git a/pkgs/applications/misc/system76-keyboard-configurator/default.nix b/pkgs/applications/misc/system76-keyboard-configurator/default.nix index 8662032fbe7a..1cec644ba92b 100644 --- a/pkgs/applications/misc/system76-keyboard-configurator/default.nix +++ b/pkgs/applications/misc/system76-keyboard-configurator/default.nix @@ -6,13 +6,13 @@ rustPlatform.buildRustPackage rec { pname = "system76-keyboard-configurator"; - version = "1.3.1"; + version = "1.3.2"; src = fetchFromGitHub { owner = "pop-os"; repo = "keyboard-configurator"; rev = "v${version}"; - sha256 = "sha256-k9VmEg/HZECUwHaD491ZmfGUxZ14hLOaJD5x3zMK2jI="; + sha256 = "sha256-21cn43qyKg8jL6FF8D9H7dgcgSKggqaxb4cJVc0ljl0="; }; nativeBuildInputs = [ @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { udev ]; - cargoHash = "sha256-0SFph9quh4QWR3nU5IJr4FyLGqrYvmHcZHDRli6phsc="; + cargoHash = "sha256-9VjrDE/1VAgNrRmSYxCYKPrnilPQF+OXAYpFkF2lpAE="; meta = with lib; { description = "Keyboard configuration application for System76 keyboards and laptops"; diff --git a/pkgs/applications/networking/kubo/default.nix b/pkgs/applications/networking/kubo/default.nix index e4b86636322f..2c270199f127 100644 --- a/pkgs/applications/networking/kubo/default.nix +++ b/pkgs/applications/networking/kubo/default.nix @@ -2,7 +2,7 @@ buildGoModule rec { pname = "kubo"; - version = "0.19.2"; # When updating, also check if the repo version changed and adjust repoVersion below + version = "0.20.0"; # When updating, also check if the repo version changed and adjust repoVersion below rev = "v${version}"; passthru.repoVersion = "13"; # Also update kubo-migrator when changing the repo version @@ -10,7 +10,7 @@ buildGoModule rec { # Kubo makes changes to it's source tarball that don't match the git source. src = fetchurl { url = "https://github.com/ipfs/kubo/releases/download/${rev}/kubo-source.tar.gz"; - hash = "sha256-HPhlKAavINaN0SJHWmeJRx43jfeHeYDZb3/dZ55kMLI="; + hash = "sha256-3Oj/x3EkceNO8/Ik7+U43wi1aL0lYJi1FA0AjtdJRDI="; }; # tarball contains multiple files/directories diff --git a/pkgs/applications/terminal-emulators/wezterm/default.nix b/pkgs/applications/terminal-emulators/wezterm/default.nix index 26c35d50d214..9743197d8323 100644 --- a/pkgs/applications/terminal-emulators/wezterm/default.nix +++ b/pkgs/applications/terminal-emulators/wezterm/default.nix @@ -22,6 +22,7 @@ , CoreGraphics , Cocoa , Foundation +, System , libiconv , UserNotifications , nixosTests @@ -81,11 +82,14 @@ rustPlatform.buildRustPackage rec { CoreGraphics Foundation libiconv + System UserNotifications ]; buildFeatures = [ "distro-defaults" ]; + env.NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework System"; + postInstall = '' mkdir -p $out/nix-support echo "${passthru.terminfo}" >> $out/nix-support/propagated-user-env-packages diff --git a/pkgs/applications/version-management/forgejo/default.nix b/pkgs/applications/version-management/forgejo/default.nix index e88f04dc2083..d21097df07b1 100644 --- a/pkgs/applications/version-management/forgejo/default.nix +++ b/pkgs/applications/version-management/forgejo/default.nix @@ -116,7 +116,7 @@ buildGoModule rec { homepage = "https://forgejo.org"; changelog = "https://codeberg.org/forgejo/forgejo/releases/tag/v${version}"; license = licenses.mit; - maintainers = with maintainers; [ indeednotjames urandom ]; + maintainers = with maintainers; [ emilylange urandom ]; broken = stdenv.isDarwin; mainProgram = "gitea"; }; diff --git a/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile b/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile index 25fbc65d271c..b0826a2482e5 100644 --- a/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile +++ b/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile @@ -19,7 +19,7 @@ gem 'bootsnap', '~> 1.16.0', require: false # Pin openssl to match the version bundled with our supported Rubies. # See https://stdgems.org/openssl/#gem-version. -gem 'openssl', '2.2.2' +gem 'openssl', '3.0.2' gem 'ipaddr', '~> 1.2.5' # Responders respond_to and respond_with diff --git a/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile.lock b/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile.lock index cbc11b360a2d..0b14f9032d1f 100644 --- a/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile.lock +++ b/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile.lock @@ -1093,8 +1093,7 @@ GEM validate_email validate_url webfinger (>= 1.0.1) - openssl (2.2.2) - ipaddr + openssl (3.0.2) openssl-signature_algorithm (1.3.0) openssl (> 2.0) opentracing (0.5.0) @@ -1855,7 +1854,7 @@ DEPENDENCIES omniauth_crowd (~> 2.4.0)! omniauth_openid_connect (~> 0.6.1) openid_connect (= 1.3.0) - openssl (= 2.2.2) + openssl (= 3.0.2) org-ruby (~> 0.9.12) pact (~> 1.63) parallel (~> 1.19) @@ -1967,4 +1966,4 @@ DEPENDENCIES yajl-ruby (~> 1.4.3) BUNDLED WITH - 2.4.12 + 2.4.13 diff --git a/pkgs/applications/version-management/gitlab/rubyEnv/gemset.nix b/pkgs/applications/version-management/gitlab/rubyEnv/gemset.nix index 579dcd4242c2..237c9ab5a53d 100644 --- a/pkgs/applications/version-management/gitlab/rubyEnv/gemset.nix +++ b/pkgs/applications/version-management/gitlab/rubyEnv/gemset.nix @@ -4218,15 +4218,14 @@ src: version = "1.3.0"; }; openssl = { - dependencies = ["ipaddr"]; groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0xx01in25q31rpxmq2qlimi44zarsp4px7046xnc6in0pa127xsk"; + sha256 = "0mcg47zz4w902cq6c8cdj62npawgwq68sfh7n7aqy7vm3pgvls9h"; type = "gem"; }; - version = "2.2.2"; + version = "3.0.2"; }; openssl-signature_algorithm = { dependencies = ["openssl"]; diff --git a/pkgs/applications/version-management/gitlab/update.py b/pkgs/applications/version-management/gitlab/update.py index 1965ce78b7a0..bfdf51d49b41 100755 --- a/pkgs/applications/version-management/gitlab/update.py +++ b/pkgs/applications/version-management/gitlab/update.py @@ -144,6 +144,9 @@ def update_rubyenv(): with open(rubyenv_dir / fn, 'w') as f: f.write(repo.get_file(fn, rev)) + # patch for openssl 3.x support + subprocess.check_output(['sed', '-i', "s:'openssl', '2.*':'openssl', '3.0.2':g", 'Gemfile'], cwd=rubyenv_dir) + # Fetch vendored dependencies temporarily in order to build the gemset.nix subprocess.check_output(['mkdir', '-p', 'vendor/gems'], cwd=rubyenv_dir) subprocess.check_output(['sh', '-c', f'curl -L https://gitlab.com/gitlab-org/gitlab/-/archive/v{version}-ee/gitlab-v{version}-ee.tar.bz2?path=vendor/gems | tar -xj --strip-components=3'], cwd=f'{rubyenv_dir}/vendor/gems') diff --git a/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix b/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix index 811b49e8714b..a1713e24375f 100644 --- a/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix +++ b/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix @@ -1,4 +1,4 @@ -{ lib , buildNpmPackage , fetchFromGitHub, nodejs }: +{ lib, buildNpmPackage, fetchFromGitHub, nodejs, python3 }: buildNpmPackage rec { pname = "webtorrent-mpv-hook"; @@ -21,6 +21,10 @@ buildNpmPackage rec { npmDepsHash = "sha256-GpNUJ5ZCgMjSYLqsIE/RwkTSFT3uAhxrHPe7XvGDRHE="; makeCacheWritable = true; + nativeBuildInputs = [ + python3 # Fixes node-gyp on aarch64-linux + ]; + postInstall = '' mkdir -p $out/share/mpv/scripts/ ln -s $out/lib/node_modules/webtorrent-mpv-hook/build/webtorrent.js $out/share/mpv/scripts/ diff --git a/pkgs/build-support/node/build-npm-package/hooks/default.nix b/pkgs/build-support/node/build-npm-package/hooks/default.nix index e5c93f1f7784..c34709335ff7 100644 --- a/pkgs/build-support/node/build-npm-package/hooks/default.nix +++ b/pkgs/build-support/node/build-npm-package/hooks/default.nix @@ -6,6 +6,7 @@ name = "npm-config-hook"; substitutions = { nodeSrc = srcOnly nodejs; + nodeGyp = "${buildPackages.nodejs}/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"; # Specify `diff`, `jq`, and `prefetch-npm-deps` by abspath to ensure that the user's build # inputs do not cause us to find the wrong binaries. diff --git a/pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh b/pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh index c1acdc3ac3f0..0edc0e2b36a4 100644 --- a/pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh +++ b/pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh @@ -3,10 +3,15 @@ npmConfigHook() { echo "Executing npmConfigHook" + # Use npm patches in the nodejs package + export NIX_NODEJS_BUILDNPMPACKAGE=1 + export prefetchNpmDeps="@prefetchNpmDeps@" + echo "Configuring npm" export HOME="$TMPDIR" export npm_config_nodedir="@nodeSrc@" + export npm_config_node_gyp="@nodeGyp@" if [ -z "${npmDeps-}" ]; then echo @@ -93,22 +98,7 @@ npmConfigHook() { patchShebangs node_modules - local -r lockfileVersion="$(@jq@ .lockfileVersion package-lock.json)" - - if (( lockfileVersion < 2 )); then - # This is required because npm consults a hidden lockfile in node_modules to figure out - # what to create bin links for. When using an old lockfile offline, this hidden lockfile - # contains insufficent data, making npm silently fail to create links. The hidden lockfile - # is bypassed when any file in node_modules is newer than it. Thus, we create a file when - # using an old lockfile, so bin links work as expected without having to downgrade Node or npm. - touch node_modules/.meow - fi - - npm rebuild "${npmRebuildFlags[@]}" "${npmFlags[@]}" - - if (( lockfileVersion < 2 )); then - rm node_modules/.meow - fi + npm rebuild $npmRebuildFlags "${npmRebuildFlagsArray[@]}" $npmFlags "${npmFlagsArray[@]}" patchShebangs node_modules diff --git a/pkgs/data/fonts/source-code-pro/default.nix b/pkgs/data/fonts/source-code-pro/default.nix index c94e9aaca480..4d3f5155929b 100644 --- a/pkgs/data/fonts/source-code-pro/default.nix +++ b/pkgs/data/fonts/source-code-pro/default.nix @@ -2,18 +2,18 @@ stdenvNoCC.mkDerivation rec { pname = "source-code-pro"; - version = "2.038"; + version = "2.042"; src = fetchzip { - url = "https://github.com/adobe-fonts/source-code-pro/releases/download/${version}R-ro%2F1.058R-it%2F1.018R-VAR/OTF-source-code-pro-${version}R-ro-1.058R-it.zip"; + url = "https://github.com/adobe-fonts/source-code-pro/releases/download/${version}R-u%2F1.062R-i%2F1.026R-vf/OTF-source-code-pro-${version}R-u_1.062R-i.zip"; stripRoot = false; - hash = "sha256-ijeTLka131jf6B9xj/eNWK1T5r7r3aBXBgnVyRAxmuY="; + hash = "sha256-+BnfmD+AjObSoVxPvFAqbnMD2j5qf2YmbXGQtXoaiy0="; }; installPhase = '' runHook preInstall - install -Dm644 *.otf -t $out/share/fonts/opentype + install -Dm644 OTF/*.otf -t $out/share/fonts/opentype runHook postInstall ''; diff --git a/pkgs/data/fonts/victor-mono/default.nix b/pkgs/data/fonts/victor-mono/default.nix index 1708a43b8056..5c17ad653ebc 100644 --- a/pkgs/data/fonts/victor-mono/default.nix +++ b/pkgs/data/fonts/victor-mono/default.nix @@ -2,7 +2,7 @@ stdenvNoCC.mkDerivation rec { pname = "victor-mono"; - version = "1.5.4"; + version = "1.5.5"; # Upstream prefers we download from the website, # but we really insist on a more versioned resource. @@ -14,7 +14,7 @@ stdenvNoCC.mkDerivation rec { src = fetchzip { url = "https://github.com/rubjo/victor-mono/raw/v${version}/public/VictorMonoAll.zip"; stripRoot = false; - hash = "sha256-E8j1bfYrM8yRtasiwgTvyE4EYx2LyAbmw3MXH1l+owk="; + hash = "sha256-l8XeKE9PtluiazZO0PXfkGCcnm5o+VZdL7NZ6w0tp80="; }; installPhase = '' diff --git a/pkgs/development/compilers/souffle/default.nix b/pkgs/development/compilers/souffle/default.nix index 96d3b5f6fc42..6a06213e9599 100644 --- a/pkgs/development/compilers/souffle/default.nix +++ b/pkgs/development/compilers/souffle/default.nix @@ -10,22 +10,17 @@ let in stdenv.mkDerivation rec { pname = "souffle"; - version = "2.3"; + version = "2.4"; src = fetchFromGitHub { owner = "souffle-lang"; repo = "souffle"; rev = version; - sha256 = "sha256-wdTBSmyA2I+gaSV577NNKA2oY2fdVTGmvV7h15NY1tU="; + sha256 = "sha256-5g2Ikbfm5nQrsgGntZZ/VbjqSDOj0AP/mnH1nW2b4co="; }; patches = [ ./threads.patch - (fetchpatch { - name = "missing-override.patch"; - url = "https://github.com/souffle-lang/souffle/commit/da2d778f0cca94f206686546fa56b9ffc738ad75.patch"; - sha256 = "Oefm3vRRwOyom94oGSOK2w9m23gkbJ++9gcWrdLlkyk="; - }) ]; hardeningDisable = lib.optionals stdenv.isDarwin [ "strictoverflow" ]; diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 6732980273e5..dff357eb4e95 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -2663,4 +2663,12 @@ self: super: { parsec = lself.parsec_3_1_16_1; text = lself.text_2_0_2; })); + + # Merged upstream, but never released. Allows both intel and aarch64 darwin to build. + # https://github.com/vincenthz/hs-gauge/pull/106 + gauge = appendPatch (pkgs.fetchpatch { + name = "darwin-aarch64-fix.patch"; + url = "https://github.com/vincenthz/hs-gauge/commit/3d7776f41187c70c4f0b4517e6a7dde10dc02309.patch"; + hash = "sha256-4osUMo0cvTvyDTXF8lY9tQbFqLywRwsc3RkHIhqSriQ="; + }) super.gauge; } // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index 7b242e42c69e..111c46d62161 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -708,6 +708,7 @@ supported-platforms: linux-mount: [ platforms.linux ] linux-namespaces: [ platforms.linux ] lxc: [ platforms.linux ] + memfd: [ platforms.linux ] midi-alsa: [ platforms.linux ] # alsa-core only supported on linux midisurface: [ platforms.linux ] # alsa-core only supported on linux OrderedBits: [ platforms.x86 ] # lacks implementations for non-x86: https://github.com/choener/OrderedBits/blob/401cbbe933b1635aa33e8e9b29a4a570b0a8f044/lib/Data/Bits/Ordered.hs#L316 diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index ce6c1069244c..ede7c9cdf947 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -192598,6 +192598,7 @@ self: { libraryHaskellDepends = [ base transformers ]; description = "Open temporary anonymous Linux file handles"; license = lib.licenses.asl20; + platforms = lib.platforms.linux; }) {}; "meminfo" = callPackage diff --git a/pkgs/development/interpreters/bqn/cbqn/cbqn-bytecode.nix b/pkgs/development/interpreters/bqn/cbqn/cbqn-bytecode.nix index 34768c1955ec..d311f3d61ebd 100644 --- a/pkgs/development/interpreters/bqn/cbqn/cbqn-bytecode.nix +++ b/pkgs/development/interpreters/bqn/cbqn/cbqn-bytecode.nix @@ -5,13 +5,13 @@ stdenvNoCC.mkDerivation { pname = "cbqn-bytecode"; - version = "unstable-2023-04-19"; + version = "unstable-2023-05-17"; src = fetchFromGitHub { owner = "dzaima"; repo = "cbqnBytecode"; - rev = "78ed4102f914eb5fa490d76d4dcd4f8be6e53417"; - hash = "sha256-IOhxcfGmpARiTdFMSpc+Rh8VXtasZdfP6vKJzULNxAg="; + rev = "32db4dfbfc753835bf112f3d8ae2991d8aebbe3d"; + hash = "sha256-9uBPrEESn/rB9u0xXwKaQ7ABveQWPc8LRMPlnI/79kg="; }; dontConfigure = true; @@ -20,7 +20,7 @@ stdenvNoCC.mkDerivation { installPhase = '' runHook preInstall - install -D $src/gen/{compiles,explain,formatter,runtime0,runtime1,src} -t $out/dev + install -D $src/gen/{compiles,explain,formatter,runtime0,runtime1,runtime1x,src} -t $out/dev runHook postInstall ''; diff --git a/pkgs/development/interpreters/bqn/cbqn/default.nix b/pkgs/development/interpreters/bqn/cbqn/default.nix index a6e8f4c9feb9..bcc58315ebb6 100644 --- a/pkgs/development/interpreters/bqn/cbqn/default.nix +++ b/pkgs/development/interpreters/bqn/cbqn/default.nix @@ -6,9 +6,8 @@ , fixDarwinDylibNames , genBytecode ? false , bqn-path ? null -, mbqn-source ? null +, mbqn-source , enableReplxx ? false -, enableSingeli ? stdenv.hostPlatform.avx2Support , enableLibcbqn ? ((stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin) && !enableReplxx) , libffi , pkg-config @@ -24,13 +23,13 @@ assert genBytecode -> ((bqn-path != null) && (mbqn-source != null)); stdenv.mkDerivation rec { pname = "cbqn" + lib.optionalString (!genBytecode) "-standalone"; - version = "0.2.0"; + version = "0.3.0"; src = fetchFromGitHub { owner = "dzaima"; repo = "CBQN"; rev = "v${version}"; - hash = "sha256-M9GTsm65DySLcMk9QDEhImHnUvWtYGPwiG657wHg3KA="; + hash = "sha256-LoxwNxuadbYJgIkr1+bZoErTc9WllN2siAsKnxoom3Y="; }; nativeBuildInputs = [ @@ -42,6 +41,7 @@ stdenv.mkDerivation rec { ]; dontConfigure = true; + doInstallCheck = true; postPatch = '' sed -i '/SHELL =.*/ d' makefile @@ -54,8 +54,11 @@ stdenv.mkDerivation rec { buildFlags = [ # interpreter binary - (lib.flatten (if enableSingeli then ["o3n-singeli" "f='-mavx2'"] else ["o3"])) + "o3" + "notui=1" # display build progress in a plain-text format "REPLXX=${if enableReplxx then "1" else "0"}" + ] ++ lib.optionals stdenv.hostPlatform.avx2Support [ + "has=avx2" ] ++ lib.optionals enableLibcbqn [ # embeddable interpreter as a shared lib "shared-o3" @@ -64,6 +67,7 @@ stdenv.mkDerivation rec { preBuild = '' # Purity: avoids git downloading bytecode files mkdir -p build/bytecodeLocal/gen + cp -r ${singeli-submodule}/dev/* build/singeliLocal/ '' + (if genBytecode then '' ${bqn-path} ./build/genRuntime ${mbqn-source} build/bytecodeLocal/ '' else '' @@ -71,10 +75,7 @@ stdenv.mkDerivation rec { '') + lib.optionalString enableReplxx '' cp -r ${replxx-submodule}/dev/* build/replxxLocal/ - '' - + lib.optionalString enableSingeli '' - cp -r ${singeli-submodule}/dev/* build/singeliLocal/ - ''; + ''; outputs = [ "out" @@ -100,6 +101,26 @@ stdenv.mkDerivation rec { runHook postInstall ''; + installCheckPhase = '' + runHook preInstallCheck + + # main test suite from mlochbaum/BQN + $out/bin/BQN ${mbqn-source}/test/this.bqn + + # CBQN tests that do not require compiling with test-only flags + $out/bin/BQN test/cmp.bqn + $out/bin/BQN test/equal.bqn + $out/bin/BQN test/copy.bqn + $out/bin/BQN test/bit.bqn + $out/bin/BQN test/hash.bqn + $out/bin/BQN test/squeezeValid.bqn + $out/bin/BQN test/squeezeExact.bqn + $out/bin/BQN test/various.bqn + $out/bin/BQN test/random.bqn + + runHook postInstallCheck + ''; + meta = with lib; { homepage = "https://github.com/dzaima/CBQN/"; description = "BQN implementation in C"; @@ -108,4 +129,3 @@ stdenv.mkDerivation rec { platforms = platforms.all; }; } -# TODO: test suite diff --git a/pkgs/development/interpreters/bqn/cbqn/singeli.nix b/pkgs/development/interpreters/bqn/cbqn/singeli.nix index 253f7549a6c0..fafbc875a795 100644 --- a/pkgs/development/interpreters/bqn/cbqn/singeli.nix +++ b/pkgs/development/interpreters/bqn/cbqn/singeli.nix @@ -5,13 +5,13 @@ stdenvNoCC.mkDerivation { pname = "singeli"; - version = "unstable-2023-04-12"; + version = "unstable-2023-04-27"; src = fetchFromGitHub { owner = "mlochbaum"; repo = "Singeli"; - rev = "3327956fedfdc6aef12954bc12120f20de2226d0"; - hash = "sha256-k25hk5zTn0m+2Nh9buTJYhtM98/VRlQ0guoRw9el3VE="; + rev = "853ab1a06ae8d8603f228d8e784fa319cc401459"; + hash = "sha256-X/NnufvakihJAE9H7geuuDS7Tv9l7tgLKdRgXC4ZX4A="; }; dontConfigure = true; diff --git a/pkgs/development/interpreters/bqn/mlochbaum-bqn/default.nix b/pkgs/development/interpreters/bqn/mlochbaum-bqn/default.nix index 85a3be161caa..d217ec99ebe5 100644 --- a/pkgs/development/interpreters/bqn/mlochbaum-bqn/default.nix +++ b/pkgs/development/interpreters/bqn/mlochbaum-bqn/default.nix @@ -7,13 +7,13 @@ stdenvNoCC.mkDerivation rec { pname = "bqn"; - version = "0.pre+date=2023-05-09"; + version = "unstable-2023-05-17"; src = fetchFromGitHub { owner = "mlochbaum"; repo = "BQN"; - rev = "656b176c5dc783b038b018f0ed17a5414ea62b4d"; - hash = "sha256-6r+N0eCvwvaoB84cw+Vtoqa6MXuI0NXLbOPblemY4M8="; + rev = "070bd07dc10c291695215265218ec0ff856ce457"; + hash = "sha256-GRIIzJwlJ+JTBHXZjoX/9vLFbAC7zyeuqVcrA/Jm/NA="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/development/libraries/composable_kernel/default.nix b/pkgs/development/libraries/composable_kernel/default.nix index 8b0ac955810e..e00af9a9755e 100644 --- a/pkgs/development/libraries/composable_kernel/default.nix +++ b/pkgs/development/libraries/composable_kernel/default.nix @@ -76,6 +76,9 @@ let passthru.updateScript = unstableGitUpdater { }; + # Times out otherwise + requiredSystemFeatures = [ "big-parallel" ]; + meta = with lib; { description = "Performance portable programming model for machine learning tensor operators"; homepage = "https://github.com/ROCmSoftwarePlatform/composable_kernel"; @@ -89,7 +92,7 @@ let cp -a ${ck}/bin/ckProfiler $out ''; in stdenv.mkDerivation { - inherit (ck) pname version outputs src passthru meta; + inherit (ck) pname version outputs src passthru requiredSystemFeatures meta; dontUnpack = true; dontPatch = true; diff --git a/pkgs/development/libraries/pagmo2/default.nix b/pkgs/development/libraries/pagmo2/default.nix index 7e30b0593b21..4bbf6f77288f 100644 --- a/pkgs/development/libraries/pagmo2/default.nix +++ b/pkgs/development/libraries/pagmo2/default.nix @@ -12,13 +12,13 @@ stdenv.mkDerivation rec { pname = "pagmo2"; - version = "2.18.0"; + version = "2.19.0"; src = fetchFromGitHub { owner = "esa"; repo = "pagmo2"; rev = "v${version}"; - sha256 = "0rd8scs4hj6qd8ylmn5hafncml2vr4fvcgm3agz3jrvmnc7hadrj"; + sha256 = "sha256-z5kg2xKZ666EPK844yp+hi4iGisaIPme9xNdzsAEEjw="; }; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/libraries/parson/default.nix b/pkgs/development/libraries/parson/default.nix index 6426beaeeae0..a61df952f893 100644 --- a/pkgs/development/libraries/parson/default.nix +++ b/pkgs/development/libraries/parson/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation { pname = "parson"; - version = "1.5.1"; + version = "1.5.2"; src = fetchFromGitHub { owner = "kgabis"; repo = "parson"; - rev = "3c4ee26dbb3df177a2d7b9d80e154ec435ca8c01"; # upstream doesn't use tags - sha256 = "sha256-fz2yhxy6Q5uEPAbzMxMiaXqSYkQ9uB3A4sV2qYOekJ8="; + rev = "60c37844d7a1c97547812cac3423d458c73e60f9"; # upstream doesn't use tags + hash = "sha256-SbM0kqRtdcz1s+pUTW7VPMY1O6zdql3bao19Rk4t470="; }; nativeBuildInputs = [ meson ninja ]; diff --git a/pkgs/development/python-modules/dashing/default.nix b/pkgs/development/python-modules/dashing/default.nix new file mode 100644 index 000000000000..e4c57679966a --- /dev/null +++ b/pkgs/development/python-modules/dashing/default.nix @@ -0,0 +1,27 @@ +{ lib +, python3 +}: + +python3.pkgs.buildPythonPackage rec { + pname = "dashing"; + version = "0.1.0"; + format = "setuptools"; + + disabled = python3.pythonOlder "3.7"; + + src = python3.pkgs.fetchPypi { + inherit pname version; + hash = "sha256-JRRgjg8pp3Xb0bERFWEhnOg9U8+kuqL+QQH6uE/Vbxs="; + }; + + propagatedBuildInputs = with python3.pkgs; [ + blessed + ]; + + meta = with lib; { + homepage = "https://github.com/FedericoCeratto/dashing"; + description = "Terminal dashboards for Python"; + license = licenses.gpl3; + maintainers = with maintainers; [ juliusrickert ]; + }; +} diff --git a/pkgs/development/python-modules/glances-api/default.nix b/pkgs/development/python-modules/glances-api/default.nix index bc9b3895c1c4..c57cee073f7d 100644 --- a/pkgs/development/python-modules/glances-api/default.nix +++ b/pkgs/development/python-modules/glances-api/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "glances-api"; - version = "0.4.1"; + version = "0.4.2"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -19,8 +19,8 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "home-assistant-ecosystem"; repo = "python-glances-api"; - rev = version; - hash = "sha256-IBEy19iouYAHIZwc/bnMgmHLrbfZjLni0Ne4o0I6FNg="; + rev = "refs/tags/${version}"; + hash = "sha256-fcQgwOYGhpwxSXfa1PYFOe2UDTEu+2YGIQmuSa5J0g4="; }; nativeBuildInputs = [ @@ -44,6 +44,7 @@ buildPythonPackage rec { meta = with lib; { description = "Python API for interacting with Glances"; homepage = "https://github.com/home-assistant-ecosystem/python-glances-api"; + changelog = "https://github.com/home-assistant-ecosystem/python-glances-api/releases/tag/${version}"; license = with licenses; [ mit ]; maintainers = with maintainers; [ fab ]; }; diff --git a/pkgs/development/python-modules/hmmlearn/default.nix b/pkgs/development/python-modules/hmmlearn/default.nix index 8097cc3b46b4..a7c673c38cad 100644 --- a/pkgs/development/python-modules/hmmlearn/default.nix +++ b/pkgs/development/python-modules/hmmlearn/default.nix @@ -1,5 +1,5 @@ { lib -, fetchurl +, fetchPypi , buildPythonPackage , numpy , scikit-learn @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "hmmlearn"; - version = "0.2.8"; + version = "0.3.0"; format = "setuptools"; disabled = pythonOlder "3.6"; - src = fetchurl { - url = "mirror://pypi/h/hmmlearn/${pname}-${version}.tar.gz"; - hash = "sha256-aWkx49zmgBzJt4xin1QwYd1+tnpxFVsD0bOeoXKipfk="; + src = fetchPypi { + inherit pname version; + hash = "sha256-0TqR6jaV34gUZePTYTLX7vToTUg/S6U4pLRuJLXqEA8="; }; buildInputs = [ diff --git a/pkgs/development/python-modules/jaraco-net/default.nix b/pkgs/development/python-modules/jaraco-net/default.nix index 164b46dd4f7f..86a8c63e19ad 100644 --- a/pkgs/development/python-modules/jaraco-net/default.nix +++ b/pkgs/development/python-modules/jaraco-net/default.nix @@ -26,6 +26,7 @@ , importlib-resources , pyparsing , requests-mock +, nettools }: buildPythonPackage rec { @@ -78,6 +79,8 @@ buildPythonPackage rec { importlib-resources pyparsing requests-mock + ] ++ lib.optionals stdenv.isDarwin [ + nettools ]; disabledTestPaths = [ diff --git a/pkgs/development/python-modules/json-stream-rs-tokenizer/default.nix b/pkgs/development/python-modules/json-stream-rs-tokenizer/default.nix index 513bf89cfc04..299a526dfdd7 100644 --- a/pkgs/development/python-modules/json-stream-rs-tokenizer/default.nix +++ b/pkgs/development/python-modules/json-stream-rs-tokenizer/default.nix @@ -1,8 +1,10 @@ { lib +, stdenv , buildPythonPackage , fetchFromGitHub , rustPlatform , cargo +, darwin , rustc , setuptools-rust , json-stream-rs-tokenizer @@ -38,6 +40,10 @@ buildPythonPackage rec { rustc ]; + buildInputs = lib.optionals stdenv.isDarwin [ + darwin.libiconv + ]; + # Tests depend on json-stream, which depends on this package. # To avoid infinite recursion, we only enable tests when building passthru.tests. doCheck = false; diff --git a/pkgs/development/python-modules/markerlib/default.nix b/pkgs/development/python-modules/markerlib/default.nix deleted file mode 100644 index 99358e4f95d3..000000000000 --- a/pkgs/development/python-modules/markerlib/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ lib -, buildPythonPackage -, fetchPypi -, setuptools -, nose -}: - -buildPythonPackage rec { - version = "0.6.0"; - pname = "markerlib"; - - src = fetchPypi { - inherit pname version; - sha256 = "2fdb3939441f5bf4f090b1979a34f84a11d33eed6c0e3995de88ae5c06b6e3ae"; - }; - - buildInputs = [ setuptools ]; - nativeCheckInputs = [ nose ]; - - checkPhase = '' - nosetests - ''; - - meta = with lib; { - homepage = "https://bitbucket.org/dholth/markerlib/"; - description = "A compiler for PEP 345 environment markers"; - license = licenses.mit; - maintainers = [ maintainers.costrouc ]; - }; -} diff --git a/pkgs/development/python-modules/onnx/default.nix b/pkgs/development/python-modules/onnx/default.nix index 2b9bce880153..52e0984f5aa0 100644 --- a/pkgs/development/python-modules/onnx/default.nix +++ b/pkgs/development/python-modules/onnx/default.nix @@ -1,55 +1,50 @@ { lib +, stdenv , buildPythonPackage -, python3 -, bash , cmake , fetchFromGitHub , gtest -, isPy27 , nbval , numpy +, parameterized , protobuf , pybind11 , pytestCheckHook -, six +, pythonOlder , tabulate , typing-extensions -, pythonRelaxDepsHook }: let gtestStatic = gtest.override { static = true; }; in buildPythonPackage rec { pname = "onnx"; - version = "1.13.1"; + version = "1.14.0"; format = "setuptools"; - disabled = isPy27; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-10MH23XpAv/uDW/2tRFGS2lKU8hnaNBwbIBIgVc7Jpk="; + hash = "sha256-f+s25Y/jGosaSdoZY6PE3j6pENkfDcD+IQndrbtuzWg="; }; nativeBuildInputs = [ cmake - pythonRelaxDepsHook pybind11 ]; - pythonRelaxDeps = [ "protobuf" ]; - propagatedBuildInputs = [ protobuf numpy - six typing-extensions ]; nativeCheckInputs = [ nbval + parameterized pytestCheckHook tabulate ]; @@ -72,7 +67,6 @@ in buildPythonPackage rec { # Set CMAKE_INSTALL_LIBDIR to lib explicitly, because otherwise it gets set # to lib64 and cmake incorrectly looks for the protobuf library in lib64 export CMAKE_ARGS="-DCMAKE_INSTALL_LIBDIR=lib -DONNX_USE_PROTOBUF_SHARED_LIBS=ON" - '' + lib.optionalString doCheck '' export CMAKE_ARGS+=" -Dgoogletest_STATIC_LIBRARIES=${gtestStatic}/lib/libgtest.a -Dgoogletest_INCLUDE_DIRS=${lib.getDev gtestStatic}/include" export ONNX_BUILD_TESTS=1 ''; @@ -89,14 +83,18 @@ in buildPythonPackage rec { # The setup.py does all the configuration dontUseCmakeConfigure = true; - doCheck = true; preCheck = '' export HOME=$(mktemp -d) # detecting source dir as a python package confuses pytest mv onnx/__init__.py onnx/__init__.py.hidden ''; - pytestFlagsArray = [ "onnx/test" "onnx/examples" ]; + + pytestFlagsArray = [ + "onnx/test" + "onnx/examples" + ]; + disabledTests = [ # attempts to fetch data from web "test_bvlc_alexnet_cpu" @@ -108,11 +106,25 @@ in buildPythonPackage rec { "test_squeezenet_cpu" "test_vgg19_cpu" "test_zfnet512_cpu" + ] ++ lib.optionals stdenv.isAarch64 [ + # AssertionError: Output 0 of test 0 in folder + "test__pytorch_converted_Conv2d_depthwise_padded" + "test__pytorch_converted_Conv2d_dilated" + "test_dft" + "test_dft_axis" + # AssertionError: Mismatch in test 'test_Conv2d_depthwise_padded' + "test_xor_bcast4v4d" + # AssertionError: assert 1 == 0 + "test_ops_tested" ]; + disabledTestPaths = [ # Unexpected output fields from running code: {'stderr'} "onnx/examples/np_array_tensorproto.ipynb" ]; + + __darwinAllowLocalNetworking = true; + postCheck = '' # run "cpp" tests .setuptools-cmake-build/onnx_gtests diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index 105b463f8272..4e9f663d9ac5 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -516,7 +516,7 @@ in openssl = attrs: { # https://github.com/ruby/openssl/issues/369 - buildInputs = [ openssl_1_1 ]; + buildInputs = [ (if (lib.versionAtLeast attrs.version "3.0.0") then openssl else openssl_1_1) ]; }; opus-ruby = attrs: { diff --git a/pkgs/development/tools/continuous-integration/drone-runner-docker/default.nix b/pkgs/development/tools/continuous-integration/drone-runner-docker/default.nix index 784486f49ce4..f71068188049 100644 --- a/pkgs/development/tools/continuous-integration/drone-runner-docker/default.nix +++ b/pkgs/development/tools/continuous-integration/drone-runner-docker/default.nix @@ -14,7 +14,7 @@ buildGoModule rec { vendorHash = "sha256-KcNp3VdJ201oxzF0bLXY4xWHqHNz54ZrVSI96cfhU+k="; meta = with lib; { - maintainers = with maintainers; [ endocrimes indeednotjames ]; + maintainers = with maintainers; [ endocrimes emilylange ]; license = licenses.unfreeRedistributable; homepage = "https://github.com/drone-runners/drone-runner-docker"; description = "Drone pipeline runner that executes builds inside Docker containers"; diff --git a/pkgs/development/tools/database/clickhouse-backup/default.nix b/pkgs/development/tools/database/clickhouse-backup/default.nix index 7f28528cd484..d50a37b9eeff 100644 --- a/pkgs/development/tools/database/clickhouse-backup/default.nix +++ b/pkgs/development/tools/database/clickhouse-backup/default.nix @@ -7,13 +7,13 @@ buildGoModule rec { pname = "clickhouse-backup"; - version = "2.2.5"; + version = "2.2.6"; src = fetchFromGitHub { owner = "AlexAkulov"; repo = pname; rev = "v${version}"; - sha256 = "sha256-sy5R2QSVkxFmfRMiD5KDzkFCol7MpOnfz0/JR++zIX4="; + sha256 = "sha256-oFGaNxK8cVrs+rkmJR9wSYB4+i3B8BGYhsuHbUTK3es="; }; vendorHash = "sha256-UY/8fWPoO3d0g1/CN215Q4z744S2cCT7fB4ctpridAI="; diff --git a/pkgs/development/tools/fq/default.nix b/pkgs/development/tools/fq/default.nix index fc4b42910458..8e153cd1d409 100644 --- a/pkgs/development/tools/fq/default.nix +++ b/pkgs/development/tools/fq/default.nix @@ -7,16 +7,16 @@ buildGoModule rec { pname = "fq"; - version = "0.5.0"; + version = "0.6.0"; src = fetchFromGitHub { owner = "wader"; repo = "fq"; rev = "v${version}"; - hash = "sha256-Fg5J/iLxGUwb2QRZJMHLqK9dBECW9VsiZGX+LyUtyhw="; + hash = "sha256-j7s9oluNtYi6MmTKCendTIjc/zvynY6fWvXH47XkwOI="; }; - vendorHash = "sha256-sjzGtSBgRybcJvOXM4wKN5pTgihNrjUCMPsc62n3tLk="; + vendorHash = "sha256-XobOcG5s2ggTk3RmJPM14OWv45PMyKs0w0BOvozUobw="; ldflags = [ "-s" diff --git a/pkgs/development/tools/go-containerregistry/default.nix b/pkgs/development/tools/go-containerregistry/default.nix index 2cfe32cd4348..55a331b38e48 100644 --- a/pkgs/development/tools/go-containerregistry/default.nix +++ b/pkgs/development/tools/go-containerregistry/default.nix @@ -4,13 +4,13 @@ let bins = [ "crane" "gcrane" ]; in buildGoModule rec { pname = "go-containerregistry"; - version = "0.15.1"; + version = "0.15.2"; src = fetchFromGitHub { owner = "google"; repo = pname; rev = "v${version}"; - sha256 = "sha256-yXIFPLuqyWaWgbGbGOuBwWg/KWM9vuMnXnTBcgluzhI="; + sha256 = "sha256-Bva962laaHJAHwiQAMPtOBkwqce1ww+sBGkjV1TjrwQ="; }; vendorHash = null; diff --git a/pkgs/development/tools/kustomize/kustomize-sops.nix b/pkgs/development/tools/kustomize/kustomize-sops.nix index 8d7201e5b723..32f23fa4a7e8 100644 --- a/pkgs/development/tools/kustomize/kustomize-sops.nix +++ b/pkgs/development/tools/kustomize/kustomize-sops.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "kustomize-sops"; - version = "4.1.1"; + version = "4.1.3"; src = fetchFromGitHub { owner = "viaduct-ai"; repo = pname; rev = "v${version}"; - sha256 = "sha256-jwOyOGSnUgk9+cD+cGj1/ZzQ84HAdAn0HMy3CLPs1U0="; + sha256 = "sha256-ZIYg6ITGHXJZ0YySwSN8mlSmiFiWsWUeGwIo8vRLw3Y="; }; vendorHash = "sha256-tNYPgXFDJuNRlrVE0ywg77goNzfoWHFVzOG9mHqK3q8="; diff --git a/pkgs/development/tools/pet/default.nix b/pkgs/development/tools/pet/default.nix index 5b34d2506524..9437db2ffc37 100644 --- a/pkgs/development/tools/pet/default.nix +++ b/pkgs/development/tools/pet/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "pet"; - version = "0.4.0"; + version = "0.5.0"; src = fetchFromGitHub { owner = "knqyf263"; repo = "pet"; rev = "v${version}"; - sha256 = "sha256-gVTpzmXekQxGMucDKskGi+e+34nJwwsXwvQTjRO6Gdg="; + sha256 = "sha256-+ng4+wrJW/fl1DJMbycLymFgiviTwjlxNApE2Q8PesQ="; }; - vendorSha256 = "sha256-dUvp7FEW09V0xMuhewPGw3TuAic/sD7xyXEYviZ2Ivs="; + vendorHash = "sha256-JOP7hcCOwVZ0hb2UXHHdxpKxpZqs6a8AjOFbrs711ps="; ldflags = [ "-s" "-w" "-X=github.com/knqyf263/pet/cmd.version=${version}" diff --git a/pkgs/development/tools/vsce/default.nix b/pkgs/development/tools/vsce/default.nix index 633eda1371c1..7fc1b297922e 100644 --- a/pkgs/development/tools/vsce/default.nix +++ b/pkgs/development/tools/vsce/default.nix @@ -1,8 +1,10 @@ { lib +, stdenv , buildNpmPackage , fetchFromGitHub , pkg-config , libsecret +, darwin , python3 , testers , vsce @@ -27,7 +29,8 @@ buildNpmPackage rec { nativeBuildInputs = [ pkg-config python3 ]; - buildInputs = [ libsecret ]; + buildInputs = [ libsecret ] + ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit Security ]); makeCacheWritable = true; npmFlags = [ "--legacy-peer-deps" ]; @@ -43,4 +46,3 @@ buildNpmPackage rec { license = licenses.mit; }; } - diff --git a/pkgs/development/web/newman/default.nix b/pkgs/development/web/newman/default.nix index 6aa2413677c5..b36b61d0e94d 100644 --- a/pkgs/development/web/newman/default.nix +++ b/pkgs/development/web/newman/default.nix @@ -1,18 +1,27 @@ -{ pkgs, nodejs, stdenv, lib, ... }: +{ lib +, buildNpmPackage +, fetchFromGitHub +}: -let +buildNpmPackage rec { + pname = "newman"; + version = "5.3.2"; - packageName = with lib; concatStrings (map (entry: (concatStrings (mapAttrsToList (key: value: "${key}-${value}") entry))) (importJSON ./package.json)); - - nodePackages = import ./node-composition.nix { - inherit pkgs nodejs; - inherit (stdenv.hostPlatform) system; + src = fetchFromGitHub { + owner = "postmanlabs"; + repo = "newman"; + rev = "refs/tags/v${version}"; + hash = "sha256-j5YS9Zbk9b3K4+0sGzqtCgEsR+S5nGPf/rebeGzsscA="; }; -in -nodePackages.newman.override { + + npmDepsHash = "sha256-FwVmesHtzTZKsTCIfZiRPb1zf7q5LqABAZOh8gXB9qw="; + + dontNpmBuild = true; + meta = with lib; { homepage = "https://www.getpostman.com"; description = "A command-line collection runner for Postman"; + changelog = "https://github.com/postmanlabs/newman/releases/tag/v${version}"; maintainers = with maintainers; [ freezeboy ]; license = licenses.asl20; }; diff --git a/pkgs/development/web/newman/generate-dependencies.sh b/pkgs/development/web/newman/generate-dependencies.sh deleted file mode 100755 index 7111289d2909..000000000000 --- a/pkgs/development/web/newman/generate-dependencies.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env nix-shell -#! nix-shell -i bash -p nodePackages.node2nix - -node2nix \ - --node-env node-env.nix \ - --development \ - --input package.json \ - --output node-packages.nix \ - --composition node-composition.nix diff --git a/pkgs/development/web/newman/node-composition.nix b/pkgs/development/web/newman/node-composition.nix deleted file mode 100644 index b795f708f189..000000000000 --- a/pkgs/development/web/newman/node-composition.nix +++ /dev/null @@ -1,17 +0,0 @@ -# This file has been generated by node2nix 1.11.1. Do not edit! - -{pkgs ? import { - inherit system; - }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs_14"}: - -let - nodeEnv = import ./node-env.nix { - inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript; - inherit pkgs nodejs; - libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null; - }; -in -import ./node-packages.nix { - inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit; - inherit nodeEnv; -} diff --git a/pkgs/development/web/newman/node-env.nix b/pkgs/development/web/newman/node-env.nix deleted file mode 100644 index 5dad9ec63d47..000000000000 --- a/pkgs/development/web/newman/node-env.nix +++ /dev/null @@ -1,686 +0,0 @@ -# This file originates from node2nix - -{lib, stdenv, nodejs, python2, pkgs, libtool, runCommand, writeTextFile, writeShellScript}: - -let - # Workaround to cope with utillinux in Nixpkgs 20.09 and util-linux in Nixpkgs master - utillinux = if pkgs ? utillinux then pkgs.utillinux else pkgs.util-linux; - - python = if nodejs ? python then nodejs.python else python2; - - # Create a tar wrapper that filters all the 'Ignoring unknown extended header keyword' noise - tarWrapper = runCommand "tarWrapper" {} '' - mkdir -p $out/bin - - cat > $out/bin/tar <> $out/nix-support/hydra-build-products - ''; - }; - - # Common shell logic - installPackage = writeShellScript "install-package" '' - installPackage() { - local packageName=$1 src=$2 - - local strippedName - - local DIR=$PWD - cd $TMPDIR - - unpackFile $src - - # Make the base dir in which the target dependency resides first - mkdir -p "$(dirname "$DIR/$packageName")" - - if [ -f "$src" ] - then - # Figure out what directory has been unpacked - packageDir="$(find . -maxdepth 1 -type d | tail -1)" - - # Restore write permissions to make building work - find "$packageDir" -type d -exec chmod u+x {} \; - chmod -R u+w "$packageDir" - - # Move the extracted tarball into the output folder - mv "$packageDir" "$DIR/$packageName" - elif [ -d "$src" ] - then - # Get a stripped name (without hash) of the source directory. - # On old nixpkgs it's already set internally. - if [ -z "$strippedName" ] - then - strippedName="$(stripHash $src)" - fi - - # Restore write permissions to make building work - chmod -R u+w "$strippedName" - - # Move the extracted directory into the output folder - mv "$strippedName" "$DIR/$packageName" - fi - - # Change to the package directory to install dependencies - cd "$DIR/$packageName" - } - ''; - - # Bundle the dependencies of the package - # - # Only include dependencies if they don't exist. They may also be bundled in the package. - includeDependencies = {dependencies}: - lib.optionalString (dependencies != []) ( - '' - mkdir -p node_modules - cd node_modules - '' - + (lib.concatMapStrings (dependency: - '' - if [ ! -e "${dependency.packageName}" ]; then - ${composePackage dependency} - fi - '' - ) dependencies) - + '' - cd .. - '' - ); - - # Recursively composes the dependencies of a package - composePackage = { name, packageName, src, dependencies ? [], ... }@args: - builtins.addErrorContext "while evaluating node package '${packageName}'" '' - installPackage "${packageName}" "${src}" - ${includeDependencies { inherit dependencies; }} - cd .. - ${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."} - ''; - - pinpointDependencies = {dependencies, production}: - let - pinpointDependenciesFromPackageJSON = writeTextFile { - name = "pinpointDependencies.js"; - text = '' - var fs = require('fs'); - var path = require('path'); - - function resolveDependencyVersion(location, name) { - if(location == process.env['NIX_STORE']) { - return null; - } else { - var dependencyPackageJSON = path.join(location, "node_modules", name, "package.json"); - - if(fs.existsSync(dependencyPackageJSON)) { - var dependencyPackageObj = JSON.parse(fs.readFileSync(dependencyPackageJSON)); - - if(dependencyPackageObj.name == name) { - return dependencyPackageObj.version; - } - } else { - return resolveDependencyVersion(path.resolve(location, ".."), name); - } - } - } - - function replaceDependencies(dependencies) { - if(typeof dependencies == "object" && dependencies !== null) { - for(var dependency in dependencies) { - var resolvedVersion = resolveDependencyVersion(process.cwd(), dependency); - - if(resolvedVersion === null) { - process.stderr.write("WARNING: cannot pinpoint dependency: "+dependency+", context: "+process.cwd()+"\n"); - } else { - dependencies[dependency] = resolvedVersion; - } - } - } - } - - /* Read the package.json configuration */ - var packageObj = JSON.parse(fs.readFileSync('./package.json')); - - /* Pinpoint all dependencies */ - replaceDependencies(packageObj.dependencies); - if(process.argv[2] == "development") { - replaceDependencies(packageObj.devDependencies); - } - else { - packageObj.devDependencies = {}; - } - replaceDependencies(packageObj.optionalDependencies); - replaceDependencies(packageObj.peerDependencies); - - /* Write the fixed package.json file */ - fs.writeFileSync("package.json", JSON.stringify(packageObj, null, 2)); - ''; - }; - in - '' - node ${pinpointDependenciesFromPackageJSON} ${if production then "production" else "development"} - - ${lib.optionalString (dependencies != []) - '' - if [ -d node_modules ] - then - cd node_modules - ${lib.concatMapStrings (dependency: pinpointDependenciesOfPackage dependency) dependencies} - cd .. - fi - ''} - ''; - - # Recursively traverses all dependencies of a package and pinpoints all - # dependencies in the package.json file to the versions that are actually - # being used. - - pinpointDependenciesOfPackage = { packageName, dependencies ? [], production ? true, ... }@args: - '' - if [ -d "${packageName}" ] - then - cd "${packageName}" - ${pinpointDependencies { inherit dependencies production; }} - cd .. - ${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."} - fi - ''; - - # Extract the Node.js source code which is used to compile packages with - # native bindings - nodeSources = runCommand "node-sources" {} '' - tar --no-same-owner --no-same-permissions -xf ${nodejs.src} - mv node-* $out - ''; - - # Script that adds _integrity fields to all package.json files to prevent NPM from consulting the cache (that is empty) - addIntegrityFieldsScript = writeTextFile { - name = "addintegrityfields.js"; - text = '' - var fs = require('fs'); - var path = require('path'); - - function augmentDependencies(baseDir, dependencies) { - for(var dependencyName in dependencies) { - var dependency = dependencies[dependencyName]; - - // Open package.json and augment metadata fields - var packageJSONDir = path.join(baseDir, "node_modules", dependencyName); - var packageJSONPath = path.join(packageJSONDir, "package.json"); - - if(fs.existsSync(packageJSONPath)) { // Only augment packages that exist. Sometimes we may have production installs in which development dependencies can be ignored - console.log("Adding metadata fields to: "+packageJSONPath); - var packageObj = JSON.parse(fs.readFileSync(packageJSONPath)); - - if(dependency.integrity) { - packageObj["_integrity"] = dependency.integrity; - } else { - packageObj["_integrity"] = "sha1-000000000000000000000000000="; // When no _integrity string has been provided (e.g. by Git dependencies), add a dummy one. It does not seem to harm and it bypasses downloads. - } - - if(dependency.resolved) { - packageObj["_resolved"] = dependency.resolved; // Adopt the resolved property if one has been provided - } else { - packageObj["_resolved"] = dependency.version; // Set the resolved version to the version identifier. This prevents NPM from cloning Git repositories. - } - - if(dependency.from !== undefined) { // Adopt from property if one has been provided - packageObj["_from"] = dependency.from; - } - - fs.writeFileSync(packageJSONPath, JSON.stringify(packageObj, null, 2)); - } - - // Augment transitive dependencies - if(dependency.dependencies !== undefined) { - augmentDependencies(packageJSONDir, dependency.dependencies); - } - } - } - - if(fs.existsSync("./package-lock.json")) { - var packageLock = JSON.parse(fs.readFileSync("./package-lock.json")); - - if(![1, 2].includes(packageLock.lockfileVersion)) { - process.stderr.write("Sorry, I only understand lock file versions 1 and 2!\n"); - process.exit(1); - } - - if(packageLock.dependencies !== undefined) { - augmentDependencies(".", packageLock.dependencies); - } - } - ''; - }; - - # Reconstructs a package-lock file from the node_modules/ folder structure and package.json files with dummy sha1 hashes - reconstructPackageLock = writeTextFile { - name = "reconstructpackagelock.js"; - text = '' - var fs = require('fs'); - var path = require('path'); - - var packageObj = JSON.parse(fs.readFileSync("package.json")); - - var lockObj = { - name: packageObj.name, - version: packageObj.version, - lockfileVersion: 2, - requires: true, - packages: { - "": { - name: packageObj.name, - version: packageObj.version, - license: packageObj.license, - bin: packageObj.bin, - dependencies: packageObj.dependencies, - engines: packageObj.engines, - optionalDependencies: packageObj.optionalDependencies - } - }, - dependencies: {} - }; - - function augmentPackageJSON(filePath, packages, dependencies) { - var packageJSON = path.join(filePath, "package.json"); - if(fs.existsSync(packageJSON)) { - var packageObj = JSON.parse(fs.readFileSync(packageJSON)); - packages[filePath] = { - version: packageObj.version, - integrity: "sha1-000000000000000000000000000=", - dependencies: packageObj.dependencies, - engines: packageObj.engines, - optionalDependencies: packageObj.optionalDependencies - }; - dependencies[packageObj.name] = { - version: packageObj.version, - integrity: "sha1-000000000000000000000000000=", - dependencies: {} - }; - processDependencies(path.join(filePath, "node_modules"), packages, dependencies[packageObj.name].dependencies); - } - } - - function processDependencies(dir, packages, dependencies) { - if(fs.existsSync(dir)) { - var files = fs.readdirSync(dir); - - files.forEach(function(entry) { - var filePath = path.join(dir, entry); - var stats = fs.statSync(filePath); - - if(stats.isDirectory()) { - if(entry.substr(0, 1) == "@") { - // When we encounter a namespace folder, augment all packages belonging to the scope - var pkgFiles = fs.readdirSync(filePath); - - pkgFiles.forEach(function(entry) { - if(stats.isDirectory()) { - var pkgFilePath = path.join(filePath, entry); - augmentPackageJSON(pkgFilePath, packages, dependencies); - } - }); - } else { - augmentPackageJSON(filePath, packages, dependencies); - } - } - }); - } - } - - processDependencies("node_modules", lockObj.packages, lockObj.dependencies); - - fs.writeFileSync("package-lock.json", JSON.stringify(lockObj, null, 2)); - ''; - }; - - # Script that links bins defined in package.json to the node_modules bin directory - # NPM does not do this for top-level packages itself anymore as of v7 - linkBinsScript = writeTextFile { - name = "linkbins.js"; - text = '' - var fs = require('fs'); - var path = require('path'); - - var packageObj = JSON.parse(fs.readFileSync("package.json")); - - var nodeModules = Array(packageObj.name.split("/").length).fill("..").join(path.sep); - - if(packageObj.bin !== undefined) { - fs.mkdirSync(path.join(nodeModules, ".bin")) - - if(typeof packageObj.bin == "object") { - Object.keys(packageObj.bin).forEach(function(exe) { - if(fs.existsSync(packageObj.bin[exe])) { - console.log("linking bin '" + exe + "'"); - fs.symlinkSync( - path.join("..", packageObj.name, packageObj.bin[exe]), - path.join(nodeModules, ".bin", exe) - ); - } - else { - console.log("skipping non-existent bin '" + exe + "'"); - } - }) - } - else { - if(fs.existsSync(packageObj.bin)) { - console.log("linking bin '" + packageObj.bin + "'"); - fs.symlinkSync( - path.join("..", packageObj.name, packageObj.bin), - path.join(nodeModules, ".bin", packageObj.name.split("/").pop()) - ); - } - else { - console.log("skipping non-existent bin '" + packageObj.bin + "'"); - } - } - } - else if(packageObj.directories !== undefined && packageObj.directories.bin !== undefined) { - fs.mkdirSync(path.join(nodeModules, ".bin")) - - fs.readdirSync(packageObj.directories.bin).forEach(function(exe) { - if(fs.existsSync(path.join(packageObj.directories.bin, exe))) { - console.log("linking bin '" + exe + "'"); - fs.symlinkSync( - path.join("..", packageObj.name, packageObj.directories.bin, exe), - path.join(nodeModules, ".bin", exe) - ); - } - else { - console.log("skipping non-existent bin '" + exe + "'"); - } - }) - } - ''; - }; - - prepareAndInvokeNPM = {packageName, bypassCache, reconstructLock, npmFlags, production}: - let - forceOfflineFlag = if bypassCache then "--offline" else "--registry http://www.example.com"; - in - '' - # Pinpoint the versions of all dependencies to the ones that are actually being used - echo "pinpointing versions of dependencies..." - source $pinpointDependenciesScriptPath - - # Patch the shebangs of the bundled modules to prevent them from - # calling executables outside the Nix store as much as possible - patchShebangs . - - # Deploy the Node.js package by running npm install. Since the - # dependencies have been provided already by ourselves, it should not - # attempt to install them again, which is good, because we want to make - # it Nix's responsibility. If it needs to install any dependencies - # anyway (e.g. because the dependency parameters are - # incomplete/incorrect), it fails. - # - # The other responsibilities of NPM are kept -- version checks, build - # steps, postprocessing etc. - - export HOME=$TMPDIR - cd "${packageName}" - runHook preRebuild - - ${lib.optionalString bypassCache '' - ${lib.optionalString reconstructLock '' - if [ -f package-lock.json ] - then - echo "WARNING: Reconstruct lock option enabled, but a lock file already exists!" - echo "This will most likely result in version mismatches! We will remove the lock file and regenerate it!" - rm package-lock.json - else - echo "No package-lock.json file found, reconstructing..." - fi - - node ${reconstructPackageLock} - ''} - - node ${addIntegrityFieldsScript} - ''} - - npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${lib.optionalString production "--production"} rebuild - - runHook postRebuild - - if [ "''${dontNpmInstall-}" != "1" ] - then - # NPM tries to download packages even when they already exist if npm-shrinkwrap is used. - rm -f npm-shrinkwrap.json - - npm ${forceOfflineFlag} --nodedir=${nodeSources} --no-bin-links --ignore-scripts ${npmFlags} ${lib.optionalString production "--production"} install - fi - - # Link executables defined in package.json - node ${linkBinsScript} - ''; - - # Builds and composes an NPM package including all its dependencies - buildNodePackage = - { name - , packageName - , version ? null - , dependencies ? [] - , buildInputs ? [] - , production ? true - , npmFlags ? "" - , dontNpmInstall ? false - , bypassCache ? false - , reconstructLock ? false - , preRebuild ? "" - , dontStrip ? true - , unpackPhase ? "true" - , buildPhase ? "true" - , meta ? {} - , ... }@args: - - let - extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "preRebuild" "unpackPhase" "buildPhase" "meta" ]; - in - stdenv.mkDerivation ({ - name = "${name}${if version == null then "" else "-${version}"}"; - buildInputs = [ tarWrapper python nodejs ] - ++ lib.optional (stdenv.isLinux) utillinux - ++ lib.optional (stdenv.isDarwin) libtool - ++ buildInputs; - - inherit nodejs; - - inherit dontStrip; # Stripping may fail a build for some package deployments - inherit dontNpmInstall preRebuild unpackPhase buildPhase; - - compositionScript = composePackage args; - pinpointDependenciesScript = pinpointDependenciesOfPackage args; - - passAsFile = [ "compositionScript" "pinpointDependenciesScript" ]; - - installPhase = '' - source ${installPackage} - - # Create and enter a root node_modules/ folder - mkdir -p $out/lib/node_modules - cd $out/lib/node_modules - - # Compose the package and all its dependencies - source $compositionScriptPath - - ${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }} - - # Create symlink to the deployed executable folder, if applicable - if [ -d "$out/lib/node_modules/.bin" ] - then - ln -s $out/lib/node_modules/.bin $out/bin - - # Patch the shebang lines of all the executables - ls $out/bin/* | while read i - do - file="$(readlink -f "$i")" - chmod u+rwx "$file" - patchShebangs "$file" - done - fi - - # Create symlinks to the deployed manual page folders, if applicable - if [ -d "$out/lib/node_modules/${packageName}/man" ] - then - mkdir -p $out/share - for dir in "$out/lib/node_modules/${packageName}/man/"* - do - mkdir -p $out/share/man/$(basename "$dir") - for page in "$dir"/* - do - ln -s $page $out/share/man/$(basename "$dir") - done - done - fi - - # Run post install hook, if provided - runHook postInstall - ''; - - meta = { - # default to Node.js' platforms - platforms = nodejs.meta.platforms; - } // meta; - } // extraArgs); - - # Builds a node environment (a node_modules folder and a set of binaries) - buildNodeDependencies = - { name - , packageName - , version ? null - , src - , dependencies ? [] - , buildInputs ? [] - , production ? true - , npmFlags ? "" - , dontNpmInstall ? false - , bypassCache ? false - , reconstructLock ? false - , dontStrip ? true - , unpackPhase ? "true" - , buildPhase ? "true" - , ... }@args: - - let - extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" ]; - in - stdenv.mkDerivation ({ - name = "node-dependencies-${name}${if version == null then "" else "-${version}"}"; - - buildInputs = [ tarWrapper python nodejs ] - ++ lib.optional (stdenv.isLinux) utillinux - ++ lib.optional (stdenv.isDarwin) libtool - ++ buildInputs; - - inherit dontStrip; # Stripping may fail a build for some package deployments - inherit dontNpmInstall unpackPhase buildPhase; - - includeScript = includeDependencies { inherit dependencies; }; - pinpointDependenciesScript = pinpointDependenciesOfPackage args; - - passAsFile = [ "includeScript" "pinpointDependenciesScript" ]; - - installPhase = '' - source ${installPackage} - - mkdir -p $out/${packageName} - cd $out/${packageName} - - source $includeScriptPath - - # Create fake package.json to make the npm commands work properly - cp ${src}/package.json . - chmod 644 package.json - ${lib.optionalString bypassCache '' - if [ -f ${src}/package-lock.json ] - then - cp ${src}/package-lock.json . - chmod 644 package-lock.json - fi - ''} - - # Go to the parent folder to make sure that all packages are pinpointed - cd .. - ${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."} - - ${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }} - - # Expose the executables that were installed - cd .. - ${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."} - - mv ${packageName} lib - ln -s $out/lib/node_modules/.bin $out/bin - ''; - } // extraArgs); - - # Builds a development shell - buildNodeShell = - { name - , packageName - , version ? null - , src - , dependencies ? [] - , buildInputs ? [] - , production ? true - , npmFlags ? "" - , dontNpmInstall ? false - , bypassCache ? false - , reconstructLock ? false - , dontStrip ? true - , unpackPhase ? "true" - , buildPhase ? "true" - , ... }@args: - - let - nodeDependencies = buildNodeDependencies args; - extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "unpackPhase" "buildPhase" ]; - in - stdenv.mkDerivation ({ - name = "node-shell-${name}${if version == null then "" else "-${version}"}"; - - buildInputs = [ python nodejs ] ++ lib.optional (stdenv.isLinux) utillinux ++ buildInputs; - buildCommand = '' - mkdir -p $out/bin - cat > $out/bin/shell <