Skip to content

Commit

Permalink
umu-launcher[-unwrapped]: init at 1.1.4 (#369259)
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman authored Jan 19, 2025
2 parents b66bae5 + 4f4441e commit 0d199cb
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 0 deletions.
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
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
'';
}

0 comments on commit 0d199cb

Please sign in to comment.