summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorJaka Hudoklin <jakahudoklin@gmail.com>2016-08-24 23:46:08 +0200
committerGitHub <noreply@github.com>2016-08-24 23:46:08 +0200
commitdcebe6f8ccb9ac8902ed0ae813f179823a6d8199 (patch)
treefa68350041997503ab2ff9fa14994d1dbf2a16ce /pkgs/tools
parentb0b02c848d6aabae0536bdcd370b26c6932326e6 (diff)
parentffb3f0396c238b87bbb798f4d851291a1b0fda15 (diff)
downloadnixlib-dcebe6f8ccb9ac8902ed0ae813f179823a6d8199.tar
nixlib-dcebe6f8ccb9ac8902ed0ae813f179823a6d8199.tar.gz
nixlib-dcebe6f8ccb9ac8902ed0ae813f179823a6d8199.tar.bz2
nixlib-dcebe6f8ccb9ac8902ed0ae813f179823a6d8199.tar.lz
nixlib-dcebe6f8ccb9ac8902ed0ae813f179823a6d8199.tar.xz
nixlib-dcebe6f8ccb9ac8902ed0ae813f179823a6d8199.tar.zst
nixlib-dcebe6f8ccb9ac8902ed0ae813f179823a6d8199.zip
Merge pull request #17712 from mbrock/unclutter-xfixes
unclutter-xfixes: init at 1.2
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/misc/unclutter-xfixes/default.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/tools/misc/unclutter-xfixes/default.nix b/pkgs/tools/misc/unclutter-xfixes/default.nix
new file mode 100644
index 000000000000..dd13a0d9adce
--- /dev/null
+++ b/pkgs/tools/misc/unclutter-xfixes/default.nix
@@ -0,0 +1,51 @@
+{ stdenv, fetchFromGitHub,
+  xlibsWrapper, libev, libXi, libXfixes,
+  pkgconfig, asciidoc, libxslt, docbook_xsl }:
+
+let version = "1.2"; in
+
+stdenv.mkDerivation {
+  name = "unclutter-xfixes-${version}";
+  version = version;
+  
+  src = fetchFromGitHub {
+    owner = "Airblader";
+    repo = "unclutter-xfixes";
+    rev = "v${version}";
+    sha256 = "1pw567mj7mq5kr8mqnyrvy7jj62qfg6zgqfyzz21nncslddnjzg8";
+  };
+
+  nativeBuildInputs = [pkgconfig];
+  buildInputs = [
+    xlibsWrapper libev libXi libXfixes
+    asciidoc libxslt docbook_xsl
+  ];
+
+  postPatch = ''
+    substituteInPlace Makefile --replace "CC = gcc" "CC = 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
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Rewrite of unclutter using the X11 Xfixes extension";
+    platforms = platforms.unix;
+    license = stdenv.lib.licenses.mit;
+    inherit version;
+  };
+}