{ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; utils.url = "github:numtide/flake-utils"; }; outputs = { self, nixpkgs, utils }: let cargoToml = with builtins; (fromTOML (readFile ./Cargo.toml)); version = "${cargoToml.package.version}_${builtins.substring 0 8 self.lastModifiedDate}_${self.shortRev or "dirty"}"; in utils.lib.eachDefaultSystem (system: let inherit (nixpkgs) lib; pkgs = import nixpkgs { inherit system; }; vnetod = pkgs.rustPlatform.buildRustPackage { name = "vnetod-${version}"; src = lib.cleanSource ./.; cargoLock.lockFile = ./Cargo.lock; doCheck = true; }; in { apps.default = { type = "app"; program = "${vnetod}/bin/vnetod"; }; packages.default = vnetod; devShell = pkgs.mkShell { packages = with pkgs; [ cargo rustc rustfmt clippy rust-analyzer ]; RUST_SRC_PATH = pkgs.rustPlatform.rustLibSrc; }; overlays = f: p: { inherit vnetod; }; }); }