Last active
May 15, 2019 05:23
-
-
Save matthewess/6848331be03882a5998bf577253658cc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GHC_VER = ghc864 | |
GHC_ARG = --argstr compiler $(GHC_VER) | |
IDE_ARG = --arg isIDE true | |
.PHONY: code | |
code: bugsy.cabal | |
nix-shell \ | |
$(IDE_ARG) \ | |
$(GHC_ARG) \ | |
--run "code ." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# default.nix | |
{ compiler ? "latest" }: | |
let | |
nixpkgs = import <nixpkgs> {}; | |
haskell = nixpkgs.pkgs.haskell; | |
packages = if compiler == "latest" | |
then nixpkgs.pkgs.haskellPackages | |
else haskell.packages."${compiler}"; | |
in | |
packages.extend (haskell.lib.packageSourceOverrides { | |
bugsy = ./..; | |
}) | |
# release.nix | |
{ compiler ? "default" }: | |
{ compiler ? "latest" }: | |
let | |
packages = import ./default.nix { compiler = compiler; }; | |
in | |
{ bugsy = packages.bugsy; | |
} | |
# shell-WIP.nix | |
{ compiler ? "latest", isIDE ? false }: | |
let | |
packages = import ./default.nix { compiler = compiler; }; | |
b = import ./brittany.nix {}; | |
devPackages = p: if isIDE | |
then [p.hindent p.hlint b.brittany] | |
else []; | |
in | |
packages.shellFor { | |
packages = p: [p.bugsy] ++ (devPackages p); | |
withHoogle = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment