Merge pull request #26296 from gnidorah/master3
autorandr: 855c18b -> 1.1
This commit is contained in:
commit
fbe658eea0
|
@ -22,19 +22,9 @@ in {
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.autorandr ];
|
environment.systemPackages = [ pkgs.autorandr ];
|
||||||
|
|
||||||
# systemd.unitPackages = [ pkgs.autorandr ];
|
systemd.packages = [ pkgs.autorandr ];
|
||||||
|
|
||||||
systemd.services.autorandr = {
|
systemd.services.autorandr = {
|
||||||
unitConfig = {
|
|
||||||
Description = "autorandr execution hook";
|
|
||||||
After = [ "sleep.target" ];
|
|
||||||
StartLimitInterval = "5";
|
|
||||||
StartLimitBurst = "1";
|
|
||||||
};
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = "${pkgs.autorandr}/bin/autorandr --batch --change --default default";
|
|
||||||
Type = "oneshot";
|
|
||||||
RemainAfterExit = false;
|
|
||||||
};
|
|
||||||
wantedBy = [ "sleep.target" ];
|
wantedBy = [ "sleep.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -6,48 +6,41 @@
|
||||||
let
|
let
|
||||||
python = python3Packages.python;
|
python = python3Packages.python;
|
||||||
wrapPython = python3Packages.wrapPython;
|
wrapPython = python3Packages.wrapPython;
|
||||||
date = "2017-01-22";
|
version = "1.1";
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "autorandr-unstable-${date}";
|
name = "autorandr-${version}";
|
||||||
|
|
||||||
buildInputs = [ python wrapPython ];
|
buildInputs = [ python ];
|
||||||
|
|
||||||
phases = [ "unpackPhase" "installPhase" ];
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
make install TARGETS='autorandr' PREFIX=$out
|
make install TARGETS='autorandr' PREFIX=$out
|
||||||
wrapPythonProgramsIn $out/bin/autorandr $out
|
|
||||||
|
|
||||||
make install TARGETS='bash_completion' DESTDIR=$out
|
make install TARGETS='bash_completion' DESTDIR=$out
|
||||||
|
|
||||||
make install TARGETS='autostart_config' PREFIX=$out DESTDIR=$out
|
make install TARGETS='autostart_config' PREFIX=$out DESTDIR=$out
|
||||||
|
|
||||||
${if false then ''
|
${if systemd != null then ''
|
||||||
# breaks systemd-udev-settle during boot so disabled
|
|
||||||
make install TARGETS='systemd udev' PREFIX=$out DESTDIR=$out \
|
make install TARGETS='systemd udev' PREFIX=$out DESTDIR=$out \
|
||||||
SYSTEMD_UNIT_DIR=/lib/systemd/system \
|
SYSTEMD_UNIT_DIR=/lib/systemd/system \
|
||||||
UDEV_RULES_DIR=/etc/udev/rules.d
|
UDEV_RULES_DIR=/etc/udev/rules.d
|
||||||
substituteInPlace $out/etc/udev/rules.d/40-monitor-hotplug.rules \
|
substituteInPlace $out/etc/udev/rules.d/40-monitor-hotplug.rules \
|
||||||
--replace /bin "${systemd}/bin"
|
--replace /bin/systemctl "${systemd}/bin/systemctl"
|
||||||
'' else if systemd != null then ''
|
|
||||||
make install TARGETS='systemd' PREFIX=$out DESTDIR=$out \
|
|
||||||
SYSTEMD_UNIT_DIR=/lib/systemd/system
|
|
||||||
make install TARGETS='udev' PREFIX=$out DESTDIR=$out \
|
|
||||||
UDEV_RULES_DIR=/etc/udev/rules.d
|
|
||||||
'' else ''
|
'' else ''
|
||||||
make install TARGETS='pmutils' DESTDIR=$out \
|
make install TARGETS='pmutils' DESTDIR=$out \
|
||||||
PM_SLEEPHOOKS_DIR=/lib/pm-utils/sleep.d
|
PM_SLEEPHOOKS_DIR=/lib/pm-utils/sleep.d
|
||||||
make install TARGETS='udev' PREFIX=$out DESTDIR=$out \
|
make install TARGETS='udev' PREFIX=$out DESTDIR=$out \
|
||||||
UDEV_RULES_DIR=/etc/udev/rules.d
|
UDEV_RULES_DIR=/etc/udev/rules.d
|
||||||
''}
|
''}
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "phillipberndt";
|
owner = "phillipberndt";
|
||||||
repo = "autorandr";
|
repo = "autorandr";
|
||||||
rev = "855c18b7f2cfd364d6f085d4301b5b98ba6e572a";
|
rev = "${version}";
|
||||||
sha256 = "1yp1gns3lwa8796cb7par9czkc9i7paap2fkzf7wj6zqlkgjdvv0";
|
sha256 = "05jlzxlrdyd4j90srr71fv91c2hf32diw40n9rmybgcdvy45kygd";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
Loading…
Reference in New Issue