lol

setroot: fix build

+14 -7
+14 -7
pkgs/tools/X11/setroot/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, libX11, imlib2 2 - , enableXinerama ? true, libXinerama ? null 1 + { lib, stdenv, fetchFromGitHub, libX11, imlib2, pkg-config, fetchpatch 2 + , enableXinerama ? true, libXinerama 3 3 }: 4 - 5 - assert enableXinerama -> libXinerama != null; 6 4 7 5 stdenv.mkDerivation rec { 8 6 version = "2.0.2"; ··· 15 13 sha256 = "0w95828v0splk7bj5kfacp4pq6wxpyamvyjmahyvn5hc3ycq21mq"; 16 14 }; 17 15 16 + patches = [ 17 + (fetchpatch { 18 + url = "https://github.com/ttzhou/setroot/commit/d8ff8edd7d7594d276d741186bf9ccf0bce30277.patch"; 19 + sha256 = "sha256-e0iMSpiOmTOpQnp599fjH2UCPU4Oq1VKXcVypVoR9hw="; 20 + }) 21 + ]; 22 + 23 + nativeBuildInputs = [ pkg-config ]; 24 + 18 25 buildInputs = [ libX11 imlib2 ] 19 - ++ lib.optional enableXinerama libXinerama; 26 + ++ lib.optionals enableXinerama [ libXinerama ]; 20 27 21 - buildFlags = [ "CC=${stdenv.cc.targetPrefix}cc" (if enableXinerama then "xinerama=1" else "xinerama=0") ] ; 28 + buildFlags = [ (if enableXinerama then "xinerama=1" else "xinerama=0") ] ; 22 29 23 - installFlags = [ "DESTDIR=$(out)" "PREFIX=" ]; 30 + installFlags = [ "PREFIX=$(out)" ]; 24 31 25 32 meta = with lib; { 26 33 description = "Simple X background setter inspired by imlibsetroot and feh";