nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 pkg-config,
6 libX11,
7 libXft,
8 libXinerama,
9 libXpm,
10}:
11
12stdenv.mkDerivation rec {
13 pname = "dzen2";
14 version = "0.9.5";
15
16 nativeBuildInputs = [ pkg-config ];
17 buildInputs = [
18 libX11
19 libXft
20 libXinerama
21 libXpm
22 ];
23
24 src = fetchurl {
25 url = "https://github.com/robm/dzen/tarball/master/dzen2-${version}git.tar.gz";
26 sha256 = "d4f7943cd39dc23fd825eb684b49dc3484860fa8443d30b06ee38af72a53b556";
27 };
28
29 patchPhase = ''
30 CFLAGS=" -Wall -Os ''${INCS} -DVERSION=\"''${VERSION}\" -DDZEN_XINERAMA -DDZEN_XPM -DDZEN_XFT `pkg-config --cflags xft`"
31 LIBS=" -L/usr/lib -lc -lXft -lXpm -lXinerama -lX11"
32 echo "CFLAGS=$CFLAGS" >>config.mk
33 echo "LIBS=$LIBS" >>config.mk
34 echo "LDFLAGS=$LIBS" >>config.mk
35 substituteInPlace config.mk --replace /usr/local "$out"
36 substituteInPlace gadgets/config.mk --replace /usr/local "$out"
37 '';
38
39 buildPhase = ''
40 mkdir -p $out/bin $out/man/man1
41 make clean install
42 cd gadgets
43 make clean install
44 '';
45
46 meta = {
47 homepage = "https://github.com/robm/dzen";
48 license = lib.licenses.mit;
49 description = "X notification utility";
50 platforms = lib.platforms.linux;
51 };
52}