about summary refs log tree commit diff
path: root/pkgs/tools/misc/autorandr/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/misc/autorandr/default.nix')
-rw-r--r--pkgs/tools/misc/autorandr/default.nix19
1 files changed, 13 insertions, 6 deletions
diff --git a/pkgs/tools/misc/autorandr/default.nix b/pkgs/tools/misc/autorandr/default.nix
index deb915c9a5e1..46c056ef0c00 100644
--- a/pkgs/tools/misc/autorandr/default.nix
+++ b/pkgs/tools/misc/autorandr/default.nix
@@ -1,29 +1,36 @@
 { fetchgit
 , stdenv
 , enableXRandr ? true, xrandr ? null
-, enableDisper ? false, disper ? null
+, enableDisper ? true, disper ? null
+, python
 , xdpyinfo }:
 
 assert enableXRandr -> xrandr != null;
 assert enableDisper -> disper != null;
 
 let
-  rev = "4f5e2401ef";
+  # Revision and date taken from the legacy tree, which still
+  # supports disper:
+  # https://github.com/phillipberndt/autorandr/tree/legacy
+  rev = "59f6aec0bb72e26751ce285d079e085b7178e45d";
+  date = "20150127";
 in
   stdenv.mkDerivation {
-    name = "autorandr-${rev}";
+    name = "autorandr-${date}";
 
     src = fetchgit {
       inherit rev;
-      url = "https://github.com/wertarbyte/autorandr.git";
-      sha256 = "1x8agg6mf5jr0imw7dznr8kxyw970bf252bda9q7b0z4yksya2zd"; 
+      url = "https://github.com/phillipberndt/autorandr.git";
+      sha256 = "0mnggsp42477kbzwwn65gi8y0rydk10my9iahikvs6n43lphfa1f";
     };
 
     patchPhase = ''
       substituteInPlace "autorandr" \
         --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"
+        --replace "/usr/bin/xdpyinfo" "${xdpyinfo}/bin/xdpyinfo" \
+        --replace "which xxd" "false" \
+        --replace "python" "${python}/bin/python"
     '';
 
     installPhase = ''