-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
42 lines (36 loc) · 1.14 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
{
inputs.nix-appimage = {
url = "github:42LoCo42/nix-appimage";
inputs = {
flake-utils.follows = "flake-utils";
nixpkgs.follows = "nixpkgs";
};
};
outputs = { flake-utils, nixpkgs, nix-appimage, ... }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; }; in rec {
packages = {
default = pkgs.buildGoModule rec {
pname = "kallisto";
version = "1";
src = with pkgs.lib.fileset; toSource {
root = ./.;
fileset = unions [
./go.mod
./go.sum
./main.go
];
};
nativeBuildInputs = with pkgs; [ cacert ];
buildInputs = with pkgs; [ libsodium ];
ldflags = [ "-s" "-w" ];
vendorHash = "sha256-6Qy5AN0cH6TJOspuPYUYQjGjFJwchBGg1ngS/4QCGC4=";
meta.mainProgram = pname;
};
appimage = nix-appimage.bundlers.${system}.default packages.default;
};
devShells.default = pkgs.mkShell {
inputsFrom = [ packages.default ];
};
});
}