Skip to content

Instantly share code, notes, and snippets.

@idontgetoutmuch
Created February 15, 2020 08:36
Show Gist options
  • Save idontgetoutmuch/3254ed39646badacfe90c7cc28684957 to your computer and use it in GitHub Desktop.
Save idontgetoutmuch/3254ed39646badacfe90c7cc28684957 to your computer and use it in GitHub Desktop.
let overlay = self: super:
{
};
in
{ nixpkgs ? import <nixpkgs> { overlays = [ overlay ]; }, compiler ? "default", doBenchmark ? false }:
let
hsOverlay = self: super: {
haskell = super.haskell // {
packages = super.haskell.packages // {
"${compiler}" = super.haskell.packages."${compiler}".override {
overrides = haskellSelf: haskellSuper: {
random = haskellSuper.callCabal2nix "random" /Users/dom/random {};
mwc-random = haskellSuper.callCabal2nix "mwc-random" /Users/dom/mwc-random {};
};
};
};
};
};
orig_pkgs = import nixpkgs {};
pkgs = import orig_pkgs.path { overlays = [ hsOverlay ]; };
# random = nixpkgs.haskellPackages.callCabal2nix "random" (builtins.fetchGit {
# url = "https://github.com/lehins/random.git";
# ref = "interface-to-performance";
# rev = "e30bd6afedab60b5814bca3e123353cb27ba9cad";
# }) { };
haskellDeps = ps: with ps; [
random
splitmix
mwc-random
];
in
pkgs.stdenv.mkDerivation {
name = "env";
buildInputs = [
(pkgs.haskellPackages.ghcWithPackages haskellDeps)
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment