domani/flake.nix

25 lines
722 B
Nix
Raw Normal View History

2023-05-03 07:58:06 +00:00
{
inputs = {
naersk.url = "github:nix-community/naersk/master";
2023-05-04 12:56:31 +00:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";
2023-05-03 07:58:06 +00:00
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils, naersk }:
utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
naersk-lib = pkgs.callPackage naersk { };
in
{
defaultPackage = naersk-lib.buildPackage ./.;
devShell = with pkgs; mkShell {
buildInputs = [ cargo rustc rustfmt pre-commit rustPackages.clippy ];
RUST_SRC_PATH = rustPlatform.rustLibSrc;
2023-05-04 12:56:31 +00:00
shellHook = ''
export CARGO_HOME=$(pwd)/.cargo
'';
2023-05-03 07:58:06 +00:00
};
});
}