-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathshell.nix
More file actions
37 lines (32 loc) · 810 Bytes
/
shell.nix
File metadata and controls
37 lines (32 loc) · 810 Bytes
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
{ pkgs ? import <nixpkgs> {} }:
let
zig = pkgs.stdenv.mkDerivation {
name = "zig";
src = pkgs.fetchurl {
url = "https://ziglang.org/download/0.15.2/zig-x86_64-linux-0.15.2.tar.xz";
hash = "sha256-AqonDxg9onbltZILHaxEpj8aSeVQUOveOuzJ64L5Mjk=";
};
nativeBuildInputs = [
pkgs.autoPatchelfHook
];
buildInputs = [
pkgs.stdenv.cc.cc.lib
pkgs.zlib
];
installPhase = ''
mkdir -p $out/bin
cp -r . $out/zig-install
ln -s $out/zig-install/zig $out/bin/zig
'';
};
in
pkgs.mkShell {
buildInputs = [
zig
pkgs.redis
];
shellHook = ''
echo "zig $(zig version)"
echo "$(redis-cli --version)"
'';
}