From 53fa7c3729d5f80a2b1a17660509bbbf6719adc3 Mon Sep 17 00:00:00 2001 From: strawberry Date: Sun, 7 Jul 2024 02:47:07 -0400 Subject: [PATCH] nix: add `all-features` outputs/packages Signed-off-by: strawberry --- flake.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/flake.nix b/flake.nix index b252193e..ae8533b9 100644 --- a/flake.nix +++ b/flake.nix @@ -114,9 +114,15 @@ { packages = { default = scopeHost.main; + all-features = scopeHost.main.override { all_features = true; }; hmalloc = scopeHost.main.override { features = ["hardened_malloc"]; }; oci-image = scopeHost.oci-image; + oci-image-all-features = scopeHost.oci-image.override { + main = scopeHost.main.override { + all_features = true; + }; + }; oci-image-hmalloc = scopeHost.oci-image.override { main = scopeHost.main.override { features = ["hardened_malloc"]; @@ -151,6 +157,14 @@ value = scopeCrossStatic.main; } + # An output for a statically-linked binary with `--all-features` + { + name = "${binaryName}-all-features"; + value = scopeCrossStatic.main.override { + all_features = true; + }; + } + # An output for a statically-linked binary with hardened_malloc { name = "${binaryName}-hmalloc"; @@ -165,6 +179,16 @@ value = scopeCrossStatic.oci-image; } + # An output for an OCI image based on that binary with `--all-features` + { + name = "oci-image-${crossSystem}-all-features"; + value = scopeCrossStatic.oci-image.override { + main = scopeCrossStatic.main.override { + all_features = true; + }; + }; + } + # An output for an OCI image based on that binary with hardened_malloc { name = "oci-image-${crossSystem}-hmalloc";