From 3ed22708d0c54e646d4990ca76a24977013766a0 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Fri, 9 Jun 2023 19:41:56 -0400 Subject: [PATCH 01/16] fetchfirefoxaddon: formatting Had some inconsistent spacing, so ran against nixpkgs-fmt and also split fn args into multiple lines for simpler diffs. --- .../fetchfirefoxaddon/default.nix | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/pkgs/build-support/fetchfirefoxaddon/default.nix b/pkgs/build-support/fetchfirefoxaddon/default.nix index fe9ff5c469ba..3ef344a209a4 100644 --- a/pkgs/build-support/fetchfirefoxaddon/default.nix +++ b/pkgs/build-support/fetchfirefoxaddon/default.nix @@ -1,7 +1,12 @@ -{stdenv, unzip, jq, zip, fetchurl,writeScript, ...}: +{ stdenv +, fetchurl +, jq +, unzip +, writeScript +, zip +}: -{ - name +{ name , url ? null , md5 ? "" , sha1 ? "" @@ -14,7 +19,8 @@ let extid = if fixedExtid == null then "nixos@${name}" else fixedExtid; - source = if url == null then src else fetchurl { + source = if url == null then src else + fetchurl { url = url; inherit md5 sha1 sha256 sha512 hash; }; @@ -40,5 +46,10 @@ stdenv.mkDerivation { zip -r -q -FS "$out/$UUID.xpi" * rm -r "$out/$UUID" ''; - nativeBuildInputs = [ unzip zip jq ]; + + nativeBuildInputs = [ + jq + unzip + zip + ]; } From 2e02abd798f741887ab4e5983c29e1c22f754c9b Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Fri, 9 Jun 2023 19:45:50 -0400 Subject: [PATCH 02/16] fetchfirefoxaddon: make reproducible --- pkgs/build-support/fetchfirefoxaddon/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/build-support/fetchfirefoxaddon/default.nix b/pkgs/build-support/fetchfirefoxaddon/default.nix index 3ef344a209a4..41eaa550ea27 100644 --- a/pkgs/build-support/fetchfirefoxaddon/default.nix +++ b/pkgs/build-support/fetchfirefoxaddon/default.nix @@ -1,6 +1,7 @@ { stdenv , fetchurl , jq +, strip-nondeterminism , unzip , writeScript , zip @@ -44,11 +45,13 @@ stdenv.mkDerivation { echo "$NEW_MANIFEST" > "$out/$UUID/manifest.json" cd "$out/$UUID" zip -r -q -FS "$out/$UUID.xpi" * + strip-nondeterminism "$out/$UUID.xpi" rm -r "$out/$UUID" ''; nativeBuildInputs = [ jq + strip-nondeterminism unzip zip ]; From 54d8532f40d7ccd47c3ace56ba0fda4276778fc1 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Fri, 9 Jun 2023 23:40:13 -0400 Subject: [PATCH 03/16] bisq-desktop: formatting --- pkgs/applications/blockchains/bisq-desktop/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/blockchains/bisq-desktop/default.nix b/pkgs/applications/blockchains/bisq-desktop/default.nix index 36bc0ebfb883..1151b06792c5 100644 --- a/pkgs/applications/blockchains/bisq-desktop/default.nix +++ b/pkgs/applications/blockchains/bisq-desktop/default.nix @@ -41,7 +41,14 @@ stdenv.mkDerivation rec { sha256 = "0jisxzajsc4wfvxabvfzd0x9y1fxzg39fkhap1781q7wyi4ry9kd"; }; - nativeBuildInputs = [ makeWrapper copyDesktopItems imagemagick dpkg zip xz ]; + nativeBuildInputs = [ + copyDesktopItems + dpkg + imagemagick + makeWrapper + xz + zip + ]; desktopItems = [ (makeDesktopItem { From d634a6244fa5d9ce035bcd6fc7604f1b062a81be Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Fri, 9 Jun 2023 23:40:32 -0400 Subject: [PATCH 04/16] bisq-desktop: make reproducible --- pkgs/applications/blockchains/bisq-desktop/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/blockchains/bisq-desktop/default.nix b/pkgs/applications/blockchains/bisq-desktop/default.nix index 1151b06792c5..46f6b57859c2 100644 --- a/pkgs/applications/blockchains/bisq-desktop/default.nix +++ b/pkgs/applications/blockchains/bisq-desktop/default.nix @@ -9,6 +9,7 @@ , dpkg , writeScript , bash +, strip-nondeterminism , tor , zip , xz @@ -46,6 +47,7 @@ stdenv.mkDerivation rec { dpkg imagemagick makeWrapper + strip-nondeterminism xz zip ]; @@ -71,8 +73,9 @@ stdenv.mkDerivation rec { mkdir -p native/linux/x64/ cp ${bisq-tor} ./tor - tar -cJf native/linux/x64/tor.tar.xz tor + tar --sort=name --mtime="@$SOURCE_DATE_EPOCH" -cJf native/linux/x64/tor.tar.xz tor zip -r opt/bisq/lib/app/desktop-${version}-all.jar native + strip-nondeterminism opt/bisq/lib/app/desktop-${version}-all.jar ''; installPhase = '' From 90427d2381a5293ca377be7306c5e3cecb69a255 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Sat, 10 Jun 2023 01:21:40 -0400 Subject: [PATCH 05/16] pcsx2: formatting --- pkgs/applications/emulators/pcsx2/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/emulators/pcsx2/default.nix b/pkgs/applications/emulators/pcsx2/default.nix index 953fd3a3daa2..015f12cdac28 100644 --- a/pkgs/applications/emulators/pcsx2/default.nix +++ b/pkgs/applications/emulators/pcsx2/default.nix @@ -58,7 +58,12 @@ stdenv.mkDerivation rec { "-DDISABLE_BUILD_DATE=TRUE" ]; - nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook zip ]; + nativeBuildInputs = [ + cmake + pkg-config + wrapQtAppsHook + zip + ]; buildInputs = [ curl From 199cc23afee9a574a440ae4916f4112baac61234 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Fri, 9 Jun 2023 23:49:31 -0400 Subject: [PATCH 06/16] pcsx2: make reproducible --- pkgs/applications/emulators/pcsx2/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/applications/emulators/pcsx2/default.nix b/pkgs/applications/emulators/pcsx2/default.nix index 015f12cdac28..517f4356a012 100644 --- a/pkgs/applications/emulators/pcsx2/default.nix +++ b/pkgs/applications/emulators/pcsx2/default.nix @@ -23,6 +23,7 @@ , rapidyaml , SDL2 , soundtouch +, strip-nondeterminism , vulkan-headers , vulkan-loader , wayland @@ -61,6 +62,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config + strip-nondeterminism wrapQtAppsHook zip ]; @@ -100,6 +102,7 @@ stdenv.mkDerivation rec { install -Dm644 $src/.github/workflows/scripts/linux/pcsx2-qt.desktop $out/share/applications/PCSX2.desktop zip -jq $out/bin/resources/patches.zip ${pcsx2_patches}/patches/* + strip-nondeterminism $out/bin/resources/patches.zip ''; qtWrapperArgs = [ From 2db2887d2fc6205fe9a66a49b46b05fd059e44d9 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Fri, 9 Jun 2023 23:51:44 -0400 Subject: [PATCH 07/16] slimmerjs: formatting --- pkgs/development/tools/slimerjs/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/slimerjs/default.nix b/pkgs/development/tools/slimerjs/default.nix index 7ebe7dba8512..e15e84b3a4bc 100644 --- a/pkgs/development/tools/slimerjs/default.nix +++ b/pkgs/development/tools/slimerjs/default.nix @@ -1,4 +1,11 @@ -{ lib, stdenv, fetchFromGitHub, zip, unzip, firefox, bash }: +{ lib +, bash +, fetchFromGitHub +, firefox +, stdenv +, unzip +, zip +}: stdenv.mkDerivation rec { pname = "slimerjs"; From 013dde9275cde07ae9d6993c11372606004c98db Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Sat, 10 Jun 2023 00:17:58 -0400 Subject: [PATCH 08/16] slimmerjs: make reproducible --- pkgs/development/tools/slimerjs/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/slimerjs/default.nix b/pkgs/development/tools/slimerjs/default.nix index e15e84b3a4bc..f800dedf615f 100644 --- a/pkgs/development/tools/slimerjs/default.nix +++ b/pkgs/development/tools/slimerjs/default.nix @@ -2,6 +2,7 @@ , bash , fetchFromGitHub , firefox +, strip-nondeterminism , stdenv , unzip , zip @@ -19,7 +20,10 @@ stdenv.mkDerivation rec { }; buildInputs = [ zip ]; - nativeBuildInputs = [ unzip ]; + nativeBuildInputs = [ + strip-nondeterminism + unzip + ]; preConfigure = '' test -d src && cd src @@ -27,6 +31,7 @@ stdenv.mkDerivation rec { ''; installPhase = '' + strip-nondeterminism --type zip omni.ja mkdir -p "$out"/{bin,share/doc/slimerjs,lib/slimerjs} cp LICENSE README* "$out/share/doc/slimerjs" cp -r * "$out/lib/slimerjs" From bf818c857f12d97570fe11e48de55a28ec434cf3 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Fri, 9 Jun 2023 23:57:00 -0400 Subject: [PATCH 09/16] mari0: formatting --- pkgs/games/mari0/default.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/pkgs/games/mari0/default.nix b/pkgs/games/mari0/default.nix index 9541b97476c1..864e015e54a3 100644 --- a/pkgs/games/mari0/default.nix +++ b/pkgs/games/mari0/default.nix @@ -1,5 +1,12 @@ -{ lib, stdenv, fetchFromGitHub, zip, love, makeWrapper, makeDesktopItem -, copyDesktopItems }: +{ lib +, copyDesktopItems +, fetchFromGitHub +, love +, makeDesktopItem +, makeWrapper +, stdenv +, zip +}: stdenv.mkDerivation rec { pname = "mari0"; @@ -12,7 +19,11 @@ stdenv.mkDerivation rec { sha256 = "1zqaq4w599scsjvy1rsb21fd2r8j3srx9vym4ir9bh666dp36gxa"; }; - nativeBuildInputs = [ makeWrapper copyDesktopItems zip ]; + nativeBuildInputs = [ + copyDesktopItems + makeWrapper + zip + ]; desktopItems = [ (makeDesktopItem { From aea09ca7070ba1339c021cd55f3c743d4731af65 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Sat, 10 Jun 2023 00:18:14 -0400 Subject: [PATCH 10/16] mari0: make reproducible --- pkgs/games/mari0/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/games/mari0/default.nix b/pkgs/games/mari0/default.nix index 864e015e54a3..6e644245c4fb 100644 --- a/pkgs/games/mari0/default.nix +++ b/pkgs/games/mari0/default.nix @@ -5,6 +5,7 @@ , makeDesktopItem , makeWrapper , stdenv +, strip-nondeterminism , zip }: @@ -22,6 +23,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ copyDesktopItems makeWrapper + strip-nondeterminism zip ]; @@ -39,6 +41,7 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall zip -9 -r mari0.love ./* + strip-nondeterminism --type zip mari0.love install -Dm444 -t $out/share/games/lovegames/ mari0.love makeWrapper ${love}/bin/love $out/bin/mari0 \ --add-flags $out/share/games/lovegames/mari0.love From c0a48fcaf5f2fee3ecc1d4512210c868543c6de3 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Sat, 10 Jun 2023 00:21:02 -0400 Subject: [PATCH 11/16] orthorobot: formatting --- pkgs/games/orthorobot/default.nix | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/pkgs/games/orthorobot/default.nix b/pkgs/games/orthorobot/default.nix index 5fc11d212514..e6ee3bcb4e08 100644 --- a/pkgs/games/orthorobot/default.nix +++ b/pkgs/games/orthorobot/default.nix @@ -1,5 +1,14 @@ -{ lib, stdenv, fetchurl, fetchFromGitHub, love, zip, fetchpatch, makeWrapper -, makeDesktopItem, copyDesktopItems }: +{ lib +, copyDesktopItems +, fetchFromGitHub +, fetchpatch +, fetchurl +, love +, makeDesktopItem +, makeWrapper +, stdenv +, zip +}: stdenv.mkDerivation rec { pname = "orthorobot"; @@ -29,7 +38,11 @@ stdenv.mkDerivation rec { }) ]; - nativeBuildInputs = [ makeWrapper zip copyDesktopItems ]; + nativeBuildInputs = [ + copyDesktopItems + makeWrapper + zip + ]; patches = [ # support for love11 From a7b2dbf48d537997ccfe64fe5786c5c4338a4b29 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Sat, 10 Jun 2023 00:24:27 -0400 Subject: [PATCH 12/16] orthorobot: make reproducible --- pkgs/games/orthorobot/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/games/orthorobot/default.nix b/pkgs/games/orthorobot/default.nix index e6ee3bcb4e08..6ca70596458d 100644 --- a/pkgs/games/orthorobot/default.nix +++ b/pkgs/games/orthorobot/default.nix @@ -7,6 +7,7 @@ , makeDesktopItem , makeWrapper , stdenv +, strip-nondeterminism , zip }: @@ -41,6 +42,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ copyDesktopItems makeWrapper + strip-nondeterminism zip ]; @@ -55,6 +57,7 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall zip -9 -r orthorobot.love ./* + strip-nondeterminism --type zip orthorobot.love install -Dm444 -t $out/share/games/lovegames/ orthorobot.love makeWrapper ${love}/bin/love $out/bin/orthorobot \ --add-flags $out/share/games/lovegames/orthorobot.love From 34e6a8b4a1d7f7dddd7f6faf9727da59de526acb Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Sat, 10 Jun 2023 00:24:55 -0400 Subject: [PATCH 13/16] wireworld: formatting --- pkgs/games/wireworld/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/games/wireworld/default.nix b/pkgs/games/wireworld/default.nix index 5528b52a280a..b12e21bfb6e5 100644 --- a/pkgs/games/wireworld/default.nix +++ b/pkgs/games/wireworld/default.nix @@ -19,7 +19,11 @@ stdenv.mkDerivation rec { hash = "sha256-8BshnGLuA8lmG9g7FU349DWKP/fZvlvjrQBau/LSJ4E="; }; - nativeBuildInputs = [ makeWrapper copyDesktopItems zip ]; + nativeBuildInputs = [ + copyDesktopItems + makeWrapper + zip + ]; desktopItems = [ (makeDesktopItem { From 059f9dc3c0f654f53779f0d4364911a31c216286 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Sat, 10 Jun 2023 00:26:13 -0400 Subject: [PATCH 14/16] wireworld: make reproducible --- pkgs/games/wireworld/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/games/wireworld/default.nix b/pkgs/games/wireworld/default.nix index b12e21bfb6e5..828d313d2a87 100644 --- a/pkgs/games/wireworld/default.nix +++ b/pkgs/games/wireworld/default.nix @@ -6,6 +6,7 @@ , makeWrapper , makeDesktopItem , copyDesktopItems +, strip-nondeterminism }: stdenv.mkDerivation rec { @@ -22,6 +23,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ copyDesktopItems makeWrapper + strip-nondeterminism zip ]; @@ -39,6 +41,7 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall zip -9 -r Wireworld.love ./* + strip-nondeterminism --type zip Wireworld.love install -Dm444 -t $out/share/games/lovegames/ Wireworld.love makeWrapper ${love}/bin/love $out/bin/Wireworld \ --add-flags $out/share/games/lovegames/Wireworld.love From 24eb37f2a8d3514ad840eaff99e4dc4ca5baf876 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Sat, 10 Jun 2023 00:31:52 -0400 Subject: [PATCH 15/16] pridefetch: formatting --- pkgs/tools/misc/pridefetch/default.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/pridefetch/default.nix b/pkgs/tools/misc/pridefetch/default.nix index 80fd1b0e9bc2..24169b413437 100644 --- a/pkgs/tools/misc/pridefetch/default.nix +++ b/pkgs/tools/misc/pridefetch/default.nix @@ -1,4 +1,11 @@ -{ lib, stdenv, fetchFromGitHub, python3, zip }: let +{ lib +, fetchFromGitHub +, python3 +, stdenv +, zip +}: + +let version = "1.1.0"; sha256 = "sha256-563xOz63vto19yuaHtReV1dSw6BgNf+CLtS3lrPnaoc="; @@ -9,16 +16,21 @@ rev = "v" + version; inherit sha256; }; -in stdenv.mkDerivation { +in + +stdenv.mkDerivation { inherit pname version src; + nativeBuildInputs = [ zip ]; + buildInputs = [ (python3.withPackages (pythonPackages: with pythonPackages; [ distro ])) ]; + buildPhase = '' runHook preBuild pushd src @@ -28,6 +40,7 @@ in stdenv.mkDerivation { rm pridefetch.zip runHook postBuild ''; + installPhase = '' runHook preInstall mkdir -p $out/bin @@ -35,6 +48,7 @@ in stdenv.mkDerivation { chmod +x $out/bin/pridefetch runHook postInstall ''; + meta = with lib; { description = "Print out system statistics with pride flags"; longDescription = '' From b06a89a01ccf2ef8175e24b1ea58f33d7d594176 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Sat, 10 Jun 2023 00:43:00 -0400 Subject: [PATCH 16/16] pridefetch: make reproducible --- pkgs/tools/misc/pridefetch/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/tools/misc/pridefetch/default.nix b/pkgs/tools/misc/pridefetch/default.nix index 24169b413437..22e5c7a0afb2 100644 --- a/pkgs/tools/misc/pridefetch/default.nix +++ b/pkgs/tools/misc/pridefetch/default.nix @@ -2,6 +2,7 @@ , fetchFromGitHub , python3 , stdenv +, strip-nondeterminism , zip }: @@ -22,6 +23,7 @@ stdenv.mkDerivation { inherit pname version src; nativeBuildInputs = [ + strip-nondeterminism zip ]; @@ -35,6 +37,7 @@ stdenv.mkDerivation { runHook preBuild pushd src zip -r ../pridefetch.zip ./* + strip-nondeterminism ../pridefetch.zip popd echo '#!/usr/bin/env python' | cat - pridefetch.zip > pridefetch rm pridefetch.zip