gamma-launcher: init at 2.5 (#430510)

This commit is contained in:
Bruno Bigras
2025-11-20 18:53:33 +00:00
committed by GitHub
4 changed files with 106 additions and 0 deletions
@@ -0,0 +1,45 @@
{
lib,
python3Packages,
fetchFromGitHub,
versionCheckHook,
}:
python3Packages.buildPythonApplication rec {
pname = "gamma-launcher";
version = "2.5";
pyproject = true;
src = fetchFromGitHub {
owner = "Mord3rca";
repo = "gamma-launcher";
tag = "v${version}";
hash = "sha256-qzjfgDFimEL6vtsJBubY6fHsokilDB248WwHJt3F7fI=";
};
build-system = [ python3Packages.setuptools ];
dependencies = with python3Packages; [
beautifulsoup4
cloudscraper
gitpython
platformdirs
py7zr
python-unrar
requests
tenacity
tqdm
];
nativeCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
meta = {
description = "Python cli to download S.T.A.L.K.E.R. GAMMA";
changelog = "https://github.com/Mord3rca/gamma-launcher/releases/tag/v${version}";
homepage = "https://github.com/Mord3rca/gamma-launcher";
mainProgram = "gamma-launcher";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ DrymarchonShaun ];
platforms = lib.platforms.linux;
};
}
@@ -0,0 +1,46 @@
{
stdenv,
lib,
replaceVars,
buildPythonPackage,
fetchPypi,
unrar,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "python-unrar";
version = "0.4";
pyproject = true;
src = fetchPypi {
pname = "unrar";
inherit version;
hash = "sha256-skRHpbkwJL5gDvglVmi6I6MPRRF2V3tpFVnqE1n30WQ=";
};
build-system = [
setuptools
];
patches = [
(replaceVars ./use_nix_unrar_path.patch {
unrar_lib_path = "${unrar}/lib/libunrar${stdenv.hostPlatform.extensions.sharedLibrary}";
})
];
nativeCheckInputs = [ pytestCheckHook ];
doCheck = true;
pythonImportsCheck = [ "unrar" ];
meta = {
homepage = "http://github.com/matiasb/python-unrar";
changelog = "https://github.com/matiasb/python-unrar/releases/tag/v${version}";
description = "Wrapper for UnRAR library, plus a rarfile module on top of it";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ DrymarchonShaun ];
platforms = lib.platforms.linux;
};
}
@@ -0,0 +1,13 @@
diff --git a/unrar/unrarlib.py b/unrar/unrarlib.py
index 06df081..22c1dde 100644
--- a/unrar/unrarlib.py
+++ b/unrar/unrarlib.py
@@ -31,7 +31,7 @@ __all__ = ["RAROpenArchiveDataEx", "RARHeaderDataEx", "RAROpenArchiveEx",
"dostime_to_timetuple"]
-lib_path = os.environ.get('UNRAR_LIB_PATH', None)
+lib_path = "@unrar_lib_path@"
# find and load unrar library
unrarlib = None
+2
View File
@@ -15367,6 +15367,8 @@ self: super: with self; {
python-ulid = callPackage ../development/python-modules/python-ulid { };
python-unrar = callPackage ../development/python-modules/python-unrar { inherit (pkgs) unrar; };
python-utils = callPackage ../development/python-modules/python-utils { };
python-vagrant = callPackage ../development/python-modules/python-vagrant { };