Skip to content

Commit

Permalink
Fix platform string used for musl (#2195)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishmack authored May 13, 2024
1 parent fca24cd commit 55e46dd
Showing 1 changed file with 5 additions and 5 deletions.
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

0 comments on commit 55e46dd

Please sign in to comment.