Skip to content

Commit

Permalink
Merge pull request #173812 from azahi/setroot
Browse files Browse the repository at this point in the history
setroot: fix build
  • Loading branch information
Artturin authored May 22, 2022
2 parents 3efe723 + 91198c9 commit a1bd563
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions pkgs/tools/X11/setroot/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{ lib, stdenv, fetchFromGitHub, libX11, imlib2
, enableXinerama ? true, libXinerama ? null
{ lib, stdenv, fetchFromGitHub, libX11, imlib2, pkg-config, fetchpatch
, enableXinerama ? true, libXinerama
}:

assert enableXinerama -> libXinerama != null;

stdenv.mkDerivation rec {
version = "2.0.2";
pname = "setroot";
Expand All @@ -15,12 +13,21 @@ stdenv.mkDerivation rec {
sha256 = "0w95828v0splk7bj5kfacp4pq6wxpyamvyjmahyvn5hc3ycq21mq";
};

patches = [
(fetchpatch {
url = "https://github.com/ttzhou/setroot/commit/d8ff8edd7d7594d276d741186bf9ccf0bce30277.patch";
sha256 = "sha256-e0iMSpiOmTOpQnp599fjH2UCPU4Oq1VKXcVypVoR9hw=";
})
];

nativeBuildInputs = [ pkg-config ];

buildInputs = [ libX11 imlib2 ]
++ lib.optional enableXinerama libXinerama;
++ lib.optionals enableXinerama [ libXinerama ];

buildFlags = [ "CC=${stdenv.cc.targetPrefix}cc" (if enableXinerama then "xinerama=1" else "xinerama=0") ] ;
buildFlags = [ (if enableXinerama then "xinerama=1" else "xinerama=0") ] ;

installFlags = [ "DESTDIR=$(out)" "PREFIX=" ];
installFlags = [ "PREFIX=$(out)" ];

meta = with lib; {
description = "Simple X background setter inspired by imlibsetroot and feh";
Expand Down

0 comments on commit a1bd563

Please sign in to comment.