build: add mainProgram and use new flake layout

man-page
Moritz Böhme 2023-08-25 16:48:52 +02:00
parent 37dc5c727a
commit 00d3c0ce84
Signed by: moritz
GPG Key ID: 970C6E89EB0547A9
1 changed files with 5 additions and 2 deletions

View File

@ -12,8 +12,11 @@
naersk-lib = pkgs.callPackage naersk { };
in
{
defaultPackage = naersk-lib.buildPackage ./.;
devShell = with pkgs; mkShell {
packages.default = naersk-lib.buildPackage {
src = ./.;
meta.mainProgram = "timers";
};
devShells.default = with pkgs; mkShell {
buildInputs = [ cargo rustc rustfmt pre-commit rustPackages.clippy rust-analyzer ];
RUST_SRC_PATH = rustPlatform.rustLibSrc;
};