Skip to content

Fix GHC 9.10 literate haskell support for musl64 #2259

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 2 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions builder/ghc-for-component-wrapper.nix
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ let

''
+ lib.optionalString (stdenv.targetPlatform.isMusl && !haskellLib.isNativeMusl && builtins.compareVersions ghc.version "9.9" >0) ''
ln -s $wrappedGhc/bin/${targetPrefix}unlit $wrappedGhc/bin/unlit
ln -s $wrappedGhc/bin/${ghcCommand}-iserv $wrappedGhc/bin/ghc-iserv
ln -s $wrappedGhc/bin/${ghcCommand}-iserv-prof $wrappedGhc/bin/ghc-iserv-prof
''
Expand Down
1 change: 1 addition & 0 deletions test/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ let
supported-languages = callTest ./supported-langauges {};
js-template-haskell = callTest ./js-template-haskell {};
gi-gtk = callTest ./gi-gtk { inherit util; };
literate-haskell = callTest ./literate-haskell {};
unit = unitTests;
};

Expand Down
19 changes: 19 additions & 0 deletions test/literate-haskell/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{ stdenv, lib, project', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name, evalPackages }:

with lib;

let
project = project' {
inherit compiler-nix-name evalPackages;
src = testSrc "literate-haskell";
};

packages = project.hsPkgs;

in recurseIntoAttrs {
ifdInputs = {
inherit (project) plan-nix;
};

build = packages.literate-haskell.components.library;
}
16 changes: 16 additions & 0 deletions test/literate-haskell/literate-haskell.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
cabal-version: 3.0
name: literate-haskell
version: 0.1.0.0
category: Repro
build-type: Simple

common warnings
ghc-options: -Wall

library
import: warnings
exposed-modules: MyLib
build-depends: base
hs-source-dirs: src
default-language: Haskell2010

7 changes: 7 additions & 0 deletions test/literate-haskell/src/MyLib.lhs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
\begin{code}

module MyLib (x) where

x=1

\end{code}
Loading