mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:33:03 +03:00
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 New Issue
Block a user