feat(third_party/bazel): Check in rules_haskell from Tweag
This commit is contained in:
parent
2eb1dc26e4
commit
f723b8b878
479 changed files with 51484 additions and 0 deletions
0
third_party/bazel/rules_haskell/nixpkgs/BUILD.bazel
vendored
Normal file
0
third_party/bazel/rules_haskell/nixpkgs/BUILD.bazel
vendored
Normal file
0
third_party/bazel/rules_haskell/nixpkgs/NOTUSED
vendored
Normal file
0
third_party/bazel/rules_haskell/nixpkgs/NOTUSED
vendored
Normal file
36
third_party/bazel/rules_haskell/nixpkgs/cc-toolchain.nix
vendored
Normal file
36
third_party/bazel/rules_haskell/nixpkgs/cc-toolchain.nix
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
with import ./. {};
|
||||
with darwin.apple_sdk.frameworks;
|
||||
|
||||
# XXX On Darwin, workaround
|
||||
# https://github.com/NixOS/nixpkgs/issues/42059. See also
|
||||
# https://github.com/NixOS/nixpkgs/pull/41589.
|
||||
let cc = runCommand "cc-wrapper-bazel" {
|
||||
buildInputs = [ pkgs.stdenv.cc makeWrapper ];
|
||||
}
|
||||
''
|
||||
mkdir -p $out/bin
|
||||
|
||||
# Copy the content of pkgs.stdenv.cc
|
||||
for i in ${pkgs.stdenv.cc}/bin/*
|
||||
do
|
||||
ln -sf $i $out/bin
|
||||
done
|
||||
|
||||
# Override clang
|
||||
rm $out/bin/clang
|
||||
|
||||
makeWrapper ${pkgs.stdenv.cc}/bin/clang $out/bin/clang \
|
||||
--add-flags "-isystem ${llvmPackages.libcxx}/include/c++/v1 \
|
||||
-F${CoreFoundation}/Library/Frameworks \
|
||||
-F${CoreServices}/Library/Frameworks \
|
||||
-F${Security}/Library/Frameworks \
|
||||
-F${Foundation}/Library/Frameworks \
|
||||
-L${libcxx}/lib \
|
||||
-L${darwin.libobjc}/lib"
|
||||
'';
|
||||
stdenv = if pkgs.stdenv.isDarwin then overrideCC pkgs.stdenv cc else pkgs.stdenv;
|
||||
in
|
||||
buildEnv {
|
||||
name = "bazel-cc-toolchain";
|
||||
paths = [ stdenv.cc ] ++ (if stdenv.isDarwin then [ ] else [ binutils ]);
|
||||
}
|
||||
6
third_party/bazel/rules_haskell/nixpkgs/default.nix
vendored
Normal file
6
third_party/bazel/rules_haskell/nixpkgs/default.nix
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import (fetchTarball {
|
||||
# Nixpkgs checkout from 2019-01-30.
|
||||
|
||||
url = https://github.com/NixOS/nixpkgs/archive/2e2ab461b76ec2c586ab126acc53f53bce49cb94.tar.gz;
|
||||
sha256 = "17gicjn4cafpajczv49czy5r61w16kplkbz6r8hqn5rkvp4i5i9b";
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue