From ffe685b3e0187a60c792ab942600b349735fd6d9 Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Tue, 10 Dec 2024 23:22:07 +0100 Subject: [PATCH 01/59] pkgs/stdenv/linux: update armv5tel-unknown-linux-gnueabi bootstrap-files sha256sum of files to be uploaded: $ sha256sum /nix/store/7xapg8fj3p2fpmnppsd28a66q62vzdg1-stdenv-bootstrap-tools-armv5tel-unknown-linux-gnueabi/on-server/* fbb71d2944e184e6f8a551418cf585a416d37e7eb803f7b39199cfea11213113 /nix/store/7xapg8fj3p2fpmnppsd28a66q62vzdg1-stdenv-bootstrap-tools-armv5tel-unknown-linux-gnueabi/on-server/bootstrap-tools.tar.xz 90dff34c05771333bd1c95c9eb2017b15da428937aed3cbf91677f09469d11ad /nix/store/7xapg8fj3p2fpmnppsd28a66q62vzdg1-stdenv-bootstrap-tools-armv5tel-unknown-linux-gnueabi/on-server/busybox Suggested commands to upload files to 'tarballs.nixos.org': $ nix-store --realize /nix/store/7xapg8fj3p2fpmnppsd28a66q62vzdg1-stdenv-bootstrap-tools-armv5tel-unknown-linux-gnueabi $ aws s3 cp --recursive --acl public-read /nix/store/7xapg8fj3p2fpmnppsd28a66q62vzdg1-stdenv-bootstrap-tools-armv5tel-unknown-linux-gnueabi/on-server/ s3://nixpkgs-tarballs/stdenv/armv5tel-unknown-linux-gnueabi/029dea9aaacf920ce8f7d89e4cf09da31a38d8e1 $ aws s3 cp --recursive s3://nixpkgs-tarballs/stdenv/armv5tel-unknown-linux-gnueabi/029dea9aaacf920ce8f7d89e4cf09da31a38d8e1 ./ $ sha256sum bootstrap-tools.tar.xz busybox $ sha256sum /nix/store/7xapg8fj3p2fpmnppsd28a66q62vzdg1-stdenv-bootstrap-tools-armv5tel-unknown-linux-gnueabi/on-server/* --- .../armv5tel-unknown-linux-gnueabi.nix | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/pkgs/stdenv/linux/bootstrap-files/armv5tel-unknown-linux-gnueabi.nix b/pkgs/stdenv/linux/bootstrap-files/armv5tel-unknown-linux-gnueabi.nix index 0ac818b9f223..f608581568b5 100644 --- a/pkgs/stdenv/linux/bootstrap-files/armv5tel-unknown-linux-gnueabi.nix +++ b/pkgs/stdenv/linux/bootstrap-files/armv5tel-unknown-linux-gnueabi.nix @@ -1,18 +1,21 @@ +# Autogenerated by maintainers/scripts/bootstrap-files/refresh-tarballs.bash as: +# $ ./refresh-tarballs.bash --targets=armv5tel-unknown-linux-gnueabi +# +# Metadata: +# - nixpkgs revision: 029dea9aaacf920ce8f7d89e4cf09da31a38d8e1 +# - hydra build: https://hydra.nixos.org/job/nixpkgs/cross-trunk/bootstrapTools.armv5tel-unknown-linux-gnueabi.build/latest +# - resolved hydra build: https://hydra.nixos.org/build/281086357 +# - instantiated derivation: /nix/store/j44ipis8k634n1a6j9j1blff88w13ix9-stdenv-bootstrap-tools-armv5tel-unknown-linux-gnueabi.drv +# - output directory: /nix/store/7xapg8fj3p2fpmnppsd28a66q62vzdg1-stdenv-bootstrap-tools-armv5tel-unknown-linux-gnueabi +# - build time: Tue, 03 Dec 2024 13:59:40 +0000 { - # Note: do not use Hydra as a source URL. Ask a member of the - # infrastructure team to mirror the job. + bootstrapTools = import { + url = "http://tarballs.nixos.org/stdenv/armv5tel-unknown-linux-gnueabi/029dea9aaacf920ce8f7d89e4cf09da31a38d8e1/bootstrap-tools.tar.xz"; + hash = "sha256-+7cdKUThhOb4pVFBjPWFpBbTfn64A/ezkZnP6hEhMRM="; + }; busybox = import { - # from job: https://hydra.nixos.org/job/nixpkgs/cross-trunk/bootstrapTools.armv5tel.dist/latest - # from build: https://hydra.nixos.org/build/114203025 - url = "http://tarballs.nixos.org/stdenv-linux/armv5tel/0eb0ddc4dbe3cd5415c6b6e657538eb809fc3778/busybox"; - # note: the following hash is different than the above hash, due to executable = true - sha256 = "0qxp2fsvs4phbc17g9npj9bsm20ylr8myi5pivcrmxm5qqflgi8d"; + url = "http://tarballs.nixos.org/stdenv/armv5tel-unknown-linux-gnueabi/029dea9aaacf920ce8f7d89e4cf09da31a38d8e1/busybox"; + hash = "sha256-vZ3oSKUjGVcx2TJsrKmTX4d+3S4/flD780vFVaaHDGI="; executable = true; }; - bootstrapTools = import { - # from job: https://hydra.nixos.org/job/nixpkgs/cross-trunk/bootstrapTools.armv5tel.dist/latest - # from build: https://hydra.nixos.org/build/114203025 - url = "http://tarballs.nixos.org/stdenv-linux/armv5tel/0eb0ddc4dbe3cd5415c6b6e657538eb809fc3778/bootstrap-tools.tar.xz"; - sha256 = "28327343db5ecc7f7811449ec69280d5867fa5d1d377cab0426beb9d4e059ed6"; - }; } From a2d3d00fb0acdb9bfc7b115f0bfd05528fb6678b Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Tue, 10 Dec 2024 23:22:18 +0100 Subject: [PATCH 02/59] pkgs/stdenv/linux: update armv6l-unknown-linux-gnueabihf bootstrap-files sha256sum of files to be uploaded: $ sha256sum /nix/store/cwfvh58lcbyk26d34j1w26d3ladgcgn8-stdenv-bootstrap-tools-armv6l-unknown-linux-gnueabihf/on-server/* 20e6514c946fa0fd1b233e4623a1aa18061bfc574c13ec55572153be0b662eec /nix/store/cwfvh58lcbyk26d34j1w26d3ladgcgn8-stdenv-bootstrap-tools-armv6l-unknown-linux-gnueabihf/on-server/bootstrap-tools.tar.xz dc73ddacf019a38669921f1c58c3adeaac290c2988cd54fc39f968c805d521a8 /nix/store/cwfvh58lcbyk26d34j1w26d3ladgcgn8-stdenv-bootstrap-tools-armv6l-unknown-linux-gnueabihf/on-server/busybox Suggested commands to upload files to 'tarballs.nixos.org': $ nix-store --realize /nix/store/cwfvh58lcbyk26d34j1w26d3ladgcgn8-stdenv-bootstrap-tools-armv6l-unknown-linux-gnueabihf $ aws s3 cp --recursive --acl public-read /nix/store/cwfvh58lcbyk26d34j1w26d3ladgcgn8-stdenv-bootstrap-tools-armv6l-unknown-linux-gnueabihf/on-server/ s3://nixpkgs-tarballs/stdenv/armv6l-unknown-linux-gnueabihf/029dea9aaacf920ce8f7d89e4cf09da31a38d8e1 $ aws s3 cp --recursive s3://nixpkgs-tarballs/stdenv/armv6l-unknown-linux-gnueabihf/029dea9aaacf920ce8f7d89e4cf09da31a38d8e1 ./ $ sha256sum bootstrap-tools.tar.xz busybox $ sha256sum /nix/store/cwfvh58lcbyk26d34j1w26d3ladgcgn8-stdenv-bootstrap-tools-armv6l-unknown-linux-gnueabihf/on-server/* --- .../armv6l-unknown-linux-gnueabihf.nix | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/pkgs/stdenv/linux/bootstrap-files/armv6l-unknown-linux-gnueabihf.nix b/pkgs/stdenv/linux/bootstrap-files/armv6l-unknown-linux-gnueabihf.nix index 8bc99c64c681..8bef180f3b69 100644 --- a/pkgs/stdenv/linux/bootstrap-files/armv6l-unknown-linux-gnueabihf.nix +++ b/pkgs/stdenv/linux/bootstrap-files/armv6l-unknown-linux-gnueabihf.nix @@ -1,18 +1,21 @@ +# Autogenerated by maintainers/scripts/bootstrap-files/refresh-tarballs.bash as: +# $ ./refresh-tarballs.bash --targets=armv6l-unknown-linux-gnueabihf +# +# Metadata: +# - nixpkgs revision: 029dea9aaacf920ce8f7d89e4cf09da31a38d8e1 +# - hydra build: https://hydra.nixos.org/job/nixpkgs/cross-trunk/bootstrapTools.armv6l-unknown-linux-gnueabihf.build/latest +# - resolved hydra build: https://hydra.nixos.org/build/281086894 +# - instantiated derivation: /nix/store/gq29b3av5mf7x9zlbvaf1qrvlnb1ps4l-stdenv-bootstrap-tools-armv6l-unknown-linux-gnueabihf.drv +# - output directory: /nix/store/cwfvh58lcbyk26d34j1w26d3ladgcgn8-stdenv-bootstrap-tools-armv6l-unknown-linux-gnueabihf +# - build time: Tue, 03 Dec 2024 13:59:47 +0000 { - # Note: do not use Hydra as a source URL. Ask a member of the - # infrastructure team to mirror the job. + bootstrapTools = import { + url = "http://tarballs.nixos.org/stdenv/armv6l-unknown-linux-gnueabihf/029dea9aaacf920ce8f7d89e4cf09da31a38d8e1/bootstrap-tools.tar.xz"; + hash = "sha256-IOZRTJRvoP0bIz5GI6GqGAYb/FdME+xVVyFTvgtmLuw="; + }; busybox = import { - # from job: https://hydra.nixos.org/job/nixpkgs/cross-trunk/bootstrapTools.armv6l.dist/latest - # from build: https://hydra.nixos.org/build/114202834 - url = "http://tarballs.nixos.org/stdenv-linux/armv6l/0eb0ddc4dbe3cd5415c6b6e657538eb809fc3778/busybox"; - # note: the following hash is different than the above hash, due to executable = true - sha256 = "1q02537cq56wlaxbz3s3kj5vmh6jbm27jhvga6b4m4jycz5sxxp6"; + url = "http://tarballs.nixos.org/stdenv/armv6l-unknown-linux-gnueabihf/029dea9aaacf920ce8f7d89e4cf09da31a38d8e1/busybox"; + hash = "sha256-kdlAOhgypLa+ZesRT1ZVDoDQdNefV1Rx5Yf7H254o80="; executable = true; }; - bootstrapTools = import { - # from job: https://hydra.nixos.org/job/nixpkgs/cross-trunk/bootstrapTools.armv6l.dist/latest - # from build: https://hydra.nixos.org/build/114202834 - url = "http://tarballs.nixos.org/stdenv-linux/armv6l/0eb0ddc4dbe3cd5415c6b6e657538eb809fc3778/bootstrap-tools.tar.xz"; - sha256 = "0810fe74f8cd09831f177d075bd451a66b71278d3cc8db55b07c5e38ef3fbf3f"; - }; } From 7b9726f12c6f457416df47f069149b8eec37d273 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 16 Dec 2024 12:22:14 +0100 Subject: [PATCH 03/59] pkgs/tools/text/diffutils: Disabled test-c-stack2 test-sigsegv-catch-stackoverflow1 and 2 on Aarch32 Those tests fail on qemu making it impossible to build on other architectures --- pkgs/tools/text/diffutils/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/text/diffutils/default.nix b/pkgs/tools/text/diffutils/default.nix index 6c1bc8bf01f1..f7fdecd93f91 100644 --- a/pkgs/tools/text/diffutils/default.nix +++ b/pkgs/tools/text/diffutils/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { # Disable stack-related gnulib tests on x86_64-darwin because they have problems running under # Rosetta 2: test-c-stack hangs, test-sigsegv-catch-stackoverflow fails. - postPatch = if (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) then '' + postPatch = if ((stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) || (stdenv.hostPlatform.isAarch32)) then '' sed -i -E 's:test-c-stack2?\.sh::g' gnulib-tests/Makefile.in sed -i -E 's:test-sigsegv-catch-stackoverflow[12]::g' gnulib-tests/Makefile.in '' else null; From 34d7324bcd66d1f8fd3e84ba25d33a6509d4c208 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 16 Dec 2024 12:24:35 +0100 Subject: [PATCH 04/59] pkgs/tools/text/gnugrep: Disabled tests for Aarch32 Some tests fail on qemu making it impossible to build on other architectures --- pkgs/tools/text/gnugrep/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/text/gnugrep/default.nix b/pkgs/tools/text/gnugrep/default.nix index bbb876703f2b..98d471cca61e 100644 --- a/pkgs/tools/text/gnugrep/default.nix +++ b/pkgs/tools/text/gnugrep/default.nix @@ -32,7 +32,8 @@ stdenv.mkDerivation { # cygwin: FAIL: multibyte-white-space # freebsd: FAIL mb-non-UTF8-performance # x86_64-darwin: fails 'stack-overflow' tests on Rosetta 2 emulator - doCheck = !stdenv.hostPlatform.isCygwin && !stdenv.hostPlatform.isFreeBSD && !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) && !stdenv.buildPlatform.isRiscV64; + # aarch32: fails 'stack-overflow' when run on qemu under x86_64 + doCheck = !stdenv.hostPlatform.isCygwin && !stdenv.hostPlatform.isFreeBSD && !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) && !stdenv.buildPlatform.isRiscV64 && !stdenv.hostPlatform.isAarch32; # On macOS, force use of mkdir -p, since Grep's fallback # (./install-sh) is broken. From bf58353bc480d031412c225ecb268aaa7593cb56 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 28 Dec 2024 04:02:18 +0000 Subject: [PATCH 05/59] python312Packages.mozart-api: 4.1.1.116.3 -> 4.1.1.116.4 --- pkgs/development/python-modules/mozart-api/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/mozart-api/default.nix b/pkgs/development/python-modules/mozart-api/default.nix index 67005b38cf1d..65421615d17e 100644 --- a/pkgs/development/python-modules/mozart-api/default.nix +++ b/pkgs/development/python-modules/mozart-api/default.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { pname = "mozart-api"; - version = "4.1.1.116.3"; + version = "4.1.1.116.4"; pyproject = true; disabled = pythonOlder "3.11"; @@ -26,7 +26,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "mozart_api"; inherit version; - hash = "sha256-ioM+l+1ab191OTKXE4Ou8OOPafAqZz9XmxO5c82KH8g="; + hash = "sha256-9yg02AQdHMR/Yz0dpjSb3umdNRNTo7S04Q2BY/vu7WQ="; }; build-system = [ poetry-core ]; From c0286526ec34b81b11e04e0240b335c0dade7672 Mon Sep 17 00:00:00 2001 From: Nicky Mouha Date: Mon, 30 Dec 2024 14:58:27 -0500 Subject: [PATCH 06/59] tsocks: fix ./configure error --- pkgs/by-name/ts/tsocks/package.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/by-name/ts/tsocks/package.nix b/pkgs/by-name/ts/tsocks/package.nix index 2619380fdafb..03faca1336f4 100644 --- a/pkgs/by-name/ts/tsocks/package.nix +++ b/pkgs/by-name/ts/tsocks/package.nix @@ -17,6 +17,8 @@ stdenv.mkDerivation rec { preConfigure = '' sed -i -e "s,\\\/usr,"$(echo $out|sed -e "s,\\/,\\\\\\\/,g")",g" tsocks + substituteInPlace configure \ + --replace-fail "main(){return(0);}" "int main(){return(0);}" substituteInPlace tsocks --replace /usr $out ''; From 2c20f93c8ed233ad7daa842e8524d68dcda5f0b0 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 31 Dec 2024 12:54:06 +0000 Subject: [PATCH 07/59] i2pd: 2.54.0 -> 2.55.0 --- pkgs/by-name/i2/i2pd/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/i2/i2pd/package.nix b/pkgs/by-name/i2/i2pd/package.nix index c24325c31ba1..643c4a86e17f 100644 --- a/pkgs/by-name/i2/i2pd/package.nix +++ b/pkgs/by-name/i2/i2pd/package.nix @@ -13,13 +13,13 @@ stdenv.mkDerivation rec { pname = "i2pd"; - version = "2.54.0"; + version = "2.55.0"; src = fetchFromGitHub { owner = "PurpleI2P"; repo = pname; rev = version; - sha256 = "sha256-neoIDZNBBDq3tqz1ET3/CS/zb0Lret9niyuU7iWoNIE="; + sha256 = "sha256-mdjt2+h+IWjHBRDUpx85ku6s6gKHjxUBuhv+gJK7QhU="; }; buildInputs = [ From c7814ab4d0d254c091f336f50bf9cc448cf34e15 Mon Sep 17 00:00:00 2001 From: lucasew Date: Tue, 31 Dec 2024 22:12:28 -0300 Subject: [PATCH 08/59] xc: tweak, add update script, add sanity tests Signed-off-by: lucasew --- pkgs/by-name/xc/xc/example.md | 9 +++++++++ pkgs/by-name/xc/xc/package.nix | 25 ++++++++++++++++++++----- 2 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 pkgs/by-name/xc/xc/example.md diff --git a/pkgs/by-name/xc/xc/example.md b/pkgs/by-name/xc/xc/example.md new file mode 100644 index 000000000000..1d7bf507bd85 --- /dev/null +++ b/pkgs/by-name/xc/xc/example.md @@ -0,0 +1,9 @@ +# Tasks + +## example + +Tests if xc works + +```sh +touch ./test +``` diff --git a/pkgs/by-name/xc/xc/package.nix b/pkgs/by-name/xc/xc/package.nix index 95ee1c8f1e3a..924dbf49bff5 100644 --- a/pkgs/by-name/xc/xc/package.nix +++ b/pkgs/by-name/xc/xc/package.nix @@ -2,6 +2,8 @@ lib, buildGoModule, fetchFromGitHub, + gitUpdater, + versionCheckHook, }: buildGoModule rec { @@ -11,7 +13,7 @@ buildGoModule rec { src = fetchFromGitHub { owner = "joerdav"; repo = pname; - rev = "v${version}"; + tag = "v${version}"; sha256 = "sha256-vTyCS85xbJnAgbasWD6LFxij9EezzlJ1pyvCJptqmOU="; }; @@ -23,13 +25,26 @@ buildGoModule rec { "-X=main.version=${version}" ]; - meta = with lib; { + nativeInstallCheckInputs = [ versionCheckHook ]; + doInstallCheck = true; + postInstallCheck = '' + cp ${./example.md} example.md + $out/bin/xc -file ./example.md example + if ! [[ -f test ]] then + echo "example.md didn't do anything" >&2 + return 1 + fi + ''; + + passthru.updateScript = gitUpdater { rev-prefix = "v"; }; + + meta = { description = "Markdown defined task runner"; mainProgram = "xc"; homepage = "https://xcfile.dev/"; - changelog = "https://github.com/joerdav/xc/releases/tag/${src.rev}"; - license = licenses.mit; - maintainers = with maintainers; [ + changelog = "https://github.com/joerdav/xc/releases/tag/${src.tag}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ figsoda joerdav ]; From 530628753825a4188d9ca92bec712cad4bdc13da Mon Sep 17 00:00:00 2001 From: lucasew Date: Tue, 31 Dec 2024 22:13:47 -0300 Subject: [PATCH 09/59] xc: 0.8.0 -> 0.8.5 Signed-off-by: lucasew --- pkgs/by-name/xc/xc/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/xc/xc/package.nix b/pkgs/by-name/xc/xc/package.nix index 924dbf49bff5..e369418dc05f 100644 --- a/pkgs/by-name/xc/xc/package.nix +++ b/pkgs/by-name/xc/xc/package.nix @@ -8,13 +8,13 @@ buildGoModule rec { pname = "xc"; - version = "0.8.0"; + version = "0.8.5"; src = fetchFromGitHub { owner = "joerdav"; repo = pname; tag = "v${version}"; - sha256 = "sha256-vTyCS85xbJnAgbasWD6LFxij9EezzlJ1pyvCJptqmOU="; + sha256 = "sha256-eaFHK7VsfLSgSJehv4urxq8qMPT+zzs2tRypz4q+MLc="; }; vendorHash = "sha256-EbIuktQ2rExa2DawyCamTrKRC1yXXMleRB8/pcKFY5c="; From 8736508e49afd1b5b6f4dc6f5ada72cf750f2c7e Mon Sep 17 00:00:00 2001 From: Heitor Augusto Date: Sun, 15 Dec 2024 23:46:54 -0300 Subject: [PATCH 10/59] cosmic-ext-ctl: init at 1.1.0 --- pkgs/by-name/co/cosmic-ext-ctl/package.nix | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 pkgs/by-name/co/cosmic-ext-ctl/package.nix diff --git a/pkgs/by-name/co/cosmic-ext-ctl/package.nix b/pkgs/by-name/co/cosmic-ext-ctl/package.nix new file mode 100644 index 000000000000..9812b7f88eff --- /dev/null +++ b/pkgs/by-name/co/cosmic-ext-ctl/package.nix @@ -0,0 +1,41 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + versionCheckHook, + nix-update-script, + cosmic-comp, +}: +let + version = "1.1.0"; +in +rustPlatform.buildRustPackage { + pname = "cosmic-ext-ctl"; + inherit version; + + src = fetchFromGitHub { + owner = "cosmic-utils"; + repo = "cosmic-ctl"; + tag = "v${version}"; + hash = "sha256-dcUzrJcwJpzbYPuqdHgm43NYbaowsFmFP4sS0cfzNAg="; + }; + + useFetchCargoVendor = true; + cargoHash = "sha256-EReo2hkBaIO1YOBx4D9rQSXlx+3NK5VQtj59jfZZI/0="; + + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgram = "${placeholder "out"}/bin/cosmic-ctl"; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "CLI for COSMIC Desktop configuration management"; + changelog = "https://github.com/cosmic-utils/cosmic-ctl/releases/tag/v${version}"; + homepage = "https://github.com/cosmic-utils/cosmic-ctl"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ HeitorAugustoLN ]; + mainProgram = "cosmic-ctl"; + inherit (cosmic-comp.meta) platforms; + }; +} From 5812c8fb3d5ae8d1169b5bf3134737cb3160a319 Mon Sep 17 00:00:00 2001 From: Ben C Date: Sun, 29 Dec 2024 13:32:58 -0500 Subject: [PATCH 11/59] owmods-gui: init at 0.15.0 --- pkgs/by-name/ow/owmods-gui/package.nix | 122 +++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 pkgs/by-name/ow/owmods-gui/package.nix diff --git a/pkgs/by-name/ow/owmods-gui/package.nix b/pkgs/by-name/ow/owmods-gui/package.nix new file mode 100644 index 000000000000..28e477cbf2e8 --- /dev/null +++ b/pkgs/by-name/ow/owmods-gui/package.nix @@ -0,0 +1,122 @@ +{ + lib, + libsoup_3, + dbus, + glib, + glib-networking, + librsvg, + webkitgtk_4_1, + pkg-config, + wrapGAppsHook3, + makeDesktopItem, + copyDesktopItems, + rustPlatform, + buildNpmPackage, + fetchFromGitHub, + mono, + wrapWithMono ? true, +}: +rustPlatform.buildRustPackage rec { + pname = "owmods-gui"; + version = "0.15.0"; + + src = fetchFromGitHub { + owner = "ow-mods"; + repo = "ow-mod-man"; + tag = "gui_v${version}"; + hash = "sha256-rTANG+yHE8YfWYUyELoKgj4El+1ZW6vI9NkgADD40pw="; + }; + + cargoHash = "sha256-rFkh2G7kFuQI7nlZIwaqvt7x9bKLqmWU21YwZu2+wUA="; + + buildFeatures = [ + "tauri/custom-protocol" + ]; + + nativeBuildInputs = [ + pkg-config + copyDesktopItems + wrapGAppsHook3 + ]; + + buildInputs = [ + dbus + libsoup_3 + glib + librsvg + glib-networking + webkitgtk_4_1 + ]; + + buildAndTestSubdir = "owmods_gui/backend"; + + preFixup = lib.optionalString wrapWithMono "gappsWrapperArgs+=(--prefix PATH : '${mono}/bin')"; + + postPatch = + let + frontend = buildNpmPackage { + inherit version; + + env.VITE_VERSION_SUFFIX = "-nix"; + + pname = "owmods-gui-ui"; + src = "${src}/owmods_gui/frontend"; + + packageJSON = "${src}/owmods_gui/frontend/package.json"; + npmDepsHash = "sha256-h6e+hQzd52G3XtufioEYlBuXNu6I+ZTQcNgJaQdaAck="; + + postBuild = '' + cp -r ../dist/ $out + ''; + distPhase = "true"; + dontInstall = true; + installInPlace = true; + distDir = "../dist"; + + meta = { + description = "Web frontend for the Outer Wilds Mod Manager"; + homepage = "https://github.com/ow-mods/ow-mod-man/tree/main/owmods_gui/frontend"; + license = lib.licenses.gpl3Plus; + }; + }; + in + '' + substituteInPlace owmods_gui/backend/tauri.conf.json \ + --replace-fail '"frontendDist": "../dist"' '"frontendDist": "${frontend}"' + ''; + + postInstall = '' + install -DT owmods_gui/backend/icons/128x128@2x.png $out/share/icons/hicolor/256x256@2/apps/outer-wilds-mod-manager.png + install -DT owmods_gui/backend/icons/128x128.png $out/share/icons/hicolor/128x128/apps/outer-wilds-mod-manager.png + install -DT owmods_gui/backend/icons/32x32.png $out/share/icons/hicolor/32x32/apps/outer-wilds-mod-manager.png + + mv $out/bin/owmods_gui $out/bin/outer-wilds-mod-manager + ''; + + desktopItems = [ + (makeDesktopItem { + name = "outer-wilds-mod-manager"; + exec = "outer-wilds-mod-manager %u"; + icon = "outer-wilds-mod-manager"; + desktopName = "Outer Wilds Mod Manager"; + categories = [ "Game" ]; + comment = "Manage Outer Wilds Mods"; + mimeTypes = [ "x-scheme-handler/owmods" ]; + }) + ]; + + meta = { + description = "GUI version of the mod manager for Outer Wilds Mod Loader"; + homepage = "https://github.com/ow-mods/ow-mod-man/tree/main/owmods_gui"; + downloadPage = "https://github.com/ow-mods/ow-mod-man/releases/tag/gui_v${version}"; + changelog = "https://github.com/ow-mods/ow-mod-man/releases/tag/gui_v${version}"; + mainProgram = "outer-wilds-mod-manager"; + platforms = lib.platforms.linux; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ + bwc9876 + locochoco + spoonbaker + ]; + }; +} From 18d7d0a431c15ee89fa13fa8358bd409739ed26e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 23 Dec 2024 09:11:09 +0100 Subject: [PATCH 12/59] python312Packages.pyroute2: 0.7.12 -> 0.8.1 Diff: https://github.com/svinota/pyroute2/compare/refs/tags/0.7.12...0.8.1 Changelog: https://github.com/svinota/pyroute2/blob/0.8.1/CHANGELOG.rst --- pkgs/development/python-modules/pyroute2/default.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/pyroute2/default.nix b/pkgs/development/python-modules/pyroute2/default.nix index 61bbf1913150..f81db36e95d9 100644 --- a/pkgs/development/python-modules/pyroute2/default.nix +++ b/pkgs/development/python-modules/pyroute2/default.nix @@ -2,28 +2,25 @@ lib, buildPythonPackage, fetchFromGitHub, - importlib-metadata, pythonOlder, setuptools, }: buildPythonPackage rec { pname = "pyroute2"; - version = "0.7.12"; + version = "0.8.1"; pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "svinota"; repo = "pyroute2"; tag = version; - hash = "sha256-zB792ZwDWd74YBYvQ5au0t2RWTIAqrWvNtQ/e+ZEk50="; + hash = "sha256-eItzD9ub8COaOkNLEKLtf8uJil4W4rqjzVa95LJahHw="; }; - nativeBuildInputs = [ setuptools ]; - - propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; + build-system = [ setuptools ]; # Requires root privileges, https://github.com/svinota/pyroute2/issues/778 doCheck = false; From 3f7d1b040c03c796555e982200952661a2567b0a Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 6 Jan 2025 23:55:18 +0100 Subject: [PATCH 13/59] python312Packages.ml-dtypes: 0.5.0 -> 0.5.2 Diff: https://github.com/jax-ml/ml_dtypes/compare/refs/tags/v0.5.0...v0.5.2 Changelog: https://github.com/jax-ml/ml_dtypes/releases/tag/v0.5.2 --- .../python-modules/ml-dtypes/default.nix | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/ml-dtypes/default.nix b/pkgs/development/python-modules/ml-dtypes/default.nix index 83100c471fd9..dc262a0cdac3 100644 --- a/pkgs/development/python-modules/ml-dtypes/default.nix +++ b/pkgs/development/python-modules/ml-dtypes/default.nix @@ -2,7 +2,6 @@ lib, buildPythonPackage, fetchFromGitHub, - fetchpatch2, # build-system setuptools, @@ -17,31 +16,23 @@ buildPythonPackage rec { pname = "ml-dtypes"; - version = "0.5.0"; + version = "0.5.2"; pyproject = true; src = fetchFromGitHub { owner = "jax-ml"; repo = "ml_dtypes"; tag = "v${version}"; - hash = "sha256-+6job9fEHVguh9JBE/NUv+QezwQohuKPO8DlhbaawZ4="; + hash = "sha256-XRvqyWyi5smaLh5ese5QY2aIOkVliXGc7ngwT5CRsmc="; # Since this upstream patch (https://github.com/jax-ml/ml_dtypes/commit/1bfd097e794413b0d465fa34f2eff0f3828ff521), # the attempts to use the nixpkgs packaged eigen dependency have failed. # Hence, we rely on the bundled eigen library. fetchSubmodules = true; }; - patches = [ - (fetchpatch2 { - name = "numpy2-compat.patch"; - url = "https://github.com/jax-ml/ml_dtypes/commit/204df1147fd568f65890d958b6cdfa4dc55a226c.patch"; - hash = "sha256-IPHE6bQTbM0Ky5X6FDwwD/1eXL+kcA/D8pDGihAiJrQ="; - }) - ]; - postPatch = '' substituteInPlace pyproject.toml \ - --replace-fail "setuptools~=73.0.1" "setuptools" + --replace-fail "setuptools~=75.7.0" "setuptools" ''; build-system = [ setuptools ]; From 1f8a925df39233b05c9fc0ebe10294bfdfa9bf9b Mon Sep 17 00:00:00 2001 From: Reno Dakota Date: Tue, 7 Jan 2025 09:36:23 +0000 Subject: [PATCH 14/59] ispc: unpin LLVM17 --- pkgs/top-level/all-packages.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0be8e747eaed..248062d479cc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9428,9 +9428,7 @@ with pkgs; isort = with python3Packages; toPythonApplication isort; - ispc = callPackage ../development/compilers/ispc { - llvmPackages = llvmPackages_17; - }; + ispc = callPackage ../development/compilers/ispc { }; isso = callPackage ../servers/isso { nodejs = nodejs_20; From 12e98fcb99eac12f844fb6712463efb71c02fa91 Mon Sep 17 00:00:00 2001 From: Stephen Huan Date: Tue, 7 Jan 2025 04:04:38 -0800 Subject: [PATCH 15/59] maintainers: add esrh --- maintainers/maintainer-list.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 3be810a16b6d..84c65c985de4 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -6908,6 +6908,13 @@ githubId = 2544204; name = "Erik Skytthe"; }; + esrh = { + name = "Eshan Ramesh"; + email = "esrh@esrh.me"; + github = "eshrh"; + githubId = 16175276; + keys = [ { fingerprint = "E4CE B0F0 B2EC 09A3 9678 F294 CC7A 7E3C 6CF3 1343"; } ]; + }; ethancedwards8 = { email = "ethan@ethancedwards.com"; github = "ethancedwards8"; From 4882bd152bbcc79a4f42e4f2197ac77dd40e610a Mon Sep 17 00:00:00 2001 From: Stephen Huan Date: Tue, 7 Jan 2025 03:40:39 -0800 Subject: [PATCH 16/59] inori: init at 0.2.2 --- pkgs/by-name/in/inori/package.nix | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 pkgs/by-name/in/inori/package.nix diff --git a/pkgs/by-name/in/inori/package.nix b/pkgs/by-name/in/inori/package.nix new file mode 100644 index 000000000000..b7d7d87bf482 --- /dev/null +++ b/pkgs/by-name/in/inori/package.nix @@ -0,0 +1,35 @@ +{ + lib, + fetchFromGitHub, + rustPlatform, + nix-update-script, +}: + +rustPlatform.buildRustPackage rec { + pname = "inori"; + version = "0.2.2"; + + src = fetchFromGitHub { + owner = "eshrh"; + repo = "inori"; + tag = "v${version}"; + hash = "sha256-yd1kIlPepVbeTEFzjxTDWEh8o4m6dh/ya9GitqYHHT8="; + }; + + cargoHash = "sha256-mmzJXIl0wfcyEaYc2wZfA22ZEbTQXG5LVqxEQ4+x76M="; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Client for the Music Player Daemon (MPD)"; + homepage = "https://github.com/eshrh/inori"; + changelog = "https://github.com/eshrh/inori/releases/tag/${src.tag}"; + license = lib.licenses.gpl3Only; + platforms = lib.platforms.unix ++ lib.platforms.windows; + mainProgram = "inori"; + maintainers = with lib.maintainers; [ + stephen-huan + esrh + ]; + }; +} From dda4c5a8f7876bb3d73196bda86c70f38e80c37d Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 8 Jan 2025 14:14:10 +0100 Subject: [PATCH 17/59] python312Packages.equinox: skip failing test on darwin --- pkgs/development/python-modules/equinox/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/equinox/default.nix b/pkgs/development/python-modules/equinox/default.nix index faa86adc4466..7c48e8a67835 100644 --- a/pkgs/development/python-modules/equinox/default.nix +++ b/pkgs/development/python-modules/equinox/default.nix @@ -1,5 +1,6 @@ { lib, + stdenv, buildPythonPackage, fetchFromGitHub, @@ -47,6 +48,11 @@ buildPythonPackage rec { pytestCheckHook ]; + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ + # SystemError: nanobind::detail::nb_func_error_except(): exception could not be translated! + "test_filter" + ]; + pythonImportsCheck = [ "equinox" ]; meta = { From b2206cafa945e71f153a52d1c8da57de94700576 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 5 Jan 2025 22:03:13 +0100 Subject: [PATCH 18/59] badchars: 0.4.0 -> 0.5.0 Diff: https://github.com/cytopia/badchars/compare/refs/tags/0.4.0...0.5.0 Changelog: https://github.com/cytopia/badchars/releases/tag/0.5.0 --- pkgs/tools/security/badchars/default.nix | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/pkgs/tools/security/badchars/default.nix b/pkgs/tools/security/badchars/default.nix index 849ac3208280..bbb399555a7e 100644 --- a/pkgs/tools/security/badchars/default.nix +++ b/pkgs/tools/security/badchars/default.nix @@ -1,28 +1,22 @@ { lib, - buildPythonApplication, - fetchPypi, + fetchFromGitHub, python3, }: python3.pkgs.buildPythonApplication rec { pname = "badchars"; - version = "0.4.0"; + version = "0.5.0"; pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-4neV1S5gwQ03kEXEyZezNSj+PVXJyA5MO4lyZzGKE/c="; + src = fetchFromGitHub { + owner = "cytopia"; + repo = "badchars"; + tag = version; + hash = "sha256-VWe3k34snEviBK7VBCDTWAu3YjZfh1gXHXjlnFlefJw="; }; - postPatch = '' - substituteInPlace setup.py \ - --replace-fail "argparse" "" - ''; - - build-system = with python3.pkgs; [ - setuptools - ]; + build-system = with python3.pkgs; [ setuptools ]; # no tests are available and it can't be imported (it's only a script, not a module) doCheck = false; From 8bf0ea2bda6027ce628e03209931831f5ba0d6b1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 9 Jan 2025 09:47:13 +0100 Subject: [PATCH 19/59] badchars: remove with lib; --- pkgs/tools/security/badchars/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/badchars/default.nix b/pkgs/tools/security/badchars/default.nix index bbb399555a7e..5f29d98f5707 100644 --- a/pkgs/tools/security/badchars/default.nix +++ b/pkgs/tools/security/badchars/default.nix @@ -21,7 +21,7 @@ python3.pkgs.buildPythonApplication rec { # no tests are available and it can't be imported (it's only a script, not a module) doCheck = false; - meta = with lib; { + meta = { description = "HEX badchar generator for different programming languages"; longDescription = '' A HEX bad char generator to instruct encoders such as shikata-ga-nai to @@ -29,8 +29,8 @@ python3.pkgs.buildPythonApplication rec { ''; homepage = "https://github.com/cytopia/badchars"; changelog = "https://github.com/cytopia/badchars/releases/tag/${version}"; - license = with licenses; [ mit ]; - maintainers = with maintainers; [ fab ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; mainProgram = "badchars"; }; } From 9b308dc1b21caf610e65ed08f8c4fe9828fd3a5e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 9 Jan 2025 09:48:03 +0100 Subject: [PATCH 20/59] badchars: add passthru.updateScript --- pkgs/tools/security/badchars/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/tools/security/badchars/default.nix b/pkgs/tools/security/badchars/default.nix index 5f29d98f5707..173b609cf883 100644 --- a/pkgs/tools/security/badchars/default.nix +++ b/pkgs/tools/security/badchars/default.nix @@ -21,6 +21,8 @@ python3.pkgs.buildPythonApplication rec { # no tests are available and it can't be imported (it's only a script, not a module) doCheck = false; + passthru.updateScript = gitUpdater { }; + meta = { description = "HEX badchar generator for different programming languages"; longDescription = '' From 9b4fbc7af92396fee1f1a5b62fa5aa7488770108 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 9 Jan 2025 10:48:55 +0100 Subject: [PATCH 21/59] badchars: migrate to pkgs/by-name --- .../badchars/default.nix => by-name/ba/badchars/package.nix} | 1 + pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) rename pkgs/{tools/security/badchars/default.nix => by-name/ba/badchars/package.nix} (98%) diff --git a/pkgs/tools/security/badchars/default.nix b/pkgs/by-name/ba/badchars/package.nix similarity index 98% rename from pkgs/tools/security/badchars/default.nix rename to pkgs/by-name/ba/badchars/package.nix index 173b609cf883..a127cdc3e473 100644 --- a/pkgs/tools/security/badchars/default.nix +++ b/pkgs/by-name/ba/badchars/package.nix @@ -1,6 +1,7 @@ { lib, fetchFromGitHub, + gitUpdater, python3, }: diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a73f126419bc..5d689244c9ad 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1958,8 +1958,6 @@ with pkgs; babelfish = callPackage ../shells/fish/babelfish.nix { }; - badchars = python3Packages.callPackage ../tools/security/badchars { }; - bat-extras = recurseIntoAttrs (callPackages ../tools/misc/bat-extras { }); beauty-line-icon-theme = callPackage ../data/icons/beauty-line-icon-theme { From 717b4bf39598032d69bf95ff619238e5621bcd63 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 5 Jan 2025 21:54:56 +0100 Subject: [PATCH 22/59] amber-secret: add changelog to meta --- pkgs/tools/security/amber/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/security/amber/default.nix b/pkgs/tools/security/amber/default.nix index d95e21c954df..ef0fc819f75e 100644 --- a/pkgs/tools/security/amber/default.nix +++ b/pkgs/tools/security/amber/default.nix @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec { owner = "fpco"; repo = "amber"; rev = "v${version}"; - sha256 = "sha256-nduSnDhLvHpZD7Y1zeZC4nNL7P1qfLWc0yMpsdqrKHM="; + hash = "sha256-nduSnDhLvHpZD7Y1zeZC4nNL7P1qfLWc0yMpsdqrKHM="; }; cargoHash = "sha256-DxTsbJ51TUMvc/NvsUYhRG9OxxEGrWfEPYCOYaG9PXo="; @@ -25,6 +25,7 @@ rustPlatform.buildRustPackage rec { meta = with lib; { description = "Manage secret values in-repo via public key cryptography"; homepage = "https://github.com/fpco/amber"; + changelog = "https://github.com/fpco/amber/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ psibi ]; mainProgram = "amber"; From c543543901b06ef3317f2925322993d791c2966e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 9 Jan 2025 09:52:10 +0100 Subject: [PATCH 23/59] amber-secret: remove with lib; --- pkgs/tools/security/amber/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/amber/default.nix b/pkgs/tools/security/amber/default.nix index ef0fc819f75e..be6267925ecf 100644 --- a/pkgs/tools/security/amber/default.nix +++ b/pkgs/tools/security/amber/default.nix @@ -22,12 +22,12 @@ rustPlatform.buildRustPackage rec { buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; - meta = with lib; { + meta = { description = "Manage secret values in-repo via public key cryptography"; homepage = "https://github.com/fpco/amber"; changelog = "https://github.com/fpco/amber/releases/tag/v${version}"; - license = licenses.mit; - maintainers = with maintainers; [ psibi ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ psibi ]; mainProgram = "amber"; }; } From 44086f2d8ca028fd39958d464fa349f65c2c4e05 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 9 Jan 2025 09:55:19 +0100 Subject: [PATCH 24/59] amber-secret: migrate to pkgs/by-name --- .../default.nix => by-name/am/amber-secret/package.nix} | 6 +++--- pkgs/top-level/all-packages.nix | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-) rename pkgs/{tools/security/amber/default.nix => by-name/am/amber-secret/package.nix} (87%) diff --git a/pkgs/tools/security/amber/default.nix b/pkgs/by-name/am/amber-secret/package.nix similarity index 87% rename from pkgs/tools/security/amber/default.nix rename to pkgs/by-name/am/amber-secret/package.nix index be6267925ecf..d4d60e9669b9 100644 --- a/pkgs/tools/security/amber/default.nix +++ b/pkgs/by-name/am/amber-secret/package.nix @@ -1,9 +1,9 @@ { lib, stdenv, - rustPlatform, + darwin, fetchFromGitHub, - Security, + rustPlatform, }: rustPlatform.buildRustPackage rec { @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-DxTsbJ51TUMvc/NvsUYhRG9OxxEGrWfEPYCOYaG9PXo="; - buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; meta = { description = "Manage secret values in-repo via public key cryptography"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a73f126419bc..c3dce9b9421e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1582,10 +1582,6 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Security; }; - amber-secret = callPackage ../tools/security/amber { - inherit (darwin.apple_sdk.frameworks) Security; - }; - inherit (callPackages ../development/tools/ammonite {}) ammonite_2_12 ammonite_2_13 From 2e5abe9e5c2d9df36a9c9210fc90af28dfd8ae3b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 10 Jan 2025 20:35:16 +0000 Subject: [PATCH 25/59] lomiri.lomiri-system-settings-unwrapped: 1.2.0 -> 1.3.0 --- .../lomiri/applications/lomiri-system-settings/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/desktops/lomiri/applications/lomiri-system-settings/default.nix b/pkgs/desktops/lomiri/applications/lomiri-system-settings/default.nix index 7b29df587707..515561bb8bb1 100644 --- a/pkgs/desktops/lomiri/applications/lomiri-system-settings/default.nix +++ b/pkgs/desktops/lomiri/applications/lomiri-system-settings/default.nix @@ -48,13 +48,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "lomiri-system-settings-unwrapped"; - version = "1.2.0"; + version = "1.3.0"; src = fetchFromGitLab { owner = "ubports"; repo = "development/core/lomiri-system-settings"; rev = finalAttrs.version; - hash = "sha256-dWaXPr9Z5jz5SbwLSd3jVqjK0E5BdcKVeF15p8j47uM="; + hash = "sha256-8X5a2zJ0y8bSSnbqDvRoYm/2VPAWcfZZuiH+5p8eXi4="; }; outputs = [ From 9b5d58120f55dadc548758fe179acf48dd3e7faa Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 10 Jan 2025 22:53:49 +0000 Subject: [PATCH 26/59] lomiri.lomiri-settings-components: 1.1.1 -> 1.1.2 --- .../lomiri/qml/lomiri-settings-components/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/desktops/lomiri/qml/lomiri-settings-components/default.nix b/pkgs/desktops/lomiri/qml/lomiri-settings-components/default.nix index 4f1ee61b2623..0ce25119ef6a 100644 --- a/pkgs/desktops/lomiri/qml/lomiri-settings-components/default.nix +++ b/pkgs/desktops/lomiri/qml/lomiri-settings-components/default.nix @@ -13,13 +13,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "lomiri-settings-components"; - version = "1.1.1"; + version = "1.1.2"; src = fetchFromGitLab { owner = "ubports"; repo = "development/core/lomiri-settings-components"; rev = finalAttrs.version; - hash = "sha256-2Wyh+2AW6EeKRv26D4l+GIoH5sWC9SmOODNHOveFZPg="; + hash = "sha256-H7G3dzzitdyahB/MwgtfRBpo+qMOhmQSzN4EGYculks="; }; postPatch = From b49f2301a43c9d97ce384ed220f2c9308b8d6d20 Mon Sep 17 00:00:00 2001 From: Emily Trau Date: Sat, 11 Jan 2025 14:06:23 +1100 Subject: [PATCH 27/59] rar2hashcat: init at 1.0 --- .../ra/rar2hashcat/darwin-support.patch | 24 ++++++++++ pkgs/by-name/ra/rar2hashcat/package.nix | 46 +++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 pkgs/by-name/ra/rar2hashcat/darwin-support.patch create mode 100644 pkgs/by-name/ra/rar2hashcat/package.nix diff --git a/pkgs/by-name/ra/rar2hashcat/darwin-support.patch b/pkgs/by-name/ra/rar2hashcat/darwin-support.patch new file mode 100644 index 000000000000..26979c2eb3fa --- /dev/null +++ b/pkgs/by-name/ra/rar2hashcat/darwin-support.patch @@ -0,0 +1,24 @@ +diff --git a/Makefile b/Makefile +index eca86a9..f11931b 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,5 +1,5 @@ + # Common variables +-CFLAGS = -g -static -O2 -D_GNU_SOURCE -DARCH_LITTLE_ENDIAN=1 ++CFLAGS = -g -O2 -D_GNU_SOURCE -DARCH_LITTLE_ENDIAN=1 + TARGET = rar2hashcat + + # Variables for Linux target +diff --git a/base64_convert.c b/base64_convert.c +index 0d2635d..b101e3c 100644 +--- a/base64_convert.c ++++ b/base64_convert.c +@@ -163,7 +163,7 @@ static char *strnzcpy(char *dst, const char *src, int size) + return dst; + } + +-#ifdef __linux__ ++#if defined(__linux__) || defined(__APPLE__) + static char *strupr(char *s) + { + unsigned char *ptr = (unsigned char *)s; diff --git a/pkgs/by-name/ra/rar2hashcat/package.nix b/pkgs/by-name/ra/rar2hashcat/package.nix new file mode 100644 index 000000000000..fe0d5733e920 --- /dev/null +++ b/pkgs/by-name/ra/rar2hashcat/package.nix @@ -0,0 +1,46 @@ +{ + lib, + stdenv, + fetchFromGitHub, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "rar2hashcat"; + version = "1.0"; + + src = fetchFromGitHub { + owner = "hashstation"; + repo = "rar2hashcat"; + rev = finalAttrs.version; + hash = "sha256-GVh4Gyjn84xAwO7wKXYe2DPnpb8gnxGIMH5Szce+XpY="; + }; + + patches = [ + ./darwin-support.patch + ]; + + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=implicit-function-declaration -Wno-error=int-conversion"; + + makeFlags = [ + "CC_LINUX=${stdenv.cc.targetPrefix}cc" + "rar2hashcat" + ]; + + installPhase = '' + runHook preInstall + + install -D rar2hashcat $out/bin/rar2hashcat + + runHook postInstall + ''; + + meta = { + changelog = "https://github.com/hashstation/rar2hashcat/releases/tag/${finalAttrs.version}"; + description = "Processes input RAR files into a format suitable for use with hashcat"; + homepage = "https://github.com/hashstation/rar2hashcat"; + license = lib.licenses.mit; + mainProgram = "rar2hashcat"; + maintainers = with lib.maintainers; [ emilytrau ]; + platforms = lib.platforms.unix; + }; +}) From 1af62508e612fa7fba6c86a753bbcfdc45d73383 Mon Sep 17 00:00:00 2001 From: misilelab Date: Sat, 11 Jan 2025 18:40:48 +0900 Subject: [PATCH 28/59] lazygit: 0.44.1 -> 0.45.0 Signed-off-by: misilelab --- pkgs/by-name/la/lazygit/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/la/lazygit/package.nix b/pkgs/by-name/la/lazygit/package.nix index cfa21b9bcb91..3567a2607a25 100644 --- a/pkgs/by-name/la/lazygit/package.nix +++ b/pkgs/by-name/la/lazygit/package.nix @@ -8,13 +8,13 @@ # Regression in go1.23 see https://github.com/jesseduffield/lazygit/issues/4002 buildGo122Module rec { pname = "lazygit"; - version = "0.44.1"; + version = "0.45.0"; src = fetchFromGitHub { owner = "jesseduffield"; repo = pname; tag = "v${version}"; - hash = "sha256-BP5PMgRq8LHLuUYDrWaX1PgfT9VEhj3xeLE2aDMAPF0="; + hash = "sha256-hGJDsx0klccbueP7h5HtcYioFLL4gf3W3lbOHIA36FA="; }; vendorHash = null; From e342422513d6c36ce729801f6b80699539ac1b9e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 11 Jan 2025 11:30:11 +0000 Subject: [PATCH 29/59] erigon: 2.60.10 -> 2.61.0 --- pkgs/by-name/er/erigon/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/er/erigon/package.nix b/pkgs/by-name/er/erigon/package.nix index 810255b8c033..5fcc6673d107 100644 --- a/pkgs/by-name/er/erigon/package.nix +++ b/pkgs/by-name/er/erigon/package.nix @@ -7,7 +7,7 @@ let pname = "erigon"; - version = "2.60.10"; + version = "2.61.0"; in buildGoModule { inherit pname version; @@ -16,11 +16,11 @@ buildGoModule { owner = "ledgerwatch"; repo = pname; rev = "v${version}"; - hash = "sha256-14s3Dfo1sqQlNZSdjByUCAsYzbv6xjPcCsBxEmoY3pU="; + hash = "sha256-B9FDGBx5ac1v0PqVK/2LhDH2seRthZxtaGu3G9flo0A="; fetchSubmodules = true; }; - vendorHash = "sha256-I4rdz8dswA9/w4S9BNS43VTD9iDsH+cNK2haWowhBO4="; + vendorHash = "sha256-bGVHIrICYWyHPgWWgEAIT+J/IIPjcWqTHeuqbT6lung="; proxyVendor = true; # Build errors in mdbx when format hardening is enabled: From d81f7ff8a996124988d9ea3bba6286e838bd0822 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 11 Jan 2025 11:36:51 +0000 Subject: [PATCH 30/59] nix-fast-build: 1.0.0 -> 1.1.0 --- pkgs/by-name/ni/nix-fast-build/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ni/nix-fast-build/package.nix b/pkgs/by-name/ni/nix-fast-build/package.nix index f610c1f3a9ac..2c4e485d8d4b 100644 --- a/pkgs/by-name/ni/nix-fast-build/package.nix +++ b/pkgs/by-name/ni/nix-fast-build/package.nix @@ -10,14 +10,14 @@ python3Packages.buildPythonApplication rec { pname = "nix-fast-build"; - version = "1.0.0"; + version = "1.1.0"; pyproject = true; src = fetchFromGitHub { owner = "Mic92"; repo = "nix-fast-build"; rev = "refs/tags/${version}"; - hash = "sha256-8zW6eWvE9T03cMpo/hY8RRZIsSCfs1zmsJOkEZzuYwM="; + hash = "sha256-HkaJeIFgxncLm8MC1BaWRTkge9b1/+mjPcbzXTRshoM="; }; build-system = [ python3Packages.setuptools ]; From 585cfbd8b77d4c72ad4ca9273e0b3a42ee86c84e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 11 Jan 2025 12:44:28 +0100 Subject: [PATCH 31/59] python312Packages.result: refactor --- .../python-modules/result/default.nix | 29 +++++++------------ 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/pkgs/development/python-modules/result/default.nix b/pkgs/development/python-modules/result/default.nix index db123e031067..cd4793401976 100644 --- a/pkgs/development/python-modules/result/default.nix +++ b/pkgs/development/python-modules/result/default.nix @@ -2,21 +2,19 @@ lib, buildPythonPackage, fetchFromGitHub, - pytestCheckHook, pytest-asyncio, - nix-update-script, + pytest-cov-stub, + pytestCheckHook, + pythonOlder, setuptools, - wheel, }: buildPythonPackage rec { pname = "result"; version = "0.17.0"; pyproject = true; - build-system = [ - setuptools - wheel - ]; + + disabled = pythonOlder "3.10"; src = fetchFromGitHub { owner = "rustedpy"; @@ -25,27 +23,20 @@ buildPythonPackage rec { hash = "sha256-o+7qKxGQCeMUnsmEReggvf+XwQWFHRCYArYk3DxCa50="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace '"--flake8",' "" \ - --replace '"--tb=short",' "" \ - --replace '"--cov=result",' "" \ - --replace '"--cov=tests",' "" \ - --replace '"--cov-report=term",' "" \ - --replace '"--cov-report=xml",' "" - ''; + build-system = [ setuptools ]; nativeCheckInputs = [ - pytestCheckHook pytest-asyncio + pytest-cov-stub + pytestCheckHook ]; - passthru.updateScript = nix-update-script { }; pythonImportsCheck = [ "result" ]; meta = with lib; { - description = "A simple Result type for Python 3 inspired by Rust, fully type annotated"; + description = "A Rust-like result type for Python"; homepage = "https://github.com/rustedpy/result"; + changelog = "https://github.com/rustedpy/result/blob/v${version}/CHANGELOG.md"; license = licenses.mit; maintainers = with lib.maintainers; [ emattiza ]; }; From 78631b33b519afd9be31abff47df2fecec070f65 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 11 Jan 2025 12:50:13 +0100 Subject: [PATCH 32/59] python312Packages.weconnect-mqtt: refactor --- .../python-modules/weconnect-mqtt/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/weconnect-mqtt/default.nix b/pkgs/development/python-modules/weconnect-mqtt/default.nix index 910009e6a233..19a2cd2fb32b 100644 --- a/pkgs/development/python-modules/weconnect-mqtt/default.nix +++ b/pkgs/development/python-modules/weconnect-mqtt/default.nix @@ -3,6 +3,7 @@ buildPythonPackage, fetchFromGitHub, paho-mqtt_2, + pytest-cov-stub, pytestCheckHook, python-dateutil, pythonOlder, @@ -30,8 +31,7 @@ buildPythonPackage rec { substituteInPlace requirements.txt \ --replace-fail "weconnect[Images]~=" "weconnect>=" substituteInPlace pytest.ini \ - --replace-fail "--cov=weconnect_mqtt --cov-config=.coveragerc --cov-report html" "" \ - --replace-fail "pytest-cov" "" + --replace-fail "required_plugins = pytest-cov" "" ''; pythonRelaxDeps = [ "python-dateutil" ]; @@ -44,7 +44,10 @@ buildPythonPackage rec { weconnect ] ++ weconnect.optional-dependencies.Images; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "weconnect_mqtt" ]; @@ -52,7 +55,7 @@ buildPythonPackage rec { description = "Python client that publishes data from Volkswagen WeConnect"; homepage = "https://github.com/tillsteinbach/WeConnect-mqtt"; changelog = "https://github.com/tillsteinbach/WeConnect-mqtt/releases/tag/v${version}"; - license = with lib.licenses; [ mit ]; + license = lib.licenses.mit; maintainers = with lib.maintainers; [ fab ]; mainProgram = "weconnect-mqtt"; }; From c59db9cf651d8c2b6aee12df78b5d83a335b161d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 11 Jan 2025 12:50:26 +0100 Subject: [PATCH 33/59] python312Packages.weconnect: refactor --- .../python-modules/weconnect/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/weconnect/default.nix b/pkgs/development/python-modules/weconnect/default.nix index ea09e36a8647..c4d08efb46d7 100644 --- a/pkgs/development/python-modules/weconnect/default.nix +++ b/pkgs/development/python-modules/weconnect/default.nix @@ -5,6 +5,7 @@ fetchFromGitHub, oauthlib, pillow, + pytest-cov-stub, pytestCheckHook, pythonOlder, requests, @@ -32,13 +33,12 @@ buildPythonPackage rec { --replace-fail "setup_requires=SETUP_REQUIRED" "setup_requires=[]" \ --replace-fail "tests_require=TEST_REQUIRED" "tests_require=[]" substituteInPlace pytest.ini \ - --replace-fail "--cov=weconnect --cov-config=.coveragerc --cov-report html" "" \ --replace-fail "required_plugins = pytest-cov" "" ''; - nativeBuildInputs = [ setuptools ]; + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ oauthlib requests ]; @@ -50,7 +50,10 @@ buildPythonPackage rec { ]; }; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "weconnect" ]; @@ -58,7 +61,7 @@ buildPythonPackage rec { description = "Python client for the Volkswagen WeConnect Services"; homepage = "https://github.com/tillsteinbach/WeConnect-python"; changelog = "https://github.com/tillsteinbach/WeConnect-python/releases/tag/v${version}"; - license = with licenses; [ mit ]; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; } From 34310888b2c27f7a62dda1ae51dcf59751e5153d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 11 Jan 2025 13:01:23 +0100 Subject: [PATCH 34/59] python312Packages.withings-api: refactor --- .../python-modules/withings-api/default.nix | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/withings-api/default.nix b/pkgs/development/python-modules/withings-api/default.nix index 8f35b3798f7e..9c589fd060e8 100644 --- a/pkgs/development/python-modules/withings-api/default.nix +++ b/pkgs/development/python-modules/withings-api/default.nix @@ -1,21 +1,22 @@ { lib, + arrow, buildPythonPackage, - pythonOlder, fetchFromGitHub, poetry-core, - arrow, - requests-oauthlib, - typing-extensions, pydantic, - responses, + pytest-cov-stub, pytestCheckHook, + pythonOlder, + requests-oauthlib, + responses, + typing-extensions, }: buildPythonPackage rec { pname = "withings-api"; version = "2.4.0"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.6"; @@ -28,13 +29,12 @@ buildPythonPackage rec { postPatch = '' substituteInPlace pyproject.toml \ - --replace 'requests-oauth = ">=0.4.1"' ''' \ - --replace 'addopts = "--capture no --cov ./withings_api --cov-report html:build/coverage_report --cov-report term --cov-report xml:build/coverage.xml"' ''' + --replace-fail 'requests-oauth = ">=0.4.1"' ''' ''; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ arrow requests-oauthlib typing-extensions @@ -42,13 +42,17 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ + pytest-cov-stub pytestCheckHook responses ]; + pythonImportsCheck = [ "withings_api" ]; + meta = with lib; { description = "Library for the Withings Health API"; homepage = "https://github.com/vangorra/python_withings_api"; + changelog = "https://github.com/vangorra/python_withings_api/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ kittywitch ]; broken = versionAtLeast pydantic.version "2"; From 88334fc9e8b78bd2a256f01772e2d91a1808cd0e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 11 Jan 2025 13:08:28 +0100 Subject: [PATCH 35/59] python312Packages.twentemilieu: migrate to pytest-cov-stub --- .../python-modules/twentemilieu/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/twentemilieu/default.nix b/pkgs/development/python-modules/twentemilieu/default.nix index f91d96c0658e..4f0c5322a73f 100644 --- a/pkgs/development/python-modules/twentemilieu/default.nix +++ b/pkgs/development/python-modules/twentemilieu/default.nix @@ -1,14 +1,15 @@ { lib, - buildPythonPackage, - pythonOlder, - fetchFromGitHub, aiohttp, - yarl, aresponses, + buildPythonPackage, + fetchFromGitHub, poetry-core, pytest-asyncio, + pytest-cov-stub, pytestCheckHook, + pythonOlder, + yarl, }: buildPythonPackage rec { @@ -26,8 +27,8 @@ buildPythonPackage rec { }; postPatch = '' + # Upstream is creating GitHub releases without version substituteInPlace pyproject.toml \ - --replace "--cov" "" \ --replace '"0.0.0"' '"${version}"' ''; @@ -41,6 +42,7 @@ buildPythonPackage rec { nativeCheckInputs = [ aresponses pytest-asyncio + pytest-cov-stub pytestCheckHook ]; From e0ae370dab9fdc6a740d8f39f8f15bbfc889f8f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Gaspard?= Date: Sat, 11 Jan 2025 15:00:02 +0100 Subject: [PATCH 36/59] nixos/rustic: init module --- .../manual/release-notes/rl-2505.section.md | 2 + nixos/modules/module-list.nix | 1 + nixos/modules/services/backup/rustic.nix | 375 ++++++++++++++++++ 3 files changed, 378 insertions(+) create mode 100644 nixos/modules/services/backup/rustic.nix diff --git a/nixos/doc/manual/release-notes/rl-2505.section.md b/nixos/doc/manual/release-notes/rl-2505.section.md index 97e0ca92469f..f04bc955e56b 100644 --- a/nixos/doc/manual/release-notes/rl-2505.section.md +++ b/nixos/doc/manual/release-notes/rl-2505.section.md @@ -99,6 +99,8 @@ - [git-worktree-switcher](https://github.com/mateusauler/git-worktree-switcher), switch between git worktrees with speed. Available as [programs.git-worktree-switcher](#opt-programs.git-worktree-switcher.enable) +- [rustic](https://github.com/rustic-rs/rustic), a Rust-based backup tool. Available as [services.rustic](#opt-services.rustic.enable). + ## Backward Incompatibilities {#sec-release-25.05-incompatibilities} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index b5b6fd8c0e2f..bb309ae02b21 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -429,6 +429,7 @@ ./services/backup/restic-rest-server.nix ./services/backup/restic.nix ./services/backup/rsnapshot.nix + ./services/backup/rustic.nix ./services/backup/sanoid.nix ./services/backup/syncoid.nix ./services/backup/tarsnap.nix diff --git a/nixos/modules/services/backup/rustic.nix b/nixos/modules/services/backup/rustic.nix new file mode 100644 index 000000000000..3136b37d0f3a --- /dev/null +++ b/nixos/modules/services/backup/rustic.nix @@ -0,0 +1,375 @@ +{ config, lib, pkgs, ... }: + +let + tomlFormat = pkgs.formats.toml {}; + + cfg = config.services.rustic; + configFiles = lib.mapAttrs (k: v: tomlFormat.generate "rustic-${k}.toml" v) cfg.profiles; + + commonOpts = v: + if v ? files then v.files + else if v ? command then v.command + else if v ? postgres then v.postgres + else throw "unexpected: backup has none of the authorized types"; + + backupType = v: + if v ? files then "files" + else if v ? command then "command" + else if v ? postgres then "postgres" + else throw "unexpected: backup has none of the authorized types"; + + backupConfigToCmd = k: v: let + o = commonOpts v; + profileArgs = lib.concatMapStrings (s: " -P \"${s}\"") o.useProfiles; + extraArgs = lib.concatMapStrings (s: " \"${s}\"") o.extraArgs; + genericArgs = profileArgs + extraArgs; + + sourcesArgs = lib.concatMapStrings (s: " ${s}") v.files.sources; + asPathArg = lib.optionalString (v.files.asPath != null) " --as-path \"${v.files.asPath}\""; + ifFilesArgs = lib.optionalString (v ? files) (sourcesArgs + asPathArg); + + commandArg = " --stdin-command \"${v.command.command}\" -"; # stdin-command requires adding `-` as a source + stdinFilenameArg = lib.optionalString (v.command.filename != null) " --stdin-filename \"${v.command.filename}\""; + ifCommandArgs = lib.optionalString (v ? command) (commandArg + stdinFilenameArg); + + pipeJsonIntoCmd = + if o.pipeJsonInto ? nothing then "" + else if o.pipeJsonInto ? command then " --json | ${o.pipeJsonInto.command} \"$1\"" + else if o.pipeJsonInto ? prometheus then " --json | ${prometheusWriteScript o.pipeJsonInto.prometheus.nodeExporterCollectorFolder} \"$1\"" + else throw "unexpected: pipeJsonInto has none of the authorized types"; + in + if v ? postgres + then + let systemctl = "${config.systemd.package}/bin/systemctl"; in + pkgs.writeScript "rustic-postgres-starter-${k}" '' + #!${pkgs.bash}/bin/bash + set -euo pipefail + + ${systemctl} start --no-block rustic-postgres-globals-${k}.service + + ${pkgs.sudo}/bin/sudo -u postgres \ + ${config.services.postgresql.package}/bin/psql \ + -c 'SELECT datname FROM pg_database' \ + --csv \ + | tail -n +2 \ + | grep -Ev '^template0$' \ + | xargs -I {} \ + ${systemctl} start --no-block rustic-postgres-db-${k}@{}.service + '' + else + pkgs.writeScript "rustic-backup-${k}" '' + #!${pkgs.bash}/bin/bash + set -euo pipefail + + TZ="" ${cfg.package}/bin/rustic backup${ifFilesArgs + ifCommandArgs + genericArgs + pipeJsonIntoCmd} + ''; + + prometheusNumericMetrics = [ + "files_new" + "files_changed" + "files_unmodified" + "total_files_processed" + "total_bytes_processed" + "dirs_new" + "dirs_changed" + "dirs_unmodified" + "total_dirs_processed" + "total_dirsize_processed" + "data_blobs" + "tree_blobs" + "data_added" + "data_added_packed" + "data_added_files" + "data_added_files_packed" + "data_added_trees" + "data_added_trees_packed" + "backup_duration" + "total_duration" + ]; + + prometheusTimeMetrics = [ + "backup_start" + "backup_end" + ]; + + prometheusAllMetrics = prometheusNumericMetrics ++ prometheusTimeMetrics; + + prometheusJqTemplate = lib.concatMapStrings (m: '' + rustic_backup_${m}{id=\"{{id}}\"} {{${m}}} + '') prometheusAllMetrics; + + prometheusWriteScript = f: pkgs.writeScript "rustic-write-to-prometheus" '' + #!${pkgs.bash}/bin/bash + set -euo pipefail + + ${pkgs.jq}/bin/jq -r --arg template "${prometheusJqTemplate}" ' + . as $json + | $template + | gsub("{{id}}"; "'"$1"'") + ${lib.concatMapStrings + (m: ''| gsub("{{${m}}}"; $json.summary.${m} | tostring)'') + prometheusNumericMetrics} + ${lib.concatMapStrings + # jq's `fromdate` builtins do not support sub-second accuracy (as of early 2025) + (m: ''| gsub("{{${m}}}"; $json.summary.${m} | sub(".[0-9]{9}Z"; "Z") | fromdateiso8601 | tostring)'') + prometheusTimeMetrics} + ' > "${f}/rustic-backup-$1.prom.next" + mv "${f}/rustic-backup-$1.prom.next" "${f}/rustic-backup-$1.prom" + ''; + + commonOptions = { + startAt = lib.mkOption { + type = with lib.types; either (listOf str) str; + description = '' + Time(s) at which to run this operation. + + The format is documented in `man systemd.time`. + ''; + }; + + useProfiles = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = []; + description = "Config profiles to use"; + }; + + extraArgs = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = []; + description = "Extra command-line arguments to pass to the `rustic` call."; + }; + }; + + commonBackupOptions = commonOptions // { + pipeJsonInto = lib.mkOption { + description = "Command that will be called on the JSON result of `rustic backup`."; + default = { nothing = {}; }; + type = lib.types.attrTag { + nothing = lib.mkOption { + description = "Do nothing with the result."; + type = lib.types.any; + }; + + command = lib.mkOption { + description = '' + Run a command on the result. + + It will be called with the JSON result on standard input, and an identifier of + the backup section as an argument. You can pass any other arguments eg. as tags, + which rustic will return in its JSON output. + ''; + type = lib.types.str; + }; + + prometheus = lib.mkOption { + description = "Write the result as prometheus metrics."; + type = lib.types.submodule { + options.nodeExporterCollectorFolder = lib.mkOption { + type = lib.types.path; + description = '' + Folder that is exported by the node exporter, and in which the metrics should be placed. + + This should be configured in the node exporter as `--collector.textfile.directory=`. + ''; + }; + }; + }; + }; + }; + }; +in +{ + options.services.rustic = { + enable = lib.mkEnableOption "rustic"; + package = lib.mkPackageOption pkgs "rustic" {}; + + checkProfiles = lib.mkOption { + type = lib.types.bool; + default = true; + description = '' + If enabled, checks that the generated rustic profiles are valid. + + Note that imports that cannot be resolved are accepted. This allows + the recommended setup of using an imported file that only root can read + to store the passwords. + ''; + }; + + profiles = lib.mkOption { + type = lib.types.attrsOf tomlFormat.type; + default = {}; + description = '' + Configuration files for rustic, see + + for supported settings. + + The `rustic` profile will be the one used by default. + + Note that this will be world-readable in the nix store, so do not put + your passwords here! Instead, you should write them somewhere safe, and + then set, eg. if you put it in `/root/rustic-passwords.toml`: + ```nix + global.use-profiles = ["/root/rustic-passwords"]; + ``` + ''; + }; + + backups = lib.mkOption { + default = {}; + type = lib.types.attrsOf (lib.types.attrTag { + files = lib.mkOption { + description = "Backup files and directories."; + type = lib.types.submodule { + options = commonBackupOptions // { + sources = lib.mkOption { + type = lib.types.listOf lib.types.path; + default = []; + description = '' + List of sources to backup. + + Defaults to the ones defined in the relevant configuration files. + ''; + }; + + asPath = lib.mkOption { + type = lib.types.nullOr lib.types.str; + default = null; + description = "Manually set the backup path in snapshot"; + }; + }; + }; + }; + + command = lib.mkOption { + description = "Backup the output of a command."; + type = lib.types.submodule { + options = commonBackupOptions // { + command = lib.mkOption { + type = lib.types.str; + description = "Command of which to backup the output"; + }; + + filename = lib.mkOption { + type = lib.types.nullOr lib.types.str; + default = null; + description = '' + Filename to use in the backup. + + Defaults to the profile-provided filename, or `stdin`. + ''; + }; + }; + }; + }; + + postgres = lib.mkOption { + description = '' + Backup all postgresql databases. + + Use a custom `command` using `pg_dump` if you want to backup a single + database. + + This backs up globals and individual databases in independent files. + ''; + type = lib.types.submodule { + options = commonBackupOptions // { + prefix = lib.mkOption { + type = lib.types.str; + default = "/postgres"; + description = "Path prefix for the dumps."; + }; + }; + }; + }; + }); + }; + + checks = lib.mkOption { + default = {}; + type = lib.types.attrsOf (lib.types.submodule { options = commonOptions; }); + }; + + prune = commonOptions // { + enable = lib.mkEnableOption "rustic-prune"; + }; + }; + + config = lib.mkIf cfg.enable { + system.checks = lib.optional cfg.checkProfiles (pkgs.runCommand "rustic-profiles-check" {} '' + ${lib.concatMapStrings (p: '' + ln -s ${p} ./rustic-config-for-checking.toml + ${cfg.package}/bin/rustic show-config -P rustic-config-for-checking > /dev/null + rm ./rustic-config-for-checking.toml + '') (lib.attrValues configFiles)} + touch $out + ''); + + environment.systemPackages = [ cfg.package ]; + + environment.etc = lib.mapAttrs' (k: v: { + name = "rustic/${k}.toml"; + value.source = v; + }) configFiles; + + systemd.services = lib.concatMapAttrs (k: v: { + "rustic-backup-${k}" = { + serviceConfig = { + Type = "oneshot"; + User = "root"; + ExecStart = "${backupConfigToCmd k v} ${backupType v}-${k}"; + }; + startAt = (commonOpts v).startAt; + }; + } // lib.optionalAttrs (v ? postgres) { + "rustic-postgres-globals-${k}" = { + serviceConfig = { + Type = "oneshot"; + User = "root"; + ExecStart = "${backupConfigToCmd k { + command = v.postgres // { + filename = "${v.postgres.prefix}/globals.sql"; + command = "${pkgs.sudo}/bin/sudo -u postgres ${config.services.postgresql.package}/bin/pg_dumpall --globals-only"; + }; + }} postgres-globals-${k}"; + }; + }; + + "rustic-postgres-db-${k}@" = { + serviceConfig = { + Type = "oneshot"; + User = "root"; + ExecStart = "${backupConfigToCmd k { + command = v.postgres // { + filename = "$3"; + command = "${pkgs.sudo}/bin/sudo -u postgres ${config.services.postgresql.package}/bin/pg_dump $2"; + }; + }} 'postgres-db-${k}-%i' '%i' '${v.postgres.prefix}/db/%i.sql'"; + }; + }; + }) cfg.backups // lib.concatMapAttrs (k: v: let + profiles = lib.concatMapStrings (p: " -P \"${p}\"") v.useProfiles; + extraArgs = lib.concatMapStrings (a: " \"${a}\"") v.extraArgs; + in { + "rustic-check-${k}" = { + serviceConfig = { + Type = "oneshot"; + User = "root"; + ExecStart = "${cfg.package}/bin/rustic check${profiles}${extraArgs}"; + }; + startAt = v.startAt; + }; + }) cfg.checks // lib.optionalAttrs cfg.prune.enable (let + profiles = lib.concatMapStrings (p: " -P \"${p}\"") cfg.prune.useProfiles; + extraArgs = lib.concatMapStrings (a: " \"${a}\"") cfg.prune.extraArgs; + in { + "rustic-prune" = { + serviceConfig = { + Type = "oneshot"; + User = "root"; + ExecStart = "${cfg.package}/bin/rustic forget --prune${profiles}${extraArgs}"; + }; + startAt = cfg.prune.startAt; + }; + }); + }; +} From 59664286ac7cd0b839410849a4861a7eb81ef9a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Gaspard?= Date: Sat, 11 Jan 2025 15:26:24 +0100 Subject: [PATCH 37/59] nixos/rustic: fix manual build --- nixos/modules/services/backup/rustic.nix | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/backup/rustic.nix b/nixos/modules/services/backup/rustic.nix index 3136b37d0f3a..22e61ef1123a 100644 --- a/nixos/modules/services/backup/rustic.nix +++ b/nixos/modules/services/backup/rustic.nix @@ -147,7 +147,7 @@ let type = lib.types.attrTag { nothing = lib.mkOption { description = "Do nothing with the result."; - type = lib.types.any; + type = lib.types.unspecified; }; command = lib.mkOption { @@ -163,7 +163,7 @@ let prometheus = lib.mkOption { description = "Write the result as prometheus metrics."; - type = lib.types.submodule { + type = lib.types.submodule { options.nodeExporterCollectorFolder = lib.mkOption { type = lib.types.path; description = '' @@ -216,6 +216,14 @@ in backups = lib.mkOption { default = {}; + description = '' + Backup configurations. + + Each key is the name of the backup, and the value is the parameters + with which this backup will be run. This allows setting multiple backups + running at different intervals, and backing up different folders or + databases. + ''; type = lib.types.attrsOf (lib.types.attrTag { files = lib.mkOption { description = "Backup files and directories."; @@ -265,7 +273,7 @@ in postgres = lib.mkOption { description = '' Backup all postgresql databases. - + Use a custom `command` using `pg_dump` if you want to backup a single database. @@ -286,6 +294,14 @@ in checks = lib.mkOption { default = {}; + description = '' + Check configurations. + + Each key is the name of the check, and the value is the parameters + with which this check will be run. This allows setting multiple check + running at different intervals, eg. a frequent metadata-only check and + an infrequent full-data check. + ''; type = lib.types.attrsOf (lib.types.submodule { options = commonOptions; }); }; From 619f94bf5ee67812fbb5e24761154f4b0a0bce29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Gaspard?= Date: Sat, 11 Jan 2025 15:32:08 +0100 Subject: [PATCH 38/59] nixos/rustic: nixfmt --- nixos/modules/services/backup/rustic.nix | 393 +++++++++++++---------- 1 file changed, 223 insertions(+), 170 deletions(-) diff --git a/nixos/modules/services/backup/rustic.nix b/nixos/modules/services/backup/rustic.nix index 22e61ef1123a..c0497dc4b00d 100644 --- a/nixos/modules/services/backup/rustic.nix +++ b/nixos/modules/services/backup/rustic.nix @@ -1,46 +1,70 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let - tomlFormat = pkgs.formats.toml {}; + tomlFormat = pkgs.formats.toml { }; cfg = config.services.rustic; configFiles = lib.mapAttrs (k: v: tomlFormat.generate "rustic-${k}.toml" v) cfg.profiles; - commonOpts = v: - if v ? files then v.files - else if v ? command then v.command - else if v ? postgres then v.postgres - else throw "unexpected: backup has none of the authorized types"; + commonOpts = + v: + if v ? files then + v.files + else if v ? command then + v.command + else if v ? postgres then + v.postgres + else + throw "unexpected: backup has none of the authorized types"; - backupType = v: - if v ? files then "files" - else if v ? command then "command" - else if v ? postgres then "postgres" - else throw "unexpected: backup has none of the authorized types"; + backupType = + v: + if v ? files then + "files" + else if v ? command then + "command" + else if v ? postgres then + "postgres" + else + throw "unexpected: backup has none of the authorized types"; - backupConfigToCmd = k: v: let - o = commonOpts v; - profileArgs = lib.concatMapStrings (s: " -P \"${s}\"") o.useProfiles; - extraArgs = lib.concatMapStrings (s: " \"${s}\"") o.extraArgs; - genericArgs = profileArgs + extraArgs; + backupConfigToCmd = + k: v: + let + o = commonOpts v; + profileArgs = lib.concatMapStrings (s: " -P \"${s}\"") o.useProfiles; + extraArgs = lib.concatMapStrings (s: " \"${s}\"") o.extraArgs; + genericArgs = profileArgs + extraArgs; - sourcesArgs = lib.concatMapStrings (s: " ${s}") v.files.sources; - asPathArg = lib.optionalString (v.files.asPath != null) " --as-path \"${v.files.asPath}\""; - ifFilesArgs = lib.optionalString (v ? files) (sourcesArgs + asPathArg); + sourcesArgs = lib.concatMapStrings (s: " ${s}") v.files.sources; + asPathArg = lib.optionalString (v.files.asPath != null) " --as-path \"${v.files.asPath}\""; + ifFilesArgs = lib.optionalString (v ? files) (sourcesArgs + asPathArg); - commandArg = " --stdin-command \"${v.command.command}\" -"; # stdin-command requires adding `-` as a source - stdinFilenameArg = lib.optionalString (v.command.filename != null) " --stdin-filename \"${v.command.filename}\""; - ifCommandArgs = lib.optionalString (v ? command) (commandArg + stdinFilenameArg); + commandArg = " --stdin-command \"${v.command.command}\" -"; # stdin-command requires adding `-` as a source + stdinFilenameArg = lib.optionalString ( + v.command.filename != null + ) " --stdin-filename \"${v.command.filename}\""; + ifCommandArgs = lib.optionalString (v ? command) (commandArg + stdinFilenameArg); - pipeJsonIntoCmd = - if o.pipeJsonInto ? nothing then "" - else if o.pipeJsonInto ? command then " --json | ${o.pipeJsonInto.command} \"$1\"" - else if o.pipeJsonInto ? prometheus then " --json | ${prometheusWriteScript o.pipeJsonInto.prometheus.nodeExporterCollectorFolder} \"$1\"" - else throw "unexpected: pipeJsonInto has none of the authorized types"; - in - if v ? postgres - then - let systemctl = "${config.systemd.package}/bin/systemctl"; in + pipeJsonIntoCmd = + if o.pipeJsonInto ? nothing then + "" + else if o.pipeJsonInto ? command then + " --json | ${o.pipeJsonInto.command} \"$1\"" + else if o.pipeJsonInto ? prometheus then + " --json | ${prometheusWriteScript o.pipeJsonInto.prometheus.nodeExporterCollectorFolder} \"$1\"" + else + throw "unexpected: pipeJsonInto has none of the authorized types"; + in + if v ? postgres then + let + systemctl = "${config.systemd.package}/bin/systemctl"; + in pkgs.writeScript "rustic-postgres-starter-${k}" '' #!${pkgs.bash}/bin/bash set -euo pipefail @@ -98,24 +122,29 @@ let rustic_backup_${m}{id=\"{{id}}\"} {{${m}}} '') prometheusAllMetrics; - prometheusWriteScript = f: pkgs.writeScript "rustic-write-to-prometheus" '' - #!${pkgs.bash}/bin/bash - set -euo pipefail + prometheusWriteScript = + f: + pkgs.writeScript "rustic-write-to-prometheus" '' + #!${pkgs.bash}/bin/bash + set -euo pipefail - ${pkgs.jq}/bin/jq -r --arg template "${prometheusJqTemplate}" ' - . as $json - | $template - | gsub("{{id}}"; "'"$1"'") - ${lib.concatMapStrings - (m: ''| gsub("{{${m}}}"; $json.summary.${m} | tostring)'') - prometheusNumericMetrics} - ${lib.concatMapStrings - # jq's `fromdate` builtins do not support sub-second accuracy (as of early 2025) - (m: ''| gsub("{{${m}}}"; $json.summary.${m} | sub(".[0-9]{9}Z"; "Z") | fromdateiso8601 | tostring)'') - prometheusTimeMetrics} - ' > "${f}/rustic-backup-$1.prom.next" - mv "${f}/rustic-backup-$1.prom.next" "${f}/rustic-backup-$1.prom" - ''; + ${pkgs.jq}/bin/jq -r --arg template "${prometheusJqTemplate}" ' + . as $json + | $template + | gsub("{{id}}"; "'"$1"'") + ${lib.concatMapStrings ( + m: ''| gsub("{{${m}}}"; $json.summary.${m} | tostring)'' + ) prometheusNumericMetrics} + ${lib.concatMapStrings + # jq's `fromdate` builtins do not support sub-second accuracy (as of early 2025) + ( + m: ''| gsub("{{${m}}}"; $json.summary.${m} | sub(".[0-9]{9}Z"; "Z") | fromdateiso8601 | tostring)'' + ) + prometheusTimeMetrics + } + ' > "${f}/rustic-backup-$1.prom.next" + mv "${f}/rustic-backup-$1.prom.next" "${f}/rustic-backup-$1.prom" + ''; commonOptions = { startAt = lib.mkOption { @@ -129,13 +158,13 @@ let useProfiles = lib.mkOption { type = lib.types.listOf lib.types.str; - default = []; + default = [ ]; description = "Config profiles to use"; }; extraArgs = lib.mkOption { type = lib.types.listOf lib.types.str; - default = []; + default = [ ]; description = "Extra command-line arguments to pass to the `rustic` call."; }; }; @@ -143,7 +172,9 @@ let commonBackupOptions = commonOptions // { pipeJsonInto = lib.mkOption { description = "Command that will be called on the JSON result of `rustic backup`."; - default = { nothing = {}; }; + default = { + nothing = { }; + }; type = lib.types.attrTag { nothing = lib.mkOption { description = "Do nothing with the result."; @@ -181,7 +212,7 @@ in { options.services.rustic = { enable = lib.mkEnableOption "rustic"; - package = lib.mkPackageOption pkgs "rustic" {}; + package = lib.mkPackageOption pkgs "rustic" { }; checkProfiles = lib.mkOption { type = lib.types.bool; @@ -197,7 +228,7 @@ in profiles = lib.mkOption { type = lib.types.attrsOf tomlFormat.type; - default = {}; + default = { }; description = '' Configuration files for rustic, see @@ -215,7 +246,7 @@ in }; backups = lib.mkOption { - default = {}; + default = { }; description = '' Backup configurations. @@ -224,76 +255,78 @@ in running at different intervals, and backing up different folders or databases. ''; - type = lib.types.attrsOf (lib.types.attrTag { - files = lib.mkOption { - description = "Backup files and directories."; - type = lib.types.submodule { - options = commonBackupOptions // { - sources = lib.mkOption { - type = lib.types.listOf lib.types.path; - default = []; - description = '' - List of sources to backup. + type = lib.types.attrsOf ( + lib.types.attrTag { + files = lib.mkOption { + description = "Backup files and directories."; + type = lib.types.submodule { + options = commonBackupOptions // { + sources = lib.mkOption { + type = lib.types.listOf lib.types.path; + default = [ ]; + description = '' + List of sources to backup. - Defaults to the ones defined in the relevant configuration files. - ''; - }; + Defaults to the ones defined in the relevant configuration files. + ''; + }; - asPath = lib.mkOption { - type = lib.types.nullOr lib.types.str; - default = null; - description = "Manually set the backup path in snapshot"; + asPath = lib.mkOption { + type = lib.types.nullOr lib.types.str; + default = null; + description = "Manually set the backup path in snapshot"; + }; }; }; }; - }; - command = lib.mkOption { - description = "Backup the output of a command."; - type = lib.types.submodule { - options = commonBackupOptions // { - command = lib.mkOption { - type = lib.types.str; - description = "Command of which to backup the output"; - }; + command = lib.mkOption { + description = "Backup the output of a command."; + type = lib.types.submodule { + options = commonBackupOptions // { + command = lib.mkOption { + type = lib.types.str; + description = "Command of which to backup the output"; + }; - filename = lib.mkOption { - type = lib.types.nullOr lib.types.str; - default = null; - description = '' - Filename to use in the backup. + filename = lib.mkOption { + type = lib.types.nullOr lib.types.str; + default = null; + description = '' + Filename to use in the backup. - Defaults to the profile-provided filename, or `stdin`. - ''; + Defaults to the profile-provided filename, or `stdin`. + ''; + }; }; }; }; - }; - postgres = lib.mkOption { - description = '' - Backup all postgresql databases. + postgres = lib.mkOption { + description = '' + Backup all postgresql databases. - Use a custom `command` using `pg_dump` if you want to backup a single - database. + Use a custom `command` using `pg_dump` if you want to backup a single + database. - This backs up globals and individual databases in independent files. - ''; - type = lib.types.submodule { - options = commonBackupOptions // { - prefix = lib.mkOption { - type = lib.types.str; - default = "/postgres"; - description = "Path prefix for the dumps."; + This backs up globals and individual databases in independent files. + ''; + type = lib.types.submodule { + options = commonBackupOptions // { + prefix = lib.mkOption { + type = lib.types.str; + default = "/postgres"; + description = "Path prefix for the dumps."; + }; }; }; }; - }; - }); + } + ); }; checks = lib.mkOption { - default = {}; + default = { }; description = '' Check configurations. @@ -311,14 +344,16 @@ in }; config = lib.mkIf cfg.enable { - system.checks = lib.optional cfg.checkProfiles (pkgs.runCommand "rustic-profiles-check" {} '' - ${lib.concatMapStrings (p: '' - ln -s ${p} ./rustic-config-for-checking.toml - ${cfg.package}/bin/rustic show-config -P rustic-config-for-checking > /dev/null - rm ./rustic-config-for-checking.toml - '') (lib.attrValues configFiles)} - touch $out - ''); + system.checks = lib.optional cfg.checkProfiles ( + pkgs.runCommand "rustic-profiles-check" { } '' + ${lib.concatMapStrings (p: '' + ln -s ${p} ./rustic-config-for-checking.toml + ${cfg.package}/bin/rustic show-config -P rustic-config-for-checking > /dev/null + rm ./rustic-config-for-checking.toml + '') (lib.attrValues configFiles)} + touch $out + '' + ); environment.systemPackages = [ cfg.package ]; @@ -327,65 +362,83 @@ in value.source = v; }) configFiles; - systemd.services = lib.concatMapAttrs (k: v: { - "rustic-backup-${k}" = { - serviceConfig = { - Type = "oneshot"; - User = "root"; - ExecStart = "${backupConfigToCmd k v} ${backupType v}-${k}"; - }; - startAt = (commonOpts v).startAt; - }; - } // lib.optionalAttrs (v ? postgres) { - "rustic-postgres-globals-${k}" = { - serviceConfig = { - Type = "oneshot"; - User = "root"; - ExecStart = "${backupConfigToCmd k { - command = v.postgres // { - filename = "${v.postgres.prefix}/globals.sql"; - command = "${pkgs.sudo}/bin/sudo -u postgres ${config.services.postgresql.package}/bin/pg_dumpall --globals-only"; + systemd.services = + lib.concatMapAttrs ( + k: v: + { + "rustic-backup-${k}" = { + serviceConfig = { + Type = "oneshot"; + User = "root"; + ExecStart = "${backupConfigToCmd k v} ${backupType v}-${k}"; }; - }} postgres-globals-${k}"; - }; - }; + startAt = (commonOpts v).startAt; + }; + } + // lib.optionalAttrs (v ? postgres) { + "rustic-postgres-globals-${k}" = { + serviceConfig = { + Type = "oneshot"; + User = "root"; + ExecStart = "${ + backupConfigToCmd k { + command = v.postgres // { + filename = "${v.postgres.prefix}/globals.sql"; + command = "${pkgs.sudo}/bin/sudo -u postgres ${config.services.postgresql.package}/bin/pg_dumpall --globals-only"; + }; + } + } postgres-globals-${k}"; + }; + }; - "rustic-postgres-db-${k}@" = { - serviceConfig = { - Type = "oneshot"; - User = "root"; - ExecStart = "${backupConfigToCmd k { - command = v.postgres // { - filename = "$3"; - command = "${pkgs.sudo}/bin/sudo -u postgres ${config.services.postgresql.package}/bin/pg_dump $2"; + "rustic-postgres-db-${k}@" = { + serviceConfig = { + Type = "oneshot"; + User = "root"; + ExecStart = "${ + backupConfigToCmd k { + command = v.postgres // { + filename = "$3"; + command = "${pkgs.sudo}/bin/sudo -u postgres ${config.services.postgresql.package}/bin/pg_dump $2"; + }; + } + } 'postgres-db-${k}-%i' '%i' '${v.postgres.prefix}/db/%i.sql'"; }; - }} 'postgres-db-${k}-%i' '%i' '${v.postgres.prefix}/db/%i.sql'"; - }; - }; - }) cfg.backups // lib.concatMapAttrs (k: v: let - profiles = lib.concatMapStrings (p: " -P \"${p}\"") v.useProfiles; - extraArgs = lib.concatMapStrings (a: " \"${a}\"") v.extraArgs; - in { - "rustic-check-${k}" = { - serviceConfig = { - Type = "oneshot"; - User = "root"; - ExecStart = "${cfg.package}/bin/rustic check${profiles}${extraArgs}"; - }; - startAt = v.startAt; - }; - }) cfg.checks // lib.optionalAttrs cfg.prune.enable (let - profiles = lib.concatMapStrings (p: " -P \"${p}\"") cfg.prune.useProfiles; - extraArgs = lib.concatMapStrings (a: " \"${a}\"") cfg.prune.extraArgs; - in { - "rustic-prune" = { - serviceConfig = { - Type = "oneshot"; - User = "root"; - ExecStart = "${cfg.package}/bin/rustic forget --prune${profiles}${extraArgs}"; - }; - startAt = cfg.prune.startAt; - }; - }); + }; + } + ) cfg.backups + // lib.concatMapAttrs ( + k: v: + let + profiles = lib.concatMapStrings (p: " -P \"${p}\"") v.useProfiles; + extraArgs = lib.concatMapStrings (a: " \"${a}\"") v.extraArgs; + in + { + "rustic-check-${k}" = { + serviceConfig = { + Type = "oneshot"; + User = "root"; + ExecStart = "${cfg.package}/bin/rustic check${profiles}${extraArgs}"; + }; + startAt = v.startAt; + }; + } + ) cfg.checks + // lib.optionalAttrs cfg.prune.enable ( + let + profiles = lib.concatMapStrings (p: " -P \"${p}\"") cfg.prune.useProfiles; + extraArgs = lib.concatMapStrings (a: " \"${a}\"") cfg.prune.extraArgs; + in + { + "rustic-prune" = { + serviceConfig = { + Type = "oneshot"; + User = "root"; + ExecStart = "${cfg.package}/bin/rustic forget --prune${profiles}${extraArgs}"; + }; + startAt = cfg.prune.startAt; + }; + } + ); }; } From fb13178b735aa4fd5e200349e5132ff634c2680c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 11 Jan 2025 15:55:33 +0000 Subject: [PATCH 39/59] openasar: 0-unstable-2024-11-13 -> 0-unstable-2025-01-10 --- pkgs/by-name/op/openasar/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/op/openasar/package.nix b/pkgs/by-name/op/openasar/package.nix index d48baf764f83..f12a4c8c47ef 100644 --- a/pkgs/by-name/op/openasar/package.nix +++ b/pkgs/by-name/op/openasar/package.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "openasar"; - version = "0-unstable-2024-11-13"; + version = "0-unstable-2025-01-10"; src = fetchFromGitHub { owner = "GooseMod"; repo = "OpenAsar"; - rev = "ef4470849624032a8eb7265eabd23158aa5a2356"; - hash = "sha256-U9wYKen5MfE/WTKL0SICN0v3DPMLqblMYQVAbkZnfjY="; + rev = "4ed9e52d42501927b60354fcc456da50ed41cde2"; + hash = "sha256-3b31iEmNUlBLc47Cw7EtMMgc+oPr1V6oqNTKRemXJfA="; }; postPatch = '' From 8b01bcec62344c45fff4883e4fbcb10b973789ea Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 11 Jan 2025 16:12:52 +0000 Subject: [PATCH 40/59] modelscan: 0.8.1 -> 0.8.3 --- pkgs/by-name/mo/modelscan/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/mo/modelscan/package.nix b/pkgs/by-name/mo/modelscan/package.nix index a71ca94e2592..a80b370a485f 100644 --- a/pkgs/by-name/mo/modelscan/package.nix +++ b/pkgs/by-name/mo/modelscan/package.nix @@ -6,14 +6,14 @@ python3.pkgs.buildPythonApplication rec { pname = "modelscan"; - version = "0.8.1"; + version = "0.8.3"; pyproject = true; src = fetchFromGitHub { owner = "protectai"; repo = "modelscan"; tag = "v${version}"; - hash = "sha256-90VnIVQFjtKgLCHc+tmOtDdgJP8aaH4h5ZiOOejnXgQ="; + hash = "sha256-MhwXarjIHZgSC7G7+XevVyCflM/SiaNagJMhzLvs1Uc="; }; build-system = with python3.pkgs; [ From 72b02a589ed234ea26abaf69609bb7028662ce57 Mon Sep 17 00:00:00 2001 From: MidAutumnMoon Date: Sun, 12 Jan 2025 00:26:32 +0800 Subject: [PATCH 41/59] dnscrypt-proxy: 2.1.5 -> 2.1.7 Release: https://github.com/DNSCrypt/dnscrypt-proxy/releases/tag/2.1.7 Diff: https://github.com/DNSCrypt/dnscrypt-proxy/compare/2.1.5...2.1.7 --- pkgs/by-name/dn/dnscrypt-proxy/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/dn/dnscrypt-proxy/package.nix b/pkgs/by-name/dn/dnscrypt-proxy/package.nix index 4d11703a59be..92d43baaa160 100644 --- a/pkgs/by-name/dn/dnscrypt-proxy/package.nix +++ b/pkgs/by-name/dn/dnscrypt-proxy/package.nix @@ -7,7 +7,7 @@ buildGoModule rec { pname = "dnscrypt-proxy"; - version = "2.1.5"; + version = "2.1.7"; vendorHash = null; @@ -17,7 +17,7 @@ buildGoModule rec { owner = "DNSCrypt"; repo = "dnscrypt-proxy"; rev = version; - sha256 = "sha256-A9Cu4wcJxrptd9CpgXw4eyMX2nmNAogYBRDeeAjpEZY="; + sha256 = "sha256-s0ooICual87+y/DMppuTQtNzZRRCg/42SQImDrPVRng="; }; passthru.tests = { inherit (nixosTests) dnscrypt-proxy2; }; From 510d5b4e550dbafdf0b0a29863c8bb0001b76a93 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 11 Jan 2025 17:31:29 +0100 Subject: [PATCH 42/59] python313Packages.teslemetry-stream: 0.4.2 -> 0.6.3 Diff: https://github.com/Teslemetry/python-teslemetry-stream/compare/v0.4.2...v0.6.3 Changelog: https://github.com/Teslemetry/python-teslemetry-stream/releases/tag/v0.6.3 --- pkgs/development/python-modules/teslemetry-stream/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/teslemetry-stream/default.nix b/pkgs/development/python-modules/teslemetry-stream/default.nix index 1154f0380442..f1c21d63c07f 100644 --- a/pkgs/development/python-modules/teslemetry-stream/default.nix +++ b/pkgs/development/python-modules/teslemetry-stream/default.nix @@ -8,14 +8,14 @@ buildPythonPackage rec { pname = "teslemetry-stream"; - version = "0.4.2"; + version = "0.6.3"; pyproject = true; src = fetchFromGitHub { owner = "Teslemetry"; repo = "python-teslemetry-stream"; rev = "v${version}"; - hash = "sha256-Ny68yiM0LS2U7zy6K2R35ZLm+Jo4s+HIFJjuqgL49E0="; + hash = "sha256-hKGYZYRfI4FikTPsf7Wy0gOA+dCiMdlpWtEb/Gn1y7s="; }; build-system = [ setuptools ]; From b5247487441375fd9f1c8fa11e97c0ba49e65fd8 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sun, 12 Jan 2025 04:14:50 +1000 Subject: [PATCH 43/59] hyprutils: 0.3.2 -> 0.3.3 (#372976) --- pkgs/by-name/hy/hyprutils/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/hy/hyprutils/package.nix b/pkgs/by-name/hy/hyprutils/package.nix index bb6b9b0f7753..dec697da74fd 100644 --- a/pkgs/by-name/hy/hyprutils/package.nix +++ b/pkgs/by-name/hy/hyprutils/package.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "hyprutils"; - version = "0.3.2"; + version = "0.3.3"; src = fetchFromGitHub { owner = "hyprwm"; repo = "hyprutils"; tag = "v${finalAttrs.version}"; - hash = "sha256-7D5j2sh3Miw2CRdmx8ftepb342pl36kDFJy+3aVfDVc="; + hash = "sha256-1LimBKvDpBbeX+qW7T240WEyw+DBVpDotZB4JYm8Aps="; }; nativeBuildInputs = [ From 4fbf6e85fdd5774daa406066ef0003658e8c839a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 11 Jan 2025 18:59:52 +0000 Subject: [PATCH 44/59] tideways-cli: 1.2.2 -> 1.2.4 --- pkgs/by-name/ti/tideways-cli/package.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/ti/tideways-cli/package.nix b/pkgs/by-name/ti/tideways-cli/package.nix index 44a64a6ec318..074a12d49d00 100644 --- a/pkgs/by-name/ti/tideways-cli/package.nix +++ b/pkgs/by-name/ti/tideways-cli/package.nix @@ -11,7 +11,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { pname = "tideways-cli"; - version = "1.2.2"; + version = "1.2.4"; nativeBuildInputs = [ installShellFiles ]; @@ -38,19 +38,19 @@ stdenvNoCC.mkDerivation (finalAttrs: { sources = { "x86_64-linux" = fetchurl { url = "https://s3-eu-west-1.amazonaws.com/tideways/cli/${finalAttrs.version}/tideways-cli_linux_amd64-${finalAttrs.version}.tar.gz"; - hash = "sha256-g06PE464P/A0PDGG7xMa644ztcIRMAU/ueee2IOhiHc="; + hash = "sha256-PoZHmr4kq6A6aTVlo9kbjnRSkLBJ9q/GneHGWoEvraQ="; }; "aarch64-linux" = fetchurl { url = "https://s3-eu-west-1.amazonaws.com/tideways/cli/${finalAttrs.version}/tideways-cli_linux_arm64-${finalAttrs.version}.tar.gz"; - hash = "sha256-nbC9vMXA5vHKxEpINDQJTUqh7YOe0T0x5MbbQg03gk4="; + hash = "sha256-8r3s9izpi8fR+lSDQ6ZAxGWK2XQxrtp7WgRykRC+pD4="; }; "x86_64-darwin" = fetchurl { url = "https://s3-eu-west-1.amazonaws.com/tideways/cli/${finalAttrs.version}/tideways-cli_macos_amd64-${finalAttrs.version}.tar.gz"; - hash = "sha256-RfCTl61r/zfWy/3W+zmrSaAjIWe52POfZnzsmm5loD4="; + hash = "sha256-D40PF6zgf79NO1K35koZ2gpUeJllF9CpW9DoCQ1uJIU="; }; "aarch64-darwin" = fetchurl { url = "https://s3-eu-west-1.amazonaws.com/tideways/cli/${finalAttrs.version}/tideways-cli_macos_arm64-${finalAttrs.version}.tar.gz"; - hash = "sha256-4N4hUvbf8b9BnKUY4YTsB76Z35DmSTyWv6BC+bqJNCI="; + hash = "sha256-QGkRu0IRUpydLIy0DgtRhLiH0mLZ0UTRCJo1WZeICQQ="; }; }; From 6762e6e33e7a2d57f57f447a0722600b6001304f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 11 Dec 2024 08:25:57 +0100 Subject: [PATCH 45/59] python312Packages.elementpath: 4.5.0 -> 4.6.0 Diff: https://github.com/sissaschool/elementpath/compare/refs/tags/v4.5.0...v4.6.0 Changelog: https://github.com/sissaschool/elementpath/blob/v4.6.0/CHANGELOG.rst --- pkgs/development/python-modules/elementpath/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/elementpath/default.nix b/pkgs/development/python-modules/elementpath/default.nix index 702c8cd453f3..f07fa7004e24 100644 --- a/pkgs/development/python-modules/elementpath/default.nix +++ b/pkgs/development/python-modules/elementpath/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "elementpath"; - version = "4.5.0"; + version = "4.6.0"; pyproject = true; disabled = pythonOlder "3.7"; @@ -17,7 +17,7 @@ buildPythonPackage rec { owner = "sissaschool"; repo = "elementpath"; tag = "v${version}"; - hash = "sha256-zyJ+UtPTGEziIlucIXN1dIzfN5sfLkeOia7tiqOGFjk="; + hash = "sha256-lFUrY3LOSc2OROkzotGSW9N3h9dJA4EnCvLNU41BPA0="; }; build-system = [ setuptools ]; From 5ef0268f7ff514fcba39560c1ef5be7836ff7392 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 11 Dec 2024 08:26:56 +0100 Subject: [PATCH 46/59] python312Packages.elementpath: update disabled --- pkgs/development/python-modules/elementpath/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/elementpath/default.nix b/pkgs/development/python-modules/elementpath/default.nix index f07fa7004e24..e2e1d2a0342b 100644 --- a/pkgs/development/python-modules/elementpath/default.nix +++ b/pkgs/development/python-modules/elementpath/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { version = "4.6.0"; pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "sissaschool"; From 89c3cfa1ce11ca51ae3c812c4fe0efaeabf28356 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 11 Jan 2025 19:17:28 +0000 Subject: [PATCH 47/59] firefox-beta-unwrapped: 133.0b9 -> 135.0b3 --- .../networking/browsers/firefox/packages/firefox-beta.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox/packages/firefox-beta.nix b/pkgs/applications/networking/browsers/firefox/packages/firefox-beta.nix index 9f2359782dc9..84bda1f9346b 100644 --- a/pkgs/applications/networking/browsers/firefox/packages/firefox-beta.nix +++ b/pkgs/applications/networking/browsers/firefox/packages/firefox-beta.nix @@ -9,11 +9,11 @@ buildMozillaMach rec { pname = "firefox-beta"; - version = "133.0b9"; + version = "135.0b3"; applicationName = "Mozilla Firefox Beta"; src = fetchurl { url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz"; - sha512 = "2c950f04730666387a84b25cfe3afbd93b53988608345a062c8b538619e895c274049fe557a604e86f7ea5744ae2a50dc9c448a20664f0d7308949422a453ae9"; + sha512 = "2d6f04b929257532ac3883f6c16f063718c66acaf0c131d1f449f4a0de947d061ca772a3388f02b9122649ba27474500db287a9b4b7a0cc53a1639805c7f3064"; }; meta = { From 3402ec2496a3aee8abcc5dce032570ab34e3ae75 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 11 Jan 2025 20:30:08 +0100 Subject: [PATCH 48/59] python313Packages.aiogram: 3.16.0 -> 3.17.0 Diff: https://github.com/aiogram/aiogram/compare/refs/tags/v3.16.0...v3.17.0 Changelog: https://github.com/aiogram/aiogram/releases/tag/v3.17.0 --- pkgs/development/python-modules/aiogram/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aiogram/default.nix b/pkgs/development/python-modules/aiogram/default.nix index 08acdfba4eb3..ca0248f8210d 100644 --- a/pkgs/development/python-modules/aiogram/default.nix +++ b/pkgs/development/python-modules/aiogram/default.nix @@ -28,7 +28,7 @@ buildPythonPackage rec { pname = "aiogram"; - version = "3.16.0"; + version = "3.17.0"; pyproject = true; disabled = pythonOlder "3.9"; @@ -37,7 +37,7 @@ buildPythonPackage rec { owner = "aiogram"; repo = "aiogram"; tag = "v${version}"; - hash = "sha256-0kvGEispsDpeTM1NXYb9HylskDONHP48NBn+JyBhSJ4="; + hash = "sha256-47PWd1geTALgO7MDglHqaoMmZ+u1BnKSlj6Jxj7fkBQ="; }; build-system = [ hatchling ]; From 430e618f93f5a55f2c5ebe6c546c6ac5ee906f51 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 11 Jan 2025 15:53:43 +0000 Subject: [PATCH 49/59] python312Packages.scikit-hep-testdata: 0.5.0 -> 0.5.2 --- .../python-modules/scikit-hep-testdata/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/scikit-hep-testdata/default.nix b/pkgs/development/python-modules/scikit-hep-testdata/default.nix index 75537af44715..ad27cd906f28 100644 --- a/pkgs/development/python-modules/scikit-hep-testdata/default.nix +++ b/pkgs/development/python-modules/scikit-hep-testdata/default.nix @@ -15,14 +15,14 @@ buildPythonPackage rec { pname = "scikit-hep-testdata"; - version = "0.5.0"; + version = "0.5.2"; pyproject = true; src = fetchFromGitHub { owner = "scikit-hep"; repo = "scikit-hep-testdata"; tag = "v${version}"; - hash = "sha256-FIv3yC5Q3H1RXl0n32YH1UqaZiMuWHNcMPTSKLN+IkA="; + hash = "sha256-yG9ZeBKB0NcTZ8zU0iJTSwDvaafD+2FzkDk2dVYSJO8="; }; build-system = [ setuptools-scm ]; From 35c29c2e9c67e7306387e1ef6d797e6cca562894 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 11 Jan 2025 20:36:31 +0100 Subject: [PATCH 50/59] python312Packages.busylight-for-humans: 0.33.0 -> 0.33.2 Diff: https://github.com/JnyJny/busylight/compare/refs/tags/0.33.0...0.33.2 Changelog: https://github.com/JnyJny/busylight/releases/tag/0.33.2 --- .../python-modules/busylight-for-humans/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/busylight-for-humans/default.nix b/pkgs/development/python-modules/busylight-for-humans/default.nix index e4e9fd2337fc..bbc5d3ac2bbe 100644 --- a/pkgs/development/python-modules/busylight-for-humans/default.nix +++ b/pkgs/development/python-modules/busylight-for-humans/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { pname = "busylight-for-humans"; - version = "0.33.0"; + version = "0.33.2"; pyproject = true; disabled = pythonOlder "3.8"; @@ -25,7 +25,7 @@ buildPythonPackage rec { owner = "JnyJny"; repo = "busylight"; tag = version; - hash = "sha256-gwhN8aFwxRdA6fPuCDVdBJ8yl8Zq6DAfSRW88Yk7IUk="; + hash = "sha256-66XJumC++/Wa6hY/A3m6IR2ALCH4vLSut9ERW8msLY4="; }; build-system = [ poetry-core ]; From cbd055b534605c83d7f9de8ed1ae9e54d84cf426 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 11 Jan 2025 20:37:28 +0100 Subject: [PATCH 51/59] python312Packages.awswrangler: 3.10.1 -> 3.11.0 Diff: https://github.com/aws/aws-sdk-pandas/compare/refs/tags/3.10.1...3.11.0 Changelog: https://github.com/aws/aws-sdk-pandas/releases/tag/3.11.0 --- pkgs/development/python-modules/awswrangler/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/awswrangler/default.nix b/pkgs/development/python-modules/awswrangler/default.nix index ddbcc8213dfb..b34170f60747 100644 --- a/pkgs/development/python-modules/awswrangler/default.nix +++ b/pkgs/development/python-modules/awswrangler/default.nix @@ -25,7 +25,7 @@ buildPythonPackage rec { pname = "awswrangler"; - version = "3.10.1"; + version = "3.11.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -34,7 +34,7 @@ buildPythonPackage rec { owner = "aws"; repo = "aws-sdk-pandas"; tag = version; - hash = "sha256-JR1gO24biFluwqZAIQMFGjjbn9VBxTlAS8i76N82onc="; + hash = "sha256-dIdNrfhBrfrzXmspw25yd/y6MbXRrLfDveCQk+AERV0="; }; pythonRelaxDeps = [ "packaging" ]; From fbb280f870620e8d585f7eeabab32acde0e5e4a6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 11 Jan 2025 21:01:58 +0100 Subject: [PATCH 52/59] python313Packages.environs: 14.0.0 -> 14.1.0 Diff: https://github.com/sloria/environs/compare/refs/tags/14.0.0...14.1.0 Changelog: https://github.com/sloria/environs/blob/14.1.0/CHANGELOG.md --- pkgs/development/python-modules/environs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/environs/default.nix b/pkgs/development/python-modules/environs/default.nix index e6697813e4f0..c6e377e7be99 100644 --- a/pkgs/development/python-modules/environs/default.nix +++ b/pkgs/development/python-modules/environs/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "environs"; - version = "14.0.0"; + version = "14.1.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "sloria"; repo = "environs"; tag = version; - hash = "sha256-sqEe0DoJHUtHFin04+lNQKuXjvSmDmfwjQIvU6a4sDo="; + hash = "sha256-OmZn6ngujcPuws+idRtzwIt+9XLfRge7IFby+yCiQNM="; }; nativeBuildInputs = [ flit-core ]; From 589a387a44411609edcdaf42eb382148b4acb8cb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 11 Jan 2025 21:25:52 +0100 Subject: [PATCH 53/59] python312Packages.amaranth: disable failing tests --- .../python-modules/amaranth/default.nix | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/amaranth/default.nix b/pkgs/development/python-modules/amaranth/default.nix index c4effc294787..096505a690d3 100644 --- a/pkgs/development/python-modules/amaranth/default.nix +++ b/pkgs/development/python-modules/amaranth/default.nix @@ -20,8 +20,9 @@ buildPythonPackage rec { pname = "amaranth"; - format = "pyproject"; version = "0.5.4"; + pyproject = true; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { @@ -33,12 +34,11 @@ buildPythonPackage rec { postPatch = '' substituteInPlace pyproject.toml \ - --replace-fail \ - "pdm-backend~=2.3.0" \ - "pdm-backend>=2.3.0" + --replace-fail "pdm-backend~=2.3.0" "pdm-backend>=2.3.0" ''; nativeBuildInputs = [ git ]; + build-system = [ pdm-backend ]; dependencies = @@ -59,14 +59,28 @@ buildPythonPackage rec { pythonImportsCheck = [ "amaranth" ]; + disabledTests = [ + "verilog" + "test_reversible" + "test_distance" + ]; + + disabledTestPaths = [ + # Subprocesses + "tests/test_examples.py" + # Verification failures + "tests/test_lib_fifo.py" + ]; + meta = with lib; { description = "Modern hardware definition language and toolchain based on Python"; - mainProgram = "amaranth-rpc"; homepage = "https://amaranth-lang.org/docs/amaranth"; + changelog = "https://github.com/amaranth-lang/amaranth/blob/v${version}/docs/changes.rst"; license = licenses.bsd2; maintainers = with maintainers; [ thoughtpolice pbsds ]; + mainProgram = "amaranth-rpc"; }; } From b918d10c29a3420d9c79543010ef760ea3f45592 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 11 Jan 2025 21:37:47 +0100 Subject: [PATCH 54/59] python312Packages.azure-mgmt-cognitiveservices: 13.5.0 -> 13.6.0 Changelog: https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-cognitiveservices_13.6.0/sdk/cognitiveservices/azure-mgmt-cognitiveservices/CHANGELOG.md --- .../azure-mgmt-cognitiveservices/default.nix | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/azure-mgmt-cognitiveservices/default.nix b/pkgs/development/python-modules/azure-mgmt-cognitiveservices/default.nix index a4052e739880..97a4b3ad0815 100644 --- a/pkgs/development/python-modules/azure-mgmt-cognitiveservices/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-cognitiveservices/default.nix @@ -1,38 +1,46 @@ { lib, - buildPythonPackage, - fetchPypi, azure-common, azure-mgmt-core, - msrestazure, + buildPythonPackage, + fetchPypi, + isodate, pythonOlder, + setuptools, + typing-extensions, }: buildPythonPackage rec { pname = "azure-mgmt-cognitiveservices"; - version = "13.5.0"; - format = "setuptools"; + version = "13.6.0"; + pyproject = true; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.8"; src = fetchPypi { - inherit pname version; - extension = "zip"; - hash = "sha256-RK8LGbH4J+nN6gnGBUweZgkqUcMrwe9aVtvZtAvFeBU="; + pname = "azure_mgmt_cognitiveservices"; + inherit version; + hash = "sha256-YS5W956CT4HVkM/wwJJTNYraBl1aYWnBOQX8NQZNm0A="; }; - propagatedBuildInputs = [ - msrestazure + build-system = [ setuptools ]; + + dependencies = [ azure-common azure-mgmt-core + isodate + typing-extensions ]; # Module has no tests doCheck = false; + pythonImportsCheck = [ "azure.mgmt.cognitiveservices" ]; + meta = with lib; { description = "This is the Microsoft Azure Cognitive Services Management Client Library"; - homepage = "https://github.com/Azure/azure-sdk-for-python"; + homepage = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitiveservices/azure-mgmt-cognitiveservices"; + changelog = "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-cognitiveservices_${version}/sdk/cognitiveservices/azure-mgmt-cognitiveservices/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ maxwilson ]; }; From 66e1128445e59bfb90d53f5dd1b45434633403f5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 11 Jan 2025 21:49:56 +0100 Subject: [PATCH 55/59] python313Packages.construct-typing: disable faling tests on Python 3.13 --- .../python-modules/construct-typing/default.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/construct-typing/default.nix b/pkgs/development/python-modules/construct-typing/default.nix index 2d5ecf5dde58..7253c51d6978 100644 --- a/pkgs/development/python-modules/construct-typing/default.nix +++ b/pkgs/development/python-modules/construct-typing/default.nix @@ -3,6 +3,7 @@ buildPythonPackage, fetchFromGitHub, setuptools, + pythonAtLeast, construct, typing-extensions, arrow, @@ -46,11 +47,17 @@ buildPythonPackage rec { ruamel-yaml ]; - disabledTests = [ - # tests fail with construct>=2.10.70 - "test_bitsinteger" - "test_bytesinteger" - ]; + disabledTests = + [ + # tests fail with construct>=2.10.70 + "test_bitsinteger" + "test_bytesinteger" + ] + ++ lib.optionals (pythonAtLeast "3.13") [ + # https://github.com/timrid/construct-typing/issues/31 + "test_tenum_docstring" + "test_tenum_flags_docstring" + ]; meta = { changelog = "https://github.com/timrid/construct-typing/releases/tag/v${version}"; From 9692553cb583e8dca46b66ab76c0eb2ada1a4098 Mon Sep 17 00:00:00 2001 From: Matt McHenry Date: Sat, 11 Jan 2025 16:00:57 -0500 Subject: [PATCH 56/59] epson-escpr: restore correct install layout (#373003) in 75ad85225676171bb0743533f156b58b5023c35c, some new patches were added (to deal with gcc 14, among other things). these patches disagree with the source tarball about the line endings of the files being patches. in that commit, the solution was to run dos2unix across the entire source tree. however, that produced this failure: WARNING: 'aclocal-1.15' is missing on your system. You should only need it if you modified 'acinclude.m4' or 'configure.ac' or m4 files included by 'configure.ac'. so in that same commit, automake and autoconf were added to nativeBuildInputs. this fixed that error, but it meant that the 'configure' script was regenerated. and that's a problem, because cups-filter-ppd-dirs.patch patches the 'configure' script to ensure that the installPhase doesn't introduce weird partial store paths under $out. as it turns out, there is only one file that is both touched by the new patches and comes with dos line endings in the source tarball. so, we can be much more focused with our invocation of dos2unix. this prevents the build from seeing unexpected modifications and deciding to try to clobber our patch to the 'configure' script. further, if we shift our invocation of dos2unix from the unpack phase to the patch phase, we've already cd'd into the unpacked source directory, so we don't need any obscure bash voodoo to figure out its name. --- pkgs/by-name/ep/epson-escpr/package.nix | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/pkgs/by-name/ep/epson-escpr/package.nix b/pkgs/by-name/ep/epson-escpr/package.nix index 5d6882fe04fb..a90a7f95e675 100644 --- a/pkgs/by-name/ep/epson-escpr/package.nix +++ b/pkgs/by-name/ep/epson-escpr/package.nix @@ -5,8 +5,6 @@ cups, fetchpatch, dos2unix, - automake115x, - autoconf, }: let @@ -29,17 +27,10 @@ stdenv.mkDerivation { ]; sha256 = "sha256-hVbX4OXPe4y37Szju3uVdXlVdjX4DFSN/A2Emz3eCcQ="; }; - # DOS Line Endings in /lib directory and UNIX Line endings in /src directory. - # So convert everything to UNIX style line endings. - # Since the files are modified, autoconf and automake is required - postUnpack = '' - dir=''${src%-*} - cd ''${dir#*-} - local f - for f in $(find ./ -type f || die); do - ${dos2unix}/bin/dos2unix $f - done - cd .. + # the patches above are expecting unix line endings, but one of the files + # being patched has dos line endings in the source tarball + prePatch = '' + ${dos2unix}/bin/dos2unix lib/epson-escpr-api.h ''; patches = [ @@ -59,10 +50,6 @@ stdenv.mkDerivation { "-p1" ]; buildInputs = [ cups ]; - nativeBuildInputs = [ - automake115x - autoconf - ]; meta = with lib; { homepage = "http://download.ebz.epson.net/dsc/search/01/search/"; From e7e04212425991f8a2dd9af7ef77946bbb1d0eb4 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 11 Jan 2025 22:06:17 +0100 Subject: [PATCH 57/59] Revert "nixos/rustic: init module" --- .../manual/release-notes/rl-2505.section.md | 2 - nixos/modules/module-list.nix | 1 - nixos/modules/services/backup/rustic.nix | 444 ------------------ 3 files changed, 447 deletions(-) delete mode 100644 nixos/modules/services/backup/rustic.nix diff --git a/nixos/doc/manual/release-notes/rl-2505.section.md b/nixos/doc/manual/release-notes/rl-2505.section.md index f04bc955e56b..97e0ca92469f 100644 --- a/nixos/doc/manual/release-notes/rl-2505.section.md +++ b/nixos/doc/manual/release-notes/rl-2505.section.md @@ -99,8 +99,6 @@ - [git-worktree-switcher](https://github.com/mateusauler/git-worktree-switcher), switch between git worktrees with speed. Available as [programs.git-worktree-switcher](#opt-programs.git-worktree-switcher.enable) -- [rustic](https://github.com/rustic-rs/rustic), a Rust-based backup tool. Available as [services.rustic](#opt-services.rustic.enable). - ## Backward Incompatibilities {#sec-release-25.05-incompatibilities} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index bb309ae02b21..b5b6fd8c0e2f 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -429,7 +429,6 @@ ./services/backup/restic-rest-server.nix ./services/backup/restic.nix ./services/backup/rsnapshot.nix - ./services/backup/rustic.nix ./services/backup/sanoid.nix ./services/backup/syncoid.nix ./services/backup/tarsnap.nix diff --git a/nixos/modules/services/backup/rustic.nix b/nixos/modules/services/backup/rustic.nix deleted file mode 100644 index c0497dc4b00d..000000000000 --- a/nixos/modules/services/backup/rustic.nix +++ /dev/null @@ -1,444 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: - -let - tomlFormat = pkgs.formats.toml { }; - - cfg = config.services.rustic; - configFiles = lib.mapAttrs (k: v: tomlFormat.generate "rustic-${k}.toml" v) cfg.profiles; - - commonOpts = - v: - if v ? files then - v.files - else if v ? command then - v.command - else if v ? postgres then - v.postgres - else - throw "unexpected: backup has none of the authorized types"; - - backupType = - v: - if v ? files then - "files" - else if v ? command then - "command" - else if v ? postgres then - "postgres" - else - throw "unexpected: backup has none of the authorized types"; - - backupConfigToCmd = - k: v: - let - o = commonOpts v; - profileArgs = lib.concatMapStrings (s: " -P \"${s}\"") o.useProfiles; - extraArgs = lib.concatMapStrings (s: " \"${s}\"") o.extraArgs; - genericArgs = profileArgs + extraArgs; - - sourcesArgs = lib.concatMapStrings (s: " ${s}") v.files.sources; - asPathArg = lib.optionalString (v.files.asPath != null) " --as-path \"${v.files.asPath}\""; - ifFilesArgs = lib.optionalString (v ? files) (sourcesArgs + asPathArg); - - commandArg = " --stdin-command \"${v.command.command}\" -"; # stdin-command requires adding `-` as a source - stdinFilenameArg = lib.optionalString ( - v.command.filename != null - ) " --stdin-filename \"${v.command.filename}\""; - ifCommandArgs = lib.optionalString (v ? command) (commandArg + stdinFilenameArg); - - pipeJsonIntoCmd = - if o.pipeJsonInto ? nothing then - "" - else if o.pipeJsonInto ? command then - " --json | ${o.pipeJsonInto.command} \"$1\"" - else if o.pipeJsonInto ? prometheus then - " --json | ${prometheusWriteScript o.pipeJsonInto.prometheus.nodeExporterCollectorFolder} \"$1\"" - else - throw "unexpected: pipeJsonInto has none of the authorized types"; - in - if v ? postgres then - let - systemctl = "${config.systemd.package}/bin/systemctl"; - in - pkgs.writeScript "rustic-postgres-starter-${k}" '' - #!${pkgs.bash}/bin/bash - set -euo pipefail - - ${systemctl} start --no-block rustic-postgres-globals-${k}.service - - ${pkgs.sudo}/bin/sudo -u postgres \ - ${config.services.postgresql.package}/bin/psql \ - -c 'SELECT datname FROM pg_database' \ - --csv \ - | tail -n +2 \ - | grep -Ev '^template0$' \ - | xargs -I {} \ - ${systemctl} start --no-block rustic-postgres-db-${k}@{}.service - '' - else - pkgs.writeScript "rustic-backup-${k}" '' - #!${pkgs.bash}/bin/bash - set -euo pipefail - - TZ="" ${cfg.package}/bin/rustic backup${ifFilesArgs + ifCommandArgs + genericArgs + pipeJsonIntoCmd} - ''; - - prometheusNumericMetrics = [ - "files_new" - "files_changed" - "files_unmodified" - "total_files_processed" - "total_bytes_processed" - "dirs_new" - "dirs_changed" - "dirs_unmodified" - "total_dirs_processed" - "total_dirsize_processed" - "data_blobs" - "tree_blobs" - "data_added" - "data_added_packed" - "data_added_files" - "data_added_files_packed" - "data_added_trees" - "data_added_trees_packed" - "backup_duration" - "total_duration" - ]; - - prometheusTimeMetrics = [ - "backup_start" - "backup_end" - ]; - - prometheusAllMetrics = prometheusNumericMetrics ++ prometheusTimeMetrics; - - prometheusJqTemplate = lib.concatMapStrings (m: '' - rustic_backup_${m}{id=\"{{id}}\"} {{${m}}} - '') prometheusAllMetrics; - - prometheusWriteScript = - f: - pkgs.writeScript "rustic-write-to-prometheus" '' - #!${pkgs.bash}/bin/bash - set -euo pipefail - - ${pkgs.jq}/bin/jq -r --arg template "${prometheusJqTemplate}" ' - . as $json - | $template - | gsub("{{id}}"; "'"$1"'") - ${lib.concatMapStrings ( - m: ''| gsub("{{${m}}}"; $json.summary.${m} | tostring)'' - ) prometheusNumericMetrics} - ${lib.concatMapStrings - # jq's `fromdate` builtins do not support sub-second accuracy (as of early 2025) - ( - m: ''| gsub("{{${m}}}"; $json.summary.${m} | sub(".[0-9]{9}Z"; "Z") | fromdateiso8601 | tostring)'' - ) - prometheusTimeMetrics - } - ' > "${f}/rustic-backup-$1.prom.next" - mv "${f}/rustic-backup-$1.prom.next" "${f}/rustic-backup-$1.prom" - ''; - - commonOptions = { - startAt = lib.mkOption { - type = with lib.types; either (listOf str) str; - description = '' - Time(s) at which to run this operation. - - The format is documented in `man systemd.time`. - ''; - }; - - useProfiles = lib.mkOption { - type = lib.types.listOf lib.types.str; - default = [ ]; - description = "Config profiles to use"; - }; - - extraArgs = lib.mkOption { - type = lib.types.listOf lib.types.str; - default = [ ]; - description = "Extra command-line arguments to pass to the `rustic` call."; - }; - }; - - commonBackupOptions = commonOptions // { - pipeJsonInto = lib.mkOption { - description = "Command that will be called on the JSON result of `rustic backup`."; - default = { - nothing = { }; - }; - type = lib.types.attrTag { - nothing = lib.mkOption { - description = "Do nothing with the result."; - type = lib.types.unspecified; - }; - - command = lib.mkOption { - description = '' - Run a command on the result. - - It will be called with the JSON result on standard input, and an identifier of - the backup section as an argument. You can pass any other arguments eg. as tags, - which rustic will return in its JSON output. - ''; - type = lib.types.str; - }; - - prometheus = lib.mkOption { - description = "Write the result as prometheus metrics."; - type = lib.types.submodule { - options.nodeExporterCollectorFolder = lib.mkOption { - type = lib.types.path; - description = '' - Folder that is exported by the node exporter, and in which the metrics should be placed. - - This should be configured in the node exporter as `--collector.textfile.directory=`. - ''; - }; - }; - }; - }; - }; - }; -in -{ - options.services.rustic = { - enable = lib.mkEnableOption "rustic"; - package = lib.mkPackageOption pkgs "rustic" { }; - - checkProfiles = lib.mkOption { - type = lib.types.bool; - default = true; - description = '' - If enabled, checks that the generated rustic profiles are valid. - - Note that imports that cannot be resolved are accepted. This allows - the recommended setup of using an imported file that only root can read - to store the passwords. - ''; - }; - - profiles = lib.mkOption { - type = lib.types.attrsOf tomlFormat.type; - default = { }; - description = '' - Configuration files for rustic, see - - for supported settings. - - The `rustic` profile will be the one used by default. - - Note that this will be world-readable in the nix store, so do not put - your passwords here! Instead, you should write them somewhere safe, and - then set, eg. if you put it in `/root/rustic-passwords.toml`: - ```nix - global.use-profiles = ["/root/rustic-passwords"]; - ``` - ''; - }; - - backups = lib.mkOption { - default = { }; - description = '' - Backup configurations. - - Each key is the name of the backup, and the value is the parameters - with which this backup will be run. This allows setting multiple backups - running at different intervals, and backing up different folders or - databases. - ''; - type = lib.types.attrsOf ( - lib.types.attrTag { - files = lib.mkOption { - description = "Backup files and directories."; - type = lib.types.submodule { - options = commonBackupOptions // { - sources = lib.mkOption { - type = lib.types.listOf lib.types.path; - default = [ ]; - description = '' - List of sources to backup. - - Defaults to the ones defined in the relevant configuration files. - ''; - }; - - asPath = lib.mkOption { - type = lib.types.nullOr lib.types.str; - default = null; - description = "Manually set the backup path in snapshot"; - }; - }; - }; - }; - - command = lib.mkOption { - description = "Backup the output of a command."; - type = lib.types.submodule { - options = commonBackupOptions // { - command = lib.mkOption { - type = lib.types.str; - description = "Command of which to backup the output"; - }; - - filename = lib.mkOption { - type = lib.types.nullOr lib.types.str; - default = null; - description = '' - Filename to use in the backup. - - Defaults to the profile-provided filename, or `stdin`. - ''; - }; - }; - }; - }; - - postgres = lib.mkOption { - description = '' - Backup all postgresql databases. - - Use a custom `command` using `pg_dump` if you want to backup a single - database. - - This backs up globals and individual databases in independent files. - ''; - type = lib.types.submodule { - options = commonBackupOptions // { - prefix = lib.mkOption { - type = lib.types.str; - default = "/postgres"; - description = "Path prefix for the dumps."; - }; - }; - }; - }; - } - ); - }; - - checks = lib.mkOption { - default = { }; - description = '' - Check configurations. - - Each key is the name of the check, and the value is the parameters - with which this check will be run. This allows setting multiple check - running at different intervals, eg. a frequent metadata-only check and - an infrequent full-data check. - ''; - type = lib.types.attrsOf (lib.types.submodule { options = commonOptions; }); - }; - - prune = commonOptions // { - enable = lib.mkEnableOption "rustic-prune"; - }; - }; - - config = lib.mkIf cfg.enable { - system.checks = lib.optional cfg.checkProfiles ( - pkgs.runCommand "rustic-profiles-check" { } '' - ${lib.concatMapStrings (p: '' - ln -s ${p} ./rustic-config-for-checking.toml - ${cfg.package}/bin/rustic show-config -P rustic-config-for-checking > /dev/null - rm ./rustic-config-for-checking.toml - '') (lib.attrValues configFiles)} - touch $out - '' - ); - - environment.systemPackages = [ cfg.package ]; - - environment.etc = lib.mapAttrs' (k: v: { - name = "rustic/${k}.toml"; - value.source = v; - }) configFiles; - - systemd.services = - lib.concatMapAttrs ( - k: v: - { - "rustic-backup-${k}" = { - serviceConfig = { - Type = "oneshot"; - User = "root"; - ExecStart = "${backupConfigToCmd k v} ${backupType v}-${k}"; - }; - startAt = (commonOpts v).startAt; - }; - } - // lib.optionalAttrs (v ? postgres) { - "rustic-postgres-globals-${k}" = { - serviceConfig = { - Type = "oneshot"; - User = "root"; - ExecStart = "${ - backupConfigToCmd k { - command = v.postgres // { - filename = "${v.postgres.prefix}/globals.sql"; - command = "${pkgs.sudo}/bin/sudo -u postgres ${config.services.postgresql.package}/bin/pg_dumpall --globals-only"; - }; - } - } postgres-globals-${k}"; - }; - }; - - "rustic-postgres-db-${k}@" = { - serviceConfig = { - Type = "oneshot"; - User = "root"; - ExecStart = "${ - backupConfigToCmd k { - command = v.postgres // { - filename = "$3"; - command = "${pkgs.sudo}/bin/sudo -u postgres ${config.services.postgresql.package}/bin/pg_dump $2"; - }; - } - } 'postgres-db-${k}-%i' '%i' '${v.postgres.prefix}/db/%i.sql'"; - }; - }; - } - ) cfg.backups - // lib.concatMapAttrs ( - k: v: - let - profiles = lib.concatMapStrings (p: " -P \"${p}\"") v.useProfiles; - extraArgs = lib.concatMapStrings (a: " \"${a}\"") v.extraArgs; - in - { - "rustic-check-${k}" = { - serviceConfig = { - Type = "oneshot"; - User = "root"; - ExecStart = "${cfg.package}/bin/rustic check${profiles}${extraArgs}"; - }; - startAt = v.startAt; - }; - } - ) cfg.checks - // lib.optionalAttrs cfg.prune.enable ( - let - profiles = lib.concatMapStrings (p: " -P \"${p}\"") cfg.prune.useProfiles; - extraArgs = lib.concatMapStrings (a: " \"${a}\"") cfg.prune.extraArgs; - in - { - "rustic-prune" = { - serviceConfig = { - Type = "oneshot"; - User = "root"; - ExecStart = "${cfg.package}/bin/rustic forget --prune${profiles}${extraArgs}"; - }; - startAt = cfg.prune.startAt; - }; - } - ); - }; -} From 4bc4a96aa56aa011e4e02398ab556fadf8c99c2a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 11 Jan 2025 22:10:22 +0100 Subject: [PATCH 58/59] python312Packages.env-canada: 0.7.2 -> 0.8.0 Diff: michaeldavie/env_canada@refs/tags/v0.7.2...v0.8.0 Changelog: https://github.com/michaeldavie/env_canada/blob/v0.8.0/CHANGELOG.md --- .../development/python-modules/env-canada/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/env-canada/default.nix b/pkgs/development/python-modules/env-canada/default.nix index 50698a923abb..617ecdb8d7f9 100644 --- a/pkgs/development/python-modules/env-canada/default.nix +++ b/pkgs/development/python-modules/env-canada/default.nix @@ -2,11 +2,11 @@ lib, aiohttp, buildPythonPackage, - defusedxml, fetchFromGitHub, geopy, imageio, lxml, + numpy, pandas, pillow, pytestCheckHook, @@ -18,26 +18,26 @@ buildPythonPackage rec { pname = "env-canada"; - version = "0.7.2"; + version = "0.8.0"; pyproject = true; - disabled = pythonOlder "3.8"; + disabled = pythonOlder "3.10"; src = fetchFromGitHub { owner = "michaeldavie"; repo = "env_canada"; tag = "v${version}"; - hash = "sha256-3SVpzWii9/ViJ7mbrqzKmN5FkOOYTeYdhJll6q/IseU="; + hash = "sha256-4PztYdQmMH2n3dlV8arJ2UFGp08nkIK80L460UdNhV8="; }; build-system = [ setuptools ]; dependencies = [ aiohttp - defusedxml geopy imageio lxml + numpy pandas pillow python-dateutil @@ -57,6 +57,7 @@ buildPythonPackage rec { "test_get_loop" "test_get_ec_sites" "test_ecradar" + "test_historical_number_values" ]; pythonImportsCheck = [ "env_canada" ]; From 1172244c58f5ac1a09bc9285698a74c087e51d08 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 11 Jan 2025 21:40:15 +0100 Subject: [PATCH 59/59] python312Packages.energyflow: 1.3.3 -> 1.4.0 Diff: thaler-lab/EnergyFlow@refs/tags/v1.4.0...v1.4.0 Changelog: https://github.com/thaler-lab/EnergyFlow/releases/tag/v1.4.0 --- .../python-modules/energyflow/default.nix | 61 ++++++++++++++----- 1 file changed, 45 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/energyflow/default.nix b/pkgs/development/python-modules/energyflow/default.nix index 6972331e0784..cf2850757686 100644 --- a/pkgs/development/python-modules/energyflow/default.nix +++ b/pkgs/development/python-modules/energyflow/default.nix @@ -3,41 +3,69 @@ buildPythonPackage, fetchFromGitHub, h5py, + hatch-vcs, + hatchling, + igraph, numpy, - six, - wasserstein, + pot, pytestCheckHook, + pythonOlder, + scikit-learn, + tensorflow, + tf-keras, + wasserstein, }: buildPythonPackage rec { pname = "energyflow"; - version = "1.3.3"; + version = "1.4.0"; + pyproject = true; + + disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "pkomiske"; repo = "EnergyFlow"; tag = "v${version}"; - hash = "sha256-Ioyk0IpyxcDdL2+3zkUa6yydavyphoh4do7GCz5nG60="; + hash = "sha256-4RzhpeOOty8IaVGByHD+PyeaeWgR7ZF98mSCJYoM9wY="; }; - postPatch = '' - substituteInPlace setup.cfg \ - --replace "setup_requires=" "" \ - --replace "pytest-runner" "" - ''; + build-system = [ + hatch-vcs + hatchling + ]; - propagatedBuildInputs = [ + dependencies = [ h5py numpy - six wasserstein ]; - nativeCheckInputs = [ pytestCheckHook ]; - pytestFlagsArray = [ "energyflow/tests" ]; - disabledTestPaths = [ - "energyflow/tests/test_archs.py" # requires tensorflow - "energyflow/tests/test_emd.py" # requires "ot" + optional-dependencies = { + all = [ + igraph + scikit-learn + tensorflow + ]; + archs = [ + scikit-learn + tensorflow + ]; + generation = [ igraph ]; + }; + + nativeCheckInputs = [ + pot + pytestCheckHook + tf-keras + ] ++ lib.flatten (builtins.attrValues optional-dependencies); + + disabledTests = [ + # Issues with array + "test_emd_equivalence" + "test_gdim" + "test_n_jobs" + "test_periodic_phi" ]; pythonImportsCheck = [ "energyflow" ]; @@ -45,6 +73,7 @@ buildPythonPackage rec { meta = with lib; { description = "Python package for the EnergyFlow suite of tools"; homepage = "https://energyflow.network/"; + changelog = "https://github.com/thaler-lab/EnergyFlow/releases/tag/v${version}"; license = licenses.gpl3Only; maintainers = with maintainers; [ veprbl ]; };