Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 libX11, 6 imlib2, 7 pkg-config, 8 fetchpatch, 9 enableXinerama ? true, 10 libXinerama, 11}: 12 13stdenv.mkDerivation rec { 14 version = "2.0.2"; 15 pname = "setroot"; 16 17 src = fetchFromGitHub { 18 owner = "ttzhou"; 19 repo = "setroot"; 20 rev = "v${version}"; 21 sha256 = "0w95828v0splk7bj5kfacp4pq6wxpyamvyjmahyvn5hc3ycq21mq"; 22 }; 23 24 patches = [ 25 (fetchpatch { 26 url = "https://github.com/ttzhou/setroot/commit/d8ff8edd7d7594d276d741186bf9ccf0bce30277.patch"; 27 sha256 = "sha256-e0iMSpiOmTOpQnp599fjH2UCPU4Oq1VKXcVypVoR9hw="; 28 }) 29 ]; 30 31 nativeBuildInputs = [ pkg-config ]; 32 33 buildInputs = [ 34 libX11 35 imlib2 36 ] 37 ++ lib.optionals enableXinerama [ libXinerama ]; 38 39 buildFlags = [ (if enableXinerama then "xinerama=1" else "xinerama=0") ]; 40 41 installFlags = [ "PREFIX=$(out)" ]; 42 43 meta = with lib; { 44 description = "Simple X background setter inspired by imlibsetroot and feh"; 45 homepage = "https://github.com/ttzhou/setroot"; 46 license = licenses.gpl3Plus; 47 maintainers = [ maintainers.vyp ]; 48 platforms = platforms.unix; 49 mainProgram = "setroot"; 50 }; 51}