summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlvar <geistesk@users.noreply.github.com>2020-04-22 13:37:42 +0000
committergeistesk <github.jyf300hj@0x21.biz>2020-04-22 21:17:24 +0200
commit50b213a45e819d7f04d574789db34d1c0ebe2b65 (patch)
treebd9cea19d62272d95ae8be784ca1ec50f41fbe13
parent81902419ddb83f4d3cbe1750317ce1669e2ca73e (diff)
downloadnixpkgs-50b213a45e819d7f04d574789db34d1c0ebe2b65.tar
nixpkgs-50b213a45e819d7f04d574789db34d1c0ebe2b65.tar.gz
nixpkgs-50b213a45e819d7f04d574789db34d1c0ebe2b65.tar.bz2
nixpkgs-50b213a45e819d7f04d574789db34d1c0ebe2b65.tar.lz
nixpkgs-50b213a45e819d7f04d574789db34d1c0ebe2b65.tar.xz
nixpkgs-50b213a45e819d7f04d574789db34d1c0ebe2b65.tar.zst
nixpkgs-50b213a45e819d7f04d574789db34d1c0ebe2b65.zip
Revert "st: copy config file in 'prePatch' instead of 'preBuild'"
Also change the custom config generation to the postPatch phase.
-rw-r--r--pkgs/applications/misc/st/default.nix5
1 files changed, 2 insertions, 3 deletions
diff --git a/pkgs/applications/misc/st/default.nix b/pkgs/applications/misc/st/default.nix
index 33924bdb7be..bb3c57a5990 100644
--- a/pkgs/applications/misc/st/default.nix
+++ b/pkgs/applications/misc/st/default.nix
@@ -13,9 +13,8 @@ stdenv.mkDerivation rec {
 
   inherit patches;
 
-  prePatch = optionalString (conf != null) ''
-    cp ${writeText "config.def.h" conf} config.def.h
-  '';
+  configFile = optionalString (conf!=null) (writeText "config.def.h" conf);
+  postPatch = optionalString (conf!=null) "cp ${configFile} config.def.h";
 
   nativeBuildInputs = [ pkgconfig ncurses ];
   buildInputs = [ libX11 libXft ] ++ extraLibs;