diff --git a/lib/nix-patches/default.nix b/lib/nix-patches/default.nix index fb6d40b..7a6f402 100644 --- a/lib/nix-patches/default.nix +++ b/lib/nix-patches/default.nix @@ -14,12 +14,15 @@ rec { { pkgs }: rec { mkUrlPatch = - attrs: + { + hash ? null, + ... + }@attrs: pkgs.fetchpatch ( { - hash = pkgs.lib.fakeHash; + hash = if hash == null then pkgs.lib.fakeHash else hash; } - // attrs + // (builtins.removeAttrs attrs [ "hash" ]) // (pkgs.lib.optionalAttrs (excludeGitHubManual && !(builtins.hasAttr "includes" attrs)) { excludes = (attrs.excludes or [ ]) ++ [ "nixos/doc/manual/*" ]; }) diff --git a/patches/default.nix b/patches/default.nix index 1d7ad1a..ee43201 100644 --- a/patches/default.nix +++ b/patches/default.nix @@ -7,6 +7,7 @@ let _type = "static"; inherit path; }; + npr = id: hash: { inherit id hash; }; in { @@ -16,16 +17,16 @@ in "nixos-24.11" = [ # nixos/nextcloud: Rename autocreate (a no-op) to verify_bucket_exists - { - id = "275165"; - hash = "sha256-9a26V3Pi8yLD3N9+mC1kvJoruxRTp/qOHapnt6VX7pw="; - } + (npr 275165 "sha256-9a26V3Pi8yLD3N9+mC1kvJoruxRTp/qOHapnt6VX7pw=") # Crabfit: don't depend on all google-fonts (local ./nixpkgs/03-crabfit-karla.patch) # netbox qrcode plugin (local ./nixpkgs/06-netbox-qrcode.patch) + + # Fix pretix tests + (npr 374822 "sha256-vM6l8Pb6F5HoZrpG4Ay3DdwwHBbv8MQy2Bo4gfiQ5zM=") ]; "nixos-unstable" = [