2019-01-29 14:07:53 +01:00
|
|
|
{ stdenv, fetchFromGitHub, xorg, boost, cmake, gtest }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-04-26 23:11:03 +02:00
|
|
|
pname = "xlayoutdisplay";
|
2019-11-16 07:47:15 +01:00
|
|
|
version = "1.1.1";
|
2019-01-29 14:07:53 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alex-courtis";
|
2019-04-26 23:11:03 +02:00
|
|
|
repo = pname;
|
2019-01-29 14:07:53 +01:00
|
|
|
rev = "v${version}";
|
2019-11-16 07:47:15 +01:00
|
|
|
sha256 = "0ldqbwsryy7mqhxywdn2c2yi1mzlnl39sw8p3vx10w6q9drya9iv";
|
2019-01-29 14:07:53 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = with xorg; [ libX11 libXrandr libXcursor boost ];
|
|
|
|
checkInputs = [ gtest ];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
# format security fixup
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace test/test-Monitors.cpp \
|
|
|
|
--replace 'fprintf(lidStateFile, contents);' \
|
|
|
|
'fputs(contents, lidStateFile);'
|
|
|
|
|
2019-04-26 23:11:03 +02:00
|
|
|
substituteInPlace CMakeLists.txt --replace "set(Boost_USE_STATIC_LIBS ON)" ""
|
2019-01-29 14:07:53 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Detects and arranges linux display outputs, using XRandR for detection and xrandr for arrangement";
|
|
|
|
homepage = https://github.com/alex-courtis/xlayoutdisplay;
|
|
|
|
maintainers = with maintainers; [ dtzWill ];
|
|
|
|
license = licenses.asl20;
|
2019-04-28 02:46:54 +02:00
|
|
|
platforms = platforms.linux;
|
2019-01-29 14:07:53 +01:00
|
|
|
};
|
|
|
|
}
|