diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/package-management/protontricks/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/package-management/protontricks/default.nix | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/tools/package-management/protontricks/default.nix b/nixpkgs/pkgs/tools/package-management/protontricks/default.nix index c8413c56854..c2bdf327124 100644 --- a/nixpkgs/pkgs/tools/package-management/protontricks/default.nix +++ b/nixpkgs/pkgs/tools/package-management/protontricks/default.nix @@ -1,18 +1,31 @@ { stdenv, lib, buildPythonApplication, fetchFromGitHub -, vdf, wine, winetricks, zenity +, setuptools_scm, vdf +, wine, winetricks, zenity +, pytest }: buildPythonApplication rec { pname = "protontricks"; - version = "1.3.1"; + version = "1.4.1"; src = fetchFromGitHub { owner = "Matoking"; repo = pname; rev = version; - sha256 = "0snhm9r5igik030iqxm3zd9zvhlnsxi20zac71bbc29qflsi2dhk"; + sha256 = "083ncg6yjd7s3dx91zd52w166x709mnxknwwr78ggka8d8vlyi0b"; }; + # Fix interpreter in mock run.sh for tests + postPatch = '' + substituteInPlace tests/conftest.py \ + --replace '#!/bin/bash' '#!${stdenv.shell}' \ + ''; + + preBuild = '' + export SETUPTOOLS_SCM_PRETEND_VERSION="${version}" + ''; + + nativeBuildInputs = [ setuptools_scm ]; propagatedBuildInputs = [ vdf ]; # The wine install shipped with Proton must run under steam's @@ -24,12 +37,12 @@ buildPythonApplication rec { "--set STEAM_RUNTIME 0" "--set-default WINE ${wine}/bin/wine" "--set-default WINESERVER ${wine}/bin/wineserver" - "--prefix PATH : ${lib.makeBinPath [ - (winetricks.override { inherit wine; }) - zenity - ]}" + "--prefix PATH : ${lib.makeBinPath [ winetricks zenity ]}" ]; + checkInputs = [ pytest ]; + checkPhase = "pytest"; + meta = with stdenv.lib; { description = "A simple wrapper for running Winetricks commands for Proton-enabled games"; homepage = https://github.com/Matoking/protontricks; |