Skip to content

Instantly share code, notes, and snippets.

@dminuoso
Last active October 19, 2020 08:04
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 dminuoso/15222b2cb2a8b791525f902fe5beee4e to your computer and use it in GitHub Desktop.
Save dminuoso/15222b2cb2a8b791525f902fe5beee4e to your computer and use it in GitHub Desktop.
let
compiler = "ghc865";
static-haskell-nix = fetchGit (builtins.fromJSON (builtins.readFile ./nix/static-haskell-rev.json));
pinnedPkgs = (import (static-haskell-nix + "/nixpkgs.nix"));
staticPkgs = (import (static-haskell-nix + "/survey") {
normalPkgs = extendedPkgs;
inherit compiler;
}).pkgs;
extendedPkgs = staticPkgs.extend pkgOverlay;
makeHsOverrides = lib: {
overrides = (selfHS: superHS: {
freyja = superHS.callCabal2nix "freyja" ./. {};
freyja-api = superHS.callCabal2nix "freyja-api" ./freyja-api {};
# http-media is broken because its tests dont build.
http-media = lib.dontCheck superHS.http-media;
});
};
pkgOverlay = self: super: {
haskell = super.haskell // {
packages = super.haskell.packages // {
${compiler} = super.haskell.packages.${compiler}.override (makeHsOverrides super.haskell.lib);
};
};
};
exe = extendedPkgs.haskell.packages.${compiler}.freyja;
in
{
inherit exe;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment