Skip to content

Commit ed11e78

Browse files
committed
Support 'extra-libraries: m'
1 parent 641145a commit ed11e78

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

overlays/default.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ let
2323
hix = import ./hix.nix;
2424
eval-packages = import ./eval-packages.nix combined;
2525
ghcjs = import ./ghcjs.nix;
26+
libm = import ./libm.nix;
2627
};
2728

2829
composeExtensions = f: g: final: prev:
@@ -58,6 +59,7 @@ let
5859
hix
5960
eval-packages
6061
hydra
62+
libm
6163
# Restore nixpkgs haskell and haskellPackages
6264
(_: prev: { inherit (prev.haskell-nix-prev) haskell haskellPackages; })
6365
];

overlays/libm.nix

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
self: super:
2+
3+
{
4+
# Some packages have cabal deps on `m`, which just comes with the C compiler.
5+
# So we create a dummy package to satisfy haskell.nix's dependency resolution.
6+
m = self.stdenv.mkDerivation {
7+
name = "m";
8+
unpackPhase = "true";
9+
# We have to create lib and bin to make it "look like" a library
10+
installPhase = ''
11+
mkdir -p $out/lib
12+
mkdir -p $out/bin
13+
'';
14+
};
15+
}

0 commit comments

Comments
 (0)