-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
56 lines (53 loc) · 1.29 KB
/
flake.nix
File metadata and controls
56 lines (53 loc) · 1.29 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
{
description = "Anytype rust tools and client library";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
naersk.url = "github:nix-community/naersk";
};
outputs =
{
self,
nixpkgs,
flake-utils,
#rust-overlay,
naersk,
}:
flake-utils.lib.eachSystem
[
"x86_64-linux"
"aarch64-darwin"
"aarch64-linux"
"x86_64-windows"
]
(
system:
let
pkgs = import nixpkgs {
inherit system;
};
naersk' = pkgs.callPackage naersk { };
in
{
# build all bin targets
packages.default = naersk'.buildPackage {
src = ./.;
PROTOC = "${pkgs.protobuf}/bin/protoc";
};
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
pkg-config
protobuf
rustc
cargo
chafa
# build static library that anyback can link
pkgsStatic.chafa
];
PROTOC = "${pkgs.protobuf}/bin/protoc";
PROTOC_INCLUDE = "${pkgs.protobuf}/include";
NIX_ENFORCE_PURITY = 0;
};
}
);
}