-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflake.nix
More file actions
57 lines (52 loc) · 1.23 KB
/
Copy pathflake.nix
File metadata and controls
57 lines (52 loc) · 1.23 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
57
{
description = "A simple and friendlier alternative to Apache Kafka";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
crane = {
url = "github:ipetkov/crane";
};
};
outputs = {
nixpkgs,
crane,
fenix,
...
}: let
forAllSystems = function:
nixpkgs.lib.genAttrs [
"x86_64-linux"
"aarch64-linux"
] (system:
function (import nixpkgs {
inherit system;
overlays = [fenix.overlays.default];
}));
in {
formatter = forAllSystems (pkgs: pkgs.alejandra);
packages = forAllSystems (pkgs: let
craneLib = crane.mkLib pkgs;
commonArgs = {
src = craneLib.cleanCargoSource ./.;
strictDeps = true;
};
in {
default = craneLib.buildPackage (commonArgs
// {
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
});
});
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
nativeBuildInputs = [
pkgs.xxd # useful for debugging
pkgs.rust-analyzer-nightly
pkgs.fenix.stable.defaultToolchain
];
};
});
};
}