Skip to content

Add support for updating dependencies with custom attribute names#561

Merged
Mic92 merged 1 commit intoMic92:mainfrom
ungeskriptet:custom-deps
Mar 1, 2026
Merged

Add support for updating dependencies with custom attribute names#561
Mic92 merged 1 commit intoMic92:mainfrom
ungeskriptet:custom-deps

Conversation

@ungeskriptet
Copy link
Copy Markdown
Contributor

Some packages need to fetch two different dependencies (e.g. OpenMetadata contains two yarn.lock files that need to be fetched).

Add a new --custom-dep argument to allow updating dependencies with custom attribute names.

Some packages need to fetch two different dependencies (e.g.
OpenMetadata contains two yarn.lock files that need to be fetched).

Add a new `--custom-dep` argument to allow updating dependencies with
custom attribute names.

Signed-off-by: David Wronek <david.wronek@mainlining.org>
@ungeskriptet
Copy link
Copy Markdown
Contributor Author

ungeskriptet commented Feb 26, 2026

I am aware that I could use subpackages to update the hashes, but that would require "wrapping" the fetcher (e.g. fetchYarnDeps) inside stdenv.mkDerivation, since it evaluates the subpackage a second time using eval.nix, which excepts arguments like pname that not all dependency fetchers have. Using --custom-deps bypasses evaluating the package a second time, which also keeps the package much simpler.

@Mic92 Mic92 merged commit 6116742 into Mic92:main Mar 1, 2026
11 checks passed
@ungeskriptet ungeskriptet deleted the custom-deps branch March 3, 2026 05:58
Mynacol added a commit to Mynacol/nixpkgs that referenced this pull request Mar 25, 2026
This commit rewrites the mullvad-browser package to be built from
source. A great help was the build script in guix [1], seemingly the
only other distro that builds this package from source.  The original
package is renamed to mullvad-browser-bin. I thought people might want
to keep it to ensure it matches upstream in all regards affecting
browser fingerprinting. But we can also drop it.

It mostly just uses buildMozillaMach with settings that should mostly
match upstream. To fix font rendering and use the font fingerprinting
protection, all fonts are copied from the prebuilt release (retrieving
them from the original sources is more work).  The update script works
(with it, I made the update to 15.0.8 today), but it depends on a
freshly merged feature not yet available in a release nor nixpkgs [2].
I originally fetched the source tarball from cdn.mullvad.org and the
other mirrors, but it complicates the update script, so it uses GitHub
now.

This package lacks language support besides en-US. I attempted to
provide the correct files, but was blocked by the seeming lack of
support by buildMozillaMach for it.

This work is planned to be extended to also offer a source-built package
for tor-browser.

[1] https://codeberg.org/guix/guix/src/branch/master/gnu/packages/tor-browsers.scm
[2] Mic92/nix-update#561
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants