-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
54 lines (47 loc) · 1.42 KB
/
shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{ ... }:
with builtins;
let
flake = (import (let lockFile = fromJSON (readFile ./flake.lock);
in fetchTarball {
url =
"https://github.com/edolstra/flake-compat/archive/${lockFile.nodes.flake-compat.locked.rev}.tar.gz";
sha256 = lockFile.nodes.flake-compat.locked.narHash;
}) { src = ./.; }).defaultNix;
NIX_PATH = concatStringsSep ":" (attrValues (mapAttrs
(n: v: if hasAttr "path" v then "${n}=${storePath v.path}" else "${n}=null")
((mapAttrs (n: v: getAttr currentSystem v) {
nixpkgs = flake.outputs.nixpkgs;
nixpkgs-unstable = flake.outputs.nixpkgs_latest;
}))));
TERM = "xterm";
TMPDIR = "/tmp";
nixpkgs = flake.nixpkgs.${currentSystem};
nixpkgs_latest = flake.nixpkgs_latest.${currentSystem};
in nixpkgs.mkShell {
name = "rules_cc_hdrs_map";
inherit NIX_PATH TERM TMPDIR;
buildInputs = with nixpkgs; [
nixpkgs_latest.bazel_6
# Bazel >= 5.3.0 required
# to test backward incompatible changes
# done to the bzlmod api - toolchain registration
# bazel_5
bazel-buildtools
cacert
coreutils-full
curlFull
git
gnutar
# docs generation
jdk11_headless
less
nix
nixfmt
pkg-config
];
shellHook = ''
echo "startup --output_base=$(pwd)/.bazel-output-base" > $(pwd)/.output-bazelrc
echo "build --disk_cache=$(pwd)/.bazel-disk-cache" >> $(pwd)/.output-bazelrc
echo "Welcome to rules_cc_hdrs_map dev-shell."
'';
}