btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / vr / vrrtest / package.nix
blob7a8e93a4f373ddf664770b264dfd8555641fb96c
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , makeWrapper
5 , zip
6 , love
7 }:
9 stdenv.mkDerivation (finalAttrs: {
10   pname = "vrrtest";
11   version = "2.1.0";
13   src = fetchFromGitHub {
14     owner = "Nixola";
15     repo = "VRRTest";
16     rev = "v${finalAttrs.version}";
17     hash = "sha256-esyD+BpdnB8miUrIjV6P8Lho1xztmhLDnKxdQKW8GXc=";
18   };
20   nativeBuildInputs = [ makeWrapper ];
22   buildInputs = [ zip ];
24   buildPhase = ''
25     runHook preBuild
26     zip -9 -r vrrtest.love .
27     runHook postBuild
28   '';
30   installPhase = ''
31     runHook preInstall
32     install -Dm444 -t $out/share/ vrrtest.love
33     makeWrapper ${love}/bin/love $out/bin/vrrtest \
34       --add-flags $out/share/vrrtest.love
35     runHook postInstall
36   '';
38   meta = with lib; {
39     description = "Tool testing variable refresh rates";
40     homepage = "https://github.com/Nixola/VRRTest";
41     license = licenses.zlib;
42     mainProgram = "vrrtest";
43     maintainers = with maintainers; [ justinlime ];
44     inherit (love.meta) platforms;
45   };