summary refs log tree commit diff
path: root/pkgs/tools/misc/autorandr
diff options
context:
space:
mode:
authorJoerg Thalheim <joerg@thalheim.io>2017-10-09 23:46:40 +0100
committerJoerg Thalheim <joerg@thalheim.io>2017-10-09 23:46:40 +0100
commit3541b9a72ec155e0a36c8c924e04aebc0a2a6875 (patch)
tree2c08d244911642d8126cb3193cedfc8c267ee6cf /pkgs/tools/misc/autorandr
parenta61304e3cbc7648a7dc73e4dc5d3c0abdbf3389e (diff)
downloadnixpkgs-3541b9a72ec155e0a36c8c924e04aebc0a2a6875.tar
nixpkgs-3541b9a72ec155e0a36c8c924e04aebc0a2a6875.tar.gz
nixpkgs-3541b9a72ec155e0a36c8c924e04aebc0a2a6875.tar.bz2
nixpkgs-3541b9a72ec155e0a36c8c924e04aebc0a2a6875.tar.lz
nixpkgs-3541b9a72ec155e0a36c8c924e04aebc0a2a6875.tar.xz
nixpkgs-3541b9a72ec155e0a36c8c924e04aebc0a2a6875.tar.zst
nixpkgs-3541b9a72ec155e0a36c8c924e04aebc0a2a6875.zip
autorandr: put xrandr into PATH
Diffstat (limited to 'pkgs/tools/misc/autorandr')
-rw-r--r--pkgs/tools/misc/autorandr/default.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/tools/misc/autorandr/default.nix b/pkgs/tools/misc/autorandr/default.nix
index dc67c96ca1a..405eb29f6bf 100644
--- a/pkgs/tools/misc/autorandr/default.nix
+++ b/pkgs/tools/misc/autorandr/default.nix
@@ -1,7 +1,9 @@
 { stdenv
 , python3Packages
 , fetchFromGitHub
-, systemd }:
+, systemd
+, xrandr
+, makeWrapper }:
 
 let
   python = python3Packages.python;
@@ -12,6 +14,7 @@ in
     name = "autorandr-${version}";
 
     buildInputs = [ python ];
+    nativeBuildInputs = [ makeWrapper ];
 
     installPhase = ''
       runHook preInstall
@@ -33,9 +36,15 @@ in
         make install TARGETS='udev' PREFIX=$out DESTDIR=$out \
           UDEV_RULES_DIR=/etc/udev/rules.d
       ''}
+
       runHook postInstall
     '';
 
+    postFixup = ''
+      wrapProgram $out/bin/autorandr \
+        --prefix PATH : ${xrandr}/bin
+    '';
+
     src = fetchFromGitHub {
       owner = "phillipberndt";
       repo = "autorandr";