-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
shell.nix
35 lines (33 loc) · 1.01 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
{
pkgs ? (
let
inherit (builtins) fromJSON readFile;
flakeLock = fromJSON (readFile ./flake.lock);
inherit (flakeLock.nodes.nixpkgs) locked;
nixpkgs =
assert locked.type == "github";
builtins.fetchTarball {
url = "https://github.com/${locked.owner}/${locked.repo}/archive/${locked.rev}.tar.gz";
sha256 = locked.narHash;
};
in
import nixpkgs { }
),
stdenv ? pkgs.stdenv,
lib ? pkgs.lib,
srcDir ? null,
nix,
}:
let
nix-eval-jobs = pkgs.callPackage ./default.nix { inherit srcDir nix; };
in
(pkgs.mkShell.override { inherit stdenv; }) {
inherit (nix-eval-jobs) buildInputs;
nativeBuildInputs = nix-eval-jobs.nativeBuildInputs ++ [
(pkgs.python3.withPackages (ps: [ ps.pytest ]))
(lib.hiPrio pkgs.llvmPackages_latest.clang-tools)
];
shellHook = lib.optionalString stdenv.isLinux ''
export NIX_DEBUG_INFO_DIRS="${pkgs.curl.debug}/lib/debug:${nix.debug}/lib/debug''${NIX_DEBUG_INFO_DIRS:+:$NIX_DEBUG_INFO_DIRS}"
'';
}