Created
March 6, 2015 15:54
-
-
Save purefn/9926ded12254ca763693 to your computer and use it in GitHub Desktop.
Nix Haskell dev shell
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
#!/usr/bin/env bash | |
TOOLS="ctags haskellngPackages.codex haskellngPackages.ghc-mod haskellngPackages.hasktags haskellngPackages.hlint haskellngPackages.hscope haskellngPackages.pointfree haskellngPackages.pointful haskellngPackages.stylish-haskell" | |
EXPR="with (import <nixpkgs> {}).pkgs; with (import <nixpkgs/pkgs/development/haskell-modules/lib.nix> { inherit pkgs; });" | |
if [ -e "shell.nix" ] | |
then | |
PKG="(import ./shell.nix)" | |
else | |
PKG="myHaskellProject" | |
EXPR="$EXPR let myHaskellProject = (haskellngPackages.override { overrides = self: super: { myHaskellProject = self.callPackage ./. {}; }; }).myHaskellProject; in " | |
fi | |
EXPR="$EXPR (overrideCabal $PKG (drv: { buildTools = [ $TOOLS ]; } )).env" | |
nix-shell -E "$EXPR" |
This looks like exactly what I've been searching for. Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This looks nice. Do you maintain this script somewheres?