summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2018-12-16 17:48:58 +0000
committerJörg Thalheim <joerg@thalheim.io>2018-12-16 17:48:58 +0000
commitb6180444e701de6ff09289192c257e832138d0a3 (patch)
tree1168a0c2cf900e7ff3b517dc6d1af9b7193f09f3 /pkgs/tools
parent9c56e3e21c7c08310da496dae7ee7fc4d8b1f543 (diff)
downloadnixpkgs-b6180444e701de6ff09289192c257e832138d0a3.tar
nixpkgs-b6180444e701de6ff09289192c257e832138d0a3.tar.gz
nixpkgs-b6180444e701de6ff09289192c257e832138d0a3.tar.bz2
nixpkgs-b6180444e701de6ff09289192c257e832138d0a3.tar.lz
nixpkgs-b6180444e701de6ff09289192c257e832138d0a3.tar.xz
nixpkgs-b6180444e701de6ff09289192c257e832138d0a3.tar.zst
nixpkgs-b6180444e701de6ff09289192c257e832138d0a3.zip
unclutter-xfixes: simplify build
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/misc/unclutter-xfixes/default.nix36
1 files changed, 7 insertions, 29 deletions
diff --git a/pkgs/tools/misc/unclutter-xfixes/default.nix b/pkgs/tools/misc/unclutter-xfixes/default.nix
index 31087dbf7eb..5e1661a6a29 100644
--- a/pkgs/tools/misc/unclutter-xfixes/default.nix
+++ b/pkgs/tools/misc/unclutter-xfixes/default.nix
@@ -2,12 +2,10 @@
   xlibsWrapper, libev, libXi, libXfixes,
   pkgconfig, asciidoc, libxslt, docbook_xsl }:
 
-let version = "1.4"; in
+stdenv.mkDerivation rec {
+  pname = "unclutter-xfixes";
+  version = "1.4";
 
-stdenv.mkDerivation {
-  name = "unclutter-xfixes-${version}";
-  version = version;
-  
   src = fetchFromGitHub {
     owner = "Airblader";
     repo = "unclutter-xfixes";
@@ -15,32 +13,12 @@ stdenv.mkDerivation {
     sha256 = "0anny6hvwf5nh7ghgi4gdcywhwyhgfvqvp7fjhm59kjc3qxnwf96";
   };
 
-  nativeBuildInputs = [pkgconfig];
-  buildInputs = [
-    xlibsWrapper libev libXi libXfixes
-    asciidoc libxslt docbook_xsl
-  ];
+  nativeBuildInputs = [ pkgconfig asciidoc libxslt docbook_xsl ];
+  buildInputs = [ xlibsWrapper libev libXi libXfixes ];
 
-  postPatch = ''
-    substituteInPlace Makefile --replace "CC = gcc" "CC = cc"
-  '';
+  makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
 
-  preBuild = ''
-    # The Makefile calls git only to discover the package version,
-    # but that doesn't work right in the build environment,
-    # so we fake it.
-    git() { echo v${version}; }
-    export -f git
-  '';
-
-  preInstall = ''
-    export DESTDIR=$out MANDIR=/man/man1
-  '';
-  
-  postInstall = ''
-    mv $out/usr/bin $out/bin
-    mv $out/usr/share/man $out/man
-  '';
+  installFlags = [ "PREFIX=$(out)" ];
 
   meta = with stdenv.lib; {
     description = "Rewrite of unclutter using the X11 Xfixes extension";