Skip to content

Instantly share code, notes, and snippets.

@hhefesto
Created September 21, 2020 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hhefesto/9cce7e04e84e3f5be7787bfcdd61206b to your computer and use it in GitHub Desktop.
Save hhefesto/9cce7e04e84e3f5be7787bfcdd61206b to your computer and use it in GitHub Desktop.
overlay not working
let
gcOverlay = self: super: {
# jumper = telomare_jumper;
gc = self.boehmgc;
};
in
{ # Fetch the latest haskell.nix and import its default.nix
# haskellNix ? import (builtins.fetchTarball "https://github.com/input-output-hk/haskell.nix/archive/dc7acfeb7628032d5109747a8b330d58817b953f.tar.gz") {}
haskellNix ? import (builtins.fetchTarball "https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz") { overlays = [ gcOverlay ]; }
# # For LLVM
# , enableLLVMAssertions ? true # TODO: Fix
, compiler ? "ghc865"
}:
let
# haskell.nix provides access to the nixpkgs pins which are used by our CI,
# hence you will be more likely to get cache hits when using these.
# But you can also just use your own, e.g. '<nixpkgs>'.
nixpkgsSrc = haskellNix.sources.nixpkgs-2003;
# haskell.nix provides some arguments to be passed to nixpkgs, including some
# patches and also the haskell.nix functionality itself as an overlay.
nixpkgsArgs = haskellNix.nixpkgsArgs;
# import nixpkgs with overlays
pkgs = (import nixpkgsSrc nixpkgsArgs);
# // { overlays = [ gcOverlay ]; } // { gc = pkgs.boehmgc; };
# gcOverlay = self: super: {
# jumper = telomare_jumper;
# gc = self.boehmgc;
# };
# overlayedPkgs = pkgs // { overlays = [ gcOverlay ]; };
telomare_jumper = pkgs.stdenv.mkDerivation {
name = "telomareJumper";
src = ./cbits;
buildInputs = [ pkgs.boehmgc ];
};
in
pkgs.haskell-nix.cabalProject {
src = pkgs.haskell-nix.cleanSourceHaskell {
src = ./.;
name = "telomare";
};
compiler-nix-name = compiler;
# pkg-def-extras = [ (hkg : { packages = { gc = pkgs.boehmgc; }; }) ];
pkg-def-extras = [ (hkg : { gc = pkgs.gc; }) ];
modules = [ ];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment