-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
57 lines (49 loc) · 1.35 KB
/
shell.nix
File metadata and controls
57 lines (49 loc) · 1.35 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
45
46
47
48
49
50
51
52
53
54
55
56
57
{
pkgs ? let
lock = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs-unstable.locked;
nixpkgs = fetchTarball {
url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz";
sha256 = lock.narHash;
};
in
import nixpkgs {overlays = [];},
pre-commit-check ? import (builtins.fetchTarball "https://github.com/cachix/git-hooks.nix/tarball/master"),
...
}:
pkgs.stdenv.mkDerivation {
name = "efael-infra";
# Initial dependencies
nativeBuildInputs = with pkgs; [
git
# Latest statix
(
statix.overrideAttrs
(_o: rec {
src = fetchFromGitHub {
owner = "oppiliappan";
repo = "statix";
rev = "43681f0da4bf1cc6ecd487ef0a5c6ad72e3397c7";
hash = "sha256-LXvbkO/H+xscQsyHIo/QbNPw2EKqheuNjphdLfIZUv4=";
};
cargoDeps = pkgs.rustPlatform.importCargoLock {
lockFile = src + "/Cargo.lock";
allowBuiltinFetchGit = true;
};
})
)
nixd
deadnix
alejandra
];
# Runtime dependencies
buildInputs = pre-commit-check.enabledPackages;
# Bootstrapping commands
shellHook = ''
# Initiate git hooks
${pre-commit-check.shellHook}
# Fetch latest changes
git pull
'';
# Nix related configurations
NIX_CONFIG = "extra-experimental-features = nix-command flakes pipe-operators";
}