# ty https://hoverbear.org/blog/a-flake-for-your-crate/ { lib , naersk , stdenv , clangStdenv , hostPlatform , targetPlatform , pkg-config , libiconv , rustfmt , cargo , rustc }: let cargoToml = (builtins.fromTOML (builtins.readFile ./Cargo.toml)); in naersk.lib."${targetPlatform.system}".buildPackage rec { src = ./.; buildInputs = [ rustfmt pkg-config cargo rustc ]; checkInputs = [ cargo rustc ]; doCheck = true; CARGO_BUILD_INCREMENTAL = "false"; RUST_BACKTRACE = "full"; copyLibs = true; name = cargoToml.package.name; version = cargoToml.package.version; }