Skip to content

Commit

Permalink
Merge pull request #56 from er4hn/add-nix-flake
Browse files Browse the repository at this point in the history
Add Nix flake to biscuit-cli
  • Loading branch information
divarvel authored Mar 30, 2024
2 parents d4b1cc1 + 7900292 commit 4577fe4
Show file tree
Hide file tree
Showing 2 changed files with 128 additions and 0 deletions.
92 changes: 92 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
naersk.url = "github:nix-community/naersk";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};

outputs = { self, flake-utils, naersk, nixpkgs }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};

naersk' = pkgs.callPackage naersk {};

in rec {
# For `nix build` & `nix run`:
defaultPackage = naersk'.buildPackage {
src = ./.;
};

# For `nix develop`:
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
cargo
clippy
libiconv
rustc
rustfmt
rust-analyzer
];
};
}
);
}

0 comments on commit 4577fe4

Please sign in to comment.