Skip to content

Commit

Permalink
nix: add shared haskell package set
Browse files Browse the repository at this point in the history
  • Loading branch information
d-xo committed Jul 1, 2021
1 parent 6aad1a6 commit c729a52
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 3 additions & 2 deletions haskell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# to our Haskell package extensions from other overlays, bypassing the
# rest of our overlay. This was necessary for rather obscure reasons.

{ pkgs, lib, wrapped ? true }:
{ pkgs, lib, wrapped ? true, shared ? false }:

let
stdenv = pkgs.stdenv;
Expand Down Expand Up @@ -57,7 +57,8 @@ in self-hs: super-hs:
configureFlags = attrs.configureFlags ++ [
"--ghc-option=-O2"
] ++
(if stdenv.isDarwin then [] else [
(if stdenv.isDarwin then [] else
if shared then [] else [
"--enable-executable-static"
"--extra-lib-dirs=${pkgs.gmp.override { withStatic = true; }}/lib"
"--extra-lib-dirs=${pkgs.glibc.static}/lib"
Expand Down
7 changes: 7 additions & 0 deletions overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ in rec {
);
});

sharedHaskellPackages =
super.haskellPackages.override (old: {
overrides = lib.composeExtensions (old.overrides or (_: _: {})) (
import ./haskell.nix { inherit lib; pkgs = self; wrapped = false; shared = true; }
);
});

solidityPackage = import ./nix/solidity-package.nix {
inherit (self) pkgs;
};
Expand Down

0 comments on commit c729a52

Please sign in to comment.