diff --git a/CHANGELOG.md b/CHANGELOG.md index e81f7dd..1130c2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## Fixed +- Overriding the factory of a C platform caused the 'override' function + to disappear from the resulting set. + ## [4.1.4] - 2024-06-03 ## Fixed diff --git a/c/default.nix b/c/default.nix index 2af652d..f5fad9a 100644 --- a/c/default.nix +++ b/c/default.nix @@ -32,34 +32,35 @@ let sha256 = "sha256:10m80cpdhk1jqvqvkzy8qls7nmsra77fx7rrq4snk0s46z1msafl"; } else mathjax; - inner = + mkPlatform = { name , pkgs , stdenv ? pkgs.stdenv , output ? null , platformOverrides ? _: { } - }: + , factoryOverrides ? { } + }@args: let - factory = pkgs.callPackage (import ./make-derivation.nix platformOverrides) - { + factory = pkgs.callPackage + (import ./make-derivation.nix platformOverrides) + ({ inherit base stdenv components; targetName = name; mathjax = mathjax'; - }; + } // factoryOverrides); finalPlatform = factory: { inherit name pkgs; __functor = _self: factory; + override = overrides: + mkPlatform (args // overrides); overrideFactory = overrides: - finalPlatform ( - factory.override overrides); - } // lib.optionalAttrs (output != null) { inherit output; }; + finalPlatform (factory.override overrides); + } // { inherit output; }; in finalPlatform factory; - mkPlatform = lib.makeOverridable inner; - platforms' = { _default = mkPlatform { inherit pkgs;