diff --git a/pkgs/os-specific/linux/projecteur/default.nix b/pkgs/os-specific/linux/projecteur/default.nix index 1ee127f15b80..30ae0ba4543d 100644 --- a/pkgs/os-specific/linux/projecteur/default.nix +++ b/pkgs/os-specific/linux/projecteur/default.nix @@ -1,6 +1,6 @@ { lib, - mkDerivation, + stdenv, fetchFromGitHub, cmake, pkg-config, @@ -8,24 +8,21 @@ qtgraphicaleffects, wrapQtAppsHook, udevCheckHook, + versionCheckHook, }: -mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "projecteur"; version = "0.10"; src = fetchFromGitHub { owner = "jahnf"; repo = "Projecteur"; - rev = "v${version}"; + tag = "v${finalAttrs.version}"; fetchSubmodules = false; hash = "sha256-F7o93rBjrDTmArTIz8RB/uGBOYE6ny/U7ppk+jEhM5A="; }; - postPatch = '' - sed '1i#include ' -i src/device.h # gcc12 - ''; - buildInputs = [ qtbase qtgraphicaleffects @@ -38,14 +35,16 @@ mkDerivation rec { udevCheckHook ]; - doInstallCheck = true; - cmakeFlags = [ "-DCMAKE_INSTALL_PREFIX:PATH=${placeholder "out"}" "-DPACKAGE_TARGETS=OFF" "-DCMAKE_INSTALL_UDEVRULESDIR=${placeholder "out"}/lib/udev/rules.d" ]; + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgramArg = "--version"; + meta = { description = "Linux/X11 application for the Logitech Spotlight device (and similar devices)"; homepage = "https://github.com/jahnf/Projecteur"; @@ -56,4 +55,4 @@ mkDerivation rec { ]; platforms = lib.platforms.linux; }; -} +})