blob: dd13a0d9adce58dbe46307e6fa5bc47dfdfc8fe1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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;
};
}
|