about summary refs log tree commit diff
path: root/pkgs/build-support/fetchdebianpatch/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/fetchdebianpatch/default.nix')
-rw-r--r--pkgs/build-support/fetchdebianpatch/default.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/build-support/fetchdebianpatch/default.nix b/pkgs/build-support/fetchdebianpatch/default.nix
index c1230484f82b0..ba6aa63a732b6 100644
--- a/pkgs/build-support/fetchdebianpatch/default.nix
+++ b/pkgs/build-support/fetchdebianpatch/default.nix
@@ -1,13 +1,14 @@
 { lib, fetchpatch }:
 
 lib.makeOverridable (
-  { pname, version, debianRevision ? null, name, hash, area ? "main" }:
+  { pname, version, debianRevision ? null, patch, hash,
+    area ? "main", name ? "${patch}.patch" }:
   let versionString =
     if debianRevision == null then version else "${version}-${debianRevision}";
   in fetchpatch {
+    inherit name hash;
     url =
       "https://sources.debian.org/data/${area}/${builtins.substring 0 1 pname}/"
-      + "${pname}/${versionString}/debian/patches/${name}.patch";
-    inherit hash;
+      + "${pname}/${versionString}/debian/patches/${patch}.patch";
   }
 )