factor package expression into a function
We'll need to call it repeatedly to make packages for cross.
This commit is contained in:
parent
3ac9be5a78
commit
67d280dd2e
1 changed files with 7 additions and 5 deletions
12
flake.nix
12
flake.nix
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue