Move libseccomp source override outside package.nix

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`
This commit is contained in:
John Ericson 2024-04-25 16:36:56 -04:00
parent 1c2336ff5f
commit 1a2f88491f
2 changed files with 10 additions and 7 deletions

View file

@ -179,6 +179,14 @@
]; ];
}); });
libseccomp-nix = final.libseccomp.overrideAttrs (_: rec {
version = "2.5.5";
src = final.fetchurl {
url = "https://github.com/seccomp/libseccomp/releases/download/v${version}/libseccomp-${version}.tar.gz";
hash = "sha256-JIosik2bmFiqa69ScSw0r+/PnJ6Ut23OAsHJqiX7M3U=";
};
});
changelog-d-nix = final.buildPackages.callPackage ./misc/changelog-d.nix { }; changelog-d-nix = final.buildPackages.callPackage ./misc/changelog-d.nix { };
nix = nix =
@ -198,6 +206,7 @@
officialRelease = false; officialRelease = false;
boehmgc = final.boehmgc-nix; boehmgc = final.boehmgc-nix;
libgit2 = final.libgit2-nix; libgit2 = final.libgit2-nix;
libseccomp = final.libseccomp-nix;
busybox-sandbox-shell = final.busybox-sandbox-shell or final.default-busybox-sandbox-shell; busybox-sandbox-shell = final.busybox-sandbox-shell or final.default-busybox-sandbox-shell;
} // { } // {
# this is a proper separate downstream package, but put # this is a proper separate downstream package, but put

View file

@ -249,13 +249,7 @@ in {
] ++ lib.optionals buildUnitTests [ ] ++ lib.optionals buildUnitTests [
gtest gtest
rapidcheck rapidcheck
] ++ lib.optional stdenv.isLinux (libseccomp.overrideAttrs (_: rec { ] ++ lib.optional stdenv.isLinux libseccomp
version = "2.5.5";
src = fetchurl {
url = "https://github.com/seccomp/libseccomp/releases/download/v${version}/libseccomp-${version}.tar.gz";
hash = "sha256-JIosik2bmFiqa69ScSw0r+/PnJ6Ut23OAsHJqiX7M3U=";
};
}))
++ lib.optional stdenv.hostPlatform.isx86_64 libcpuid ++ lib.optional stdenv.hostPlatform.isx86_64 libcpuid
# There have been issues building these dependencies # There have been issues building these dependencies
++ lib.optional (stdenv.hostPlatform == stdenv.buildPlatform && (stdenv.isLinux || stdenv.isDarwin)) ++ lib.optional (stdenv.hostPlatform == stdenv.buildPlatform && (stdenv.isLinux || stdenv.isDarwin))