-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflake.nix
48 lines (43 loc) · 1.08 KB
/
flake.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
{
description = "kakoune-arcan dev environment";
inputs = {
zig-source = {
url = "https://ziglang.org/download/0.10.0/zig-linux-x86_64-0.10.0.tar.xz";
flake = false;
};
};
outputs = {
self,
nixpkgs,
zig-source
}:
let
default_system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${default_system};
zig_0_10_0 = pkgs.stdenv.mkDerivation rec {
pname = "zig";
version = "0.10.0";
src = zig-source.outPath;
installPhase = ''
mkdir -p "$out/bin"
cp zig "$out/bin"
cp -r lib "$out"
cp -r doc "$out"
'';
meta = with pkgs.lib; {
homepage = "https://ziglang.org/";
description = "General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software";
license = licenses.mit;
platforms = platforms.unix;
};
};
in {
devShell.${default_system} = pkgs.mkShell {
nativeBuildInputs = [
zig_0_10_0
pkgs.llvmPackages_latest.lldb
pkgs.pkg-config-unwrapped
];
};
};
}