nixpkgs/pkgs/tools/misc/autorandr/default.nix

43 lines
1.2 KiB
Nix
Raw Normal View History

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