2020-02-02 21:37:57 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, help2man, xrandr }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "mons";
|
2020-10-14 19:22:56 +02:00
|
|
|
version = "20200320";
|
2020-02-02 21:37:57 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Ventto";
|
|
|
|
repo = pname;
|
2020-10-14 19:22:56 +02:00
|
|
|
rev = "375bbba3aa700c8b3b33645a7fb70605c8b0ff0c";
|
|
|
|
sha256 = "19r5y721yrxhd9jp99s29jjvm0p87vl6xfjlcj38bljq903f21cl";
|
2020-02-02 21:37:57 +01:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2021-02-27 22:21:04 +01:00
|
|
|
patches = [
|
|
|
|
# Substitute xrandr path with @xrandr@ so we can replace it with
|
|
|
|
# real path in substituteInPlace
|
|
|
|
./xrandr.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace mons.sh --replace '@xrandr@' '${xrandr}/bin/xrandr'
|
|
|
|
'';
|
|
|
|
|
2020-02-02 21:37:57 +01:00
|
|
|
nativeBuildInputs = [ help2man ];
|
2020-10-14 19:22:56 +02:00
|
|
|
makeFlags = [
|
|
|
|
"DESTDIR=$(out)"
|
|
|
|
"PREFIX="
|
|
|
|
];
|
2020-02-02 21:37:57 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "POSIX Shell script to quickly manage 2-monitors display";
|
|
|
|
homepage = "https://github.com/Ventto/mons.git";
|
|
|
|
license = licenses.mit;
|
2021-02-27 21:53:44 +01:00
|
|
|
maintainers = with maintainers; [ mschneider thiagokokada ];
|
2020-02-02 21:37:57 +01:00
|
|
|
};
|
|
|
|
}
|