2013-09-26 13:12:01 +02:00
|
|
|
{ fetchgit
|
|
|
|
, stdenv
|
2016-11-26 21:27:44 +01:00
|
|
|
, python3Packages
|
|
|
|
, fetchFromGitHub }:
|
2013-09-25 00:10:59 +02:00
|
|
|
|
|
|
|
let
|
2016-11-26 21:27:44 +01:00
|
|
|
python = python3Packages.python;
|
|
|
|
wrapPython = python3Packages.wrapPython;
|
|
|
|
date = "2016-11-23";
|
2013-09-25 00:10:59 +02:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2016-11-26 21:27:44 +01:00
|
|
|
name = "autorandr-unstable-${date}";
|
2013-09-25 00:10:59 +02:00
|
|
|
|
2016-11-26 21:27:44 +01:00
|
|
|
buildInputs = [ python wrapPython ];
|
2013-09-25 00:10:59 +02:00
|
|
|
|
2016-11-26 21:27:44 +01:00
|
|
|
phases = [ "unpackPhase" "installPhase" ];
|
2013-09-25 00:10:59 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
2016-11-26 21:27:44 +01: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-25 00:10:59 +02:00
|
|
|
'';
|
|
|
|
|
2016-11-26 21:27:44 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "phillipberndt";
|
|
|
|
repo = "autorandr";
|
|
|
|
rev = "53d29f99275aebf14240ea95f2d7022b305738d5";
|
|
|
|
sha256 = "0pza4wfkzv7mmg2m4pf3n8wk0p7cy6bfqknn8ywz51r8ja16cqfj";
|
|
|
|
};
|
|
|
|
|
2013-09-25 00:10:59 +02:00
|
|
|
meta = {
|
2016-11-26 21:27:44 +01: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 14:26:16 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.coroa ];
|
2016-08-02 19:50:55 +02:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2013-09-25 00:10:59 +02:00
|
|
|
};
|
|
|
|
}
|