Skip to content

Commit a7adea1

Browse files
committed
Add Nix flake to biscuit-cli
1 parent d4b1cc1 commit a7adea1

File tree

2 files changed

+128
-0
lines changed

2 files changed

+128
-0
lines changed

flake.lock

Lines changed: 92 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
inputs = {
3+
flake-utils.url = "github:numtide/flake-utils";
4+
naersk.url = "github:nix-community/naersk";
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
6+
};
7+
8+
outputs = { self, flake-utils, naersk, nixpkgs }:
9+
flake-utils.lib.eachDefaultSystem (system:
10+
let
11+
pkgs = (import nixpkgs) {
12+
inherit system;
13+
};
14+
15+
naersk' = pkgs.callPackage naersk {};
16+
17+
in rec {
18+
# For `nix build` & `nix run`:
19+
defaultPackage = naersk'.buildPackage {
20+
src = ./.;
21+
};
22+
23+
# For `nix develop`:
24+
devShell = pkgs.mkShell {
25+
nativeBuildInputs = with pkgs; [
26+
cargo
27+
clippy
28+
libiconv
29+
rustc
30+
rustfmt
31+
rust-analyzer
32+
];
33+
};
34+
}
35+
);
36+
}

0 commit comments

Comments
 (0)