From 33dc3d6e29693e059dc99ad2bf240cf9e163de89 Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Thu, 12 Sep 2024 14:46:06 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20C=20platform=20`output`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- CHANGELOG.md | 3 +++ c/default.nix | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1130c2f..444d055 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/c/default.nix b/c/default.nix index f5fad9a..141cd6d 100644 --- a/c/default.nix +++ b/c/default.nix @@ -36,7 +36,7 @@ let { name , pkgs , stdenv ? pkgs.stdenv - , output ? null + , output ? name , platformOverrides ? _: { } , factoryOverrides ? { } }@args: @@ -45,7 +45,7 @@ let (import ./make-derivation.nix platformOverrides) ({ inherit base stdenv components; - targetName = name; + targetName = output; mathjax = mathjax'; } // factoryOverrides); @@ -71,7 +71,7 @@ let createPlatformTargets = attrsOrFn: lib.mapAttrs' (name: platform: { - name = platform.output or name; + name = platform.output; value = platform attrsOrFn; }) platforms';