Skip to content

Fix platform string used for musl #2195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/call-cabal-project-to-nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ let

ghcSrc = ghc.raw-src or ghc.buildGHC.raw-src;

fixPlatformString = x: builtins.replaceStrings ["-linux-gnu"] ["-linux"] x;
platformString = p: with p.parsed; "${cpu.name}-${vendor.name}-${kernel.name}";

# Dummy `ghc` that uses the captured output
dummy-ghc = evalPackages.writeTextFile {
Expand Down Expand Up @@ -341,10 +341,10 @@ let
then "ArchJavaScript"
else throw "Unknown target arch ${pkgs.stdenv.targetPlatform.config}"
}")'
echo ',("target platform string","${fixPlatformString pkgs.stdenv.targetPlatform.config}")'
echo ',("Build platform","${fixPlatformString pkgs.stdenv.buildPlatform.config}")'
echo ',("Host platform","${fixPlatformString pkgs.stdenv.hostPlatform.config}")'
echo ',("Target platform","${fixPlatformString pkgs.stdenv.targetPlatform.config}")'
echo ',("target platform string","${platformString pkgs.stdenv.targetPlatform}")'
echo ',("Build platform","${platformString pkgs.stdenv.buildPlatform}")'
echo ',("Host platform","${platformString pkgs.stdenv.hostPlatform}")'
echo ',("Target platform","${platformString pkgs.stdenv.targetPlatform}")'
echo ']'
;;
--print-libdir*)
Expand Down
Loading