puyo-lang/default.nix
2025-07-02 20:52:30 -04:00

39 lines
608 B
Nix

# 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;
}