markout/flake.nix

31 lines
835 B
Nix
Raw Normal View History

2022-06-18 01:45:45 +00:00
{
inputs = {
2023-01-11 23:11:02 +00:00
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
2022-06-18 01:45:45 +00:00
};
2023-01-11 23:11:02 +00:00
outputs = { self, nixpkgs, flake-utils, fenix }:
flake-utils.lib.eachDefaultSystem (system:
2022-06-18 01:45:45 +00:00
let
2023-01-11 23:11:02 +00:00
pkgs = import nixpkgs {
inherit system;
overlays = [ fenix.overlays.default ];
};
toolchain = pkgs.fenix.stable;
2022-06-18 01:45:45 +00:00
2023-01-11 23:11:02 +00:00
flakePkgs = { markout = pkgs.callPackage ./. { inherit toolchain; }; };
2022-06-18 01:45:45 +00:00
in rec {
2023-01-11 23:11:02 +00:00
packages = flake-utils.lib.flattenTree flakePkgs;
defaultPackage = packages.markout;
2022-06-18 01:45:45 +00:00
devShell = pkgs.mkShell {
2023-01-11 23:11:02 +00:00
inputsFrom = with packages; [ markout ];
packages = (with pkgs; [ cargo-watch cargo-deny cargo-edit ])
++ (with toolchain; [ cargo rustc rustfmt clippy ]);
2022-06-18 01:45:45 +00:00
};
});
}