Skip to content

Commit

Permalink
Specify make targets explicitly in nix package
Browse files Browse the repository at this point in the history
The umu-vendored make target depends on git submodules.

Until now, it was disabled with a patch, however that broke in Open-Wine-Components#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.
  • Loading branch information
MattSturgeon committed Jan 31, 2025
1 parent defe741 commit b510914
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 31 deletions.
24 changes: 0 additions & 24 deletions packaging/nix/0-Makefile-no-vendor.patch

This file was deleted.

29 changes: 22 additions & 7 deletions packaging/nix/unwrapped.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 [])
Expand Down

0 comments on commit b510914

Please sign in to comment.