From 7ea957389e09c38d0c8f40293e60557ab42a031e Mon Sep 17 00:00:00 2001 From: Nick Spinale Date: Tue, 25 Jun 2024 23:31:51 +0000 Subject: [PATCH] nix: Expose overridesForMkCrate Signed-off-by: Nick Spinale --- hacking/nix/scope/crates.nix | 12 +++++------- hacking/nix/scope/default.nix | 3 ++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/hacking/nix/scope/crates.nix b/hacking/nix/scope/crates.nix index 2f4da9718..0e61aa5ed 100644 --- a/hacking/nix/scope/crates.nix +++ b/hacking/nix/scope/crates.nix @@ -19,7 +19,7 @@ let globalPatchSection = workspaceManifest.patch; - overrides = { + overridesForMkCrate = { sel4-sys = { extraPaths = [ "build" @@ -59,13 +59,11 @@ let }; unAugmentedCrates = lib.listToAttrs (lib.forEach workspaceMemberPaths (cratePath: rec { - name = (crateUtils.crateManifest cratePath).package.name; # TODO redundant - value = crateUtils.mkCrate cratePath (overrides.${name} or {}); + name = (crateUtils.crateManifest cratePath).package.name; + value = crateUtils.mkCrate cratePath (overridesForMkCrate.${name} or {}); })); - augmentedCrates = crateUtils.augmentCrates unAugmentedCrates; - - crates = augmentedCrates; + crates = crateUtils.augmentCrates unAugmentedCrates; isPrivate = crateName: builtins.match "^sel4-.*" crateName == null; @@ -75,5 +73,5 @@ let (lib.concatMapStrings (crateName: "${crateName}\n") (lib.attrNames publicCrates)); in { - inherit crates globalPatchSection publicCrates publicCratesTxt; + inherit crates overridesForMkCrate globalPatchSection publicCrates publicCratesTxt; } diff --git a/hacking/nix/scope/default.nix b/hacking/nix/scope/default.nix index f98cc4424..7e27298be 100644 --- a/hacking/nix/scope/default.nix +++ b/hacking/nix/scope/default.nix @@ -160,7 +160,8 @@ superCallPackage ../rust-utils {} self // { name = fname; path = builtins.toFile fname (builtins.readFile "${dir}/${fname}"); } ]; - inherit (callPackage ./crates.nix {}) crates globalPatchSection publicCrates publicCratesTxt; + inherit (callPackage ./crates.nix {}) + crates overridesForMkCrate globalPatchSection publicCrates publicCratesTxt; distribution = callPackage ./distribution.nix {};