From d311c8f300e465b11d808e19c52ff207bc580750 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 15 Mar 2024 00:26:28 +0000 Subject: [PATCH 01/14] python312Packages.luddite: 1.0.3 -> 1.0.4 --- pkgs/development/python-modules/luddite/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/luddite/default.nix b/pkgs/development/python-modules/luddite/default.nix index d6ff66594f47..c3b7f4ee38ec 100644 --- a/pkgs/development/python-modules/luddite/default.nix +++ b/pkgs/development/python-modules/luddite/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "luddite"; - version = "1.0.3"; + version = "1.0.4"; format = "setuptools"; src = fetchFromGitHub { owner = "jumptrading"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-JXIM7/5LO95oabM16GwAt3v3a8uldGpGXDWmVic8Ins="; + hash = "sha256-iJ3h1XRBzLd4cBKFPNOlIV5Z5XJ/miscfIdkpPIpbJ8="; }; postPatch = '' From 4dc29e3d059814fb195b46d172c2f21d87ab06eb Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 16 Mar 2024 22:32:48 +0000 Subject: [PATCH 02/14] ospd-openvas: 22.6.2 -> 22.7.0 --- pkgs/tools/security/ospd-openvas/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/ospd-openvas/default.nix b/pkgs/tools/security/ospd-openvas/default.nix index 0e4b4b16e752..104bd1d4ae28 100644 --- a/pkgs/tools/security/ospd-openvas/default.nix +++ b/pkgs/tools/security/ospd-openvas/default.nix @@ -5,14 +5,14 @@ python3.pkgs.buildPythonApplication rec { pname = "ospd-openvas"; - version = "22.6.2"; + version = "22.7.0"; format = "pyproject"; src = fetchFromGitHub { owner = "greenbone"; repo = "ospd-openvas"; rev = "refs/tags/v${version}"; - hash = "sha256-SO2+PpxjyP+Yba0X81EgNCOAu7ntlG7zOeWA+7XdRIA="; + hash = "sha256-aBrJODymUMj0sflJW/+dMYZBRPYqtS1L2UBENDXb2Xw="; }; pythonRelaxDeps = [ From 48285f716928c4d932712ea3bca7512d69f94e09 Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Sun, 17 Mar 2024 01:52:15 +0100 Subject: [PATCH 03/14] stripJavaArchivesHook: rename from canonicalize-jars-hook and use strip-nondeterminism --- pkgs/build-support/java/canonicalize-jar.nix | 9 ------ pkgs/build-support/java/canonicalize-jar.sh | 29 ------------------- .../setup-hooks/canonicalize-jars.sh | 16 ---------- .../setup-hooks/strip-java-archives.sh | 16 ++++++++++ pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 9 +++--- 6 files changed, 21 insertions(+), 59 deletions(-) delete mode 100644 pkgs/build-support/java/canonicalize-jar.nix delete mode 100644 pkgs/build-support/java/canonicalize-jar.sh delete mode 100644 pkgs/build-support/setup-hooks/canonicalize-jars.sh create mode 100644 pkgs/build-support/setup-hooks/strip-java-archives.sh diff --git a/pkgs/build-support/java/canonicalize-jar.nix b/pkgs/build-support/java/canonicalize-jar.nix deleted file mode 100644 index 1edd9a6e0d20..000000000000 --- a/pkgs/build-support/java/canonicalize-jar.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ substituteAll, unzip, zip }: - -substituteAll { - name = "canonicalize-jar"; - src = ./canonicalize-jar.sh; - - unzip = "${unzip}/bin/unzip"; - zip = "${zip}/bin/zip"; -} diff --git a/pkgs/build-support/java/canonicalize-jar.sh b/pkgs/build-support/java/canonicalize-jar.sh deleted file mode 100644 index af010bcd2b26..000000000000 --- a/pkgs/build-support/java/canonicalize-jar.sh +++ /dev/null @@ -1,29 +0,0 @@ -# Canonicalize the manifest & repack with deterministic timestamps. -canonicalizeJar() { - local input='' outer='' - input="$(realpath -sm -- "$1")" - outer="$(pwd)" - # -qq: even quieter - @unzip@ -qq "$input" -d "$input-tmp" - canonicalizeJarManifest "$input-tmp/META-INF/MANIFEST.MF" - # Sets all timestamps to Jan 1 1980, the earliest mtime zips support. - find -- "$input-tmp" -exec touch -t 198001010000.00 {} + - rm "$input" - pushd "$input-tmp" 2>/dev/null - # -q|--quiet, -r|--recurse-paths - # -o|--latest-time: canonicalizes overall archive mtime - # -X|--no-extra: don't store platform-specific extra file attribute fields - @zip@ -qroX "$outer/tmp-out.jar" . 2> /dev/null - popd 2>/dev/null - rm -rf "$input-tmp" - mv "$outer/tmp-out.jar" "$input" -} - -# See also the Java specification's JAR requirements: -# https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html#Notes_on_Manifest_and_Signature_Files -canonicalizeJarManifest() { - local input='' - input="$(realpath -sm -- "$1")" - (head -n 1 "$input" && tail -n +2 "$input" | sort | grep -v '^\s*$') > "$input-tmp" - mv "$input-tmp" "$input" -} diff --git a/pkgs/build-support/setup-hooks/canonicalize-jars.sh b/pkgs/build-support/setup-hooks/canonicalize-jars.sh deleted file mode 100644 index 5137bfc94b01..000000000000 --- a/pkgs/build-support/setup-hooks/canonicalize-jars.sh +++ /dev/null @@ -1,16 +0,0 @@ -# This setup hook causes the fixup phase to repack all JAR files in a -# canonical & deterministic fashion, e.g. resetting mtimes (like with normal -# store files) and avoiding impure metadata. - -fixupOutputHooks+=('if [ -z "$dontCanonicalizeJars" -a -e "$prefix" ]; then canonicalizeJarsIn "$prefix"; fi') - -canonicalizeJarsIn() { - local dir="$1" - echo "canonicalizing jars in $dir" - dir="$(realpath -sm -- "$dir")" - while IFS= read -rd '' f; do - canonicalizeJar "$f" - done < <(find -- "$dir" -type f -name '*.jar' -print0) -} - -source @canonicalize_jar@ diff --git a/pkgs/build-support/setup-hooks/strip-java-archives.sh b/pkgs/build-support/setup-hooks/strip-java-archives.sh new file mode 100644 index 000000000000..22322468f76d --- /dev/null +++ b/pkgs/build-support/setup-hooks/strip-java-archives.sh @@ -0,0 +1,16 @@ +# This setup hook makes the fixup phase to repack all java archives in a +# deterministic fashion. The most important change being done is the resetting +# of the modification times of the archive entries + +fixupOutputHooks+=('stripJavaArchivesIn $prefix') + +stripJavaArchivesIn() { + local dir="$1" + echo "stripping java archives in $dir" + find $dir -type f -regextype posix-egrep -regex ".*\.(jar|war|hpi|apk)$" -print0 | + while IFS= read -rd '' f; do + echo "stripping java archive $f" + strip-nondeterminism --type jar "$f" + done +} + diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 28ee46900ded..8b1d1802c2c7 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -146,6 +146,7 @@ mapAliases ({ callPackage_i686 = pkgsi686Linux.callPackage; cadence = throw "cadence has been removed from nixpkgs, as it was archived upstream"; # Added 2023-10-28 cask = emacs.pkgs.cask; # Added 2022-11-12 + canonicalize-jars-hook = stripJavaArchivesHook; # Added 2024-03-17 cargo-embed = throw "cargo-embed is now part of the probe-rs package"; # Added 2023-07-03 cargo-espflash = espflash; cargo-flash = throw "cargo-flash is now part of the probe-rs package"; # Added 2023-07-03 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5e03fbae6b72..2b4a8529c43c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -212,11 +212,10 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Security; }; - canonicalize-jar = callPackage ../build-support/java/canonicalize-jar.nix { }; - canonicalize-jars-hook = makeSetupHook { - name = "canonicalize-jars-hook"; - substitutions = { canonicalize_jar = canonicalize-jar; }; - } ../build-support/setup-hooks/canonicalize-jars.sh; + stripJavaArchivesHook = makeSetupHook { + name = "strip-java-archives-hook"; + propagatedBuildInputs = [ strip-nondeterminism ]; + } ../build-support/setup-hooks/strip-java-archives.sh; ensureNewerSourcesHook = { year }: makeSetupHook { name = "ensure-newer-sources-hook"; From 0e209537966c90438bbb0d71124be25ffc2084c5 Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Sun, 17 Mar 2024 13:35:12 +0100 Subject: [PATCH 04/14] treewide: use stripJavaArchivesHook instead of canonicalize-jars-hook --- pkgs/applications/misc/calcoo/default.nix | 4 ++-- pkgs/applications/misc/pattypan/default.nix | 4 ++-- pkgs/applications/networking/remote/dayon/default.nix | 4 ++-- pkgs/applications/science/biology/trimmomatic/default.nix | 4 ++-- pkgs/development/compilers/abcl/default.nix | 4 ++-- pkgs/development/compilers/jasmin/default.nix | 4 ++-- pkgs/development/libraries/java/cup/default.nix | 4 ++-- pkgs/development/libraries/java/hydra-ant-logger/default.nix | 4 ++-- pkgs/development/libraries/java/swt/default.nix | 4 ++-- pkgs/development/tools/analysis/jdepend/default.nix | 4 ++-- pkgs/development/tools/parsing/javacc/default.nix | 4 ++-- pkgs/games/prismlauncher/default.nix | 4 ++-- pkgs/tools/games/jpsxdec/default.nix | 4 ++-- pkgs/tools/misc/ili2c/default.nix | 4 ++-- 14 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pkgs/applications/misc/calcoo/default.nix b/pkgs/applications/misc/calcoo/default.nix index 5f90b4bb2363..462b56d50ce0 100644 --- a/pkgs/applications/misc/calcoo/default.nix +++ b/pkgs/applications/misc/calcoo/default.nix @@ -2,7 +2,7 @@ , stdenv , fetchzip , ant -, canonicalize-jars-hook +, stripJavaArchivesHook , jdk , makeWrapper }: @@ -18,7 +18,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ ant - canonicalize-jars-hook + stripJavaArchivesHook jdk makeWrapper ]; diff --git a/pkgs/applications/misc/pattypan/default.nix b/pkgs/applications/misc/pattypan/default.nix index aac0da8b4c40..c1f5aa84b0eb 100644 --- a/pkgs/applications/misc/pattypan/default.nix +++ b/pkgs/applications/misc/pattypan/default.nix @@ -7,7 +7,7 @@ , wrapGAppsHook , makeDesktopItem , copyDesktopItems -, canonicalize-jars-hook +, stripJavaArchivesHook }: stdenv.mkDerivation (finalAttrs: { @@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: { makeWrapper wrapGAppsHook copyDesktopItems - canonicalize-jars-hook + stripJavaArchivesHook ]; dontWrapGApps = true; diff --git a/pkgs/applications/networking/remote/dayon/default.nix b/pkgs/applications/networking/remote/dayon/default.nix index a68a6eddd334..ea46ec131fbc 100644 --- a/pkgs/applications/networking/remote/dayon/default.nix +++ b/pkgs/applications/networking/remote/dayon/default.nix @@ -6,7 +6,7 @@ , jre , makeWrapper , copyDesktopItems -, canonicalize-jars-hook +, stripJavaArchivesHook }: stdenv.mkDerivation (finalAttrs: { @@ -25,7 +25,7 @@ stdenv.mkDerivation (finalAttrs: { jdk makeWrapper copyDesktopItems - canonicalize-jars-hook + stripJavaArchivesHook ]; buildPhase = '' diff --git a/pkgs/applications/science/biology/trimmomatic/default.nix b/pkgs/applications/science/biology/trimmomatic/default.nix index 53cff76badce..db19278eaa47 100644 --- a/pkgs/applications/science/biology/trimmomatic/default.nix +++ b/pkgs/applications/science/biology/trimmomatic/default.nix @@ -5,7 +5,7 @@ , jdk , jre , makeWrapper -, canonicalize-jars-hook +, stripJavaArchivesHook }: stdenv.mkDerivation (finalAttrs: { @@ -29,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: { ant jdk makeWrapper - canonicalize-jars-hook + stripJavaArchivesHook ]; buildPhase = '' diff --git a/pkgs/development/compilers/abcl/default.nix b/pkgs/development/compilers/abcl/default.nix index e36d8975e26b..317d0d92266d 100644 --- a/pkgs/development/compilers/abcl/default.nix +++ b/pkgs/development/compilers/abcl/default.nix @@ -6,7 +6,7 @@ , jdk , jre , makeWrapper -, canonicalize-jars-hook +, stripJavaArchivesHook }: let @@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: { jdk fakeHostname makeWrapper - canonicalize-jars-hook + stripJavaArchivesHook ]; buildPhase = '' diff --git a/pkgs/development/compilers/jasmin/default.nix b/pkgs/development/compilers/jasmin/default.nix index db58f48b97bb..685e6aa9537e 100644 --- a/pkgs/development/compilers/jasmin/default.nix +++ b/pkgs/development/compilers/jasmin/default.nix @@ -5,7 +5,7 @@ , ant , jdk8 , makeWrapper -, canonicalize-jars-hook +, stripJavaArchivesHook , callPackage }: @@ -27,7 +27,7 @@ in stdenv.mkDerivation (finalAttrs: { ant jdk makeWrapper - canonicalize-jars-hook + stripJavaArchivesHook ]; buildPhase = '' diff --git a/pkgs/development/libraries/java/cup/default.nix b/pkgs/development/libraries/java/cup/default.nix index 2f673a8e5a67..65df9d6cfa22 100644 --- a/pkgs/development/libraries/java/cup/default.nix +++ b/pkgs/development/libraries/java/cup/default.nix @@ -4,7 +4,7 @@ , ant , jdk , makeWrapper -, canonicalize-jars-hook +, stripJavaArchivesHook }: stdenv.mkDerivation (finalAttrs: { @@ -24,7 +24,7 @@ stdenv.mkDerivation (finalAttrs: { ant jdk makeWrapper - canonicalize-jars-hook + stripJavaArchivesHook ]; buildPhase = '' diff --git a/pkgs/development/libraries/java/hydra-ant-logger/default.nix b/pkgs/development/libraries/java/hydra-ant-logger/default.nix index 96b6cd05ed1a..8f7282df0bb2 100644 --- a/pkgs/development/libraries/java/hydra-ant-logger/default.nix +++ b/pkgs/development/libraries/java/hydra-ant-logger/default.nix @@ -3,7 +3,7 @@ , fetchFromGitHub , ant , jdk -, canonicalize-jars-hook +, stripJavaArchivesHook }: stdenv.mkDerivation { @@ -20,7 +20,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ ant jdk - canonicalize-jars-hook + stripJavaArchivesHook ]; buildPhase = '' diff --git a/pkgs/development/libraries/java/swt/default.nix b/pkgs/development/libraries/java/swt/default.nix index 4c900ed21ac6..2d3f4eeb6575 100644 --- a/pkgs/development/libraries/java/swt/default.nix +++ b/pkgs/development/libraries/java/swt/default.nix @@ -1,6 +1,6 @@ { lib , stdenv -, canonicalize-jars-hook +, stripJavaArchivesHook , fetchzip , pkg-config , atk @@ -58,7 +58,7 @@ in stdenv.mkDerivation rec { }; nativeBuildInputs = [ - canonicalize-jars-hook + stripJavaArchivesHook pkg-config ]; buildInputs = [ diff --git a/pkgs/development/tools/analysis/jdepend/default.nix b/pkgs/development/tools/analysis/jdepend/default.nix index 498a484a89f0..1f2e9605b117 100644 --- a/pkgs/development/tools/analysis/jdepend/default.nix +++ b/pkgs/development/tools/analysis/jdepend/default.nix @@ -4,7 +4,7 @@ , ant , jdk , makeWrapper -, canonicalize-jars-hook +, stripJavaArchivesHook }: stdenv.mkDerivation (finalAttrs: { @@ -22,7 +22,7 @@ stdenv.mkDerivation (finalAttrs: { ant jdk makeWrapper - canonicalize-jars-hook + stripJavaArchivesHook ]; buildPhase = '' diff --git a/pkgs/development/tools/parsing/javacc/default.nix b/pkgs/development/tools/parsing/javacc/default.nix index 42e1a536de04..a601ac15221f 100644 --- a/pkgs/development/tools/parsing/javacc/default.nix +++ b/pkgs/development/tools/parsing/javacc/default.nix @@ -5,7 +5,7 @@ , jdk , jre , makeWrapper -, canonicalize-jars-hook +, stripJavaArchivesHook }: stdenv.mkDerivation (finalAttrs: { @@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: { ant jdk makeWrapper - canonicalize-jars-hook + stripJavaArchivesHook ]; buildPhase = '' diff --git a/pkgs/games/prismlauncher/default.nix b/pkgs/games/prismlauncher/default.nix index c4571ceaa71b..058516cdc9c6 100644 --- a/pkgs/games/prismlauncher/default.nix +++ b/pkgs/games/prismlauncher/default.nix @@ -1,7 +1,7 @@ { lib , stdenv , fetchFromGitHub -, canonicalize-jars-hook +, stripJavaArchivesHook , cmake , cmark , Cocoa @@ -40,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-4VsoxZzi/EfEsnDvvwzg2xhj7j5B+k3gvaSqwJFDweE="; }; - nativeBuildInputs = [ extra-cmake-modules cmake jdk17 ninja canonicalize-jars-hook ]; + nativeBuildInputs = [ extra-cmake-modules cmake jdk17 ninja stripJavaArchivesHook ]; buildInputs = [ qtbase diff --git a/pkgs/tools/games/jpsxdec/default.nix b/pkgs/tools/games/jpsxdec/default.nix index 85fd9d65ada1..58876d678969 100644 --- a/pkgs/tools/games/jpsxdec/default.nix +++ b/pkgs/tools/games/jpsxdec/default.nix @@ -7,7 +7,7 @@ , makeWrapper , makeDesktopItem , copyDesktopItems -, canonicalize-jars-hook +, stripJavaArchivesHook }: stdenv.mkDerivation (finalAttrs: { @@ -28,7 +28,7 @@ stdenv.mkDerivation (finalAttrs: { jdk8 makeWrapper copyDesktopItems - canonicalize-jars-hook + stripJavaArchivesHook ]; buildPhase = '' diff --git a/pkgs/tools/misc/ili2c/default.nix b/pkgs/tools/misc/ili2c/default.nix index 99c1353631e9..d4ac13046377 100644 --- a/pkgs/tools/misc/ili2c/default.nix +++ b/pkgs/tools/misc/ili2c/default.nix @@ -5,7 +5,7 @@ , jdk8 , jre8 , makeWrapper -, canonicalize-jars-hook +, stripJavaArchivesHook }: let @@ -20,7 +20,7 @@ stdenv.mkDerivation (finalAttrs: { ant jdk makeWrapper - canonicalize-jars-hook + stripJavaArchivesHook ]; src = fetchFromGitHub { From 436fe7b59baed6bc65ac8430b13b8e4b9908e4eb Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Sun, 17 Mar 2024 13:35:55 +0100 Subject: [PATCH 05/14] treewide: unify ant determinism methods --- pkgs/applications/misc/mkgmap/default.nix | 7 ++----- pkgs/applications/misc/mkgmap/splitter/default.nix | 7 ++----- pkgs/applications/office/jameica/default.nix | 9 ++------- pkgs/by-name/jo/jogl/package.nix | 9 ++------- pkgs/development/libraries/freetts/default.nix | 8 ++------ pkgs/tools/typesetting/fop/default.nix | 8 ++------ 6 files changed, 12 insertions(+), 36 deletions(-) diff --git a/pkgs/applications/misc/mkgmap/default.nix b/pkgs/applications/misc/mkgmap/default.nix index ee0c2043a6b4..7f97818c7452 100644 --- a/pkgs/applications/misc/mkgmap/default.nix +++ b/pkgs/applications/misc/mkgmap/default.nix @@ -6,6 +6,7 @@ , jre , ant , makeWrapper +, stripJavaArchivesHook , doCheck ? true , withExamples ? false }: @@ -30,10 +31,6 @@ stdenv.mkDerivation rec { ]; postPatch = with deps; '' - # Fix the output jar timestamps for reproducibility - substituteInPlace build.xml \ - --replace-fail ' build/classes/mkgmap-version.properties << EOF @@ -61,7 +58,7 @@ stdenv.mkDerivation rec { '') testInputs} ''; - nativeBuildInputs = [ jdk ant makeWrapper ]; + nativeBuildInputs = [ jdk ant makeWrapper stripJavaArchivesHook ]; buildPhase = '' runHook preBuild diff --git a/pkgs/applications/misc/mkgmap/splitter/default.nix b/pkgs/applications/misc/mkgmap/splitter/default.nix index 010b140e9bf9..801af789d47d 100644 --- a/pkgs/applications/misc/mkgmap/splitter/default.nix +++ b/pkgs/applications/misc/mkgmap/splitter/default.nix @@ -6,6 +6,7 @@ , jre , ant , makeWrapper +, stripJavaArchivesHook , doCheck ? true }: let @@ -30,10 +31,6 @@ stdenv.mkDerivation rec { ]; postPatch = with deps; '' - # Fix the output jar timestamps for reproducibility - substituteInPlace build.xml \ - --replace-fail ' build/classes/splitter-version.properties << EOF @@ -58,7 +55,7 @@ stdenv.mkDerivation rec { '') testInputs} ''; - nativeBuildInputs = [ jdk ant makeWrapper ]; + nativeBuildInputs = [ jdk ant makeWrapper stripJavaArchivesHook ]; buildPhase = '' runHook preBuild diff --git a/pkgs/applications/office/jameica/default.nix b/pkgs/applications/office/jameica/default.nix index 683d51bf43f2..66d2a80c5555 100644 --- a/pkgs/applications/office/jameica/default.nix +++ b/pkgs/applications/office/jameica/default.nix @@ -4,6 +4,7 @@ , makeDesktopItem , makeWrapper , wrapGAppsHook +, stripJavaArchivesHook , ant , jdk , jre @@ -46,13 +47,7 @@ stdenv.mkDerivation rec { hash = "sha256-MSVSd5DyVL+dcfTDv1M99hxickPwT2Pt6QGNsu6DGZI="; }; - postPatch = '' - # Fix jar timestamps for reproducibility - substituteInPlace build/build.xml \ - --replace-fail ' Date: Sun, 17 Mar 2024 13:36:02 +0100 Subject: [PATCH 06/14] bisq-desktop: use stripJavaArchivesHook --- pkgs/applications/blockchains/bisq-desktop/default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/blockchains/bisq-desktop/default.nix b/pkgs/applications/blockchains/bisq-desktop/default.nix index 8e6881f0d7e8..31c044f39c61 100644 --- a/pkgs/applications/blockchains/bisq-desktop/default.nix +++ b/pkgs/applications/blockchains/bisq-desktop/default.nix @@ -9,7 +9,7 @@ , dpkg , writeScript , bash -, strip-nondeterminism +, stripJavaArchivesHook , tor , zip , xz @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { dpkg imagemagick makeWrapper - strip-nondeterminism + stripJavaArchivesHook xz zip findutils @@ -89,7 +89,6 @@ stdenv.mkDerivation rec { tar --sort=name --mtime="@$SOURCE_DATE_EPOCH" -cJf native/linux/x64/tor.tar.xz tor tor_jar_file=$(find ./opt/bisq/lib/app -name "tor-binary-linux64-*.jar") zip -r $tor_jar_file native - strip-nondeterminism ./opt/bisq/lib/app/*.jar ''; installPhase = '' From e08f26cdb1e23f47821c32de2d03f8d114289bc0 Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Sun, 17 Mar 2024 18:52:03 +0100 Subject: [PATCH 07/14] doc: include stripJavaArchivesHook in the java section --- doc/languages-frameworks/java.section.md | 29 +++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/doc/languages-frameworks/java.section.md b/doc/languages-frameworks/java.section.md index 371bdf6323fb..0ce1442cca68 100644 --- a/doc/languages-frameworks/java.section.md +++ b/doc/languages-frameworks/java.section.md @@ -4,12 +4,31 @@ Ant-based Java packages are typically built from source as follows: ```nix stdenv.mkDerivation { - name = "..."; + pname = "..."; + version = "..."; + src = fetchurl { ... }; - nativeBuildInputs = [ jdk ant ]; + nativeBuildInputs = [ + ant + jdk + stripJavaArchivesHook # removes timestamp metadata from jar files + ]; - buildPhase = "ant"; + buildPhase = '' + runHook preBuild + ant # build the project using ant + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + # copy generated jar file(s) to an appropriate location in $out + install -Dm644 build/foo.jar $out/share/java/foo.jar + + runHook postInstall + ''; } ``` @@ -17,6 +36,10 @@ Note that `jdk` is an alias for the OpenJDK (self-built where available, or pre-built via Zulu). Platforms with OpenJDK not (yet) in Nixpkgs (`Aarch32`, `Aarch64`) point to the (unfree) `oraclejdk`. +Also note that not using `stripJavaArchivesHook` will likely cause the +generated `.jar` files to be non-deterministic, which is not optimal. +Using it, however, does not always guarantee reproducibility. + JAR files that are intended to be used by other packages should be installed in `$out/share/java`. JDKs have a stdenv setup hook that add any JARs in the `share/java` directories of the build inputs to the From 2b9c3b0a97266130e1c05db90386ada62473fe05 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Mon, 18 Mar 2024 04:20:00 +0000 Subject: [PATCH 08/14] uv: 0.1.21 -> 0.1.22 Diff: https://github.com/astral-sh/uv/compare/0.1.21...0.1.22 Changelog: https://github.com/astral-sh/uv/blob/0.1.22/CHANGELOG.md --- pkgs/by-name/uv/uv/Cargo.lock | 120 ++++++++++++++++++++++++++++++++- pkgs/by-name/uv/uv/package.nix | 4 +- 2 files changed, 120 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/uv/uv/Cargo.lock b/pkgs/by-name/uv/uv/Cargo.lock index 6c4862001d75..c9f0be4d721f 100644 --- a/pkgs/by-name/uv/uv/Cargo.lock +++ b/pkgs/by-name/uv/uv/Cargo.lock @@ -885,6 +885,15 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63dfa964fe2a66f3fde91fc70b267fe193d822c7e603e2a675a49a7f46ad3f49" +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + [[package]] name = "derivative" version = "2.2.0" @@ -1956,6 +1965,15 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "line-wrap" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f30344350a2a51da54c1d53be93fade8a237e545dbcc4bdbe635413f2117cab9" +dependencies = [ + "safemem", +] + [[package]] name = "linked-hash-map" version = "0.5.6" @@ -2168,6 +2186,12 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-traits" version = "0.2.18" @@ -2256,6 +2280,16 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "os_info" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "006e42d5b888366f1880eda20371fedde764ed2213dc8496f49622fa0c99cd5e" +dependencies = [ + "log", + "winapi", +] + [[package]] name = "overload" version = "0.1.1" @@ -2453,11 +2487,26 @@ dependencies = [ name = "platform-tags" version = "0.0.1" dependencies = [ + "insta", "rustc-hash", "serde", "thiserror", ] +[[package]] +name = "plist" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5699cc8a63d1aa2b1ee8e12b9ad70ac790d65788cd36101fa37f87ea46c4cef" +dependencies = [ + "base64 0.21.7", + "indexmap 2.2.5", + "line-wrap", + "quick-xml", + "serde", + "time", +] + [[package]] name = "png" version = "0.17.13" @@ -2486,6 +2535,12 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2683,6 +2738,15 @@ dependencies = [ "toml", ] +[[package]] +name = "quick-xml" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +dependencies = [ + "memchr", +] + [[package]] name = "quote" version = "1.0.35" @@ -3209,6 +3273,12 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +[[package]] +name = "safemem" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" + [[package]] name = "same-file" version = "1.0.6" @@ -3546,6 +3616,16 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "sys-info" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b3a0d0aba8bf96a0e1ddfdc352fc53b3df7f39318c71854910c3c4b024ae52c" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "system-configuration" version = "0.5.1" @@ -3725,6 +3805,37 @@ dependencies = [ "tikv-jemalloc-sys", ] +[[package]] +name = "time" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +dependencies = [ + "num-conv", + "time-core", +] + [[package]] name = "tiny-skia" version = "0.8.4" @@ -4198,7 +4309,7 @@ checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" [[package]] name = "uv" -version = "0.1.21" +version = "0.1.22" dependencies = [ "anstream", "anyhow", @@ -4301,6 +4412,7 @@ dependencies = [ "insta", "itertools 0.12.1", "once_cell", + "pep440_rs", "pep508_rs", "pypi-types", "pyproject-toml", @@ -4359,9 +4471,11 @@ dependencies = [ "hyper 0.14.28", "insta", "install-wheel-rs", + "os_info", "pep440_rs", "pep508_rs", "platform-tags", + "plist", "pypi-types", "reqwest", "reqwest-middleware", @@ -4374,6 +4488,7 @@ dependencies = [ "serde", "serde_json", "sha2", + "sys-info", "task-local-extensions", "tempfile", "thiserror", @@ -4386,6 +4501,7 @@ dependencies = [ "uv-auth", "uv-cache", "uv-fs", + "uv-interpreter", "uv-normalize", "uv-version", "uv-warnings", @@ -4719,7 +4835,7 @@ dependencies = [ [[package]] name = "uv-version" -version = "0.1.21" +version = "0.1.22" [[package]] name = "uv-virtualenv" diff --git a/pkgs/by-name/uv/uv/package.nix b/pkgs/by-name/uv/uv/package.nix index 57404bc33584..322a47bb761f 100644 --- a/pkgs/by-name/uv/uv/package.nix +++ b/pkgs/by-name/uv/uv/package.nix @@ -11,13 +11,13 @@ rustPlatform.buildRustPackage rec { pname = "uv"; - version = "0.1.21"; + version = "0.1.22"; src = fetchFromGitHub { owner = "astral-sh"; repo = "uv"; rev = version; - hash = "sha256-xc1+33BCycl7BJqqcQKLR9Sgg8xTRcF8P7gRIyeRIZ4="; + hash = "sha256-AbixSkwyhj3eBMLvGlodpz7XE3ln0IokNMdu5SOZjOE="; }; cargoLock = { From e1a17aaa6ddb623e06e4479e16a4c66989ad780d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 18 Mar 2024 21:05:41 +0100 Subject: [PATCH 09/14] python311Packages.aioraven: init at 0.5.2 Module for communication with RAVEn devices https://github.com/cottsay/aioraven --- .../python-modules/aioraven/default.nix | 53 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 55 insertions(+) create mode 100644 pkgs/development/python-modules/aioraven/default.nix diff --git a/pkgs/development/python-modules/aioraven/default.nix b/pkgs/development/python-modules/aioraven/default.nix new file mode 100644 index 000000000000..227e0b62becf --- /dev/null +++ b/pkgs/development/python-modules/aioraven/default.nix @@ -0,0 +1,53 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, setuptools +, pythonOlder +, iso4217 +, pyserial +, pyserial-asyncio +, pytestCheckHook +, pytest-asyncio +}: + +buildPythonPackage rec { + pname = "aioraven"; + version = "0.5.2"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "cottsay"; + repo = "aioraven"; + rev = "refs/tags/${version}"; + hash = "sha256-ysmIxWy+gufX5oUfQ7Zw5xv0t/yxihFB+eAdYAWAmXs="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + propagatedBuildInputs = [ + iso4217 + pyserial + pyserial-asyncio + ]; + + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ + "aioraven" + ]; + + meta = with lib; { + description = "Module for communication with RAVEn devices"; + homepage = "https://github.com/cottsay/aioraven"; + changelog = "https://github.com/cottsay/aioraven/blob/${version}/CHANGELOG.md"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d856a94e0847..3838f98f4d39 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -361,6 +361,8 @@ self: super: with self; { aioquic = callPackage ../development/python-modules/aioquic { }; + aioraven = callPackage ../development/python-modules/aioraven { }; + aiorecollect = callPackage ../development/python-modules/aiorecollect { }; aioredis = callPackage ../development/python-modules/aioredis { }; From 63a3c173226d093b6d98dcd75d2240a347ede32f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 18 Mar 2024 21:07:13 +0100 Subject: [PATCH 10/14] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 056e17a2be0d..ff4150806f93 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -4026,12 +4026,13 @@ aiohttp-cors aiohttp-fast-url-dispatcher aiohttp-zlib-ng + aioraven fnv-hash-fast psutil-home-assistant pyserial pyudev sqlalchemy - ]; # missing inputs: aioraven + ]; "rainmachine" = ps: with ps; [ regenmaschine ]; @@ -6396,6 +6397,7 @@ "radiotherm" "rainbird" "rainforest_eagle" + "rainforest_raven" "rainmachine" "random" "rapt_ble" From 6a81e942197db880e4ed08a33d7643eb6295ccc6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 18 Mar 2024 22:09:16 +0100 Subject: [PATCH 11/14] ospd-openvas: refactor --- pkgs/tools/security/ospd-openvas/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/security/ospd-openvas/default.nix b/pkgs/tools/security/ospd-openvas/default.nix index 104bd1d4ae28..82afa1e0fec1 100644 --- a/pkgs/tools/security/ospd-openvas/default.nix +++ b/pkgs/tools/security/ospd-openvas/default.nix @@ -6,7 +6,7 @@ python3.pkgs.buildPythonApplication rec { pname = "ospd-openvas"; version = "22.7.0"; - format = "pyproject"; + pyproject = true; src = fetchFromGitHub { owner = "greenbone"; From 43a95e15bf814cb26f70271c0f555e1dcfb99bda Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 18 Mar 2024 22:42:09 +0100 Subject: [PATCH 12/14] pre2k: source is now tagged --- pkgs/by-name/pr/pre2k/package.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/pr/pre2k/package.nix b/pkgs/by-name/pr/pre2k/package.nix index 59353d9806ed..4865269b5565 100644 --- a/pkgs/by-name/pr/pre2k/package.nix +++ b/pkgs/by-name/pr/pre2k/package.nix @@ -5,14 +5,14 @@ python3.pkgs.buildPythonApplication rec { pname = "pre2k"; - version = "3.0-unstable-2024-03-14"; + version = "3.0"; pyproject = true; src = fetchFromGitHub { owner = "garrettfoster13"; repo = "pre2k"; - rev = "3baa7b73aedd45f52e417210081da3dd010c1b22"; - hash = "sha256-0lgH7Z9LuiZwODdFvKWcqS1TV02aVjzD9RgOhX0lU6s="; + rev = "refs/tags/${version}"; + hash = "sha256-z1ttuRos7x/zdWiYYozxWzRarFExd4W5rUYAEiUMugU="; }; pythonRelaxDeps = [ @@ -42,6 +42,7 @@ python3.pkgs.buildPythonApplication rec { meta = with lib; { description = "Tool to query for the existence of pre-windows 2000 computer objects"; homepage = "https://github.com/garrettfoster13/pre2k"; + changelog = "https://github.com/garrettfoster13/pre2k/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ fab ]; mainProgram = "pre2k"; From 3d0504758b52688c4d60c034b99ad86f6363c557 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 19 Mar 2024 02:21:52 +0000 Subject: [PATCH 13/14] python312Packages.tatsu: 5.11.3 -> 5.12.0 --- pkgs/development/python-modules/tatsu/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/tatsu/default.nix b/pkgs/development/python-modules/tatsu/default.nix index 7769c3b298a4..69b17a826fb5 100644 --- a/pkgs/development/python-modules/tatsu/default.nix +++ b/pkgs/development/python-modules/tatsu/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "tatsu"; - version = "5.11.3"; + version = "5.12.0"; pyproject = true; disabled = pythonOlder "3.10"; @@ -19,7 +19,7 @@ buildPythonPackage rec { owner = "neogeny"; repo = "TatSu"; rev = "refs/tags/v${version}"; - hash = "sha256-5tVvElM7pZF3rZJMMk0IIZBhiv+9J8KBLjfoVTPF198="; + hash = "sha256-55sTUqNwfWg5h9msByq2RuVx/z23ST7p7pA/ZsIeYr8="; }; nativeBuildInputs = [ From 922cc816758a2340dcab5b7ad6e4d95fcb3f2ab6 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 19 Mar 2024 02:24:09 +0000 Subject: [PATCH 14/14] python312Packages.yalexs: 2.0.0 -> 3.0.0 --- pkgs/development/python-modules/yalexs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/yalexs/default.nix b/pkgs/development/python-modules/yalexs/default.nix index 4f515f9b7bbb..2111d5fa4d6b 100644 --- a/pkgs/development/python-modules/yalexs/default.nix +++ b/pkgs/development/python-modules/yalexs/default.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { pname = "yalexs"; - version = "2.0.0"; + version = "3.0.0"; pyproject = true; disabled = pythonOlder "3.9"; @@ -27,7 +27,7 @@ buildPythonPackage rec { owner = "bdraco"; repo = "yalexs"; rev = "refs/tags/v${version}"; - hash = "sha256-ozohIzw80YfyB0sxXQ9MY6VpF+EDDvXZYfkpuloE4AU="; + hash = "sha256-hY46hUUmbQUWmI+Oa9qIQ1rZdXT5daGo1Vd5JRKfDHE="; }; postPatch = ''