A peer-to-peer stack for code collaboration
Simplify shell.nix. (#646)
Julian Arni13652dcf450c
diff --git a/nix/shell.nix b/nix/shell.nixindex 7705298..e3b91cb 100644--- a/nix/shell.nix+++ b/nix/shell.nix@@ -1,46 +1,16 @@{ pkgs ? import (fetchGit {url = https://github.com/nixos/nixpkgs.git;- ref = "release-18.09";- rev = "34a637ca9235f44fc377a881c1e48e1e6bcf84f7";+ ref = "release-19.03";+ rev = "f52505fac8c82716872a616c501ad9eff188f97f";}) {}-, compiler ? "ghc863"-, doc ? true-, extras ? true+, extras ? []}:with pkgs;-let- ghc = haskell.packages.${compiler}.ghcWithPackages (_: []);- docstuffs = python3.withPackages (ps: with ps; [ recommonmark sphinx sphinx_rtd_theme ]);-in--stdenv.mkDerivation {- name = "radicle-dev";- buildInputs = [ ghc zlib glibcLocales python3 wget stack moreutils fzf docker_compose ]- ++ (if doc then [docstuffs postgresql] else [])- ++ (if extras then [ vimPlugins.stylish-haskell haskellPackages.apply-refact hlint haskellPackages.ghcid haskellPackages.weeder] else []);- LANG = "en_US.UTF-8";- libraryPkgconfigDepends = [ zlib ];- shellHook = ''- export PATH=$PATH:`stack path --local-bin`:$PWD/bin- export RADPATH=$PWD/rad- export STACK_IN_NIX_EXTRA_ARGS="--system-ghc --nix-packages zlib"- export IS_NIX_SHELL="true"- export LOCALE_ARCHIVE="${pkgs.glibcLocales}/lib/locale/locale-archive";- export RAD_BIN="$(stack path --docker --local-install-root)/bin"- export COMPOSE_FILE=test/docker-compose.yaml- eval $(grep export ${ghc}/bin/ghc)- alias check="pushd $PWD && ./scripts/check-fmt.sh && hlint . && popd"- alias mkdocs="pushd $PWD/docs && make html && popd"- alias sb="stack build --fast"- alias se="stack exec"- alias se="stack --no-nix-pure exec"- alias sbd="stack build --fast radicle:exe:rad-daemon-radicle"- alias sbrad="stack build --fast radicle:exe:radicle"- alias st="stack test --fast"- alias sts="stack test --fast radicle:spec"- alias str="stack test --fast radicle:spec --ta '--pattern \"Radicle source file tests\"'"- alias server="stack exec radicle-server -- "- '';+haskell.lib.buildStackProject {+ inherit ghc;+ name = "radicle";+ LANG = "en_US.UTF-8";+ buildInputs = [ zlib ipfs docker docker_compose ] ++ extras ;}diff --git a/stack.yaml b/stack.yamlindex 14af2ba..6904b83 100644--- a/stack.yaml+++ b/stack.yaml@@ -70,4 +70,7 @@ docker:# extra-lib-dirs: [/path/to/dir]## Allow a newer minor version of GHC than the snapshot specifies-# compiler-check: newer-minor+compiler-check: newer-minor+nix:+ enable: false+ shell-file: nix/shell.nix