Move libseccomp source override outside package.nix#10610
Move libseccomp source override outside package.nix#10610Ericson2314 merged 1 commit intoNixOS:masterfrom
libseccomp source override outside package.nix#10610Conversation
This makes it match the current pattern: - `package.nix` assumes deps are right version - Overlay in `flake.nix` creates `*-nix` package variations - Overlay manually passes in those packages to `package.nix`
|
By implementing a single package fixpoint in Nixpkgs, we could have both in the same file. That would make it easier for contributors to see what the pattern is (if they don't know it from Nixpkgs, presumably).
Relevant bits of the new { mkPackageWithDeps, layers }:
mkPackageWithDeps ({ pkgs, stdenv, libseccomp, ... }: [
(layers.derivation { inherit stdenv; })
(this: old: {
name = "nix";
deps = old.deps // {
libseccomp = pkgs.libseccomp.overrideAttrs ...;
# ... more packages that aren't Nixpkgs top level attributes ...
};
setup.buildInputs = [ libseccomp ];
# ... more attributes ...
}
]) |
|
@roberth I do want the package function separate from the choice of dependencies however. These sorts of overrides will always be overfit -- instead of proper declarative things like version bounds and other constraints that characterize the contract/interface required of dependencies, they specify exact versions which fit the implicit, unstated contract. |
|
@Ericson2314 it merely changes the location of the default, but behaves exactly the same (although I have to admit that's not obvious from the example). |
|
@roberth Erm but what is the type of |
|
Let's move it to the implementation thread. |
Motivation
This makes it match the current pattern:
package.nixassumes deps are right versionOverlay in
flake.nixcreates*-nixpackage variationsOverlay manually passes in those packages to
package.nixContext
#10591 original PR
CC @Ma27
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.