Skip to content

Commit

Permalink
🐛 Fix C platform output
Browse files Browse the repository at this point in the history
Previously, setting `output` would make the derivation
end up on the correct component attribute but when splicing happened
it would look for the target named by `name` in other components.
  • Loading branch information
abbec committed Sep 13, 2024
1 parent c577eae commit 33dc3d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Fixed
- Overriding the factory of a C platform caused the 'override' function
to disappear from the resulting set.
- `output` now works as expected on C platforms. Previously, setting
output to a different value than `name` created a broken
configuration.

## [4.1.4] - 2024-06-03

Expand Down
6 changes: 3 additions & 3 deletions c/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ let
{ name
, pkgs
, stdenv ? pkgs.stdenv
, output ? null
, output ? name
, platformOverrides ? _: { }
, factoryOverrides ? { }
}@args:
Expand All @@ -45,7 +45,7 @@ let
(import ./make-derivation.nix platformOverrides)
({
inherit base stdenv components;
targetName = name;
targetName = output;
mathjax = mathjax';
} // factoryOverrides);

Expand All @@ -71,7 +71,7 @@ let
createPlatformTargets = attrsOrFn:
lib.mapAttrs'
(name: platform: {
name = platform.output or name;
name = platform.output;
value = platform attrsOrFn;
})
platforms';
Expand Down

0 comments on commit 33dc3d6

Please sign in to comment.