From 0b581a366f749250dd475790f1b76bb137149650 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 2 Nov 2022 04:22:46 +0000 Subject: [PATCH 01/32] libre: 2.8.0 -> 2.9.0 --- pkgs/development/libraries/libre/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libre/default.nix b/pkgs/development/libraries/libre/default.nix index 5f91b2ff8af9..7ed03f0af117 100644 --- a/pkgs/development/libraries/libre/default.nix +++ b/pkgs/development/libraries/libre/default.nix @@ -1,12 +1,12 @@ { lib, stdenv, fetchFromGitHub, zlib, openssl }: stdenv.mkDerivation rec { - version = "2.8.0"; + version = "2.9.0"; pname = "libre"; src = fetchFromGitHub { owner = "baresip"; repo = "re"; rev = "v${version}"; - sha256 = "sha256-mbPFaq49EI2BdhdQJwFaBxjAh2aKlcuFwoCTwhXRbUg="; + sha256 = "sha256-YNAfHmohMqGGF8N/VdndJJ32PF/GMBoNtjo/t2lt6HA="; }; buildInputs = [ zlib openssl ]; makeFlags = [ "USE_ZLIB=1" "USE_OPENSSL=1" "PREFIX=$(out)" ] From 9fa023faa50e3397655bb1a29098027076bc6935 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 2 Nov 2022 04:23:52 +0000 Subject: [PATCH 02/32] librem: 2.8.0 -> 2.9.0 --- pkgs/development/libraries/librem/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/librem/default.nix b/pkgs/development/libraries/librem/default.nix index 4375b2566622..6c7bdeec0bdf 100644 --- a/pkgs/development/libraries/librem/default.nix +++ b/pkgs/development/libraries/librem/default.nix @@ -1,12 +1,12 @@ { lib, stdenv, fetchFromGitHub, zlib, openssl, libre }: stdenv.mkDerivation rec { - version = "2.8.0"; + version = "2.9.0"; pname = "librem"; src = fetchFromGitHub { owner = "baresip"; repo = "rem"; rev = "v${version}"; - sha256 = "sha256-/DAJMudEEB/8IYl27SFRlD57dfhZrPA5I1ycL4lFXy8="; + sha256 = "sha256-HiVM/opZuR7Gkt421ps+nKiiKERG8sUD8qBLIMGNCJI="; }; buildInputs = [ zlib openssl libre ]; makeFlags = [ From f77d334af1dc5b0bf9b15b2bcbdc5aa0f5fc7338 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 7 Nov 2022 17:55:20 +0000 Subject: [PATCH 03/32] clingo: 5.6.1 -> 5.6.2 --- pkgs/applications/science/logic/potassco/clingo.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/logic/potassco/clingo.nix b/pkgs/applications/science/logic/potassco/clingo.nix index 0065ff3ef25c..a3c324d0dbb8 100644 --- a/pkgs/applications/science/logic/potassco/clingo.nix +++ b/pkgs/applications/science/logic/potassco/clingo.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "clingo"; - version = "5.6.1"; + version = "5.6.2"; src = fetchFromGitHub { owner = "potassco"; repo = "clingo"; rev = "v${version}"; - sha256 = "sha256-blr2GPa/ZwVfvot6wUcQmdN/mLEox6tjIWtr0geeoDI="; + sha256 = "sha256-2vOscD5jengY3z9gHoY9y9y6RLfdzUj7BNKLyppNRac="; }; nativeBuildInputs = [ cmake ]; From 7ae1b194da97ec4a0704b4b1f54837c61e4b1522 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 8 Nov 2022 20:36:21 +0100 Subject: [PATCH 04/32] microcodeIntel: 20220809 -> 20221108 https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/releases/tag/microcode-20221108 --- pkgs/os-specific/linux/microcode/intel.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/microcode/intel.nix b/pkgs/os-specific/linux/microcode/intel.nix index 6bb2855719bf..3683522f04f9 100644 --- a/pkgs/os-specific/linux/microcode/intel.nix +++ b/pkgs/os-specific/linux/microcode/intel.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "microcode-intel"; - version = "20220809"; + version = "20221108"; src = fetchFromGitHub { owner = "intel"; repo = "Intel-Linux-Processor-Microcode-Data-Files"; rev = "microcode-${version}"; - hash = "sha256-vcuLQHAGr5uRkGWWIwA2WXLJadVNxfcPgjmNS82Logg="; + hash = "sha256-JZbBrD3fHgJogDw4u2YggDX7OCXCu5/XEZKzHuVJR9k="; }; nativeBuildInputs = [ iucode-tool libarchive ]; From 1eb380d489517996794d0852cb5a389a144b4fee Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 9 Nov 2022 00:37:08 +0100 Subject: [PATCH 05/32] element-{web,desktop}: 1.11.13 -> 1.11.14 ChangeLog web: https://github.com/vector-im/element-web/releases/tag/v1.11.14 ChangeLog desktop: https://github.com/vector-im/element-desktop/releases/tag/v1.11.14 --- .../networking/instant-messengers/element/pin.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/element/pin.json b/pkgs/applications/networking/instant-messengers/element/pin.json index 9e09fa6acbee..436a8a8f4bf6 100644 --- a/pkgs/applications/networking/instant-messengers/element/pin.json +++ b/pkgs/applications/networking/instant-messengers/element/pin.json @@ -1,7 +1,7 @@ { - "version": "1.11.13", - "desktopSrcHash": "E8jpv7cJf8qdR4I3n7id5hUysAiMVvwyqUqHzGnVUJE=", - "desktopYarnHash": "1scp9y2lmah3n20f1kpc9paspd3qgslg129diis7g11cz4h0wyi5", - "webSrcHash": "985nxLIOZvrUX11AJDXYRMwC76/aP9ruSCqL47c7ZRM=", - "webYarnHash": "0bmjg9qhd89bdnh398lp257mxdgdd88wj5g3fmc3cavyd6hmgzbn" + "version": "1.11.14", + "desktopSrcHash": "91WCtb+ylVz9gSqOHb5GuSC1YZjDS3M8gdFIZYVls3c=", + "desktopYarnHash": "1ng9fwpwxsw91bzgd2kb2pdq927rkjv5rrrkmszvn55bj6ry7sqi", + "webSrcHash": "ss7Pmjg205EE/V/xIV7nvfZFRyyJfuB8MDM9dCnPckQ=", + "webYarnHash": "1v6qlk58msam9dglal4jzcyqcsrspa6idsdb8acjnscdkj26bkps" } From f552429c8071f9d597cb0306e9787933bc2bfc5c Mon Sep 17 00:00:00 2001 From: Viktor Kronvall Date: Fri, 4 Nov 2022 14:57:22 +0900 Subject: [PATCH 06/32] udpreplay: init at 1.0.0 --- maintainers/maintainer-list.nix | 6 ++++++ pkgs/tools/networking/udpreplay/default.nix | 24 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 32 insertions(+) create mode 100644 pkgs/tools/networking/udpreplay/default.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index dc6f8eca59b5..46358221ca69 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -2744,6 +2744,12 @@ githubId = 40290417; name = "Seb Blair"; }; + considerate = { + email = "viktor.kronvall@gmail.com"; + github = "considerate"; + githubId = 217918; + name = "Viktor Kronvall"; + }; copumpkin = { email = "pumpkingod@gmail.com"; github = "copumpkin"; diff --git a/pkgs/tools/networking/udpreplay/default.nix b/pkgs/tools/networking/udpreplay/default.nix new file mode 100644 index 000000000000..2e91e884e6f2 --- /dev/null +++ b/pkgs/tools/networking/udpreplay/default.nix @@ -0,0 +1,24 @@ +{ stdenv, cmake, libpcap, fetchFromGitHub, lib }: +stdenv.mkDerivation rec { + pname = "updreplay"; + version = "1.0.0"; + nativeBuildInputs = [ cmake ]; + buildInputs = [ libpcap ]; + src = fetchFromGitHub { + owner = "rigtorp"; + repo = "udpreplay"; + rev = "v${version}"; + hash = "sha256-8cp1RyVBnq3vx2LPkAx7ktmdLo0bSq9UWlbb/DrJxpc="; + }; + + meta = with lib; { + description = "Replay UDP packets from a pcap file"; + longDescription = '' + udpreplay is a lightweight alternative to tcpreplay for replaying UDP unicast and multicast streams from a pcap file. + ''; + homepage = "https://github.com/rigtorp/udpreplay"; + license = licenses.mit; + maintainers = [ maintainers.considerate ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c97f1d41dbda..a45dee49527d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12286,6 +12286,8 @@ with pkgs; udftools = callPackage ../tools/filesystems/udftools {}; + udpreplay = callPackage ../tools/networking/udpreplay { }; + udpt = callPackage ../servers/udpt { }; udptunnel = callPackage ../tools/networking/udptunnel { }; From e0f3fd697055212016f71c938ab3cfc2125a8e83 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 9 Nov 2022 15:07:38 +0100 Subject: [PATCH 07/32] python310Packages.pytenable: 1.4.8 -> 1.4.9 --- pkgs/development/python-modules/pytenable/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pytenable/default.nix b/pkgs/development/python-modules/pytenable/default.nix index 2b08e6129fad..caae9319db7e 100644 --- a/pkgs/development/python-modules/pytenable/default.nix +++ b/pkgs/development/python-modules/pytenable/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { pname = "pytenable"; - version = "1.4.8"; + version = "1.4.9"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -29,7 +29,7 @@ buildPythonPackage rec { owner = "tenable"; repo = "pyTenable"; rev = "refs/tags/${version}"; - hash = "sha256-alBEKCYwLIbQanKTzkd3NnfOudhGhKhg4sFqddWdzQA="; + hash = "sha256-Cj1/f/e+j5CJMl+afF+HStd419Uh053jKk/vmObaBl8="; }; propagatedBuildInputs = [ From cc9214ee8edbe45d9c5cba10a956122e7e85e9ea Mon Sep 17 00:00:00 2001 From: figsoda Date: Wed, 9 Nov 2022 09:53:19 -0500 Subject: [PATCH 08/32] rustscan: 2.2.0 -> 2.2.1 --- pkgs/tools/security/rustscan/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/rustscan/default.nix b/pkgs/tools/security/rustscan/default.nix index 79a1fd1195f0..849a921898a7 100644 --- a/pkgs/tools/security/rustscan/default.nix +++ b/pkgs/tools/security/rustscan/default.nix @@ -2,14 +2,14 @@ rustPlatform.buildRustPackage rec { pname = "rustscan"; - version = "2.1.0"; + version = "2.1.1"; src = fetchCrate { inherit pname version; - sha256 = "sha256-f9QFsVGGKoWqZGIg8Z8FgZGcUo5M8MFNUavK69SgHkg="; + sha256 = "sha256-yGVhbI1LivTIQEgqOK59T1+8SiTJBPIdftiXkwE4lZM="; }; - cargoSha256 = "sha256-ZoDE7SJ6snWTFvYXHZdVCC6UCug2wGghH93FfDTDsv0="; + cargoSha256 = "sha256-UR3ktV80QU0N3f7qmqdhYpc5uwoPq4UvN40zEuMbp+Q="; postPatch = '' substituteInPlace src/scripts/mod.rs \ From eb9835c6766dee18ae98e2fdb7cb17198f24538e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 9 Nov 2022 16:08:10 +0000 Subject: [PATCH 09/32] python310Packages.thriftpy2: 0.4.14 -> 0.4.15 --- pkgs/development/python-modules/thriftpy2/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/thriftpy2/default.nix b/pkgs/development/python-modules/thriftpy2/default.nix index 0d5f5afe4a5c..53b1219bc485 100644 --- a/pkgs/development/python-modules/thriftpy2/default.nix +++ b/pkgs/development/python-modules/thriftpy2/default.nix @@ -10,15 +10,15 @@ buildPythonPackage rec { pname = "thriftpy2"; - version = "0.4.14"; + version = "0.4.15"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "Thriftpy"; repo = pname; - rev = "v${version}"; - sha256 = "17f57vsbym4c9yax128bhrwg2zjxcsgl3ja6422y8hyb38v5mdc3"; + rev = "refs/tags/v${version}"; + sha256 = "sha256-1X1roRFQgLJ+rrRuRlHMVtUdj2D68WGdxvid/0chsvI="; }; nativeBuildInputs = [ From 821d9076acb51e8ba66071c8acd3d657d35f4b73 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 9 Nov 2022 18:16:39 +0000 Subject: [PATCH 10/32] python310Packages.vispy: 0.11.0 -> 0.12.0 --- pkgs/development/python-modules/vispy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/vispy/default.nix b/pkgs/development/python-modules/vispy/default.nix index 27c67de69332..6c3acdf6e2ba 100644 --- a/pkgs/development/python-modules/vispy/default.nix +++ b/pkgs/development/python-modules/vispy/default.nix @@ -16,11 +16,11 @@ buildPythonPackage rec { pname = "vispy"; - version = "0.11.0"; + version = "0.12.0"; src = fetchPypi { inherit pname version; - sha256 = "sha256-zi0lalMdQF8pWTPHSZaRL79D9lUhbbX8ao/zp4dHhBo="; + sha256 = "sha256-CtSg/pAtOhhiuS6yE3ogzF0llceMQTF12ShXIi9GMD0="; }; patches = [ From 90fc7b0b001bc0e1a3d99cf1a6e3d834fedc2872 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 9 Nov 2022 18:17:41 +0000 Subject: [PATCH 11/32] python310Packages.azure-eventgrid: 4.9.0 -> 4.9.1 --- pkgs/development/python-modules/azure-eventgrid/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/azure-eventgrid/default.nix b/pkgs/development/python-modules/azure-eventgrid/default.nix index 99e9198c4fea..43d075505193 100644 --- a/pkgs/development/python-modules/azure-eventgrid/default.nix +++ b/pkgs/development/python-modules/azure-eventgrid/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "azure-eventgrid"; - version = "4.9.0"; + version = "4.9.1"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -18,7 +18,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; extension = "zip"; - hash = "sha256-ueuOxhNATK6o/Vue+x5vtP0ac3CQellkuyQmSrq7tqQ="; + hash = "sha256-zRiS5XsinEQoyYsg2PSso3Y2pC7QwB1fbVkCF1OeQ3U="; }; propagatedBuildInputs = [ From 4ae8ed4631c104535f8c5f3f3a3dea0b61f612e9 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 9 Nov 2022 22:45:47 +0000 Subject: [PATCH 12/32] python310Packages.adafruit-platformdetect: 3.32.0 -> 3.33.0 --- .../python-modules/adafruit-platformdetect/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/adafruit-platformdetect/default.nix b/pkgs/development/python-modules/adafruit-platformdetect/default.nix index d87626e7b530..6707cb53e720 100644 --- a/pkgs/development/python-modules/adafruit-platformdetect/default.nix +++ b/pkgs/development/python-modules/adafruit-platformdetect/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "adafruit-platformdetect"; - version = "3.32.0"; + version = "3.33.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -15,7 +15,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "Adafruit-PlatformDetect"; inherit version; - hash = "sha256-MbrRf7kcPNYb1i+5cSkCvO9SJbvrPAeKGWxtfi1FmaQ="; + hash = "sha256-Fj+LUTovZm6t0YRCa8QtoTBal+PefCvTIl9OeBoac6U="; }; nativeBuildInputs = [ From d225156cde893c3061da1078f7ff2ad569e13256 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 9 Nov 2022 23:02:32 +0000 Subject: [PATCH 13/32] python310Packages.aiohomekit: 2.2.18 -> 2.2.19 --- pkgs/development/python-modules/aiohomekit/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aiohomekit/default.nix b/pkgs/development/python-modules/aiohomekit/default.nix index ab9f3556a887..a72d72878760 100644 --- a/pkgs/development/python-modules/aiohomekit/default.nix +++ b/pkgs/development/python-modules/aiohomekit/default.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { pname = "aiohomekit"; - version = "2.2.18"; + version = "2.2.19"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -27,7 +27,7 @@ buildPythonPackage rec { owner = "Jc2k"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-yE3+1dhgqgqmoBhBVsivXvn7MTKaY8FYiyqBRkg3h1U="; + hash = "sha256-x1Cah47EupdqLxwoJBLmN3AtC7zYqGZTP0nbLLsC3a0="; }; nativeBuildInputs = [ From e280d06774ab3a9adafc264f6c070d5686351474 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 10 Nov 2022 00:12:25 +0000 Subject: [PATCH 14/32] python310Packages.azure-mgmt-containerservice: 20.6.0 -> 20.7.0 --- .../python-modules/azure-mgmt-containerservice/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/azure-mgmt-containerservice/default.nix b/pkgs/development/python-modules/azure-mgmt-containerservice/default.nix index ce0920b972b6..dff9c2fe6d65 100644 --- a/pkgs/development/python-modules/azure-mgmt-containerservice/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-containerservice/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "azure-mgmt-containerservice"; - version = "20.6.0"; + version = "20.7.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -19,7 +19,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; extension = "zip"; - hash = "sha256-zQ3Lg45rO1vgtsjQnokNFjWt6qnrNQ2CnElGJ0Dksew="; + hash = "sha256-tNuBIfObCWd8JXq49CDLOzMl1pw7ulTQJua7CNJjRuo="; }; propagatedBuildInputs = [ From 3c603ddf321480716ced0b084f1132e63ea7f405 Mon Sep 17 00:00:00 2001 From: nixpkgs-upkeep-bot Date: Thu, 10 Nov 2022 00:31:06 +0000 Subject: [PATCH 15/32] vscode: 1.73.0 -> 1.73.1 --- pkgs/applications/editors/vscode/vscode.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/editors/vscode/vscode.nix b/pkgs/applications/editors/vscode/vscode.nix index 337db00d6c5d..5f7204012762 100644 --- a/pkgs/applications/editors/vscode/vscode.nix +++ b/pkgs/applications/editors/vscode/vscode.nix @@ -18,17 +18,17 @@ let archive_fmt = if stdenv.isDarwin then "zip" else "tar.gz"; sha256 = { - x86_64-linux = "1dcp6r78kaq3wzcw7dfra59kfpdzqy9qnlyp1ywayxh610ryjyfc"; - x86_64-darwin = "0ypxjh5z0v83y0wb22m942qqlvx5df7k4dk8ip9wqd4p7h8540q8"; - aarch64-linux = "1qq4zg0j3rpx06cqaic7a1x7ckk5wf8w1gp5y8hwhvkym4s8g4i7"; - aarch64-darwin = "18hrsvr7hgmlpi64dbk581i516my6c5zwz6g8awp4fhxilk0wbrg"; - armv7l-linux = "1y357ci4gllxg26m5qdv9652i5rra5vj972l7kdnxiimfgm6h83b"; + x86_64-linux = "1m5mz6wdrivqrw699iivvh62bdn4yzm6hmph455sdyvk5icq59dq"; + x86_64-darwin = "1zn0h9p05kb3fcn816fpxh8asaglycjmpiwkrmxd0s8jwjq7m4gn"; + aarch64-linux = "1gs810iz08jxqfhcgi6ab41m46ib5h3m7i3pnyvlimxx99r5lirf"; + aarch64-darwin = "1dvasr1h28snxi33m6yx95pp3jd4irwy6yav4ilwrcl22cf6ybvi"; + armv7l-linux = "1j5vrpdaqihcr02pdsd5nz07zsk0027xmkfp30npnjy1gjrjvnim"; }.${system} or throwSystem; in callPackage ./generic.nix rec { # Please backport all compatible updates to the stable release. # This is important for the extension ecosystem. - version = "1.73.0"; + version = "1.73.1"; pname = "vscode"; executableName = "code" + lib.optionalString isInsiders "-insiders"; From 43bd6a0ee63186f31876aecfc36d7b6b7ec25c1b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 10 Nov 2022 01:03:51 +0000 Subject: [PATCH 16/32] python310Packages.bellows: 0.34.2 -> 0.34.3 --- pkgs/development/python-modules/bellows/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/bellows/default.nix b/pkgs/development/python-modules/bellows/default.nix index 4e509e1b3c27..de4205654255 100644 --- a/pkgs/development/python-modules/bellows/default.nix +++ b/pkgs/development/python-modules/bellows/default.nix @@ -17,14 +17,14 @@ buildPythonPackage rec { pname = "bellows"; - version = "0.34.2"; + version = "0.34.3"; format = "setuptools"; src = fetchFromGitHub { owner = "zigpy"; repo = "bellows"; rev = "refs/tags/${version}"; - sha256 = "sha256-78LUQBFV4TFPDLiSHBG+RLnQLaCPX4LZpow9aszQAQA="; + sha256 = "sha256-7jaXNz7i+kF64T+5/QWKGpxHCkg/M9U2hbWrVB2tjH8="; }; propagatedBuildInputs = [ From da31bd56732b2b954c867b0283df66539b3764c0 Mon Sep 17 00:00:00 2001 From: Shamrock Lee <44064051+ShamrockLee@users.noreply.github.com> Date: Wed, 3 Aug 2022 09:02:55 +0800 Subject: [PATCH 17/32] patchRcPathBash, patchRcPathCsh, patchRcPathFish, patchRcPathPosix: init Init patchRcPath hooks, which provides utilities to patch shell scripts to be sourced by users. Add test cases and documentation. --- doc/hooks/index.xml | 1 + doc/hooks/patch-rc-path-hooks.section.md | 50 ++ .../patch-rc-path-hooks/default.nix | 64 +++ .../patch-rc-path-hooks/patch-rc-path-bash.sh | 50 ++ .../patch-rc-path-hooks/patch-rc-path-csh.sh | 57 +++ .../patch-rc-path-hooks/patch-rc-path-fish.sh | 50 ++ .../patch-rc-path-posix.sh | 39 ++ .../patch-rc-path-hooks/test/default.nix | 442 ++++++++++++++++++ .../test/sample_source.bash | 2 + .../test/sample_source.csh.in | 1 + .../test/sample_source.fish | 9 + .../test/sample_source.sh.in | 2 + .../test/test-sourcing-bash | 21 + .../test/test-sourcing-csh | 13 + .../test/test-sourcing-fish | 13 + .../test/test-sourcing-posix | 21 + pkgs/top-level/all-packages.nix | 4 + 17 files changed, 839 insertions(+) create mode 100644 doc/hooks/patch-rc-path-hooks.section.md create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-bash.sh create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-csh.sh create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-fish.sh create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-posix.sh create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/default.nix create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.bash create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.csh.in create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.fish create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.sh.in create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-bash create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-csh create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-fish create mode 100644 pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-posix diff --git a/doc/hooks/index.xml b/doc/hooks/index.xml index ed703c03d8b0..0917fac6c0ac 100644 --- a/doc/hooks/index.xml +++ b/doc/hooks/index.xml @@ -22,6 +22,7 @@ + diff --git a/doc/hooks/patch-rc-path-hooks.section.md b/doc/hooks/patch-rc-path-hooks.section.md new file mode 100644 index 000000000000..5c870dc782c2 --- /dev/null +++ b/doc/hooks/patch-rc-path-hooks.section.md @@ -0,0 +1,50 @@ + +# `patchRcPath` hooks {#sec-patchRcPathHooks} + +These hooks provide shell-specific utilities (with the same name as the hook) to patch shell scripts meant to be sourced by software users. + +The typical usage is to patch initialisation or [rc](https://unix.stackexchange.com/questions/3467/what-does-rc-in-bashrc-stand-for) scripts inside `$out/bin` or `$out/etc`. +Such scripts, when being sourced, would insert the binary locations of certain commands into `PATH`, modify other environment variables or run a series of start-up commands. +When shipped from the upstream, they sometimes use commands that might not be available in the environment they are getting sourced in. + +The compatible shells for each hook are: + + - `patchRcPathBash`: [Bash](https://www.gnu.org/software/bash/), [ksh](http://www.kornshell.org/), [zsh](https://www.zsh.org/) and other shells supporting the Bash-like parameter expansions. + - `patchRcPathCsh`: Csh scripts, such as those targeting [tcsh](https://www.tcsh.org/). + - `patchRcPathFish`: [Fish](https://fishshell.com/) scripts. + - `patchRcPathPosix`: POSIX-conformant shells supporting the limited parameter expansions specified by the POSIX standard. Current implementation uses the parameter expansion `${foo-}` only. + +For each supported shell, it modifies the script with a `PATH` prefix that is later removed when the script ends. +It allows nested patching, which guarantees that a patched script may source another patched script. + +Syntax to apply the utility to a script: + +```sh +patchRcPath +``` + +Example usage: + +Given a package `foo` containing an init script `this-foo.fish` that depends on `coreutils`, `man` and `which`, +patch the init script for users to source without having the above dependencies in their `PATH`: + +```nix +{ lib, stdenv, patchRcPathFish}: +stdenv.mkDerivation { + + # ... + + nativeBuildInputs = [ + patchRcPathFish + ]; + + postFixup = '' + patchRcPathFish $out/bin/this-foo.fish ${lib.makeBinPath [ coreutils man which ]} + ''; +} +``` + +::: {.note} +`patchRcPathCsh` and `patchRcPathPosix` implementation depends on `sed` to do the string processing. +The others are in vanilla shell and have no third-party dependencies. +::: diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix new file mode 100644 index 000000000000..73fbfa6e9b72 --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix @@ -0,0 +1,64 @@ +{ lib +, callPackage +, makeSetupHook +, gnused +}: +let + tests = import ./test { inherit callPackage; }; +in +{ + patchRcPathBash = (makeSetupHook + { + name = "patch-rc-path-bash"; + meta = with lib; { + description = "Setup-hook to inject source-time PATH prefix to a Bash/Ksh/Zsh script"; + maintainers = with maintainers; [ ShamrockLee ]; + }; + } ./patch-rc-path-bash.sh).overrideAttrs (oldAttrs: { + passthru.tests = { + inherit (tests) test-bash; + }; + }); + patchRcPathCsh = (makeSetupHook + { + name = "patch-rc-path-csh"; + substitutions = { + sed = "${gnused}/bin/sed"; + }; + meta = with lib; { + description = "Setup-hook to inject source-time PATH prefix to a Csh script"; + maintainers = with maintainers; [ ShamrockLee ]; + }; + } ./patch-rc-path-csh.sh).overrideAttrs (oldAttrs: { + passthru.tests = { + inherit (tests) test-csh; + }; + }); + patchRcPathFish = (makeSetupHook + { + name = "patch-rc-path-fish"; + meta = with lib; { + description = "Setup-hook to inject source-time PATH prefix to a Fish script"; + maintainers = with maintainers; [ ShamrockLee ]; + }; + } ./patch-rc-path-fish.sh).overrideAttrs (oldAttrs: { + passthru.tests = { + inherit (tests) test-fish; + }; + }); + patchRcPathPosix = (makeSetupHook + { + name = "patch-rc-path-posix"; + substitutions = { + sed = "${gnused}/bin/sed"; + }; + meta = with lib; { + description = "Setup-hook to inject source-time PATH prefix to a POSIX shell script"; + maintainers = with maintainers; [ ShamrockLee ]; + }; + } ./patch-rc-path-posix.sh).overrideAttrs (oldAttrs: { + passthru.tests = { + inherit (tests) test-posix; + }; + }); +} diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-bash.sh b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-bash.sh new file mode 100644 index 000000000000..b98b983861b0 --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-bash.sh @@ -0,0 +1,50 @@ +patchRcPathBash(){ + local FILE_TO_PATCH="$1" + local SOURCETIME_PATH="$2" + local FILE_TO_WORK_ON="$(mktemp "$(basename "$FILE_TO_PATCH").XXXXXX.tmp")" + cat <> "$FILE_TO_WORK_ON" +# Lines to add to PATH the source-time utilities for Nixpkgs packaging +if [[ -n "\${NIXPKGS_SOURCETIME_PATH-}" ]]; then + NIXPKGS_SOURCETIME_PATH_OLD="\$NIXPKGS_SOURCETIME_PATH;\${NIXPKGS_SOURCETIME_PATH_OLD-}" +fi +NIXPKGS_SOURCETIME_PATH="$SOURCETIME_PATH" +if [[ -n "\$PATH" ]]; then + PATH="\$NIXPKGS_SOURCETIME_PATH:\$PATH" +else + PATH="\$NIXPKGS_SOURCETIME_PATH" +fi +export PATH +# End of lines to add to PATH source-time utilities for Nixpkgs packaging +EOF + cat "$FILE_TO_PATCH" >> "$FILE_TO_WORK_ON" + cat <> "$FILE_TO_WORK_ON" +# Lines to clean up inside PATH the source-time utilities for Nixpkgs packaging +if [[ -n "\${PATH-}" ]]; then + # Remove the inserted section + PATH="\${PATH/\$NIXPKGS_SOURCETIME_PATH}" + # Remove the duplicated colons + PATH="\${PATH//::/:}" + # Remove the prefixing colon + if [[ -n "\$PATH" && "\${PATH:0:1}" == ":" ]]; then + PATH="\${PATH:1}" + fi + # Remove the trailing colon + if [[ -n "\$PATH" && "\${PATH:\${#PATH}-1}" == ":" ]]; then + PATH="\${PATH::}" + fi + export PATH +fi +if [[ -n "\${NIXPKGS_SOURCETIME_PATH_OLD-}" ]]; then + IFS="" read -r -d ";" NIXPKGS_SOURCETIME_PATH <<< "\$NIXPKGS_SOURCETIME_PATH_OLD" + NIXPKGS_SOURCETIME_PATH_OLD="\${NIXPKGS_SOURCETIME_PATH_OLD:\${#NIXPKGS_SOURCETIME_PATH}+1}" +else + unset NIXPKGS_SOURCETIME_PATH +fi +if [[ -z "\${NIXPKGS_SOURCETIME_PATH_OLD-}" ]]; then + unset NIXPKGS_SOURCETIME_PATH_OLD +fi +# End of lines to clean up inside PATH the source-time utilities for Nixpkgs packaging +EOF + cat "$FILE_TO_WORK_ON" > "$FILE_TO_PATCH" + rm "$FILE_TO_WORK_ON" +} diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-csh.sh b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-csh.sh new file mode 100644 index 000000000000..5e2367003ade --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-csh.sh @@ -0,0 +1,57 @@ +patchRcPathCsh(){ + local FILE_TO_PATCH="$1" + local SOURCETIME_PATH="$2" + local FILE_TO_WORK_ON="$(mktemp "$(basename "$FILE_TO_PATCH").XXXXXX.tmp")" + cat <> "$FILE_TO_WORK_ON" +# Lines to add to PATH the source-time utilities for Nixpkgs packaging +if (\$?NIXPKGS_SOURCETIME_PATH) then + if ("\$NIXPKGS_SOURCETIME_PATH" != "") then + if (\$?NIXPKGS_SOURCETIME_PATH_OLD) then + if ("\$NIXPKGS_SOURCETIME_PATH_OLD" != "") + set NIXPKGS_SOURCETIME_PATH_OLD = (\$NIXPKGS_SOURCETIME_PATH \$NIXPKGS_SOURCETIME_PATH_OLD) + else + set NIXPKGS_SOURCETIME_PATH_OLD = \$NIXPKGS_SOURCETIME_PATH + endif + else + set NIXPKGS_SOURCETIME_PATH_OLD = \$NIXPKGS_SOURCETIME_PATH + endif + endif +endif +set NIXPKGS_SOURCETIME_PATH = "$SOURCETIME_PATH" +if (! \$?PATH) then + setenv PATH "" +endif +if ("\$PATH" != "") then + setenv PATH "\${NIXPKGS_SOURCETIME_PATH}:\$PATH" +else + setenv PATH "\$NIXPKGS_SOURCETIME_PATH" +endif +# End of lines to add to PATH source-time utilities for Nixpkgs packaging +EOF + cat "$FILE_TO_PATCH" >> "$FILE_TO_WORK_ON" + cat <> "$FILE_TO_WORK_ON" +# Lines to clean up inside PATH the source-time utilities for Nixpkgs packaging +if (\$?PATH) then + if ("\$PATH" != "") then + # Remove the inserted section, the duplicated colons, and the leading and trailing colon + setenv PATH \`echo "\$PATH" | @sed@ "s#\${NIXPKGS_SOURCETIME_PATH}##" | @sed@ "s#::#:#g" | @sed@ "s#^:##" | @sed@ 's#:\$##'\` + endif +endif +if (\$?NIXPKGS_SOURCETIME_PATH_OLD) then + if ("\$NIXPKGS_SOURCETIME_PATH_OLD" != "") then + set NIXPKGS_SOURCETIME_PATH = \$NIXPKGS_SOURCETIME_PATH_OLD[1] + set NIXPKGS_SOURCETIME_PATH_OLD = \$NIXPKGS_SOURCETIME_PATH_OLD[2-] + else + unset NIXPKGS_SOURCETIME_PATH + endif + if (NIXPKGS_SOURCETIME_PATH_OLD == "") then + unset NIXPKGS_SOURCETIME_PATH_OLD + endif +else + unset NIXPKGS_SOURCETIME_PATH +endif +# End of lines to clean up inside PATH the source-time utilities for Nixpkgs packaging +EOF + cat "$FILE_TO_WORK_ON" > "$FILE_TO_PATCH" + rm "$FILE_TO_WORK_ON" +} diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-fish.sh b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-fish.sh new file mode 100644 index 000000000000..3d3e08c57a11 --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-fish.sh @@ -0,0 +1,50 @@ +patchRcPathFish(){ + local FILE_TO_PATCH="$1" + local SOURCETIME_PATH="$2" + local FILE_TO_WORK_ON="$(mktemp "$(basename "$FILE_TO_PATCH").XXXXXX.tmp")" + cat <> "$FILE_TO_WORK_ON" +# Lines to add to PATH the source-time utilities for Nixpkgs packaging +if set -q NIXPKGS_SOURCETIME_PATH && test (count \$NIXPKGS_SOURCETIME_PATH) -gt 0 + set --unpath NIXPKGS_SOURCETIME_PATH_OLD "\$NIXPKGS_SOURCETIME_PATH" \$NIXPKGS_SOURCETIME_PATH_OLD +end +set --path NIXPKGS_SOURCETIME_PATH $SOURCETIME_PATH +set -g --path PATH \$NIXPKGS_SOURCETIME_PATH \$PATH +# End of lines to add to PATH source-time utilities for Nixpkgs packaging +EOF + cat "$FILE_TO_PATCH" >> "$FILE_TO_WORK_ON" + cat <> "$FILE_TO_WORK_ON" +# Lines to clean up inside PATH the source-time utilities for Nixpkgs packaging +if set -q PATH && test "\$PATH" != "" && test (count \$PATH) -ge (count \$NIXPKGS_SOURCETIME_PATH) + # Remove the inserted section + for i in (seq 0 (math (count \$PATH) - (count \$NIXPKGS_SOURCETIME_PATH))) + for j in (seq 1 (count \$NIXPKGS_SOURCETIME_PATH)) + if test \$PATH[(math \$i + \$j)] != \$NIXPKGS_SOURCETIME_PATH[\$j] + set i -1 + break + end + end + if test \$i -eq -1 + continue + end + if test \$i -eq 0 + set -g --path PATH \$PATH[(math (count \$NIXPKGS_SOURCETIME_PATH) + 1)..] + else + set -g --path PATH \$PATH[..\$i] \$PATH[(math (count \$NIXPKGS_SOURCETIME_PATH) + 1 + \$i)..] + end + break + end +end +if set -q NIXPKGS_SOURCETIME_PATH_OLD && test (count \$NIXPKGS_SOURCETIME_PATH_OLD) -gt 0 + set --path NIXPKGS_SOURCETIME_PATH \$NIXPKGS_SOURCETIME_PATH_OLD[1] + set --unpath NIXPKGS_SOURCETIME_PATH_OLD \$NIXPKGS_SOURCETIME_PATH_OLD[2..] +else + set -e NIXPKGS_SOURCETIME_PATH +end +if set -q NIXPKGS_SOURCETIME_PATH_OLD && test (count \$NIXPKGS_SOURCETIME_PATH_OLD) -eq 0 + set -e NIXPKGS_SOURCETIME_PATH_OLD +end +# End of lines to clean up inside PATH the source-time utilities for Nixpkgs packaging +EOF + cat "$FILE_TO_WORK_ON" > "$FILE_TO_PATCH" + rm "$FILE_TO_WORK_ON" +} diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-posix.sh b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-posix.sh new file mode 100644 index 000000000000..a3740d4436d9 --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-posix.sh @@ -0,0 +1,39 @@ +patchRcPathPosix(){ + local FILE_TO_PATCH="$1" + local SOURCETIME_PATH="$2" + local FILE_TO_WORK_ON="$(mktemp "$(basename "$FILE_TO_PATCH").XXXXXX.tmp")" + cat <> "$FILE_TO_WORK_ON" +# Lines to add to PATH the source-time utilities for Nixpkgs packaging +if [ -n "\${NIXPKGS_SOURCETIME_PATH-}" ]; then + NIXPKGS_SOURCETIME_PATH_OLD="\$NIXPKGS_SOURCETIME_PATH;\${NIXPKGS_SOURCETIME_PATH_OLD-}" +fi +NIXPKGS_SOURCETIME_PATH="$SOURCETIME_PATH" +if [ -n "\$PATH" ]; then + PATH="\$NIXPKGS_SOURCETIME_PATH:\$PATH"; +else + PATH="\$NIXPKGS_SOURCETIME_PATH" +fi +export PATH +# End of lines to add to PATH source-time utilities for Nixpkgs packaging +EOF + cat "$FILE_TO_PATCH" >> "$FILE_TO_WORK_ON" + cat <> "$FILE_TO_WORK_ON" +# Lines to clean up inside PATH the source-time utilities for Nixpkgs packaging +if [ -n "\${PATH-}" ]; then + PATH="\$(echo "\$PATH" | @sed@ "s#\$NIXPKGS_SOURCETIME_PATH##" | @sed@ "s#::#:#g" | @sed@ "s#^:##" | @sed@ "s#:\\\$##")" + export PATH +fi +if [ -n "\${NIXPKGS_SOURCETIME_PATH_OLD-}" ]; then + NIXPKGS_SOURCETIME_PATH="\$(echo "\$NIXPKGS_SOURCETIME_PATH_OLD" | @sed@ "s#\\([^;]\\);.*#\\1#")" + NIXPKGS_SOURCETIME_PATH_OLD="\$(echo "\$NIXPKGS_SOURCETIME_PATH_OLD" | @sed@ "s#[^;];\\(.*\\)#\\1#")" +else + unset NIXPKGS_SOURCETIME_PATH +fi +if [ -z "\${NIXPKGS_SOURCETIME_PATH_OLD-}" ]; then + unset NIXPKGS_SOURCETIME_PATH_OLD +fi +# End of lines to clean up inside PATH the source-time utilities for Nixpkgs packaging +EOF + cat "$FILE_TO_WORK_ON" > "$FILE_TO_PATCH" + rm "$FILE_TO_WORK_ON" +} diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/default.nix b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/default.nix new file mode 100644 index 000000000000..82bc160387ee --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/default.nix @@ -0,0 +1,442 @@ +{ callPackage }: + +{ + test-bash = callPackage + ( + { lib + , runCommandLocal + , bash + , hello + , ksh + , patchRcPathBash + , shellcheck + , zsh + }: + runCommandLocal "patch-rc-path-bash-test" + { + nativeBuildInputs = [ + bash + ksh + patchRcPathBash + shellcheck + zsh + ]; + meta = { + description = "Package test of patchActivateBash"; + inherit (patchRcPathBash.meta) maintainers; + }; + } + '' + set -eu -o pipefail + + + # Check the setup hook script + + echo "Running shellcheck against ${./test-sourcing-bash}" + shellcheck -s bash --exclude SC1090 ${./test-sourcing-bash} + shellcheck -s ksh --exclude SC1090 ${./test-sourcing-bash} + + + # Test patching a blank file + + echo > blank.bash + + echo "Generating blank_patched.bash from blank.bash" + cp blank.bash blank_patched.bash + patchRcPathBash blank_patched.bash "$PWD/delta:$PWD/foxtrot" + + echo "Running shellcheck against blank_patched.bash" + shellcheck -s bash blank_patched.bash + shellcheck -s ksh blank_patched.bash + + echo "Testing in Bash if blank.bash and blank_patched.bash modifies PATH the same way" + bash ${./test-sourcing-bash} ./blank.bash ./blank_patched.bash + + echo "Testing in Ksh if blank.bash and blank_patched.bash modifies PATH the same way" + ksh ${./test-sourcing-bash} "$PWD/blank.bash" "$PWD/blank_patched.bash" + + echo "Testing in Zsh if blank.bash and blank_patched.bash modifies PATH the same way" + zsh ${./test-sourcing-bash} ./blank.bash ./blank_patched.bash + + + # Test patching silent_hello + + echo "hello > /dev/null" > silent_hello.bash + + echo "Generating silent_hello_patched.bash from silent_hello.bash" + cp silent_hello.bash silent_hello_patched.bash + patchRcPathBash silent_hello_patched.bash "${hello}/bin" + + echo "Running shellcheck against silent_hello_patched.bash" + shellcheck -s bash silent_hello_patched.bash + + echo "Testing in Bash if silent_hello_patched.bash get sourced without error" + bash -eu -o pipefail -c ". ./silent_hello_patched.bash" + + echo "Testing in Ksh if silent_hello_patched.bash get sourced without error" + ksh -eu -o pipefail -c ". ./silent_hello_patched.bash" + + echo "Testing in Zsh if silent_hello_patched.bash get sourced without error" + zsh -eu -o pipefail -c ". ./silent_hello_patched.bash" + + + # Check the sample source + + echo "Running shellcheck against sample_source.bash" + shellcheck -s bash ${./sample_source.bash} + shellcheck -s ksh ${./sample_source.bash} + + + # Test patching the sample source + + cp ${./sample_source.bash} sample_source_patched.bash + chmod u+w sample_source_patched.bash + + echo "Generating sample_source_patched.bash from ./sample_source.bash" + patchRcPathBash sample_source_patched.bash "$PWD/delta:$PWD/foxtrot" + + echo "Running shellcheck against sample_source_patched.bash" + shellcheck -s bash sample_source_patched.bash + + echo "Testing in Bash if sample_source.bash and sample_source_patched.bash modifies PATH the same way" + bash ${./test-sourcing-bash} ${./sample_source.bash} ./sample_source_patched.bash + + echo "Testing in Ksh if sample_source.bash and sample_source_patched.bash modifies PATH the same way" + ksh ${./test-sourcing-bash} ${./sample_source.bash} "$PWD/sample_source_patched.bash" + + echo "Testing in Zsh if sample_source.bash and sample_source_patched.bash modifies PATH the same way" + zsh ${./test-sourcing-bash} ${./sample_source.bash} ./sample_source_patched.bash + + + # Test double-patching the sample source + + echo "Patching again sample_source_patched.bash" + patchRcPathBash sample_source_patched.bash "$PWD/foxtrot:$PWD/golf" + + echo "Running shellcheck against sample_source_patched.bash" + shellcheck -s bash sample_source_patched.bash + shellcheck -s ksh sample_source_patched.bash + + echo "Testing in Bash if sample_source.bash and sample_source_patched.bash modifies PATH the same way" + bash ${./test-sourcing-bash} ${./sample_source.bash} ./sample_source_patched.bash + + echo "Testing in Ksh if sample_source.bash and sample_source_patched.bash modifies PATH the same way" + ksh ${./test-sourcing-bash} ${./sample_source.bash} "$PWD/sample_source_patched.bash" + + echo "Testing in Zsh if sample_source.bash and sample_source_patched.bash modifies PATH the same way" + zsh ${./test-sourcing-bash} ${./sample_source.bash} ./sample_source_patched.bash + + + # Create a dummy output + touch "$out" + '' + ) + { }; + + + + test-csh = callPackage + ( + { lib + , runCommandLocal + , gnused + , hello + , patchRcPathCsh + , tcsh + }: + runCommandLocal "patch-rc-path-csh-test" + { + nativeBuildInputs = [ + patchRcPathCsh + tcsh + ]; + meta = { + description = "Package test of patchActivateCsh"; + inherit (patchRcPathCsh.meta) maintainers; + }; + } + '' + set -eu -o pipefail + + + # Test patching a blank file + + echo > blank.csh + + echo "Generating blank_patched.csh from blank.csh" + cp blank.csh blank_patched.csh + patchRcPathCsh blank_patched.csh "$PWD/delta:$PWD/foxtrot" + + echo "Testing in Csh if blank.csh and blank_patched.csh modifies PATH the same way" + tcsh -e ${./test-sourcing-csh} blank.csh blank_patched.csh + + + # Test patching silent_hello file + + echo "hello > /dev/null" > silent_hello.csh + + echo "Generating silent_hello_patched.csh from silent_hello.csh" + cp silent_hello.csh silent_hello_patched.csh + patchRcPathCsh silent_hello_patched.csh "${hello}/bin" + + echo "Testing in Csh if silent_hello_patched.csh get sourced without errer" + tcsh -e -c "source silent_hello_patched.csh" + + + # Generate the sample source + + substitute ${./sample_source.csh.in} sample_source.csh --replace @sed@ ${gnused}/bin/sed + chmod u+rw sample_source.csh + + + # Test patching the sample source + + echo "Generating sample_source_patched.csh from sample_source.csh" + cp sample_source.csh sample_source_patched.csh + chmod u+w sample_source_patched.csh + patchRcPathCsh sample_source_patched.csh "$PWD/delta:$PWD/foxtrot" + + echo "Testing in Csh if sample_source.csh and sample_source_patched.csh modifies PATH the same way" + tcsh -e ${./test-sourcing-csh} sample_source.csh sample_source_patched.csh + + + # Test double-patching the sample source + + echo "Patching again sample_source_patched.csh from sample_source.csh" + patchRcPathCsh sample_source_patched.csh "$PWD/foxtrot:$PWD/golf" + + echo "Testing in Csh if sample_source.csh and sample_source_patched.csh modifies PATH the same way" + tcsh -e ${./test-sourcing-csh} sample_source.csh sample_source_patched.csh + + + # Create a dummy output + touch "$out" + '' + ) + { }; + + + + test-fish = callPackage + ( + { lib + , runCommandLocal + , fish + , hello + , patchRcPathFish + }: + runCommandLocal "patch-rc-path-fish-test" + { + nativeBuildInputs = [ + fish + patchRcPathFish + ]; + meta = { + description = "Package test of patchActivateFish"; + inherit (patchRcPathFish.meta) maintainers; + }; + } + '' + set -eu -o pipefail + + + # Test patching a blank file + + echo > blank.fish + + echo "Generating blank_patched.fish from blank.fish" + cp blank.fish blank_patched.fish + patchRcPathFish blank_patched.fish "$PWD/delta:$PWD/foxtrot" + + echo "Testing in Fish if blank.fish and blank_patched.fish modifies PATH the same way" + HOME_TEMP="$(mktemp -d temporary_home_XXXXXX)" + HOME="$HOME_TEMP" fish ${./test-sourcing-fish} blank.fish blank_patched.fish + rm -r "$HOME_TEMP" + + + # Test patching silent_hello file + + echo "hello > /dev/null" > silent_hello.fish + + echo "Generating silent_hello_patched.fish from silent_hello.fish" + cp silent_hello.fish silent_hello_patched.fish + patchRcPathFish silent_hello_patched.fish "${hello}/bin" + + echo "Testing in Fish if silent_hello_patched.fish get sourced without error" + HOME_TEMP="$(mktemp -d temporary_home_XXXXXX)" + HOME="$HOME_TEMP" fish -c "source silent_hello_patched.fish" + rm -r "$HOME_TEMP" + + + # Test patching the sample source + + cp ${./sample_source.fish} sample_source_patched.fish + chmod u+w sample_source_patched.fish + + echo "Generating sample_source_patched.fish from ${./sample_source.fish}" + patchRcPathFish sample_source_patched.fish "$PWD/delta:$PWD/foxtrot" + echo "Testing in Fish if sample_source.fish and sample_source_patched.fish modifies PATH the same way" + HOME_TEMP="$(mktemp -d temporary_home_XXXXXX)" + HOME="$HOME_TEMP" fish ${./test-sourcing-fish} ${./sample_source.fish} sample_source_patched.fish + rm -r "$HOME_TEMP" + + + # Test double-patching the sample source + + echo "Patching again sample_source_patched.fish from ${./sample_source.fish}" + patchRcPathFish sample_source_patched.fish "$PWD/foxtrot:$PWD/golf" + + echo "Testing in Fish if sample_source.fish and sample_source_patched.fish modifies PATH the same way" + HOME_TEMP="$(mktemp -d temporary_home_XXXXXX)" + HOME="$HOME_TEMP" fish ${./test-sourcing-fish} ${./sample_source.fish} sample_source_patched.fish + rm -r "$HOME_TEMP" + + + # Create a dummy output + touch "$out" + '' + ) + { }; + + + + test-posix = callPackage + ( + { lib + , runCommandLocal + , bash + , dash + , gnused + , hello + , ksh + , patchRcPathPosix + , shellcheck + }: + runCommandLocal "patch-rc-path-posix-test" + { + nativeBuildInputs = [ + bash + dash + ksh + patchRcPathPosix + shellcheck + ]; + meta = { + description = "Package test of patchActivatePosix"; + inherit (patchRcPathPosix.meta) maintainers; + }; + } + '' + set -eu -o pipefail + + + # Check the setup hook script + + echo "Running shellcheck against ${./test-sourcing-posix}" + shellcheck -s sh --exclude SC1090 ${./test-sourcing-posix} + shellcheck -s dash --exclude SC1090 ${./test-sourcing-posix} + + + # Test patching a blank file + + echo > blank.sh + + echo "Generating blank_patched.sh from blank.sh" + cp blank.sh blank_patched.sh + patchRcPathPosix blank_patched.sh "$PWD/delta:$PWD/foxtrot" + + echo "Running shellcheck against blank_patched.sh" + shellcheck -s sh blank_patched.sh + shellcheck -s dash blank_patched.sh + + echo "Testing in Bash if blank.sh and blank_patched.sh modifies PATH the same way" + bash --posix ${./test-sourcing-posix} ./blank.sh ./blank_patched.sh + + echo "Testing in Dash if blank.sh and blank_patched.sh modifies PATH the same way" + dash ${./test-sourcing-posix} ./blank.sh ./blank_patched.sh + + echo "Testing in Ksh if ./blank.sh and ./blank_patched.sh modifies PATH the same way" + ksh ${./test-sourcing-posix} "$PWD/blank.sh" "$PWD/blank_patched.sh" + + + # Test patching silent_hello file + + echo "hello > /dev/null" > silent_hello.sh + + echo "Generating silent_hello_patched.sh from silent_hello.sh" + cp silent_hello.sh silent_hello_patched.sh + patchRcPathPosix silent_hello_patched.sh "${hello}/bin" + + echo "Running shellcheck against silent_hello_patched.sh" + shellcheck -s sh silent_hello_patched.sh + shellcheck -s dash silent_hello_patched.sh + + echo "Testing in Bash if silent_hello_patched.sh get sourced without error" + bash --posix -eu -c ". ./silent_hello_patched.sh" + + echo "Testing in Dash if silent_hello_patched.sh get sourced without error" + dash -eu -c ". ./silent_hello_patched.sh" + + echo "Testing in Ksh if silent_hello_patched.sh get sourced without error" + ksh -eu -c ". $PWD/silent_hello_patched.sh" + + + # Generate the sample source "$PWD/delta:$PWD/foxtrot" "$PWD/delta:$PWD/foxtrot" + + substitute ${./sample_source.sh.in} sample_source.sh --replace @sed@ ${gnused}/bin/sed + chmod u+rw sample_source.sh + + + # Check the sample source + + echo "Running shellcheck against sample_source.sh" + shellcheck -s sh sample_source.sh + shellcheck -s dash sample_source.sh + + + # Test patching the sample source + + echo "Generating sample_source_patched.sh from sample_source.sh" + cp sample_source.sh sample_source_patched.sh + chmod u+w sample_source_patched.sh + patchRcPathPosix sample_source_patched.sh "$PWD/delta:$PWD/foxtrot" + + echo "Running shellcheck against sample_source_patched.sh" + shellcheck -s sh sample_source_patched.sh + shellcheck -s dash sample_source_patched.sh + + echo "Testing in Bash if sample_source.bash and sample_source_patched.bash modifies PATH the same way" + bash --posix ${./test-sourcing-posix} "./sample_source.sh" "./sample_source_patched.sh" + + echo "Testing in Dash if sample_source.sh and sample_source_patched.sh modifies PATH the same way" + dash ${./test-sourcing-posix} "./sample_source.sh" "./sample_source_patched.sh" + + echo "Testing in Ksh if sample_source.sh and sample_source_patched.sh modifies PATH the same way" + ksh ${./test-sourcing-posix} "$PWD/sample_source.sh" "$PWD/sample_source_patched.sh" + + + # Test double-patching the sample source + + echo "Patching again sample_source_patched.sh" + patchRcPathPosix sample_source_patched.sh "$PWD/foxtrot:$PWD/golf" + + echo "Running shellcheck against sample_source_patched.sh" + shellcheck -s sh sample_source_patched.sh + shellcheck -s dash sample_source_patched.sh + + echo "Testing in Bash if sample_source.bash and sample_source_patched.bash modifies PATH the same way" + bash --posix ${./test-sourcing-posix} "./sample_source.sh" "./sample_source_patched.sh" + + echo "Testing in Dash if sample_source.sh and sample_source_patched.sh modifies PATH the same way" + dash ${./test-sourcing-posix} "./sample_source.sh" "./sample_source_patched.sh" + + echo "Testing in Ksh if sample_source.sh and sample_source_patched.sh modifies PATH the same way" + ksh ${./test-sourcing-posix} "$PWD/sample_source.sh" "$PWD/sample_source_patched.sh" + + + # Create a dummy output + touch "$out" + '' + ) + { }; +} diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.bash b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.bash new file mode 100644 index 000000000000..6cb043e4e70c --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.bash @@ -0,0 +1,2 @@ +PATH="$PWD/charlie:${PATH/:$PWD\/bravo}" +export PATH diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.csh.in b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.csh.in new file mode 100644 index 000000000000..9606458c037e --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.csh.in @@ -0,0 +1 @@ +setenv PATH $PWD/charlie:`echo "$PATH" | @sed@ "s#:$PWD/bravo##"` diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.fish b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.fish new file mode 100644 index 000000000000..f638fe5e24d1 --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.fish @@ -0,0 +1,9 @@ +begin + for p in $PATH + if test $p != "$PWD/bravo" + set TEMPORARY_PATH $TEMPORARY_PATH $p + end + end + set -g PATH $TEMPORARY_PATH +end +set PATH "$PWD/charlie" $PATH diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.sh.in b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.sh.in new file mode 100644 index 000000000000..42e64a1ffc08 --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.sh.in @@ -0,0 +1,2 @@ +PATH="$PWD/charlie:$(echo "$PATH" | @sed@ "s#:$PWD/bravo##")" +export PATH diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-bash b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-bash new file mode 100644 index 000000000000..1b6cc54d8f93 --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-bash @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -eu -o pipefail + +UNPATCHED_SOURCE_FILE="$1" +PATCHED_SOURCE_FILE="$2" +ORIG_PATH="$PWD/alfa:$PWD/bravo" +RESULT_PATH_FROM_UNPATCHED="$( + PATH="$ORIG_PATH"; export PATH + . "$UNPATCHED_SOURCE_FILE" + echo "$PATH" +)" +RESULT_PATH_FROM_PATCHED="$( + PATH="$ORIG_PATH"; export PATH + . "$PATCHED_SOURCE_FILE" + echo "$PATH" +)" +if [[ "$RESULT_PATH_FROM_UNPATCHED" != "$RESULT_PATH_FROM_PATCHED" ]]; then + echo "Result path mismatched: $UNPATCHED_SOURCE_FILE ($RESULT_PATH_FROM_UNPATCHED) and $PATCHED_SOURCE_FILE ($RESULT_PATH_FROM_PATCHED)" >&2 + exit 1 +fi diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-csh b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-csh new file mode 100644 index 000000000000..7ddb2ddc1bdc --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-csh @@ -0,0 +1,13 @@ +#/usr/bin/env tcsh + +set UNPATCHED_SOURCE_FILE = "$1" +set PATCHED_SOURCE_FILE = "$2" +set ORIG_PATH = "${PWD}/alfa:${PWD}/bravo" + +set RESULT_PATH_FROM_UNPATCHED = `setenv PATH "$ORIG_PATH"; source $UNPATCHED_SOURCE_FILE; echo $PATH` +set RESULT_PATH_FROM_PATCHED = `setenv PATH "$ORIG_PATH"; source $PATCHED_SOURCE_FILE; echo $PATH` + +if ($RESULT_PATH_FROM_UNPATCHED != $RESULT_PATH_FROM_PATCHED) then + echo "Result path mismatched: $UNPATCHED_SOURCE_FILE ($RESULT_PATH_FROM_UNPATCHED) and $PATCHED_SOURCE_FILE ($RESULT_PATH_FROM_PATCHED)" > /dev/stderr + exit 1 +endif diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-fish b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-fish new file mode 100644 index 000000000000..fcce014331e5 --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-fish @@ -0,0 +1,13 @@ +#/usr/bin/env fish + +set UNPATCHED_SOURCE_FILE $argv[1] +set PATCHED_SOURCE_FILE $argv[2] +set ORIG_PATH "$PWD/alfa:$PWD/bravo" + +set RESULT_PATH_FROM_UNPATCHED (fish -c "set -g PATH \"$ORIG_PATH\"; source $UNPATCHED_SOURCE_FILE; echo \"\$PATH\"") +set RESULT_PATH_FROM_PATCHED (fish -c "set -g PATH \"$ORIG_PATH\"; source $PATCHED_SOURCE_FILE; echo \"\$PATH\"") + +if test "$RESULT_PATH_FROM_UNPATCHED" != "$RESULT_PATH_FROM_PATCHED" + echo "Result path mismatched: $UNPATCHED_SOURCE_FILE ($RESULT_PATH_FROM_UNPATCHED) and $PATCHED_SOURCE_FILE ($RESULT_PATH_FROM_PATCHED)" >&2 + exit 1 +end diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-posix b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-posix new file mode 100644 index 000000000000..6039b4dcf097 --- /dev/null +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-posix @@ -0,0 +1,21 @@ +#!/bin/sh + +set -eu + +UNPATCHED_SOURCE_FILE="$1" +PATCHED_SOURCE_FILE="$2" +ORIG_PATH="$PWD/alfa:$PWD/bravo" +RESULT_PATH_FROM_UNPATCHED="$( + PATH="$ORIG_PATH"; export PATH + . "$UNPATCHED_SOURCE_FILE" + echo "$PATH" +)" +RESULT_PATH_FROM_PATCHED="$( + PATH="$ORIG_PATH"; export PATH + . "$PATCHED_SOURCE_FILE" + echo "$PATH" +)" +if [ "$RESULT_PATH_FROM_UNPATCHED" != "$RESULT_PATH_FROM_PATCHED" ]; then + echo "Result path mismatched: $UNPATCHED_SOURCE_FILE ($RESULT_PATH_FROM_UNPATCHED) and $PATCHED_SOURCE_FILE ($RESULT_PATH_FROM_PATCHED)" > /dev/stderr + exit 1 +fi diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cdf564bd7644..22bace945227 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -983,6 +983,10 @@ with pkgs; octant-desktop = callPackage ../applications/networking/cluster/octant/desktop.nix { }; starboard-octant-plugin = callPackage ../applications/networking/cluster/octant/plugins/starboard-octant-plugin.nix { }; + inherit ( + callPackages ../build-support/setup-hooks/patch-rc-path-hooks { } + ) patchRcPathBash patchRcPathCsh patchRcPathFish patchRcPathPosix; + pathsFromGraph = ../build-support/kernel/paths-from-graph.pl; pruneLibtoolFiles = makeSetupHook { name = "prune-libtool-files"; } From 7f91dec5ddf8a75c8da23df982ad027ba333a150 Mon Sep 17 00:00:00 2001 From: Shamrock Lee <44064051+ShamrockLee@users.noreply.github.com> Date: Sat, 23 Apr 2022 03:53:34 +0800 Subject: [PATCH 18/32] root: wrap the executable and patch thisroot.* --- .../science/misc/root/default.nix | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix index f60fc95e0d56..0435ca2e5850 100644 --- a/pkgs/applications/science/misc/root/default.nix +++ b/pkgs/applications/science/misc/root/default.nix @@ -4,11 +4,14 @@ , fetchpatch , makeWrapper , cmake +, coreutils , git , davix , ftgl , gl2ps , glew +, gnugrep +, gnused , gsl , lapack , libX11 @@ -20,14 +23,18 @@ , libxcrypt , libxml2 , llvm_9 +, lsof , lz4 , xz +, man , openblas , openssl , pcre , nlohmann_json , pkg-config +, procps , python +, which , xxHash , zlib , zstd @@ -36,6 +43,9 @@ , libjpeg , libtiff , libpng +, patchRcPathCsh +, patchRcPathFish +, patchRcPathPosix , tbb , Cocoa , CoreSymbolication @@ -93,6 +103,9 @@ stdenv.mkDerivation rec { libtiff libpng nlohmann_json + patchRcPathCsh + patchRcPathFish + patchRcPathPosix python.pkgs.numpy tbb ] @@ -195,6 +208,45 @@ stdenv.mkDerivation rec { --set PYTHONPATH "$out/lib" \ --set ${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH "$out/lib" done + + # Make ldd and sed available to the ROOT executable + wrapProgram "$out/bin/root" --prefix PATH : "${lib.makeBinPath [ + gnused # sed + stdenv.cc # c++ ld etc. + stdenv.cc.libc # ldd + ]}" + + # Patch thisroot.{sh,csh,fish} + + # The main target of `thisroot.sh` is "bash-like shells", + # but it also need to support Bash-less POSIX shell like dash, + # as they are mentioned in `thisroot.sh`. + + # `thisroot.sh` would include commands `lsof` and `procps` since ROOT 6.28. + # See https://github.com/root-project/root/pull/10332 + + patchRcPathPosix "$out/bin/thisroot.sh" "${lib.makeBinPath [ + coreutils # dirname tail + gnugrep # grep + gnused # sed + lsof # lsof # for ROOT (>=6.28) + man # manpath + procps # ps # for ROOT (>=6.28) + which # which + ]}" + patchRcPathCsh "$out/bin/thisroot.csh" "${lib.makeBinPath [ + coreutils + gnugrep + gnused + lsof # lsof # for ROOT (>=6.28) + man + which + ]}" + patchRcPathFish "$out/bin/thisroot.fish" "${lib.makeBinPath [ + coreutils + man + which + ]}" ''; setupHook = ./setup-hook.sh; From a664ec27f44b4c7f29c03eff8b60ca62f90b2f16 Mon Sep 17 00:00:00 2001 From: Shamrock Lee <44064051+ShamrockLee@users.noreply.github.com> Date: Wed, 12 Oct 2022 03:11:09 +0800 Subject: [PATCH 19/32] root: add package test test-thisroot --- .../science/misc/root/default.nix | 5 ++ .../science/misc/root/tests/default.nix | 4 ++ .../science/misc/root/tests/test-thisroot.nix | 49 +++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 pkgs/applications/science/misc/root/tests/default.nix create mode 100644 pkgs/applications/science/misc/root/tests/test-thisroot.nix diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix index 0435ca2e5850..30ff02c1f2ca 100644 --- a/pkgs/applications/science/misc/root/default.nix +++ b/pkgs/applications/science/misc/root/default.nix @@ -1,5 +1,6 @@ { stdenv , lib +, callPackage , fetchFromGitHub , fetchpatch , makeWrapper @@ -71,6 +72,10 @@ stdenv.mkDerivation rec { pname = "root"; version = "6.26.08"; + passthru = { + tests = import ./tests { inherit callPackage; }; + }; + src = fetchFromGitHub { owner = "root-project"; repo = "root"; diff --git a/pkgs/applications/science/misc/root/tests/default.nix b/pkgs/applications/science/misc/root/tests/default.nix new file mode 100644 index 000000000000..9d2da2533f7f --- /dev/null +++ b/pkgs/applications/science/misc/root/tests/default.nix @@ -0,0 +1,4 @@ +{ callPackage }: +{ + test-thisroot = callPackage ./test-thisroot.nix { }; +} diff --git a/pkgs/applications/science/misc/root/tests/test-thisroot.nix b/pkgs/applications/science/misc/root/tests/test-thisroot.nix new file mode 100644 index 000000000000..3540dde8c913 --- /dev/null +++ b/pkgs/applications/science/misc/root/tests/test-thisroot.nix @@ -0,0 +1,49 @@ +{ lib +, runCommand +, root +, bash +, fish +, ksh +, tcsh +, zsh +}: runCommand "test-thisroot" +{ + meta = with lib; { + description = "Test for root thisroot.* sourcing"; + maintainers = unique ((with maintainers; [ ShamrockLee ]) ++ root.meta.maintainers); + }; +} + '' + set -eu -o pipefail + declare -a shellNameArray shellOutpathArray sourcefileNameArray sourceCommandArray + shellNameArray=( bash zsh tcsh fish ) + shellOutpathArray=( "${bash}" "${zsh}" "${tcsh}" "${fish}") + sourcefileNameArray=( thisroot.sh thisroot.sh thisroot.csh thisroot.fish ) + sourceCommandArray=( "source" "source" "source" "source" ) + debugFlagstrArray=( "-e" "-e" "-e" "" ) + nShellToTest="''${#shellNameArray[@]}" + if [[ "''${#shellOutpathArray[@]}" -ne "$nShellToTest" ]] \ + || [[ "''${#sourcefileNameArray[@]}" -ne "$nShellToTest" ]] \ + || [[ "''${#sourceCommandArray[@]}" -ne "$nShellToTest" ]] \ + || [[ "''${#debugFlagstrArray[@]}" -ne "$nShellToTest" ]] + then + echo "error: Lengths of test parameter arrays doesn't match." >&2 + exit 1 + fi + typePExpect="${root}/bin/root" + for ((i=0; i<$nShellToTest; ++i)); do + tryCommand="''${sourceCommandArray[$i]} \"${root}/bin/''${sourcefileNameArray[$i]}\"" + echo "Testing ''${shellNameArray[$i]} $tryCommand" + # Home directory for Fish + HOME_TEMP="$(mktemp -d temporary_home_XXXXXX)" + binPATHGot="$(PATH="''${shellOutpathArray[$i]}/bin" HOME=$HOME_TEMP "''${shellNameArray[$i]}" ''${debugFlagstrArray[$i]} -c "$tryCommand && echo \"\$PATH\"")" + rm -r "$HOME_TEMP" + typePGot="$(PATH="$binPATHGot" type -p root)" + if [[ "$typePGot" != "$typePExpect" ]]; then + echo "error: Got PATH \"$binPATHGot\", in which the root executable path is \"$typePGot\". Expect root executable path \"$typePExpect\"." >&2 + exit 1 + fi + done + echo "test-thisroot pass!" + touch "$out" + '' From 6386d793261ae917ae49bf95f587787c5b00db47 Mon Sep 17 00:00:00 2001 From: Shamrock Lee <44064051+ShamrockLee@users.noreply.github.com> Date: Mon, 31 Oct 2022 16:48:07 +0000 Subject: [PATCH 20/32] patchRcPath hooks: use the passthru argument --- .../patch-rc-path-hooks/default.nix | 44 +++++++++---------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix index 73fbfa6e9b72..f16644528f00 100644 --- a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix +++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix @@ -7,19 +7,18 @@ let tests = import ./test { inherit callPackage; }; in { - patchRcPathBash = (makeSetupHook + patchRcPathBash = makeSetupHook { name = "patch-rc-path-bash"; meta = with lib; { description = "Setup-hook to inject source-time PATH prefix to a Bash/Ksh/Zsh script"; maintainers = with maintainers; [ ShamrockLee ]; }; - } ./patch-rc-path-bash.sh).overrideAttrs (oldAttrs: { - passthru.tests = { - inherit (tests) test-bash; - }; - }); - patchRcPathCsh = (makeSetupHook + passthru.tests = { + inherit (tests) test-bash; + }; + } ./patch-rc-path-bash.sh; + patchRcPathCsh = makeSetupHook { name = "patch-rc-path-csh"; substitutions = { @@ -29,24 +28,22 @@ in description = "Setup-hook to inject source-time PATH prefix to a Csh script"; maintainers = with maintainers; [ ShamrockLee ]; }; - } ./patch-rc-path-csh.sh).overrideAttrs (oldAttrs: { - passthru.tests = { - inherit (tests) test-csh; - }; - }); - patchRcPathFish = (makeSetupHook + passthru.tests = { + inherit (tests) test-csh; + }; + } ./patch-rc-path-csh.sh; + patchRcPathFish = makeSetupHook { name = "patch-rc-path-fish"; meta = with lib; { description = "Setup-hook to inject source-time PATH prefix to a Fish script"; maintainers = with maintainers; [ ShamrockLee ]; }; - } ./patch-rc-path-fish.sh).overrideAttrs (oldAttrs: { - passthru.tests = { - inherit (tests) test-fish; - }; - }); - patchRcPathPosix = (makeSetupHook + passthru.tests = { + inherit (tests) test-fish; + }; + } ./patch-rc-path-fish.sh; + patchRcPathPosix = makeSetupHook { name = "patch-rc-path-posix"; substitutions = { @@ -56,9 +53,8 @@ in description = "Setup-hook to inject source-time PATH prefix to a POSIX shell script"; maintainers = with maintainers; [ ShamrockLee ]; }; - } ./patch-rc-path-posix.sh).overrideAttrs (oldAttrs: { - passthru.tests = { - inherit (tests) test-posix; - }; - }); + passthru.tests = { + inherit (tests) test-posix; + }; + } ./patch-rc-path-posix.sh; } From d4be94cb82a9a722000f656d868bebf3f5877d63 Mon Sep 17 00:00:00 2001 From: psondej Date: Thu, 10 Nov 2022 04:31:34 +0100 Subject: [PATCH 21/32] kics: add version test --- pkgs/tools/admin/kics/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/admin/kics/default.nix b/pkgs/tools/admin/kics/default.nix index ef3239355f09..8c8000168d5c 100644 --- a/pkgs/tools/admin/kics/default.nix +++ b/pkgs/tools/admin/kics/default.nix @@ -1,4 +1,10 @@ -{ stdenv, buildGoModule, fetchFromGitHub, lib }: +{ stdenv +, buildGoModule +, fetchFromGitHub +, lib +, testers +, kics +}: buildGoModule rec { pname = "kics"; @@ -25,6 +31,11 @@ buildGoModule rec { "-X github.com/Checkmarx/kics/internal/constants.Version=${version}" ]; + passthru.tests.version = testers.testVersion { + package = kics; + command = "kics version"; + }; + meta = with lib; { description = '' Find security vulnerabilities, compliance issues, and infrastructure misconfigurations early in the development From f680c2020f41da5d2ed5d88ad3f997b9a8d03b77 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 3 Oct 2022 01:18:59 +0000 Subject: [PATCH 22/32] shards: 0.17.0 -> 0.17.1 --- pkgs/development/tools/build-managers/shards/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/build-managers/shards/default.nix b/pkgs/development/tools/build-managers/shards/default.nix index a04eba1d1711..9202543ea904 100644 --- a/pkgs/development/tools/build-managers/shards/default.nix +++ b/pkgs/development/tools/build-managers/shards/default.nix @@ -37,8 +37,8 @@ let in rec { shards_0_17 = generic { - version = "0.17.0"; - hash = "sha256-f9MptrKalW7gi0J2h0fokkzdjKBVa2TmoPX8BYffqzY="; + version = "0.17.1"; + hash = "sha256-YAsFsMoZVUINnIQzYNjE7/hpvipmyU5DrLJJrk9TkHs="; }; shards = shards_0_17; From 184023a1f9e8ce094c2961a855e7f7ccb9eb0e79 Mon Sep 17 00:00:00 2001 From: Mostly Void <7rat13@gmail.com> Date: Thu, 10 Nov 2022 11:48:49 +0530 Subject: [PATCH 23/32] cotton: fix build on darwin --- pkgs/development/tools/cotton/default.nix | 6 +++++- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/cotton/default.nix b/pkgs/development/tools/cotton/default.nix index 34cf19d40fdd..310561d52646 100644 --- a/pkgs/development/tools/cotton/default.nix +++ b/pkgs/development/tools/cotton/default.nix @@ -1,6 +1,8 @@ -{ lib +{ stdenv +, lib , rustPlatform , fetchFromGitHub +, CoreServices }: rustPlatform.buildRustPackage rec { @@ -16,6 +18,8 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "sha256-qpV3UriOidIk/0di9d8RjXvjcjgD6dXqg7wLAywI66o="; + buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; + meta = with lib; { description = "A package manager for JavaScript projects"; homepage = "https://github.com/danielhuang/cotton"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0efcc5cf7e07..fcdb81b84331 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13636,7 +13636,9 @@ with pkgs; copper = callPackage ../development/compilers/copper {}; - cotton = callPackage ../development/tools/cotton { }; + cotton = callPackage ../development/tools/cotton { + inherit (darwin.apple_sdk.frameworks) CoreServices; + }; inherit (callPackages ../development/compilers/crystal { llvmPackages = if stdenv.system == "aarch64-darwin" then llvmPackages_11 else llvmPackages_10; From 016580f6daf1836ed945840dc50db69431c31e62 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 10 Nov 2022 09:01:58 +0100 Subject: [PATCH 24/32] python310Packages.azure-eventgrid: update disabled --- pkgs/development/python-modules/azure-eventgrid/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/azure-eventgrid/default.nix b/pkgs/development/python-modules/azure-eventgrid/default.nix index 43d075505193..5946f5202c8e 100644 --- a/pkgs/development/python-modules/azure-eventgrid/default.nix +++ b/pkgs/development/python-modules/azure-eventgrid/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { version = "4.9.1"; format = "setuptools"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; From 5ed3812a9ff33b2ec955d36ee2444cec2e58b536 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 10 Nov 2022 10:36:31 +0100 Subject: [PATCH 25/32] octave: enable JSON Add rapidjson to inputs, which enables the functions jsonencode and jsondecode. --- pkgs/development/interpreters/octave/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/interpreters/octave/default.nix b/pkgs/development/interpreters/octave/default.nix index c1753a7668e6..8f0cd0e6a226 100644 --- a/pkgs/development/interpreters/octave/default.nix +++ b/pkgs/development/interpreters/octave/default.nix @@ -25,6 +25,7 @@ , fftwSinglePrec , zlib , curl +, rapidjson , blas, lapack # These two should use the same lapack and blas as the above , qrupdate, arpack, suitesparse ? null @@ -130,6 +131,7 @@ let fltk zlib curl + rapidjson blas' lapack' libsndfile From b89efbd9a45aaa6563225ba2de8a93ce9663f337 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Tue, 8 Nov 2022 23:46:02 +0000 Subject: [PATCH 26/32] mame-tools: init at 0.249 This commit adds a new `tools` output to `mame` and move all non-emulator binaries to it. This is because some of those binaries (e.g.: chdman) are useful outside of the MAME, and the MAME binary is really big. So if you only want to use some of the MAME tools, this will reduce the download size needed for it. The `tools` output is declared as `mame-tools` inside `all-packages.nix`, for easier discovery. This is similar to how other distros packages MAME, e.g.: on Arch Linux we have `mame` and `mame-tools`. --- pkgs/applications/emulators/mame/default.nix | 24 ++++++++++++++++---- pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/emulators/mame/default.nix b/pkgs/applications/emulators/mame/default.nix index aaa4077015ee..cd5d718c8a4e 100644 --- a/pkgs/applications/emulators/mame/default.nix +++ b/pkgs/applications/emulators/mame/default.nix @@ -53,6 +53,8 @@ stdenv.mkDerivation rec { sha256 = "sha256-im6y/E0pQxruX2kNXZLE3fHq+zXfsstnOoC1QvH4fd4="; }; + outputs = [ "out" "tools" ]; + makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "CXX=${stdenv.cc.targetPrefix}c++" @@ -138,21 +140,33 @@ stdenv.mkDerivation rec { runHook preInstall make -f dist.mak PTR64=${lib.optionalString stdenv.is64bit "1"} + + # mame mkdir -p ${dest} mv build/release/*/Release/mame/* ${dest} - mkdir -p $out/bin - find ${dest} -maxdepth 1 -executable -type f -exec mv -t $out/bin {} \; - install -Dm755 src/osd/sdl/taputil.sh $out/bin/taputil.sh - - installManPage ${dest}/docs/man/*.1 ${dest}/docs/man/*.6 + find ${dest} -maxdepth 1 -executable -type f -delete; + install -Dm755 mame -t $out/bin install -Dm644 ${icon} $out/share/icons/hicolor/scalable/apps/mame.svg + installManPage ${dest}/docs/man/*.1 ${dest}/docs/man/*.6 mv artwork plugins samples ${dest} + # mame-tools + for _i in castool chdman floptool imgtool jedutil ldresample ldverify nltool nlwav pngcmp regrep romcmp \ + split srcclean testkeys unidasm; do + install -Dm755 $_i -t $tools/bin + done + mv $tools/bin/{,mame-}split + runHook postInstall ''; + postFixup = '' + mkdir -p $tools/share/man + mv {$out,$tools}/share/man/man1 + ''; + enableParallelBuilding = true; passthru.updateScript = writeScript "mame-update-script" '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b70b510d21f5..f7745800c661 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1597,6 +1597,8 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) CoreAudioKit ForceFeedback; }; + mame-tools = (lib.getOutput "tools" mame); + mednafen = callPackage ../applications/emulators/mednafen { inherit (darwin) libiconv; }; From d868053b400db0fa46e2a0432fa06231a040a7cb Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 10 Nov 2022 08:33:35 +0000 Subject: [PATCH 27/32] nixos/doc: formatting improvements --- .../doc/manual/from_md/release-notes/rl-2211.section.xml | 9 +++++---- nixos/doc/manual/release-notes/rl-2211.section.md | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml index c53474144d27..d9fa98904db8 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml @@ -1338,10 +1338,11 @@ - boot.kernel.sysctl is defined as a freeformType and adds a - custom merge option for net.core.rmem_max - (taking the highest value defined to avoid conflicts between 2 - services trying to set that value) + boot.kernel.sysctl is defined as a + freeformType and adds a custom merge option for + net.core.rmem_max (taking the highest value + defined to avoid conflicts between 2 services trying to set + that value). diff --git a/nixos/doc/manual/release-notes/rl-2211.section.md b/nixos/doc/manual/release-notes/rl-2211.section.md index 863bf95b55f3..d043de005dda 100644 --- a/nixos/doc/manual/release-notes/rl-2211.section.md +++ b/nixos/doc/manual/release-notes/rl-2211.section.md @@ -395,6 +395,6 @@ Available as [services.patroni](options.html#opt-services.patroni.enable). - The `nodePackages` package set now defaults to the LTS release in the `nodejs` package again, instead of being pinned to `nodejs-14_x`. Several updates to node2nix have been made for compatibility with newer Node.js and npm versions and a new `postRebuild` hook has been added for packages to perform extra build steps before the npm install step prunes dev dependencies. -- boot.kernel.sysctl is defined as a freeformType and adds a custom merge option for "net.core.rmem_max" (taking the highest value defined to avoid conflicts between 2 services trying to set that value) +- `boot.kernel.sysctl` is defined as a freeformType and adds a custom merge option for "net.core.rmem_max" (taking the highest value defined to avoid conflicts between 2 services trying to set that value). From 891511b61957757faa4c3162d173e984f9c39e34 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 10 Nov 2022 08:35:40 +0000 Subject: [PATCH 28/32] nixos/doc: document mame package changes --- .../doc/manual/from_md/release-notes/rl-2211.section.xml | 9 +++++++++ nixos/doc/manual/release-notes/rl-2211.section.md | 2 ++ 2 files changed, 11 insertions(+) diff --git a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml index d9fa98904db8..841aced11f2f 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml @@ -1345,6 +1345,15 @@ that value). + + + The mame package does not ship with its + tools anymore in the default output. They were moved to a + separate tools output instead. For + convenience, mame-tools package was added + for those who want to use it. + + diff --git a/nixos/doc/manual/release-notes/rl-2211.section.md b/nixos/doc/manual/release-notes/rl-2211.section.md index d043de005dda..85d8080fba18 100644 --- a/nixos/doc/manual/release-notes/rl-2211.section.md +++ b/nixos/doc/manual/release-notes/rl-2211.section.md @@ -397,4 +397,6 @@ Available as [services.patroni](options.html#opt-services.patroni.enable). - `boot.kernel.sysctl` is defined as a freeformType and adds a custom merge option for "net.core.rmem_max" (taking the highest value defined to avoid conflicts between 2 services trying to set that value). +- The `mame` package does not ship with its tools anymore in the default output. They were moved to a separate `tools` output instead. For convenience, `mame-tools` package was added for those who want to use it. + From b2eda58270a9b863da085f92fd2c0bc301212956 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 10 Nov 2022 10:52:37 +0100 Subject: [PATCH 29/32] mpich: 4.0.2 -> 4.0.3 --- pkgs/development/libraries/mpich/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/mpich/default.nix b/pkgs/development/libraries/mpich/default.nix index 60e543c46296..14dddf1f29fd 100644 --- a/pkgs/development/libraries/mpich/default.nix +++ b/pkgs/development/libraries/mpich/default.nix @@ -11,11 +11,11 @@ assert (ch4backend.pname == "ucx" || ch4backend.pname == "libfabric"); stdenv.mkDerivation rec { pname = "mpich"; - version = "4.0.2"; + version = "4.0.3"; src = fetchurl { url = "https://www.mpich.org/static/downloads/${version}/mpich-${version}.tar.gz"; - sha256 = "0hnxvqhhscp3h70zf538dhqz9jwmqpwwnj3fqabdk8nli6lg2hjs"; + sha256 = "sha256-F0BuqQpu1OzVvjnJ3cv6yTQ+arT3esToxevko+O2xQE="; }; configureFlags = [ From a4e879a54919387162fb68565d7ecffda0abf9f5 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 10 Nov 2022 11:22:37 +0100 Subject: [PATCH 30/32] spglib/pythonPackages.spglib: 2.0.1 -> 2.0.2 --- pkgs/development/libraries/spglib/default.nix | 4 ++-- pkgs/development/python-modules/spglib/default.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/spglib/default.nix b/pkgs/development/libraries/spglib/default.nix index c10b5a705425..4b634a0f1f69 100644 --- a/pkgs/development/libraries/spglib/default.nix +++ b/pkgs/development/libraries/spglib/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "spglib"; - version = "2.0.1"; # N.B: if you change this, please update: pythonPackages.spglib + version = "2.0.2"; # N.B: if you change this, please update: pythonPackages.spglib src = fetchFromGitHub { owner = "spglib"; repo = "spglib"; rev = "v${version}"; - sha256 = "sha256-0M3GSnNvBNmE4ShW8NNkVrOBGEF9A0C5wd++xnyrcdI="; + sha256 = "sha256-8Voepj35CMbboL3Dc55Gc4+OLPTTSgqVQuvNcRQsqmU="; }; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/python-modules/spglib/default.nix b/pkgs/development/python-modules/spglib/default.nix index c9023285568b..8b5e36b0f665 100644 --- a/pkgs/development/python-modules/spglib/default.nix +++ b/pkgs/development/python-modules/spglib/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "spglib"; - version = "2.0.1"; + version = "2.0.2"; src = fetchPypi { inherit pname version; - sha256 = "sha256-9fHKuDWuwbjXjL9CmJxUWWoomkqDP93J8MX1XKwbwsE="; + sha256 = "sha256-HQgewi2kq0/DGY6URd2tbewiYcQ5J4MRUdk+OUImEKo="; }; propagatedBuildInputs = [ numpy ]; From 0a303bce315c8588e7e0f25fc054ac74b081a073 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 10 Nov 2022 11:36:38 +0100 Subject: [PATCH 31/32] nfs-ganesha: 4.0.8 -> 4.0.12 --- pkgs/servers/nfs-ganesha/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/nfs-ganesha/default.nix b/pkgs/servers/nfs-ganesha/default.nix index a8cbe695c49a..1af14ded947d 100644 --- a/pkgs/servers/nfs-ganesha/default.nix +++ b/pkgs/servers/nfs-ganesha/default.nix @@ -1,17 +1,17 @@ { lib, stdenv, fetchFromGitHub, cmake, pkg-config , krb5, xfsprogs, jemalloc, dbus, libcap -, ntirpc, liburcu, bison, flex, nfs-utils +, ntirpc, liburcu, bison, flex, nfs-utils, acl } : stdenv.mkDerivation rec { pname = "nfs-ganesha"; - version = "4.0.8"; + version = "4.0.12"; src = fetchFromGitHub { owner = "nfs-ganesha"; repo = "nfs-ganesha"; rev = "V${version}"; - sha256 = "sha256-03zrEWwPQi7ED6Yr3HgzQyOtqJjjnUj5nChgGV6v0zk="; + sha256 = "sha256-s6iZcZObBEHvIqyD0niNzuPJf4ENZGw3mhgZZZdj2zc="; }; preConfigure = "cd src"; @@ -26,6 +26,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ + acl krb5 xfsprogs jemalloc From b73781c9893215ff33a7a372976a45ba8528086c Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Thu, 10 Nov 2022 11:32:40 +0100 Subject: [PATCH 32/32] conmon-rs: init at 0.4.0 Signed-off-by: Sascha Grunert --- .../virtualization/conmon-rs/default.nix | 31 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/applications/virtualization/conmon-rs/default.nix diff --git a/pkgs/applications/virtualization/conmon-rs/default.nix b/pkgs/applications/virtualization/conmon-rs/default.nix new file mode 100644 index 000000000000..59a2de96e9dd --- /dev/null +++ b/pkgs/applications/virtualization/conmon-rs/default.nix @@ -0,0 +1,31 @@ +{ capnproto +, lib +, fetchFromGitHub +, protobuf +, rustPlatform +}: + +rustPlatform.buildRustPackage rec { + pname = "conmon-rs"; + version = "0.4.0"; + + src = fetchFromGitHub { + owner = "containers"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-VwVJWf9tKZ5rVF8tXDf35zsS2PipqC8FPbXUpOzsw/Y="; + }; + + nativeBuildInputs = [ capnproto protobuf ]; + doCheck = false; + + cargoSha256 = "sha256-zY9fsZK1C3HnCxeNA5dCbQQHYx3IVDMHCHYwFh5ev2k="; + + meta = with lib; { + description = "An OCI container runtime monitor written in Rust"; + homepage = "https://github.com/containers/conmon-rs"; + license = licenses.asl20; + maintainers = with maintainers; [ ] ++ teams.podman.members; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0d69ac96bc7e..2a394a2aebe7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33701,6 +33701,8 @@ with pkgs; conmon = callPackage ../applications/virtualization/conmon { }; + conmon-rs = callPackage ../applications/virtualization/conmon-rs { }; + digikam = libsForQt5.callPackage ../applications/graphics/digikam {}; drumkv1 = libsForQt5.callPackage ../applications/audio/drumkv1 { };