nixpkgs/pkgs/tools/X11/libstrangle/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
1.0 KiB
Nix
Raw Normal View History

2021-01-09 16:02:57 +00:00
{ lib, stdenv, fetchFromGitLab, libGL, libX11 }:
2019-07-15 18:11:55 +00:00
stdenv.mkDerivation rec {
pname = "libstrangle";
version = "unstable-202202022";
2019-07-15 18:11:55 +00:00
2021-01-09 16:02:57 +00:00
buildInputs = [ libGL libX11 ];
src = fetchFromGitLab {
owner = "torkel104";
2019-07-15 18:11:55 +00:00
repo = pname;
rev = "0273e318e3b0cc759155db8729ad74266b74cb9b";
sha256 = "sha256-h10QA7m7hIQHq1g/vCYuZsFR2NVbtWBB46V6OWP5wgM=";
2019-07-15 18:11:55 +00:00
};
makeFlags = [ "prefix=" "DESTDIR=$(out)" ];
patches = [
./nixos.patch
];
2019-07-15 18:11:55 +00:00
postPatch = ''
substituteAllInPlace src/strangle.sh
2021-01-09 16:02:57 +00:00
substituteAllInPlace src/stranglevk.sh
2019-07-15 18:11:55 +00:00
'';
postInstall = ''
substituteInPlace $out/share/vulkan/implicit_layer.d/libstrangle_vk.json \
--replace "libstrangle_vk.so" "$out/lib/libstrangle/lib64/libstrangle_vk.so"
'';
2019-07-15 18:11:55 +00:00
meta = with lib; {
2021-01-09 16:02:57 +00:00
homepage = "https://gitlab.com/torkel104/libstrangle";
2019-07-15 18:11:55 +00:00
description = "Frame rate limiter for Linux/OpenGL";
license = licenses.gpl3;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ aske ];
2021-04-27 17:45:51 +00:00
mainProgram = "strangle";
2019-07-15 18:11:55 +00:00
};
}