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 and is not needed
now that we provide pyzstd as a nix package.

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 the Makefile can automatically
disable the target when the dependency is already available. Maybe a
make variable?

That said, having the install targets listed explicitly allows the
`delta` targets to be conditional on `withDeltaUpdates`.
  • Loading branch information
MattSturgeon committed Jan 31, 2025
1 parent b6accae commit 1e1f582
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 31 deletions.
24 changes: 0 additions & 24 deletions packaging/nix/0-Makefile-no-vendor.patch

This file was deleted.

34 changes: 27 additions & 7 deletions packaging/nix/unwrapped.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,33 @@ 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-install"
"umu-launcher-install"
]
++ lib.optionals withDeltaUpdates [
"umu-delta"
"umu-delta-install"
];

nativeBuildInputs =
(prev.nativeBuildInputs or [])
Expand Down

0 comments on commit 1e1f582

Please sign in to comment.