Skip to content

Commit ce1a986

Browse files
authored
umu-launcher: 1.1.4 -> 1.2.5 & init pyzstd (#381975)
2 parents db27914 + 28d75e8 commit ce1a986

File tree

4 files changed

+118
-36
lines changed

4 files changed

+118
-36
lines changed

pkgs/by-name/um/umu-launcher-unwrapped/no-umu-version-json.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

pkgs/by-name/um/umu-launcher-unwrapped/package.nix

Lines changed: 52 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,69 @@
11
{
2-
python3Packages,
3-
fetchFromGitHub,
4-
lib,
52
bash,
3+
cargo,
4+
fetchFromGitHub,
65
hatch,
6+
lib,
7+
python3Packages,
8+
rustPlatform,
79
scdoc,
8-
replaceVars,
9-
fetchpatch2,
10+
writableTmpDirAsHomeHook,
11+
withTruststore ? true,
12+
withDeltaUpdates ? true,
1013
}:
1114
python3Packages.buildPythonPackage rec {
1215
pname = "umu-launcher-unwrapped";
13-
version = "1.1.4";
16+
version = "1.2.5";
1417

1518
src = fetchFromGitHub {
1619
owner = "Open-Wine-Components";
1720
repo = "umu-launcher";
1821
tag = version;
19-
hash = "sha256-TOsVK6o2V8D7CLzVOkLs8AClrZmlVQTfeii32ZIQCu4=";
22+
hash = "sha256-bZ6Ywc524NrapkFrwFiWbqmVe1j0hunEH9YKrYQ8R2E=";
23+
};
24+
25+
cargoDeps = rustPlatform.fetchCargoVendor {
26+
inherit src;
27+
hash = "sha256-nU4xZn9NPd7NgexiaNYLdo4BCbH98duZ07XYeUiceP0=";
2028
};
2129

22-
# Both patches can be safely removed with the next release
23-
patches = [
24-
# Patch to avoid running `git describe`
25-
# Fixed by https://github.com/Open-Wine-Components/umu-launcher/pull/289 upstream
26-
(replaceVars ./no-umu-version-json.patch { inherit version; })
27-
# Patch to use PREFIX in the installer call
28-
(fetchpatch2 {
29-
url = "https://github.com/Open-Wine-Components/umu-launcher/commit/602a2f84a05a63f7b1b1c4d8ca85d99fdaec2cd2.diff";
30-
hash = "sha256-BMinTXr926V3HlzHHabxHKvy8quEvxsZKu1hoTGQT00=";
31-
})
30+
nativeCheckInputs = [
31+
writableTmpDirAsHomeHook
32+
python3Packages.pytestCheckHook
3233
];
3334

3435
nativeBuildInputs = [
35-
python3Packages.build
36+
cargo
3637
hatch
37-
scdoc
38+
python3Packages.build
3839
python3Packages.installer
40+
rustPlatform.cargoSetupHook
41+
scdoc
3942
];
4043

41-
pythonPath = [
42-
python3Packages.filelock
43-
python3Packages.xlib
44-
];
44+
pythonPath =
45+
with python3Packages;
46+
[
47+
pyzstd
48+
urllib3
49+
xlib
50+
]
51+
++ lib.optionals withTruststore [
52+
truststore
53+
]
54+
++ lib.optionals withDeltaUpdates [
55+
cbor2
56+
xxhash
57+
];
4558

4659
pyproject = false;
4760
configureScript = "./configure.sh";
4861

62+
configureFlags = [
63+
"--use-system-pyzstd"
64+
"--use-system-urllib"
65+
];
66+
4967
makeFlags = [
5068
"PYTHONDIR=$(PREFIX)/${python3Packages.python.sitePackages}"
5169
"PYTHON_INTERPRETER=${lib.getExe python3Packages.python}"
@@ -54,6 +72,17 @@ python3Packages.buildPythonPackage rec {
5472
"SHELL_INTERPRETER=${lib.getExe bash}"
5573
];
5674

75+
disabledTests = [
76+
# Broken? Asserts that $STEAM_RUNTIME_LIBRARY_PATH is non-empty
77+
# Fails with AssertionError: '' is not true : Expected two elements in STEAM_RUNTIME_LIBRARY_PATHS
78+
"test_game_drive_empty"
79+
"test_game_drive_libpath_empty"
80+
81+
# Broken? Tests parse_args with no options (./umu_run.py)
82+
# Fails with AssertionError: SystemExit not raised
83+
"test_parse_args_noopts"
84+
];
85+
5786
meta = {
5887
description = "Unified launcher for Windows games on Linux using the Steam Linux Runtime and Tools";
5988
changelog = "https://github.com/Open-Wine-Components/umu-launcher/releases/tag/${version}";
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
buildPythonPackage,
3+
fetchFromGitHub,
4+
lib,
5+
pytestCheckHook,
6+
setuptools,
7+
zstd-c,
8+
}:
9+
buildPythonPackage rec {
10+
pname = "pyzstd";
11+
version = "0.16.2";
12+
pyproject = true;
13+
14+
src = fetchFromGitHub {
15+
owner = "Rogdham";
16+
repo = "pyzstd";
17+
tag = version;
18+
hash = "sha256-Az+0m1XUFxExBZK8bcjK54Zt2d5ZlAKRMZRdr7rPcss=";
19+
};
20+
21+
postPatch = ''
22+
# pyzst specifies setuptools<74 because 74+ drops `distutils.msvc9compiler`,
23+
# required for Python 3.9 under Windows
24+
substituteInPlace pyproject.toml \
25+
--replace-fail '"setuptools>=64,<74"' '"setuptools"'
26+
'';
27+
28+
nativeBuildInputs = [
29+
setuptools
30+
];
31+
32+
build-system = [
33+
setuptools
34+
];
35+
36+
buildInputs = [
37+
zstd-c
38+
];
39+
40+
pypaBuildFlags = [
41+
"--config-setting=--global-option=--dynamic-link-zstd"
42+
];
43+
44+
nativeCheckInputs = [
45+
pytestCheckHook
46+
];
47+
48+
pythonImportsCheck = [
49+
"pyzstd"
50+
];
51+
52+
meta = {
53+
description = "Python bindings to Zstandard (zstd) compression library";
54+
homepage = "https://pyzstd.readthedocs.io";
55+
changelog = "https://github.com/Rogdham/pyzstd/blob/${version}/CHANGELOG.md";
56+
license = lib.licenses.bsd3;
57+
maintainers = with lib.maintainers; [
58+
MattSturgeon
59+
PopeRigby
60+
];
61+
};
62+
}

pkgs/top-level/python-packages.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11020,6 +11020,10 @@ self: super: with self; {
1102011020

1102111021
pyzipper = callPackage ../development/python-modules/pyzipper { };
1102211022

11023+
pyzstd = callPackage ../development/python-modules/pyzstd {
11024+
zstd-c = pkgs.zstd;
11025+
};
11026+
1102311027
plac = callPackage ../development/python-modules/plac { };
1102411028

1102511029
plaid-python = callPackage ../development/python-modules/plaid-python { };

0 commit comments

Comments
 (0)