{ inputs = { naersk.url = "github:nix-community/naersk/master"; nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; 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 { name = "lepton"; src = ./.; buildInputs = with pkgs; [ asciidoctor ]; overrideMain = x: x // { postBuild = '' for file in doc/*.adoc; do asciidoctor -b manpage $file done ''; postInstall = '' install -Dm644 doc/nucleus.1 $out/share/man/1/nucleus.1 install -Dm644 doc/intro.1 $out/share/man/5/nucleus.5 ''; }; }; devShell = with pkgs; mkShell { buildInputs = [ cargo rustc rustfmt pre-commit rustPackages.clippy ]; RUST_SRC_PATH = rustPlatform.rustLibSrc; }; }); }