daml/nix/bazel.nix
Andreas Herrmann a89cbb2036
Update rules_haskell (#1133)
* Update rules_haskell

- rules_haskell now handles the global package db within Bazel
    https://github.com/tweag/rules_haskell/pull/859
- We no longer use the Nix provided c2hs. So, we drop it.
- Rename `ghcWithC2hs` to `ghcStatic` to clarify that that's where the
    static linking patches are applied.
- Extend package-db patches to align Nix store paths with the new $out.
    This works around a restriction in current rules_haskell, where
    the paths in the package config files must have the same prefix as
    the path to the package config files themselves.
- Don't exclude haskell libraries from extra-libraries entries.

* Drop redundant unix-compat override

This is a left-over from when the package was patched.

* Windows GHC bindist includes ffi header

* Drop unused language-c Nix override
2019-05-20 14:20:34 +02:00

103 lines
2.2 KiB
Nix

# Bazel MUST only use this file to source dependencies
#
# This allows CI to pre-build and cache the build outputs
{ system ? builtins.currentSystem
, pkgs ? import ./nixpkgs.nix { inherit system; }
}:
rec {
inherit (pkgs)
curl
docker
gawk
gnutar
gzip
hlint
imagemagick
jdk8
jq
libffi
nodejs
patchelf
protobuf3_5
zip
;
# We need to have a file in GOPATH that we can use as
# root_file in go_wrap_sdk.
go = pkgs.go.overrideAttrs (oldAttrs: {
doCheck = false;
postFixup = ''touch $out/share/go/ROOT'';
});
# the GHC version we use plus custom overrides to sync with the
# stackage version as specified in stack.yaml. Prefer to use this for
# haskell binaries to keep the dev-env closure size as small
# as possible.
ghc = import ./ghc.nix { inherit pkgs; };
# GHC with the package configurations patched for static only linking.
ghcStatic = ghc.ghcWithPackages (p: []);
# Java 8 development
mvn = pkgs.writeScriptBin "mvn" ''
exec ${pkgs.maven}/bin/mvn ''${MVN_SETTINGS:+-s "$MVN_SETTINGS"} "$@"
'';
# The sass derivation in nixos-18.09 is broken, so we add our own
# created with bundix.
sass = pkgs.callPackage ./overrides/sass {};
sphinx183 = import ./tools/sphinx183 {
inherit pkgs;
pythonPackages = pkgs.python36Packages;
};
# Custom combination of latex packages for our latex needs
texlive = pkgs.texlive.combine {
inherit (pkgs.texlive)
bera
capt-of
collection-fontsrecommended
collection-luatex
datetime
enumitem
environ
epigraph
eqparbox
eulervm
fancyhdr
fmtcount
fncychap
footmisc
footnotebackref
framed
latexmk
lipsum
mathpartir
mathpazo
mnsymbol
multirow
needspace
palatino
scheme-small
tabulary
threeparttable
tikzsymbols
titlesec
tocbibind
todonotes
trimspaces
varwidth
wrapfig
xargs
;
};
bazel-cc-toolchain = pkgs.callPackage ./tools/bazel-cc-toolchain {};
} // (if pkgs.stdenv.isLinux then {
inherit (pkgs)
glibcLocales
;
} else {})