autorandr: add autorandr an automatic display configuration selector

This commit is contained in:
Jonas Hoersch 2013-09-25 00:10:59 +02:00
parent 6fc9f0ee91
commit cd902179db
2 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,34 @@
{ fetchgit, stdenv, disper ? null, xrandr, xdpyinfo }:
let
rev = "4f5e2401ef";
in
stdenv.mkDerivation {
name = "autorandr-${rev}";
src = fetchgit {
inherit rev;
url = "https://github.com/wertarbyte/autorandr.git";
};
patchPhase = ''
substituteInPlace "autorandr" \
--replace "/usr/bin/xrandr" "${xrandr}/bin/xrandr" \
--replace "/usr/bin/xdpyinfo" "${xdpyinfo}/bin/xdpyinfo"
'' + stdenv.lib.optionalString (disper != null) ''
substituteInPlace "autorandr"
--replace "/usr/bin/disper" "${disper}/bin/disper"
'';
installPhase = ''
mkdir -p "$out/etc/bash_completion.d"
cp -v bash_completion/autorandr "$out/etc/bash_completion.d"
mkdir -p "$out/bin"
cp -v autorandr auto-disper $out/bin
'';
meta = {
description = "Autorandr, automatic display configuration selector based on connected devices";
homepage = https://github.com/wertarbyte/autorandr;
};
}

View file

@ -495,6 +495,11 @@ let
autojump = callPackage ../tools/misc/autojump { };
autorandr = callPackage ../tools/misc/autorandr {
inherit (xorg) xrandr xdpyinfo;
disper = null;
};
avahi = callPackage ../development/libraries/avahi {
qt4Support = config.avahi.qt4Support or false;
};