]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Repackage slang correctly
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Sat, 24 Oct 2020 10:42:50 +0000 (12:42 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Sat, 24 Oct 2020 10:42:50 +0000 (12:42 +0200)
pkgs/slang_1/default.nix

index b3842f7c8e579244b779a534ecd0ee77e2a23aab..cd626e0ea1cfcc1290647de609a5215f21a560b4 100644 (file)
@@ -6,16 +6,17 @@ stdenv.mkDerivation rec {
     url = "ftp://space.mit.edu/pub/davis/slang/v1.4/slang-1.4.9.tar.gz";
     sha256 = "1y2mg0whqh4b3acd0k17i4biz55bimxg8aaxhmwd165cvspxns9r";
   };
-  patches = [
-    (fetchpatch {
-      url = "http://archive.debian.org/debian-archive/debian-amd64/pool/main/s/slang/slang_1.4.9dbs-8.diff.gz";
-      sha256 = "0xdq14k5ynqfwpmis1rcggs7m4n921i3bs27icbmbhfg5gb2hap2";
-    })
-  ];
-  preConfigure = ''
+  debian_patches = fetchurl {
+    url = "http://archive.debian.org/debian-archive/debian-amd64/pool/main/s/slang/slang_1.4.9dbs-8.diff.gz";
+    sha256 = "0xdq14k5ynqfwpmis1rcggs7m4n921i3bs27icbmbhfg5gb2hap2";
+  };
+  patchPhase = ''
+    gunzip -c ${debian_patches} | patch -p1
     for i in debian/patches/*; do
       patch -p1 < $i
     done
+  '';
+  preConfigure = ''
     makeFlagsArray=(CFLAGS=" -g -O2 -fno-strength-reduce -DUTF8 -D_REENTRANT -D_XOPEN_SOURCE=500")
     '';
   postBuild = ''