Skip to content

Instantly share code, notes, and snippets.

@idontgetoutmuch
Created July 22, 2019 17:07
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 idontgetoutmuch/af747e1c5551acfbcc1d89a4b82b7ef9 to your computer and use it in GitHub Desktop.
Save idontgetoutmuch/af747e1c5551acfbcc1d89a4b82b7ef9 to your computer and use it in GitHub Desktop.
let
pkgs = import ../pkgs.nix;
overlay = sel: sup: {
haskell = sup.haskell // {
packages = sup.haskell.packages // {
ghc864 = sup.haskell.packages.ghc864.override {
overrides = self: super: {
my-random-fu-multivariate = self.callHackage ./pkgs/random-fu-multivariate { };
my-cmaes = sel.haskell.lib.dontCheck (self.callPackage ./pkgs/cmaes { });
};
};
};
};
};
in import "${pkgs.ihaskell}/release.nix" {
compiler = "ghc864";
nixpkgs = import pkgs.nixpkgs { overlays = [ overlay ]; };
packages = self: with self; [ my-random-fu-multivariate my-cmaes ];
# systemPackages = self: with self; [ python2 ];
}
@vaibhavsagar
Copy link

Try

let
  pkgs = import ./pkgs.nix;
  overlay = sel: sup: {
    haskell = sup.haskell // {
      packages = sup.haskell.packages // {
        ghc864 = sup.haskell.packages.ghc864.override {
          overrides = self: super: {
            my-random-fu-multivariate = self.callHackage ./pkgs/random-fu-multivariate { };
            my-cmaes = sel.haskell.lib.overrideCabal (self.callPackage ./pkgs/cmaes { }) (old: {
              doCheck = false;
              librarySystemDepends = (old.librarySystemDepends or []) ++ [(sel.python2.withPackages (p: [ p.numpy ]))];
            });
          };
        };
      };
    };
  };
in import "${pkgs.ihaskell}/release.nix" {
  compiler = "ghc864";
  nixpkgs  = import pkgs.nixpkgs { overlays = [ overlay ]; };
  packages = self: with self; [ my-random-fu-multivariate my-cmaes ];
  # systemPackages = self: with self; [ python2 ];
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment