this post was submitted on 09 Aug 2023
29 points (100.0% liked)
Linux
48149 readers
973 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Yes, the most common one I think is the NUR, the Nix User Repository, the packages have their own namespace. https://github.com/nix-community/NUR
I don't see anything prohibiting that
The issue is that packages (or derivations) only depend on something because it's declared in their definition. That means if you need to add dependencies to existing packages, that can be done via
overrideAttrs
. However, I'm not certain that you can easily add attributes to functions that don't have a mechanism for it (I don't know derivations that allow for more attributes than specified and I'm not very good at the nix language) and dependencies (buildInputs
andnativeBuildInputs
) can only use packages that were supplied as attributes. Derivations usually declare their attributes via{ x, y ? "bar" }:
, what you would need to make use of additional attributes is something likeattrs @ { x, y ? "bar", ... }:
so that the additionally supplied attributes can be accessed. But again am not an expert in the language so take that with a grain of salt.You are confusing override and overrideAttrs. override is for what you said - overriding the derivation arguments. But overrideAttrs is for overriding whatever is passed to mkDerivation by the derivation code.