From ff517c4db75510b978d3d4cbcad2a700ce680af6 Mon Sep 17 00:00:00 2001 From: c0bw3b Date: Sat, 22 Jan 2022 18:54:31 +0100 Subject: [PATCH] imlibsetroot: adapt to Imlib2 v1.7.5 imlib2-config is gone imlibsetroot.c license header is actually MIT-advertising --- .../graphics/imlibsetroot/default.nix | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/graphics/imlibsetroot/default.nix b/pkgs/applications/graphics/imlibsetroot/default.nix index d3640a656f13..110a7e513e32 100644 --- a/pkgs/applications/graphics/imlibsetroot/default.nix +++ b/pkgs/applications/graphics/imlibsetroot/default.nix @@ -9,20 +9,27 @@ stdenv.mkDerivation { }; buildInputs = [ libX11 imlib2 libXinerama ]; + buildPhase = '' - gcc -g imlibsetroot.c -o imlibsetroot \ - `imlib2-config --cflags` `imlib2-config --libs` \ - -I/include/X11/extensions -lXinerama -lX11 + runHook preBuild + + gcc -g imlibsetroot.c -o imlibsetroot \ + -I${imlib2.dev}/include -L${imlib2}/lib -lImlib2 \ + -I${libX11.dev}/include -lXinerama -lX11 + + runHook postBuild ''; + installPhase = '' - mkdir -p $out/bin - install -m 755 imlibsetroot $out/bin + runHook preInstall + install -D -m 0755 imlibsetroot -t $out/bin + runHook postInstall ''; meta = with lib; { description = "A Xinerama Aware Background Changer"; homepage = "http://robotmonkeys.net/2010/03/30/imlibsetroot/"; - license = licenses.gpl2; + license = licenses.mitAdvertising; platforms = platforms.linux; maintainers = with maintainers; [ dwarfmaster ]; };