forked from mirrors/nixpkgs
autorandr: make the dependencies on xrandr and disper configurable by enableX params
This commit is contained in:
parent
cd902179db
commit
683310e05e
|
@ -1,4 +1,11 @@
|
|||
{ fetchgit, stdenv, disper ? null, xrandr, xdpyinfo }:
|
||||
{ fetchgit
|
||||
, stdenv
|
||||
, enableXRandr ? true, xrandr ? null
|
||||
, enableDisper ? false, disper ? null
|
||||
, xdpyinfo }:
|
||||
|
||||
assert enableXRandr -> xrandr != null;
|
||||
assert enableDisper -> disper != null;
|
||||
|
||||
let
|
||||
rev = "4f5e2401ef";
|
||||
|
@ -13,11 +20,9 @@ in
|
|||
|
||||
patchPhase = ''
|
||||
substituteInPlace "autorandr" \
|
||||
--replace "/usr/bin/xrandr" "${xrandr}/bin/xrandr" \
|
||||
--replace "/usr/bin/xrandr" "${if enableXRandr then xrandr else "/nowhere"}/bin/xrandr" \
|
||||
--replace "/usr/bin/disper" "${if enableDisper then disper else "/nowhere"}/bin/disper" \
|
||||
--replace "/usr/bin/xdpyinfo" "${xdpyinfo}/bin/xdpyinfo"
|
||||
'' + stdenv.lib.optionalString (disper != null) ''
|
||||
substituteInPlace "autorandr"
|
||||
--replace "/usr/bin/disper" "${disper}/bin/disper"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
|
|
@ -497,7 +497,6 @@ let
|
|||
|
||||
autorandr = callPackage ../tools/misc/autorandr {
|
||||
inherit (xorg) xrandr xdpyinfo;
|
||||
disper = null;
|
||||
};
|
||||
|
||||
avahi = callPackage ../development/libraries/avahi {
|
||||
|
|
Loading…
Reference in a new issue