Skip to content

Commit

Permalink
umu-launcher[-unwrapped]: init at 1.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
diniamo committed Jan 18, 2025
1 parent 6e0876c commit 64fef4c
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Makefile.in b/Makefile.in
index b82053d..3e4379e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -90,7 +90,7 @@ umu-dist: $(OBJDIR)/.build-umu-dist
umu-dist-install: umu-dist
$(info :: Installing umu )
install -d $(DESTDIR)$(PYTHONDIR)/$(INSTALLDIR)
- $(PYTHON_INTERPRETER) -m installer --destdir=$(DESTDIR) $(OBJDIR)/*.whl
+ $(PYTHON_INTERPRETER) -m installer --prefix=$(DESTDIR) $(OBJDIR)/*.whl

ifeq ($(FLATPAK), xtrue)
umu-install: version-install umu-dist-install
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
71 changes: 71 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,71 @@
{
python3Packages,
fetchFromGitHub,
lib,
bash,
hatch,
scdoc,
replaceVars,
}:
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=";
};

patches = [
# This should fail, and be removed for releases after 1.1.4,
# see Open-Wine-Components/umu-launcher#289
(replaceVars ./no-umu-version-json.patch { inherit version; })
# HACK: I didn't look too far into the Python installer, but I couldn't
# find a way to get a proper output directory structure without a patch
./makefile-installer-prefix.patch
];

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

pythonPath = [
python3Packages.filelock
python3Packages.xlib
];

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

# We override RELEASEDIR to avoid a git command that is normally used to get
# the current version or commit.
preBuild = ''
makeFlagsArray+=(
RELEASEDIR=${pname}-${version}
"PYTHON_INTERPRETER=${lib.getExe python3Packages.python}"
"SHELL_INTERPRETER=${lib.getExe bash}"
"PREFIX="
"PYTHONDIR=/${python3Packages.python.sitePackages}"
"DESTDIR=$out"
)
'';

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 64fef4c

Please sign in to comment.