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