forked from mirrors/nixpkgs
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
37 lines
1 KiB
Nix
37 lines
1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, xorg, boost, cmake, gtest }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "xlayoutdisplay";
|
|
version = "1.1.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "alex-courtis";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "0n3vg25gzwn1pcg6caxyyd1xf2w6n98m6jpxc70kqpxfqldxwl0m";
|
|
};
|
|
|
|
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);'
|
|
|
|
substituteInPlace CMakeLists.txt --replace "set(Boost_USE_STATIC_LIBS ON)" ""
|
|
'';
|
|
|
|
meta = with 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;
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|