25 lines
710 B
Nix
25 lines
710 B
Nix
{
|
|
inputs = {
|
|
naersk.url = "github:nix-community/naersk/master";
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
|
utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, rust-overlay, utils, naersk }:
|
|
utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
|
|
naersk-lib = pkgs.callPackage naersk {};
|
|
in
|
|
{
|
|
defaultPackage = naersk-lib.buildPackage {
|
|
src = ./.;
|
|
doCheck = true;
|
|
};
|
|
devShell = with pkgs; mkShell {
|
|
nativeBuildInputs = with pkgs; [rustc cargo rustfmt pre-commit];
|
|
};
|
|
});
|
|
} |