Compare commits

..
2 changed files with 13 additions and 28 deletions

View file

@ -10,9 +10,6 @@ thiserror = "2.0.18"
version = "1.30"
default-features = false
features = ["std", "float"]
[dependencies.gmp-mpfr-sys]
version = "*"
features = ["force-cross"]
[profile.release]
lto = true

View file

@ -10,43 +10,31 @@
inputs.flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = inputs.nixpkgs.legacyPackages.${system};
lib = inputs.nixpkgs.lib;
src = lib.sourceFilesBySuffices ./. [
"Cargo.toml"
"Cargo.lock"
".rs"
];
pkgs = import inputs.nixpkgs { inherit system; };
src = ./.;
cargoToml = fromTOML (builtins.readFile "${src}/Cargo.toml");
name = cargoToml.package.name;
bin =
{
rustPlatform,
m4,
}:
rustPlatform.buildRustPackage {
crate = pkgs.rustPlatform.buildRustPackage {
inherit name src;
cargoLock.lockFile = "${src}/Cargo.lock";
nativeBuildInputs = [
nativeBuildInputs = with pkgs; [
m4
];
};
default = pkgs.callPackage bin { };
in
{
packages.default = default;
packages.static = pkgs.pkgsStatic.callPackage bin { };
packages.default = crate;
devShells.default = pkgs.mkShell {
inputsFrom = [ default ];
inputsFrom = [ crate ];
packages = with pkgs; [
rustc
cargo
clippy
rustfmt
rust-analyzer