-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathshell.nix
More file actions
44 lines (44 loc) · 1.09 KB
/
Copy pathshell.nix
File metadata and controls
44 lines (44 loc) · 1.09 KB
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
let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
nixpkgsLock = lock.nodes.${lock.nodes.root.inputs.nixpkgs}.locked;
filnixLock = lock.nodes.${lock.nodes.root.inputs.filnix}.locked;
filnix = builtins.getFlake
"github:${filnixLock.owner}/${filnixLock.repo}/${filnixLock.rev}?narHash=${filnixLock.narHash}";
in
{ pkgs ? import (builtins.fetchTarball {
name = nixpkgsLock.rev;
url = "https://github.com/${nixpkgsLock.owner}/${nixpkgsLock.repo}/archive/${nixpkgsLock.rev}.tar.gz";
sha256 = nixpkgsLock.narHash;
}) {},
filcc ? if builtins.currentSystem == "x86_64-linux" then
filnix.packages.${builtins.currentSystem}.filcc
else
null
}:
with pkgs;
let
filc =
if filcc != null then
[
(writeShellScriptBin "filc" ''
exec ${filcc}/bin/clang "$@"
'')
]
else [];
in
mkShellNoCC {
buildInputs =
[
gcc15
clang-tools
(haskellPackages.ghcWithPackages (p: [ p.attoparsec ]))
p7zip
hyperfine
rustc
cargo
clang
] ++ filc;
shellHook = ''
export HISTFILE=.history
'';
}