-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
47 lines (41 loc) · 1.13 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
{
outputs = { nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
inherit (pkgs.lib.fileset) toSource unions;
in
rec {
packages = rec {
default = capka;
capka = pkgs.buildGoModule {
pname = "capka";
version = "0.2.0";
src = toSource {
root = ./.;
fileset = unions [
./go.mod
./go.sum
./capka.c
./capka.h
./capka_test.go
./clientside.go
./serverside.go
./utils.go
./cmd
];
};
vendorHash = "sha256-51wP3ov6rOYnzQmhGr5Hj8j8RQRnB5GB7YoYtcEratk=";
nativeBuildInputs = with pkgs; [ pkg-config ];
buildInputs = with pkgs; [ libsodium ];
};
};
devShells.default = pkgs.mkShell {
inputsFrom = builtins.attrValues packages;
packages = with pkgs; [
gopls
];
};
}
);
}