From 7487b88f646cde3a27f8779b3fe1e7873def02da Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 20 Jan 2024 22:10:46 +0000 Subject: [PATCH 01/32] renode-unstable: 1.14.0+20240106git1b3952c2c -> 1.14.0+20240119git1a0826937 --- pkgs/by-name/re/renode-unstable/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/re/renode-unstable/package.nix b/pkgs/by-name/re/renode-unstable/package.nix index b733a10bd7ba..4b63b039cd85 100644 --- a/pkgs/by-name/re/renode-unstable/package.nix +++ b/pkgs/by-name/re/renode-unstable/package.nix @@ -7,10 +7,10 @@ inherit buildUnstable; }).overrideAttrs (finalAttrs: _: { pname = "renode-unstable"; - version = "1.14.0+20240106git1b3952c2c"; + version = "1.14.0+20240119git1a0826937"; src = fetchurl { url = "https://builds.renode.io/renode-${finalAttrs.version}.linux-portable.tar.gz"; - hash = "sha256-tDo/01jYoq1Qg8h0BS4BQSPh3rsINpe72eMk9UBWgR0="; + hash = "sha256-bv5+6DVzBFt5XeKcLJFpUHB5T1RKCNi/CuXXpIn6e9k="; }; }) From a9b5c3ce90132e00fde003955f6aa9b2e6911556 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Tue, 23 Jan 2024 00:24:21 +0100 Subject: [PATCH 02/32] maintainers: add dbrgn --- maintainers/maintainer-list.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index dbed94efca19..e2a5b3cf1a32 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4350,6 +4350,15 @@ githubId = 3179832; name = "D. Bohdan"; }; + dbrgn = { + email = "nix@dbrgn.ch"; + github = "dbrgn"; + githubId = 105168; + name = "Danilo B."; + keys = [{ + fingerprint = "20EE 002D 778A E197 EF7D 0D2C B993 FF98 A90C 9AB1"; + }]; + }; dbrock = { email = "daniel@brockman.se"; github = "dbrock"; From 0f4169703e0cd18ee81d65c11e33a211e3d06207 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Tue, 23 Jan 2024 00:20:12 +0100 Subject: [PATCH 03/32] galerio: init at 1.2.0 --- pkgs/by-name/ga/galerio/package.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pkgs/by-name/ga/galerio/package.nix diff --git a/pkgs/by-name/ga/galerio/package.nix b/pkgs/by-name/ga/galerio/package.nix new file mode 100644 index 000000000000..aa1075f81a75 --- /dev/null +++ b/pkgs/by-name/ga/galerio/package.nix @@ -0,0 +1,23 @@ +{ lib, fetchFromGitHub, rustPlatform }: + +rustPlatform.buildRustPackage rec { + pname = "galerio"; + version = "1.2.0"; + + src = fetchFromGitHub { + owner = "dbrgn"; + repo = "galerio"; + rev = "v${version}"; + hash = "sha256-JR/YfMUs5IHBRr3uYqHXLNcr23YHyDvgH2y/1ip+2Y8="; + }; + + cargoHash = "sha256-nYaCN09LP/2MfNRY8oZKtjzFCBFCeRF1IZ2ZBmbHg7I="; + + meta = with lib; { + description = " A simple generator for self-contained HTML flexbox galleries"; + homepage = "https://github.com/dbrgn/galerio"; + maintainers = with maintainers; [ dbrgn ]; + license = with licenses; [ asl20 mit ]; + mainProgram = "galerio"; + }; +} From 34250891220ec2a9f32f368432809db97eae09bf Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 25 Jan 2024 02:32:56 +0000 Subject: [PATCH 04/32] uxn: unstable-2024-01-15 -> unstable-2024-01-21 --- pkgs/by-name/ux/uxn/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ux/uxn/package.nix b/pkgs/by-name/ux/uxn/package.nix index 4933591ba3f9..2bc851ff764b 100644 --- a/pkgs/by-name/ux/uxn/package.nix +++ b/pkgs/by-name/ux/uxn/package.nix @@ -7,13 +7,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "uxn"; - version = "unstable-2024-01-15"; + version = "unstable-2024-01-21"; src = fetchFromSourcehut { owner = "~rabbits"; repo = "uxn"; - rev = "8212ca5edb55a28976515a73fcb454f18eb44a09"; - hash = "sha256-K/qTKSGt/sFHt0lfUbwa/Y2XlWst30q1aKvsm4sjrLc="; + rev = "3e1183285a94a0930c9b09fd4fa73ac3a5d24fda"; + hash = "sha256-hhxcj/jVBOm7E63Z9sS3SnFjexQEXVtw3QU5n/4hkVI="; }; outputs = [ "out" "projects" ]; From d061a3c15449d72fa5219ed6e5379e3a0abc77b0 Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Fri, 26 Jan 2024 14:42:08 -0500 Subject: [PATCH 05/32] python311Packages.svgutils: init at 0.3.4 --- .../python-modules/svgutils/default.nix | 40 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/python-modules/svgutils/default.nix diff --git a/pkgs/development/python-modules/svgutils/default.nix b/pkgs/development/python-modules/svgutils/default.nix new file mode 100644 index 000000000000..ea2c7c547e43 --- /dev/null +++ b/pkgs/development/python-modules/svgutils/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, setuptools +, lxml +, matplotlib +, pytestCheckHook +, nose +}: + +buildPythonPackage rec { + pname = "svgutils"; + version = "0.3.4"; + pyproject = true; + + src = fetchFromGitHub { + owner = "btel"; + repo = "svg_utils"; + rev = "refs/tags/v${version}"; + hash = "sha256-ITvZx+3HMbTyaRmCb7tR0LKqCxGjqDdV9/2taziUD0c="; + }; + + nativeBuildInputs = [ setuptools ]; + + propagatedBuildInputs = [ + lxml + matplotlib + ]; + + nativeCheckInputs = [ pytestCheckHook nose ]; + + pythonImportsCheck = [ "svgutils" ]; + + meta = with lib; { + description = "Python tools to create and manipulate SVG files"; + homepage = "https://github.com/btel/svg_utils"; + license = licenses.mit; + maintainers = with maintainers; [ bcdarwin ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e48f85ef1392..76b62ff373c4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14002,6 +14002,8 @@ self: super: with self; { svgelements = callPackage ../development/python-modules/svgelements { }; + svgutils = callPackage ../development/python-modules/svgutils { }; + svgwrite = callPackage ../development/python-modules/svgwrite { }; sv-ttk = callPackage ../development/python-modules/sv-ttk { }; From 43a00710a5fc33db8bc713323aab1ecd98e5e077 Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Thu, 2 Nov 2023 13:01:03 -0400 Subject: [PATCH 06/32] python311Packages.nipreps-version: init at 1.0.4 --- .../nipreps-versions/default.nix | 46 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/python-modules/nipreps-versions/default.nix diff --git a/pkgs/development/python-modules/nipreps-versions/default.nix b/pkgs/development/python-modules/nipreps-versions/default.nix new file mode 100644 index 000000000000..1c54ab9d905e --- /dev/null +++ b/pkgs/development/python-modules/nipreps-versions/default.nix @@ -0,0 +1,46 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, flit-scm +, packaging +, setuptools-scm +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "nipreps-versions"; + version = "1.0.4"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "nipreps"; + repo = "version-schemes"; + rev = "refs/tags/${version}"; + hash = "sha256-B2wtLurzgk59kTooH51a2dewK7aEyA0dAm64Wp+tqhM="; + }; + + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeBuildInputs = [ + flit-scm + setuptools-scm + ]; + + propagatedBuildInputs = [ + packaging + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "nipreps_versions" ]; + + meta = with lib; { + description = "Setuptools_scm plugin for nipreps version schemes"; + homepage = "https://github.com/nipreps/version-schemes"; + changelog = "https://github.com/nipreps/version-schemes/blob/${src.rev}/CHANGES.md"; + license = licenses.asl20; + maintainers = with maintainers; [ bcdarwin ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 76b62ff373c4..3a6e8bb74250 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8363,6 +8363,8 @@ self: super: with self; { ninja = callPackage ../development/python-modules/ninja { inherit (pkgs) ninja; }; + nipreps-versions = callPackage ../development/python-modules/nipreps-versions { }; + nipy = callPackage ../development/python-modules/nipy { }; nipype = callPackage ../development/python-modules/nipype { From cdc7603f70388aa126adcc69c05d3cc6ccb139d7 Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Thu, 27 Apr 2023 19:01:22 -0400 Subject: [PATCH 07/32] python311Packages.templateflow: init at 23.1.0 --- .../python-modules/templateflow/default.nix | 45 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/python-modules/templateflow/default.nix diff --git a/pkgs/development/python-modules/templateflow/default.nix b/pkgs/development/python-modules/templateflow/default.nix new file mode 100644 index 000000000000..c879b7064d0f --- /dev/null +++ b/pkgs/development/python-modules/templateflow/default.nix @@ -0,0 +1,45 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, pytestCheckHook +, setuptools-scm +, nipreps-versions +, pybids +, requests +, tqdm +}: + +buildPythonPackage rec { + pname = "templateflow"; + version = "23.1.0"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "templateflow"; + repo = "python-client"; + rev = "refs/tags/${version}"; + hash = "sha256-8AdXC1IFGfYZ5cvCAyBz0tD3zia+KBILX0tL9IcO2NA="; + }; + + nativeBuildInputs = [ setuptools-scm ]; + propagatedBuildInputs = [ + nipreps-versions + pybids + requests + tqdm + ]; + + doCheck = false; # most tests try to download data + #pythonImportsCheck = [ "templateflow" ]; # touches $HOME/.cache, hence needs https://github.com/NixOS/nixpkgs/pull/120300 + + meta = with lib; { + homepage = "https://templateflow.org/python-client"; + description = "Python API to query TemplateFlow via pyBIDS"; + changelog = "https://github.com/templateflow/python-client/releases/tag/${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ bcdarwin ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3a6e8bb74250..d40c4626b625 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14146,6 +14146,8 @@ self: super: with self; { tempita = callPackage ../development/python-modules/tempita { }; + templateflow = callPackage ../development/python-modules/templateflow { }; + tempora = callPackage ../development/python-modules/tempora { }; tenacity = callPackage ../development/python-modules/tenacity { }; From 7a483d6e4f2625b01ed0fd9213401a061a4dbd85 Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Thu, 2 Nov 2023 13:03:34 -0400 Subject: [PATCH 08/32] python311Packages.niworkflows: init at 1.10.0 --- .../python-modules/niworkflows/default.nix | 101 ++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 103 insertions(+) create mode 100644 pkgs/development/python-modules/niworkflows/default.nix diff --git a/pkgs/development/python-modules/niworkflows/default.nix b/pkgs/development/python-modules/niworkflows/default.nix new file mode 100644 index 000000000000..494a834c937a --- /dev/null +++ b/pkgs/development/python-modules/niworkflows/default.nix @@ -0,0 +1,101 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, hatch-vcs +, hatchling +, pytestCheckHook +, attrs +, importlib-resources +, jinja2 +, looseversion +, matplotlib +, nibabel +, nilearn +, nipype +, nitransforms +, numpy +, packaging +, pandas +, pybids +, pyyaml +, scikit-image +, scipy +, seaborn +, svgutils +, templateflow +, traits +, transforms3d +}: + +buildPythonPackage rec { + pname = "niworkflows"; + version = "1.10.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "nipreps"; + repo = "niworkflows"; + rev = "refs/tags/${version}"; + hash = "sha256-wQPk9imDvomg+NTWk+VeW1TE2QlvMyi1YYVVaznhktU="; + }; + + postPatch = '' + substituteInPlace pyproject.toml --replace '"traits < 6.4"' '"traits"' + ''; + + nativeBuildInputs = [ + hatch-vcs + hatchling + ]; + + propagatedBuildInputs = [ + attrs + importlib-resources + jinja2 + looseversion + matplotlib + nibabel + nilearn + nipype + nitransforms + numpy + packaging + pandas + pybids + pyyaml + scikit-image + scipy + seaborn + svgutils + templateflow + traits + transforms3d + ]; + + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeCheckInputs = [ pytestCheckHook ]; + preCheck = ''export HOME=$(mktemp -d)''; + pytestFlagsArray = [ "niworkflows" ]; + # try to download data: + disabledTests = [ + "test_GenerateCifti" + "ROIsPlot" + "ROIsPlot2" + "test_SimpleShowMaskRPT" + "test_cifti_surfaces_plot" + "niworkflows.utils.misc.get_template_specs" + "niworkflows.interfaces.cifti._prepare_cifti" + ]; + disabledTestPaths = [ "niworkflows/tests/test_registration.py" ]; + + pythonImportsCheck = [ "niworkflows" ]; + + meta = with lib; { + description = "Common workflows for MRI (anatomical, functional, diffusion, etc.)"; + homepage = "https://github.com/nipreps/niworkflows"; + changelog = "https://github.com/nipreps/niworkflows/blob/${src.rev}/CHANGES.rst"; + license = licenses.asl20; + maintainers = with maintainers; [ bcdarwin ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d40c4626b625..f1a9bbb95aee 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8377,6 +8377,8 @@ self: super: with self; { nitransforms = callPackage ../development/python-modules/nitransforms { }; + niworkflows = callPackage ../development/python-modules/niworkflows { }; + nix-kernel = callPackage ../development/python-modules/nix-kernel { inherit (pkgs) nix; }; From 8f474713424fe27c6b55215ecd1e3347aa1c4b54 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 30 Jan 2024 05:00:03 +0000 Subject: [PATCH 09/32] invidtui: 0.3.7 -> 0.3.8 --- pkgs/by-name/in/invidtui/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/in/invidtui/package.nix b/pkgs/by-name/in/invidtui/package.nix index a0def40e132c..81402026b127 100644 --- a/pkgs/by-name/in/invidtui/package.nix +++ b/pkgs/by-name/in/invidtui/package.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "invidtui"; - version = "0.3.7"; + version = "0.3.8"; src = fetchFromGitHub { owner = "darkhz"; repo = "invidtui"; rev = "refs/tags/v${version}"; - hash = "sha256-bzstO6xaVdu7u1vBgwUjnJ9CEep0UHT73FbybBRd8y8="; + hash = "sha256-m2ygORf6GIJZXYYJKy6i12wDEkxQywtYdCutHeiyNYY="; }; - vendorHash = "sha256-F0Iyy8H6ZRYiAlMdYGQS2p2hFN9ICmfTiRP/F9kpW7c="; + vendorHash = "sha256-HQ6JHXiqawDwSV48/Czbao4opnuz1LqIBdcObrkCfNs="; doCheck = true; From f585cc67562bbac986f98edc6a52ef4804389a53 Mon Sep 17 00:00:00 2001 From: 0nyr Date: Tue, 30 Jan 2024 15:43:19 +0100 Subject: [PATCH 10/32] maintainers: add _0nyr --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index f1c8a4fc74de..6dca71167959 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -66,6 +66,12 @@ github = "0b11stan"; githubId = 27831931; }; + _0nyr = { + email = "onyr.maintainer@gmail.com"; + github = "0nyr"; + githubId = 47721040; + name = "Florian Rascoussier"; + }; _0qq = { email = "0qqw0qqw@gmail.com"; github = "0qq"; From 634277c50bc292f25cf6f3aa6b22adc7fe7f9913 Mon Sep 17 00:00:00 2001 From: 0nyr Date: Tue, 30 Jan 2024 15:47:59 +0100 Subject: [PATCH 11/32] pdfannots2json: init at 1.0.16 --- pkgs/by-name/pd/pdfannots2json/package.nix | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 pkgs/by-name/pd/pdfannots2json/package.nix diff --git a/pkgs/by-name/pd/pdfannots2json/package.nix b/pkgs/by-name/pd/pdfannots2json/package.nix new file mode 100644 index 000000000000..01c30fe1fb52 --- /dev/null +++ b/pkgs/by-name/pd/pdfannots2json/package.nix @@ -0,0 +1,25 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +let + pname = "pdfannots2json"; + version = "1.0.16"; +in + buildGoModule { + inherit pname version; + + src = fetchFromGitHub { + owner = "mgmeyers"; + repo = "pdfannots2json"; + rev = "refs/tags/${version}"; + sha256 = "sha256-qk4OSws/6SevN/Q0lsyxw+fZkm2uy1WwOYYL7CB7QUk="; + }; + + vendorHash = null; + + meta = with lib; { + homepage = "https://github.com/mgmeyers/pdfannots2json"; + license = licenses.agpl3; + description = "A tool to convert PDF annotations to JSON"; + maintainers = with maintainers; [ _0nyr ]; + }; + } From a48232a475ff1a30d823f2eeacb7409da5da4e6d Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Tue, 30 Jan 2024 18:16:21 +0100 Subject: [PATCH 12/32] strace: 6.6 -> 6.7 ChangeLog: https://github.com/strace/strace/releases/tag/v6.7 Adds `elfutils` for `-kk` (show source lines of execution stack trace). Increases the closure size from 44.0M to 59.4M (+35%). --- pkgs/development/tools/misc/strace/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/misc/strace/default.nix b/pkgs/development/tools/misc/strace/default.nix index 591eaeaa1ae2..d851aa217b5f 100644 --- a/pkgs/development/tools/misc/strace/default.nix +++ b/pkgs/development/tools/misc/strace/default.nix @@ -1,12 +1,12 @@ -{ lib, stdenv, fetchurl, perl, libunwind, buildPackages, gitUpdater }: +{ lib, stdenv, fetchurl, perl, libunwind, buildPackages, gitUpdater, elfutils }: stdenv.mkDerivation rec { pname = "strace"; - version = "6.6"; + version = "6.7"; src = fetchurl { url = "https://strace.io/files/${version}/${pname}-${version}.tar.xz"; - sha256 = "sha256-QhtBhsBrcFFj5k3IXycevc9nZgr4ZnKDFH1ehZ/IqWw="; + sha256 = "sha256-IJAgHho/8yhG9P5CHBFjsV9EC7OOMTVdCfgtOUmSKvc="; }; depsBuildBuild = [ buildPackages.stdenv.cc ]; @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { # On RISC-V platforms, LLVM's libunwind implementation is unsupported by strace. # The build will silently fall back and -k will not work on RISC-V. - buildInputs = [ libunwind ]; # support -k + buildInputs = [ libunwind elfutils ]; # support -k and -kk configureFlags = [ "--enable-mpers=check" ]; From 9ab031edc67b91ccaa89ae544b248b838489dcd2 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 31 Jan 2024 06:10:07 +0000 Subject: [PATCH 13/32] ipfs-cluster: 1.0.7 -> 1.0.8 --- pkgs/applications/networking/ipfs-cluster/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/ipfs-cluster/default.nix b/pkgs/applications/networking/ipfs-cluster/default.nix index cecb3ce3b03b..19a1b38eed42 100644 --- a/pkgs/applications/networking/ipfs-cluster/default.nix +++ b/pkgs/applications/networking/ipfs-cluster/default.nix @@ -2,15 +2,15 @@ buildGoModule rec { pname = "ipfs-cluster"; - version = "1.0.7"; + version = "1.0.8"; - vendorHash = "sha256-/Kjm/hM+lKsZ6fzStDyOitp7Vtt7Vb8ak7E/W0lbW20="; + vendorHash = "sha256-uwDXUy9mh/DvLuwj8Htm55wla5/JjvZH5ztJbqnox+U="; src = fetchFromGitHub { owner = "ipfs-cluster"; repo = "ipfs-cluster"; rev = "v${version}"; - hash = "sha256-eBbbD77nnjcumhrsixAlI09B1ZAxK5IOHoBeJGgj+TY="; + hash = "sha256-qZUoYJjw3Qac7Kmg5PfNWTDM8Ra3rqrbjScLbK6FRx4="; }; meta = with lib; { From 0cd27ecef38edb218ee5c1a543848793c1766948 Mon Sep 17 00:00:00 2001 From: Benedikt Tissot Date: Wed, 31 Jan 2024 15:16:37 +0100 Subject: [PATCH 14/32] restream: 1.2.0 -> 1.3.1 --- pkgs/applications/misc/remarkable/restream/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/remarkable/restream/default.nix b/pkgs/applications/misc/remarkable/restream/default.nix index 9af70769e3d9..c5958aff724c 100644 --- a/pkgs/applications/misc/remarkable/restream/default.nix +++ b/pkgs/applications/misc/remarkable/restream/default.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation rec { pname = "restream"; - version = "1.2.0"; + version = "1.3.1"; src = fetchFromGitHub { owner = "rien"; repo = pname; - rev = version; - sha256 = "0vyj0kng8c9inv2rbw1qdr43ic15s5x8fvk9mbw0vpc6g723x99g"; + rev = "v${version}"; + hash = "sha256-AXHKOfdIM3LsHF6u3M/lMhhcuPZADoEal7de3zlx7L4="; }; dontConfigure = true; From bcc0993a81eb17932040ead62e01e0e9c77a8572 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 31 Jan 2024 20:11:43 +0000 Subject: [PATCH 15/32] mise: 2024.1.30 -> 2024.1.35 --- pkgs/tools/misc/mise/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/mise/default.nix b/pkgs/tools/misc/mise/default.nix index 12acc61f9e24..9c0fec19d647 100644 --- a/pkgs/tools/misc/mise/default.nix +++ b/pkgs/tools/misc/mise/default.nix @@ -17,16 +17,16 @@ rustPlatform.buildRustPackage rec { pname = "mise"; - version = "2024.1.30"; + version = "2024.1.35"; src = fetchFromGitHub { owner = "jdx"; repo = "mise"; rev = "v${version}"; - hash = "sha256-1MvnxH+6xN7uQAhf2OEO+OjBISUSiTrYtfdulSe8Cxg="; + hash = "sha256-U5L66cZXgvKLQKTYIAKWcYVs5IV4OKegKxYvLr83g8k="; }; - cargoHash = "sha256-Hm8cpj0tk5bQ4NBHPGf6Fwpwq6zGJEwfE6psDkenxCQ="; + cargoHash = "sha256-Hn6uDDA/RJ9d5s3bLsR90Gd8mahYwnBmkkJ3ToGwpyM="; nativeBuildInputs = [ installShellFiles pkg-config ]; buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security SystemConfiguration ]; From 6558e891777932e8066080e89bdc773e6127e1e7 Mon Sep 17 00:00:00 2001 From: ibbem Date: Tue, 30 Jan 2024 17:55:30 +0100 Subject: [PATCH 16/32] lib.fileset.gitTracked: Allow clones of shallow repositories The only reason shallow clones are not the default in `builtins.fetchGit` is that `revCount` can't be provided when cloning a shallow repository. However, `revCount` isn't used or exposed by `lib.fileset`. Hence, allowing cloning shallow repositories makes `gitTracked` more general without any drawbacks. Co-authored-by: Silvan Mosberger --- lib/fileset/internal.nix | 19 ++++++++++++++++++- lib/fileset/tests.sh | 13 +++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/lib/fileset/internal.nix b/lib/fileset/internal.nix index 4059d2e24426..f4fcc83e1012 100644 --- a/lib/fileset/internal.nix +++ b/lib/fileset/internal.nix @@ -5,6 +5,7 @@ let isAttrs isPath isString + nixVersion pathExists readDir split @@ -17,6 +18,7 @@ let attrNames attrValues mapAttrs + optionalAttrs zipAttrsWith ; @@ -56,6 +58,7 @@ let substring stringLength hasSuffix + versionAtLeast ; inherit (lib.trivial) @@ -840,6 +843,10 @@ rec { # https://github.com/NixOS/nix/commit/55cefd41d63368d4286568e2956afd535cb44018 _fetchGitSubmodulesMinver = "2.4"; + # Support for `builtins.fetchGit` with `shallow = true` was introduced in 2.4 + # https://github.com/NixOS/nix/commit/d1165d8791f559352ff6aa7348e1293b2873db1c + _fetchGitShallowMinver = "2.4"; + # Mirrors the contents of a Nix store path relative to a local path as a file set. # Some notes: # - The store path is read at evaluation time. @@ -894,7 +901,17 @@ rec { # However a simpler alternative still would be [a builtins.gitLsFiles](https://github.com/NixOS/nix/issues/2944). fetchResult = fetchGit ({ url = path; - } // extraFetchGitAttrs); + } + # In older Nix versions, repositories were always assumed to be deep clones, which made `fetchGit` fail for shallow clones + # For newer versions this was fixed, but the `shallow` flag is required. + # The only behavioral difference is that for shallow clones, `fetchGit` doesn't return a `revCount`, + # which we don't need here, so it's fine to always pass it. + + # Unfortunately this means older Nix versions get a poor error message for shallow repositories, and there's no good way to improve that. + # Checking for `.git/shallow` doesn't seem worth it, especially since that's more of an implementation detail, + # and would also require more code to handle worktrees where `.git` is a file. + // optionalAttrs (versionAtLeast nixVersion _fetchGitShallowMinver) { shallow = true; } + // extraFetchGitAttrs); in # We can identify local working directories by checking for .git, # see https://git-scm.com/docs/gitrepository-layout#_description. diff --git a/lib/fileset/tests.sh b/lib/fileset/tests.sh index e809aef6935a..af8338eb7855 100755 --- a/lib/fileset/tests.sh +++ b/lib/fileset/tests.sh @@ -1439,6 +1439,19 @@ if [[ -n "$fetchGitSupportsSubmodules" ]]; then fi rm -rf -- * +# shallow = true is not supported on all Nix versions +# and older versions don't support shallow clones at all +if [[ "$(nix-instantiate --eval --expr "$prefixExpression (versionAtLeast builtins.nixVersion _fetchGitShallowMinver)")" == true ]]; then + createGitRepo full + # Extra commit such that there's a commit that won't be in the shallow clone + git -C full commit --allow-empty -q -m extra + git clone -q --depth 1 "file://${PWD}/full" shallow + cd shallow + checkGitTracked + cd .. + rm -rf -- * +fi + # Go through all stages of Git files # See https://www.git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository From a8770b6ef13ba13ed36710d26925dea1e788529f Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 1 Feb 2024 03:12:05 +0000 Subject: [PATCH 17/32] salt: 3006.5 -> 3006.6 --- pkgs/tools/admin/salt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/admin/salt/default.nix b/pkgs/tools/admin/salt/default.nix index 2c2d9f840180..a08e4c5a812a 100644 --- a/pkgs/tools/admin/salt/default.nix +++ b/pkgs/tools/admin/salt/default.nix @@ -11,12 +11,12 @@ python3.pkgs.buildPythonApplication rec { pname = "salt"; - version = "3006.5"; + version = "3006.6"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-b5aH8lQt3ICEsXy0fwpMr9SJQBI7o+1XMfaqgf5/lz4="; + hash = "sha256-X6tojYa3Dh6ExRtMqlZfNnGVBQaBPDcp1EQIzC9a+8M="; }; patches = [ From 6e85a666097054cef9368221b9f79f9753cd3f06 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 1 Feb 2024 03:32:20 +0000 Subject: [PATCH 18/32] sabnzbd: 4.2.1 -> 4.2.2 --- pkgs/servers/sabnzbd/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sabnzbd/default.nix b/pkgs/servers/sabnzbd/default.nix index 5601ae2f7d0f..a7035426fdf9 100644 --- a/pkgs/servers/sabnzbd/default.nix +++ b/pkgs/servers/sabnzbd/default.nix @@ -47,14 +47,14 @@ let ]); path = lib.makeBinPath [ coreutils par2cmdline-turbo unrar unzip p7zip util-linux ]; in stdenv.mkDerivation rec { - version = "4.2.1"; + version = "4.2.2"; pname = "sabnzbd"; src = fetchFromGitHub { owner = pname; repo = pname; rev = version; - sha256 = "sha256-M9DvwizNeCXkV07dkgiComdjoceUACCuccZb+y9RMdw="; + sha256 = "sha256-e5MjsBFUeQ1FMgMIuTDAmAUqf9BaM+ic2qpd1GVZEAw="; }; nativeBuildInputs = [ makeWrapper ]; From f6a0dcdc5008e7aa6ccac5b99a02b73461540789 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 1 Feb 2024 03:36:43 +0000 Subject: [PATCH 19/32] runc: 1.1.11 -> 1.1.12 --- pkgs/applications/virtualization/runc/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/virtualization/runc/default.nix b/pkgs/applications/virtualization/runc/default.nix index 38ec1e6244da..71ff22032cb5 100644 --- a/pkgs/applications/virtualization/runc/default.nix +++ b/pkgs/applications/virtualization/runc/default.nix @@ -14,13 +14,13 @@ buildGoModule rec { pname = "runc"; - version = "1.1.11"; + version = "1.1.12"; src = fetchFromGitHub { owner = "opencontainers"; repo = "runc"; rev = "v${version}"; - hash = "sha256-3LZWidINg15Aqoswml/BY7ZmLvz0XsbtYV5Cx8h5lpM="; + hash = "sha256-N77CU5XiGYIdwQNPFyluXjseTeaYuNJ//OsEUS0g/v0="; }; vendorHash = null; From 0850ee016b2fbc654a54054ddf413b45ed8907d1 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Wed, 31 Jan 2024 22:52:52 -0500 Subject: [PATCH 20/32] nixos/networkd: drop upstreamed stage-1 unit dependencies Reference: https://github.com/systemd/systemd/pull/27791 --- nixos/modules/system/boot/networkd.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix index f236a4c005ad..a7399bd55e77 100644 --- a/nixos/modules/system/boot/networkd.nix +++ b/nixos/modules/system/boot/networkd.nix @@ -2989,15 +2989,9 @@ let systemd.services.systemd-networkd = { wantedBy = [ "initrd.target" ]; - # These before and conflicts lines can be removed when this PR makes it into a release: - # https://github.com/systemd/systemd/pull/27791 - before = ["initrd-switch-root.target"]; - conflicts = ["initrd-switch-root.target"]; }; systemd.sockets.systemd-networkd = { wantedBy = [ "initrd.target" ]; - before = ["initrd-switch-root.target"]; - conflicts = ["initrd-switch-root.target"]; }; systemd.services.systemd-network-generator.wantedBy = [ "sysinit.target" ]; From 01d02a374dc95810fd4d5e2aaf83452fe81e060a Mon Sep 17 00:00:00 2001 From: Muhammad Falak R Wani Date: Thu, 1 Feb 2024 11:39:43 +0530 Subject: [PATCH 21/32] ast-grep: 0.17.0 -> 0.18.1 Diff: https://github.com/ast-grep/ast-grep/compare/0.17.0...0.18.1 Changelog: https://github.com/ast-grep/ast-grep/blob/0.18.1/CHANGELOG.md Signed-off-by: Muhammad Falak R Wani --- pkgs/by-name/as/ast-grep/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/as/ast-grep/package.nix b/pkgs/by-name/as/ast-grep/package.nix index cbc30af9e69a..67afe28bc346 100644 --- a/pkgs/by-name/as/ast-grep/package.nix +++ b/pkgs/by-name/as/ast-grep/package.nix @@ -6,16 +6,16 @@ rustPlatform.buildRustPackage rec { pname = "ast-grep"; - version = "0.17.0"; + version = "0.18.1"; src = fetchFromGitHub { owner = "ast-grep"; repo = "ast-grep"; rev = version; - hash = "sha256-/lWvFYSE4gFbVPlJMROGcb86mVviGdh1tFAY74qTTX4="; + hash = "sha256-hr6VAqBsv3szVClR93y5ickkrNKjvl6BfzqKA3zc6vM="; }; - cargoHash = "sha256-r1vfh2JtBjWFgXrijlFxPyRr8LRAIogiA2TZHI5MJRM="; + cargoHash = "sha256-ttJMtaQfVnFj4/wUz4fn8X/EmUwW+usqhmWhy4Y0AB8="; # Work around https://github.com/NixOS/nixpkgs/issues/166205. env = lib.optionalAttrs stdenv.cc.isClang { From be671135143f960d0817154c781f270167c6427a Mon Sep 17 00:00:00 2001 From: Manuel Frischknecht Date: Tue, 30 Jan 2024 22:10:06 +0100 Subject: [PATCH 22/32] grandorgue: 3.11.0 -> 3.14.0 `grandorgue` failed to build because GCC 13 stopped transitively including some headers like `cstdint` in a lot of situations, leading to many references to types like `uint8_t` in old C++ code breaking unless the respective include statements were included directly in the referring code. This build issue is already fixed upstream, and updating the package to the current release (3.14.0) fixes the build. --- .../applications/audio/grandorgue/default.nix | 31 ++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/audio/grandorgue/default.nix b/pkgs/applications/audio/grandorgue/default.nix index 9856b81c92b8..6ca3f39a9dc0 100644 --- a/pkgs/applications/audio/grandorgue/default.nix +++ b/pkgs/applications/audio/grandorgue/default.nix @@ -1,18 +1,34 @@ -{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, fftwFloat, alsa-lib -, zlib, wavpack, wxGTK32, udev, jackaudioSupport ? false, libjack2 -, imagemagick, libicns, makeWrapper, Cocoa -, includeDemo ? true }: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, pkg-config +, fftwFloat +, alsa-lib +, zlib +, wavpack +, wxGTK32 +, udev +, jackaudioSupport ? false +, libjack2 +, imagemagick +, libicns +, yaml-cpp +, makeWrapper +, Cocoa +, includeDemo ? true +}: stdenv.mkDerivation rec { pname = "grandorgue"; - version = "3.11.0"; + version = "3.14.0"; src = fetchFromGitHub { owner = "GrandOrgue"; repo = pname; rev = version; fetchSubmodules = true; - sha256 = "sha256-l1KqER/vkNwgKLXIFUzHnYLw2ivGNP7hRiKhIOzn7pw="; + hash = "sha256-kPz11V2yNmBe80egNLYxh/m2B1nDca3C5sGbEnrkqnw="; }; postPatch = '' @@ -24,7 +40,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config imagemagick libicns makeWrapper ]; - buildInputs = [ fftwFloat zlib wavpack wxGTK32 ] + buildInputs = [ fftwFloat zlib wavpack wxGTK32 yaml-cpp ] ++ lib.optionals stdenv.isLinux [ alsa-lib udev ] ++ lib.optionals stdenv.isDarwin [ Cocoa ] ++ lib.optional jackaudioSupport libjack2; @@ -53,5 +69,6 @@ stdenv.mkDerivation rec { license = lib.licenses.gpl2Plus; platforms = lib.platforms.unix; maintainers = [ lib.maintainers.puzzlewolf ]; + mainProgram = "GrandOrgue"; }; } From 9e2baeb2519a9aa219faf15d117e4bc1c63ca500 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 1 Feb 2024 08:05:44 +0000 Subject: [PATCH 23/32] pupdate: 3.1.0 -> 3.2.0 --- pkgs/by-name/pu/pupdate/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/pu/pupdate/package.nix b/pkgs/by-name/pu/pupdate/package.nix index 0f1968270cab..01a1a99bac5d 100644 --- a/pkgs/by-name/pu/pupdate/package.nix +++ b/pkgs/by-name/pu/pupdate/package.nix @@ -12,13 +12,13 @@ buildDotnetModule rec { pname = "pupdate"; - version = "3.1.0"; + version = "3.2.0"; src = fetchFromGitHub { owner = "mattpannella"; repo = "${pname}"; rev = "${version}"; - hash = "sha256-wIYqEtbQZsj9gq5KaLhd+sEnrKHBHzA9jWR+9dGDQ0s="; + hash = "sha256-9u1CKxWohGj7Gm3BrC2tpoQAY1r3cpP8OIePo+g7ETo="; }; buildInputs = [ From 88e6b0bd446bbcc03a1391d0659677df9297035c Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 1 Feb 2024 20:54:36 +0000 Subject: [PATCH 24/32] claws-mail: don't pin to `gcc-12` Latest reelase was already ported to `gcc-13` and builds successfully. --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2de3b5d49b3e..a50dc4007136 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -30808,7 +30808,7 @@ with pkgs; clapper = callPackage ../applications/video/clapper { }; - claws-mail = disable-warnings-if-gcc13 (callPackage ../applications/networking/mailreaders/claws-mail { }); + claws-mail = callPackage ../applications/networking/mailreaders/claws-mail { }; cligh = python3Packages.callPackage ../development/tools/github/cligh { }; From fefaed7b8bdeff79842359babfed641d0ad4563d Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 1 Feb 2024 23:38:27 +0000 Subject: [PATCH 25/32] oterm: 0.1.21 -> 0.1.22 --- pkgs/by-name/ot/oterm/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ot/oterm/package.nix b/pkgs/by-name/ot/oterm/package.nix index 34f79d96d949..bb4e829b3397 100644 --- a/pkgs/by-name/ot/oterm/package.nix +++ b/pkgs/by-name/ot/oterm/package.nix @@ -5,13 +5,13 @@ python3Packages.buildPythonApplication rec { pname = "oterm"; - version = "0.1.21"; + version = "0.1.22"; pyproject = true; src = fetchFromGitHub { owner = "ggozad"; repo = "oterm"; rev = "refs/tags/${version}"; - hash = "sha256-S6v7VDIGPu6UDbDe0H3LWF6IN0Z6ENmiCDxz+GuCibI="; + hash = "sha256-hRbPlRuwM3NspTNd3mPhVxPJl8zA9qyFwDGNKH3Slag="; }; pythonRelaxDeps = [ From ac20bcf44925e7d290bf2f3135bd234ad6bc1bf7 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Fri, 12 Jan 2024 13:02:17 -0800 Subject: [PATCH 26/32] writeShellApplication: Add `bashOptions` argument --- pkgs/build-support/trivial-builders/default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/trivial-builders/default.nix b/pkgs/build-support/trivial-builders/default.nix index 9643c9ba048e..a8a07f6d071e 100644 --- a/pkgs/build-support/trivial-builders/default.nix +++ b/pkgs/build-support/trivial-builders/default.nix @@ -272,6 +272,7 @@ rec { , meta ? { } , checkPhase ? null , excludeShellChecks ? [ ] + , bashOptions ? [ "errexit" "nounset" "pipefail" ] }: writeTextFile { inherit name meta; @@ -281,9 +282,7 @@ rec { preferLocalBuild = false; text = '' #!${runtimeShell} - set -o errexit - set -o nounset - set -o pipefail + ${lib.concatMapStringsSep "\n" (option: "set -o ${option}") bashOptions} '' + lib.optionalString (runtimeInputs != [ ]) '' export PATH="${lib.makeBinPath runtimeInputs}:$PATH" From a64766913f229e5e63e5a0377df9b4837c87d36f Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Fri, 12 Jan 2024 13:30:36 -0800 Subject: [PATCH 27/32] writeShellApplication: Add `runtimeEnv` argument --- pkgs/build-support/trivial-builders/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/trivial-builders/default.nix b/pkgs/build-support/trivial-builders/default.nix index a8a07f6d071e..8a5fc288f1ec 100644 --- a/pkgs/build-support/trivial-builders/default.nix +++ b/pkgs/build-support/trivial-builders/default.nix @@ -269,6 +269,7 @@ rec { { name , text , runtimeInputs ? [ ] + , runtimeEnv ? null , meta ? { } , checkPhase ? null , excludeShellChecks ? [ ] @@ -283,7 +284,15 @@ rec { text = '' #!${runtimeShell} ${lib.concatMapStringsSep "\n" (option: "set -o ${option}") bashOptions} - '' + lib.optionalString (runtimeInputs != [ ]) '' + '' + lib.optionalString (runtimeEnv != null) + (lib.concatStrings + (lib.mapAttrsToList + (name: value: '' + ${lib.toShellVar name value} + export ${name} + '') + runtimeEnv)) + + lib.optionalString (runtimeInputs != [ ]) '' export PATH="${lib.makeBinPath runtimeInputs}:$PATH" '' + '' From 863786b98b36025ddca4c0678b39bbdf383468a0 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Mon, 29 Jan 2024 10:03:51 -0800 Subject: [PATCH 28/32] writeTextFile,writeShellApplication: Allow setting extra arguments --- pkgs/build-support/trivial-builders/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/build-support/trivial-builders/default.nix b/pkgs/build-support/trivial-builders/default.nix index 8a5fc288f1ec..3e63e12febd2 100644 --- a/pkgs/build-support/trivial-builders/default.nix +++ b/pkgs/build-support/trivial-builders/default.nix @@ -152,19 +152,21 @@ rec { , meta ? { } , allowSubstitutes ? false , preferLocalBuild ? true + , derivationArgs ? { } # Extra arguments to pass to `stdenv.mkDerivation` }: let matches = builtins.match "/bin/([^/]+)" destination; in runCommand name - { + ({ inherit text executable checkPhase allowSubstitutes preferLocalBuild; - passAsFile = [ "text" ]; + passAsFile = [ "text" ] + ++ derivationArgs.passAsFile or [ ]; meta = lib.optionalAttrs (executable && matches != null) { mainProgram = lib.head matches; - } // meta; - } + } // meta // derivationArgs.meta or {}; + } // removeAttrs derivationArgs [ "passAsFile" "meta" ]) '' target=$out${lib.escapeShellArg destination} mkdir -p "$(dirname "$target")" @@ -274,9 +276,10 @@ rec { , checkPhase ? null , excludeShellChecks ? [ ] , bashOptions ? [ "errexit" "nounset" "pipefail" ] + , derivationArgs ? { } # Extra arguments to pass to `stdenv.mkDerivation` }: writeTextFile { - inherit name meta; + inherit name meta derivationArgs; executable = true; destination = "/bin/${name}"; allowSubstitutes = true; From 63f7c9b415fa09a4d7ae5b01f3ecdd420c30cbed Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Fri, 12 Jan 2024 13:42:53 -0800 Subject: [PATCH 29/32] writeShellApplication: Document arguments --- .../trivial-builders/default.nix | 104 ++++++++++++------ 1 file changed, 68 insertions(+), 36 deletions(-) diff --git a/pkgs/build-support/trivial-builders/default.nix b/pkgs/build-support/trivial-builders/default.nix index 3e63e12febd2..a38231bdcaa3 100644 --- a/pkgs/build-support/trivial-builders/default.nix +++ b/pkgs/build-support/trivial-builders/default.nix @@ -240,43 +240,75 @@ rec { meta.mainProgram = name; }; - /* - Similar to writeShellScriptBin and writeScriptBin. - Writes an executable Shell script to /nix/store//bin/ and - checks its syntax with shellcheck and the shell's -n option. - Individual checks can be foregone by putting them in the excludeShellChecks - list, e.g. [ "SC2016" ]. - Automatically includes sane set of shellopts (errexit, nounset, pipefail) - and handles creation of PATH based on runtimeInputs - - Note that the checkPhase uses stdenv.shell for the test run of the script, - while the generated shebang uses runtimeShell. If, for whatever reason, - those were to mismatch you might lose fidelity in the default checks. - - Example: - - Writes my-file to /nix/store//bin/my-file and makes executable. - - - writeShellApplication { - name = "my-file"; - runtimeInputs = [ curl w3m ]; - text = '' - curl -s 'https://nixos.org' | w3m -dump -T text/html - ''; - } - - */ + # See doc/build-helpers/trivial-build-helpers.chapter.md + # or https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-text-writing writeShellApplication = - { name - , text - , runtimeInputs ? [ ] - , runtimeEnv ? null - , meta ? { } - , checkPhase ? null - , excludeShellChecks ? [ ] - , bashOptions ? [ "errexit" "nounset" "pipefail" ] - , derivationArgs ? { } # Extra arguments to pass to `stdenv.mkDerivation` + { + /* + The name of the script to write. + + Type: String + */ + name, + /* + The shell script's text, not including a shebang. + + Type: String + */ + text, + /* + Inputs to add to the shell script's `$PATH` at runtime. + + Type: [String|Derivation] + */ + runtimeInputs ? [ ], + /* + Extra environment variables to set at runtime. + + Type: AttrSet + */ + runtimeEnv ? null, + /* + `stdenv.mkDerivation`'s `meta` argument. + + Type: AttrSet + */ + meta ? { }, + /* + The `checkPhase` to run. Defaults to `shellcheck` on supported + platforms and `bash -n`. + + The script path will be given as `$target` in the `checkPhase`. + + Type: String + */ + checkPhase ? null, + /* + Checks to exclude when running `shellcheck`, e.g. `[ "SC2016" ]`. + + See for a list of checks. + + Type: [String] + */ + excludeShellChecks ? [ ], + /* + Bash options to activate with `set -o` at the start of the script. + + Defaults to `[ "errexit" "nounset" "pipefail" ]`. + + Type: [String] + */ + bashOptions ? [ "errexit" "nounset" "pipefail" ], + /* Extra arguments to pass to `stdenv.mkDerivation`. + + :::{.caution} + Certain derivation attributes are used internally, + overriding those could cause problems. + ::: + + Type: AttrSet + */ + derivationArgs ? { }, }: writeTextFile { inherit name meta derivationArgs; From 88ce0b00191ff1d7093709696538e403c990285a Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Fri, 12 Jan 2024 16:39:00 -0800 Subject: [PATCH 30/32] writeShellApplication: Expand test suite --- .../test/writeShellApplication.nix | 154 +++++++++++++++--- 1 file changed, 133 insertions(+), 21 deletions(-) diff --git a/pkgs/build-support/trivial-builders/test/writeShellApplication.nix b/pkgs/build-support/trivial-builders/test/writeShellApplication.nix index 6ce6f0720fcf..c50f5a4d283f 100644 --- a/pkgs/build-support/trivial-builders/test/writeShellApplication.nix +++ b/pkgs/build-support/trivial-builders/test/writeShellApplication.nix @@ -1,29 +1,141 @@ -/* - Run with: - - cd nixpkgs - nix-build -A tests.trivial-builders.writeShellApplication -*/ - -{ lib, writeShellApplication, runCommand }: +# Run with: +# nix-build -A tests.trivial-builders.writeShellApplication +{ writeShellApplication +, writeTextFile +, runCommand +, lib +, linkFarm +, diffutils +, hello +}: let - pkg = writeShellApplication { - name = "test-script"; + checkShellApplication = args@{name, expected, ...}: + let + writeShellApplicationArgs = builtins.removeAttrs args ["expected"]; + script = writeShellApplication writeShellApplicationArgs; + executable = lib.getExe script; + expected' = writeTextFile { + name = "${name}-expected"; + text = expected; + }; + actual = "${name}-actual"; + in + runCommand name { } '' + echo "Running test executable ${name}" + ${executable} > ${actual} + echo "Got output from test executable:" + cat ${actual} + echo "Checking test output against expected output:" + ${diffutils}/bin/diff --color --unified ${expected'} ${actual} + touch $out + ''; +in +linkFarm "writeShellApplication-tests" { + test-meta = + let + script = writeShellApplication { + name = "test-meta"; + text = ""; + meta.description = "A test for the `writeShellApplication` `meta` argument."; + }; + in + assert script.meta.mainProgram == "test-meta"; + assert script.meta.description == "A test for the `writeShellApplication` `meta` argument."; + script; + + test-runtime-inputs = + checkShellApplication { + name = "test-runtime-inputs"; + text = '' + hello + ''; + runtimeInputs = [ hello ]; + expected = "Hello, world!\n"; + }; + + test-runtime-env = + checkShellApplication { + name = "test-runtime-env"; + runtimeEnv = { + MY_COOL_ENV_VAR = "my-cool-env-value"; + MY_OTHER_COOL_ENV_VAR = "my-other-cool-env-value"; + # Check that we can serialize a bunch of different types: + BOOL = true; + INT = 1; + LIST = [1 2 3]; + MAP = { + a = "a"; + b = "b"; + }; + }; + text = '' + echo "$MY_COOL_ENV_VAR" + echo "$MY_OTHER_COOL_ENV_VAR" + ''; + expected = '' + my-cool-env-value + my-other-cool-env-value + ''; + }; + + test-check-phase = + checkShellApplication { + name = "test-check-phase"; + text = ""; + checkPhase = '' + echo "echo -n hello" > $target + ''; + expected = "hello"; + }; + + test-argument-forwarding = + checkShellApplication { + name = "test-argument-forwarding"; + text = ""; + derivationArgs.MY_BUILD_TIME_VARIABLE = "puppy"; + derivationArgs.postCheck = '' + if [[ "$MY_BUILD_TIME_VARIABLE" != puppy ]]; then + echo "\$MY_BUILD_TIME_VARIABLE is not set to 'puppy'!" + exit 1 + fi + ''; + meta.description = "A test checking that `writeShellApplication` forwards extra arguments to `stdenv.mkDerivation`."; + expected = ""; + }; + + test-exclude-shell-checks = writeShellApplication { + name = "test-exclude-shell-checks"; excludeShellChecks = [ "SC2016" ]; text = '' - echo -e '#!/usr/bin/env bash\n' \ - 'echo "$SHELL"' > /tmp/something.sh # this line would normally - # ...cause shellcheck error + # Triggers SC2016: Expressions don't expand in single quotes, use double + # quotes for that. + echo '$SHELL' ''; }; -in - assert pkg.meta.mainProgram == "test-script"; - runCommand "test-writeShellApplication" { } '' - echo Testing if writeShellApplication builds without shellcheck error... + test-bash-options-pipefail = checkShellApplication { + name = "test-bash-options-pipefail"; + text = '' + touch my-test-file + echo puppy | grep doggy | sed 's/doggy/puppy/g' + # ^^^^^^^^^^ This will fail. + true + ''; + # Don't use `pipefail`: + bashOptions = ["errexit" "nounset"]; + expected = ""; + }; - target=${lib.getExe pkg} - - touch $out - '' + test-bash-options-nounset = checkShellApplication { + name = "test-bash-options-nounset"; + text = '' + echo -n "$someUndefinedVariable" + ''; + # Don't use `nounset`: + bashOptions = []; + # Don't warn about the undefined variable at build time: + excludeShellChecks = [ "SC2154" ]; + expected = ""; + }; +} From 41376dd064e8be5c1d936decca6da2cdd8a7a731 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Mon, 22 Jan 2024 09:33:49 -0800 Subject: [PATCH 31/32] writeShellApplication: Update manual --- doc/build-helpers/trivial-build-helpers.chapter.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/build-helpers/trivial-build-helpers.chapter.md b/doc/build-helpers/trivial-build-helpers.chapter.md index 4648c7985542..384e25035060 100644 --- a/doc/build-helpers/trivial-build-helpers.chapter.md +++ b/doc/build-helpers/trivial-build-helpers.chapter.md @@ -502,9 +502,14 @@ concatScript "my-file" [ file1 file2 ] ## `writeShellApplication` {#trivial-builder-writeShellApplication} -This can be used to easily produce a shell script that has some dependencies (`runtimeInputs`). It automatically sets the `PATH` of the script to contain all of the listed inputs, sets some sanity shellopts (`errexit`, `nounset`, `pipefail`), and checks the resulting script with [`shellcheck`](https://github.com/koalaman/shellcheck). +`writeShellApplication` is similar to `writeShellScriptBin` and `writeScriptBin` but supports runtime dependencies with `runtimeInputs`. +Writes an executable shell script to `/nix/store//bin/` and checks its syntax with [`shellcheck`](https://github.com/koalaman/shellcheck) and the `bash`'s `-n` option. +Some basic Bash options are set by default (`errexit`, `nounset`, and `pipefail`), but can be overridden with `bashOptions`. -For example, look at the following code: +Extra arguments may be passed to `stdenv.mkDerivation` by setting `derivationArgs`; note that variables set in this manner will be set when the shell script is _built,_ not when it's run. +Runtime environment variables can be set with the `runtimeEnv` argument. + +For example, the following shell application can refer to `curl` directly, rather than needing to write `${curl}/bin/curl`: ```nix writeShellApplication { @@ -518,10 +523,6 @@ writeShellApplication { } ``` -Unlike with normal `writeShellScriptBin`, there is no need to manually write out `${curl}/bin/curl`, setting the PATH -was handled by `writeShellApplication`. Moreover, the script is being checked with `shellcheck` for more strict -validation. - ## `symlinkJoin` {#trivial-builder-symlinkJoin} This can be used to put many derivations into the same directory structure. It works by creating a new derivation and adding symlinks to each of the paths listed. It expects two arguments, `name`, and `paths`. `name` is the name used in the Nix store path for the created derivation. `paths` is a list of paths that will be symlinked. These paths can be to Nix store derivations or any other subdirectory contained within. From 91f6642e1b48ff77e88b9c69946a65719608f36c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 2 Feb 2024 00:28:07 +0000 Subject: [PATCH 32/32] turso-cli: 0.88.2 -> 0.88.3 --- pkgs/development/tools/turso-cli/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/turso-cli/default.nix b/pkgs/development/tools/turso-cli/default.nix index 4c9da1e13f14..09f96c2d183a 100644 --- a/pkgs/development/tools/turso-cli/default.nix +++ b/pkgs/development/tools/turso-cli/default.nix @@ -8,13 +8,13 @@ }: buildGoModule rec { pname = "turso-cli"; - version = "0.88.2"; + version = "0.88.3"; src = fetchFromGitHub { owner = "tursodatabase"; repo = "turso-cli"; rev = "v${version}"; - hash = "sha256-9lnqjkDGQRu487Me895h/dyWDIVImQkU9bEiafjTbb8="; + hash = "sha256-tPeoLGYJRMXFVI09fupspdQMSMjF2Trdo2GlkoWs7wA="; }; vendorHash = "sha256-rTeW2RQhcdwJTAMQELm4cdObJbm8gk/I2Qz3Wk3+zpI=";