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