2013-09-26 12:12:01 +01:00
|
|
|
{ fetchgit
|
|
|
|
, stdenv
|
2016-11-26 20:27:44 +00:00
|
|
|
, python3Packages
|
|
|
|
, fetchFromGitHub }:
|
2013-09-24 23:10:59 +01:00
|
|
|
|
|
|
|
let
|
2016-11-26 20:27:44 +00:00
|
|
|
python = python3Packages.python;
|
|
|
|
wrapPython = python3Packages.wrapPython;
|
|
|
|
date = "2016-11-23";
|
2013-09-24 23:10:59 +01:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2016-11-26 20:27:44 +00:00
|
|
|
name = "autorandr-unstable-${date}";
|
2013-09-24 23:10:59 +01:00
|
|
|
|
2016-11-26 20:27:44 +00:00
|
|
|
buildInputs = [ python wrapPython ];
|
2013-09-24 23:10:59 +01:00
|
|
|
|
2016-11-26 20:27:44 +00:00
|
|
|
phases = [ "unpackPhase" "installPhase" ];
|
2013-09-24 23:10:59 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2016-11-26 20:27:44 +00:00
|
|
|
# install bash completions
|
|
|
|
mkdir -p $out/bin $out/libexec $out/etc/bash_completion.d
|
|
|
|
cp -v contrib/bash_completion/autorandr $out/etc/bash_completion.d
|
|
|
|
|
|
|
|
# install autorandr bin
|
|
|
|
cp autorandr.py $out/bin/autorandr
|
|
|
|
wrapPythonProgramsIn $out/bin/autorandr $out
|
2013-09-24 23:10:59 +01:00
|
|
|
'';
|
|
|
|
|
2016-11-26 20:27:44 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "phillipberndt";
|
|
|
|
repo = "autorandr";
|
|
|
|
rev = "53d29f99275aebf14240ea95f2d7022b305738d5";
|
|
|
|
sha256 = "0pza4wfkzv7mmg2m4pf3n8wk0p7cy6bfqknn8ywz51r8ja16cqfj";
|
|
|
|
};
|
|
|
|
|
2013-09-24 23:10:59 +01:00
|
|
|
meta = {
|
2016-11-26 20:27:44 +00:00
|
|
|
homepage = "http://github.com/phillipberndt/autorandr/";
|
|
|
|
description = "Auto-detect the connect display hardware and load the appropiate X11 setup using xrandr";
|
|
|
|
license = stdenv.lib.licenses.gpl3Plus;
|
2014-04-23 13:26:16 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.coroa ];
|
2016-08-02 18:50:55 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2013-09-24 23:10:59 +01:00
|
|
|
};
|
|
|
|
}
|