factor package expression into a function

We'll need to call it repeatedly to make packages for cross.
This commit is contained in:
Charles Hall 2024-01-22 22:56:00 -08:00
parent 3ac9be5a78
commit 67d280dd2e
No known key found for this signature in database
GPG Key ID: 7B8E0645816E07CF

View File

@ -50,9 +50,8 @@
ROCKSDB_INCLUDE_DIR = "${pkgs.rocksdb}/include";
ROCKSDB_LIB_DIR = "${pkgs.rocksdb}/lib";
};
in
{
packages.default = builder pkgsHost {
package = pkgs: builder pkgs {
src = nix-filter {
root = ./.;
include = [
@ -65,11 +64,14 @@
# This is redundant with CI
doCheck = false;
env = env pkgsHost;
nativeBuildInputs = nativeBuildInputs pkgsHost;
env = env pkgs;
nativeBuildInputs = nativeBuildInputs pkgs;
meta.mainProgram = cargoToml.package.name;
};
in
{
packages.default = package pkgsHost;
packages.oci-image =
let