Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

umu-launcher[-unwrapped]: init at 1.1.4 #369259

Merged
merged 1 commit into from
Jan 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions pkgs/by-name/um/umu-launcher-unwrapped/no-umu-version-json.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Makefile.in b/Makefile.in
index b82053d..37db8c9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -50,7 +50,7 @@ fix_shebangs:
umu/umu_version.json: umu/umu_version.json.in
$(info :: Updating $(@) )
cp $(<) $(<).tmp
- sed 's|##UMU_VERSION##|$(shell git describe --always --long --tags)|g' -i $(<).tmp
+ sed 's|##UMU_VERSION##|@version@|g' -i $(<).tmp
diniamo marked this conversation as resolved.
Show resolved Hide resolved
diniamo marked this conversation as resolved.
Show resolved Hide resolved
mv $(<).tmp $(@)

.PHONY: version
70 changes: 70 additions & 0 deletions pkgs/by-name/um/umu-launcher-unwrapped/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
python3Packages,
fetchFromGitHub,
lib,
bash,
hatch,
scdoc,
replaceVars,
fetchpatch2,
}:
python3Packages.buildPythonPackage rec {
pname = "umu-launcher-unwrapped";
version = "1.1.4";

src = fetchFromGitHub {
owner = "Open-Wine-Components";
repo = "umu-launcher";
tag = version;
hash = "sha256-TOsVK6o2V8D7CLzVOkLs8AClrZmlVQTfeii32ZIQCu4=";
};

# Both patches can be safely removed with the next release
patches = [
# Patch to avoid running `git describe`
# Fixed by https://github.com/Open-Wine-Components/umu-launcher/pull/289 upstream
(replaceVars ./no-umu-version-json.patch { inherit version; })
# Patch to use PREFIX in the installer call
(fetchpatch2 {
url = "https://github.com/Open-Wine-Components/umu-launcher/commit/602a2f84a05a63f7b1b1c4d8ca85d99fdaec2cd2.diff";
hash = "sha256-BMinTXr926V3HlzHHabxHKvy8quEvxsZKu1hoTGQT00=";
})
];

nativeBuildInputs = [
python3Packages.build
hatch
scdoc
python3Packages.installer
];

pythonPath = [
python3Packages.filelock
python3Packages.xlib
];

pyproject = false;
configureScript = "./configure.sh";

makeFlags = [
"PYTHONDIR=$(PREFIX)/${python3Packages.python.sitePackages}"
"PYTHON_INTERPRETER=${lib.getExe python3Packages.python}"
# Override RELEASEDIR to avoid running `git describe`
"RELEASEDIR=${pname}-${version}"
"SHELL_INTERPRETER=${lib.getExe bash}"
];

meta = {
description = "Unified launcher for Windows games on Linux using the Steam Linux Runtime and Tools";
changelog = "https://github.com/Open-Wine-Components/umu-launcher/releases/tag/${version}";
homepage = "https://github.com/Open-Wine-Components/umu-launcher";
license = lib.licenses.gpl3;
mainProgram = "umu-run";
maintainers = with lib.maintainers; [
diniamo
MattSturgeon
fuzen
];
platforms = lib.platforms.linux;
};
}
19 changes: 19 additions & 0 deletions pkgs/by-name/um/umu-launcher/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
buildFHSEnv,
lib,
umu-launcher-unwrapped,
}:
buildFHSEnv {
pname = "umu-launcher";
inherit (umu-launcher-unwrapped) version meta;

targetPkgs = pkgs: [ pkgs.umu-launcher-unwrapped ];

executableName = umu-launcher-unwrapped.meta.mainProgram;
runScript = lib.getExe umu-launcher-unwrapped;

extraInstallCommands = ''
ln -s ${umu-launcher-unwrapped}/lib $out/lib
ln -s ${umu-launcher-unwrapped}/share $out/share
'';
}