summary refs log tree commit diff
path: root/pkgs/tools/X11
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/X11')
-rw-r--r--pkgs/tools/X11/imwheel/default.nix13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/tools/X11/imwheel/default.nix b/pkgs/tools/X11/imwheel/default.nix
index f33e15e59cc..efed00f9639 100644
--- a/pkgs/tools/X11/imwheel/default.nix
+++ b/pkgs/tools/X11/imwheel/default.nix
@@ -10,10 +10,15 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ libX11 libXext libXi libXmu libXt libXtst ];
 
-  postPatch = ''
-    substituteInPlace Makefile.in --replace "ETCDIR = " "ETCDIR = $out"
-    substituteInPlace util.c --replace "/etc/X11/imwheel" "$out/etc/X11/imwheel"
-  '';
+  makeFlags = [
+    "sysconfdir=/etc"
+    "ETCDIR=/etc"
+  ];
+
+  installFlags = [
+    "sysconfdir=${placeholder "out"}/etc"
+    "ETCDIR=${placeholder "out"}/etc"
+  ];
 
   meta = with stdenv.lib; {
     homepage = "http://imwheel.sourceforge.net/";