Skip to content

Instantly share code, notes, and snippets.

@gilligan
Created January 13, 2018 18:10
Show Gist options
  • Select an option

  • Save gilligan/09343278fd36e8d916677e45fd7c7563 to your computer and use it in GitHub Desktop.

Select an option

Save gilligan/09343278fd36e8d916677e45fd7c7563 to your computer and use it in GitHub Desktop.
{ pkgs ? import ./nixpkgs.nix
, compiler ? "ghc802"
, imageName ? "foo:dev"
}:
let
inherit (pkgs.haskell.lib) buildStrictly justStaticExecutables overrideCabal;
inherit (pkgs.lib.strings) splitString;
inherit (builtins) elemAt;
cabal2nix = pkgs.haskell.packages."${compiler}".callCabal2nix;
in rec {
foo = buildStrictly (justStaticExecutables (cabal2nix "foo" ./. {}));
shell = overrideCabal getty-images-token-service (old: {
libraryHaskellDepends = old.libraryHaskellDepends ++ (with pkgs; [ haskellPackages.stylish-haskell ]);
}).env;
#shell = getty-images-token-service.env;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment