From 3757faac15bbc57fdf33c030ebe6ee5de00b740c Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Fri, 31 Jan 2025 01:55:49 +0000 Subject: [PATCH] Specify make targets explicitly in nix package The umu-vendored make target depends on git submodules. Until now, it was disabled with a patch, however that broke in #330. Instead of patching the makefile's `all` target, we can explicitly specify the targets we want to build/install using make flags. This is a temporary workaround until we can figure out how to get submodules working correctly with the flake. The flakeref query `submodules=1` _should_ fix this, but I couldn't get it to work for some reason. --- packaging/nix/0-Makefile-no-vendor.patch | 24 -------------------- packaging/nix/unwrapped.nix | 29 ++++++++++++++++++------ 2 files changed, 22 insertions(+), 31 deletions(-) delete mode 100644 packaging/nix/0-Makefile-no-vendor.patch diff --git a/packaging/nix/0-Makefile-no-vendor.patch b/packaging/nix/0-Makefile-no-vendor.patch deleted file mode 100644 index 852752e72..000000000 --- a/packaging/nix/0-Makefile-no-vendor.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/Makefile.in b/Makefile.in -index 9324abc..a293409 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -21,7 +21,7 @@ FLATPAK ?= xfalse - - .PHONY: all - ifeq ($(FLATPAK), xtrue) --all: umu-dist umu-launcher umu-vendored -+all: umu-dist umu-launcher - endif - - .PHONY: install -@@ -30,8 +30,8 @@ SOURCE_DATE_EPOCH = $(shell LC_ALL=C date --date='@1580601600') - all: zipapp - install: zipapp-install - else --all: umu-dist umu-docs umu-launcher umu-vendored --install: umu-install umu-launcher-install umu-vendored-install -+all: umu-dist umu-docs umu-launcher -+install: umu-install umu-launcher-install - endif - - diff --git a/packaging/nix/unwrapped.nix b/packaging/nix/unwrapped.nix index c75070ba4..fc02b0d22 100644 --- a/packaging/nix/unwrapped.nix +++ b/packaging/nix/unwrapped.nix @@ -20,13 +20,28 @@ umu-launcher-unwrapped.overridePythonAttrs (prev: { # https://github.com/Open-Wine-Components/umu-launcher/pull/289 # - The other is backporting: # https://github.com/Open-Wine-Components/umu-launcher/pull/343 - patches = [ - # Remove `umu-vendored` from the `all` target - # This causes an error when building vendored dependencies: - # python3 -m pip install urllib3 -t builddir - # => No module named pip - ./0-Makefile-no-vendor.patch - ]; + patches = []; + + # The `umu-vendored` target needs submodules. However, we don't actually need + # this target or those submodules anyway, since we add `pyzstd` as a nix package + # + # As a temporary solution, we explicitly specify the supported build targets: + buildFlags = + (prev.buildFlags or []) + ++ [ + "umu-dist" + "umu-launcher" + ]; + + # Same issue for install targets + installTargets = + (prev.installTargets or []) + ++ [ + "umu-dist" + "umu-docs" + "umu-launcher" + "umu-delta" + ]; nativeBuildInputs = (prev.nativeBuildInputs or [])