1{ lib, stdenv, fetchurl, libX11, libXinerama, imlib2 }:
2
3stdenv.mkDerivation {
4 pname = "imlibsetroot";
5 version = "1.2";
6 src = fetchurl {
7 url = "https://robotmonkeys.net/wp-content/uploads/2010/03/imlibsetroot-12.tar.gz";
8 sha256 = "8c1b3b7c861e4d865883ec13a96b8e4ab22464a87d4e6c67255b17a88e3cfd1c";
9 };
10
11 buildInputs = [ libX11 imlib2 libXinerama ];
12
13 buildPhase = ''
14 runHook preBuild
15
16 gcc -g imlibsetroot.c -o imlibsetroot \
17 -I${imlib2.dev}/include -L${imlib2}/lib -lImlib2 \
18 -I${libX11.dev}/include -lXinerama -lX11
19
20 runHook postBuild
21 '';
22
23 installPhase = ''
24 runHook preInstall
25 install -D -m 0755 imlibsetroot -t $out/bin
26 runHook postInstall
27 '';
28
29 meta = with lib; {
30 description = "A Xinerama Aware Background Changer";
31 homepage = "http://robotmonkeys.net/2010/03/30/imlibsetroot/";
32 license = licenses.mitAdvertising;
33 platforms = platforms.linux;
34 maintainers = with maintainers; [ dwarfmaster ];
35 };
36}