depot/third_party/nixpkgs/pkgs/tools/package-management/protontricks/default.nix
Default email 88abffb7d2 Project import generated by Copybara.
GitOrigin-RevId: bc9b956714ed6eac5f8888322aac5bc41389defa
2021-09-18 12:52:07 +02:00

65 lines
1.4 KiB
Nix

{ lib
, buildPythonApplication
, fetchFromGitHub
, setuptools-scm
, setuptools
, vdf
, bash
, steam-run
, winetricks
, yad
, pytestCheckHook
}:
buildPythonApplication rec {
pname = "protontricks";
version = "1.6.0";
src = fetchFromGitHub {
owner = "Matoking";
repo = pname;
rev = version;
hash = "sha256-sbYIqVsuDZ2Htb6SVIe/gBA1UIvUzu4fjTjWQ7k1WFs=";
};
patches = [
# Use steam-run to run Proton binaries
./steam-run.patch
];
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [
setuptools # implicit dependency, used to find data/icon_placeholder.png
vdf
];
makeWrapperArgs = [
"--prefix PATH : ${lib.makeBinPath [
bash
steam-run
winetricks
yad
]}"
];
checkInputs = [ pytestCheckHook ];
# From 1.6.0 release notes (https://github.com/Matoking/protontricks/releases/tag/1.6.0):
# In most cases the script is unnecessary and should be removed as part of the packaging process.
postInstall = ''
rm "$out/bin/protontricks-desktop-install"
'';
pythonImportsCheck = [ "protontricks" ];
meta = with lib; {
description = "A simple wrapper for running Winetricks commands for Proton-enabled games";
homepage = "https://github.com/Matoking/protontricks";
license = licenses.gpl3Only;
maintainers = with maintainers; [ kira-bruneau ];
platforms = [ "x86_64-linux" "i686-linux" ];
};
}