feat: infer crate version from Cargo.toml

We should never have to update flake.nix on release ever again!
This commit is contained in:
Cainã Costa 2023-07-24 10:30:03 -03:00 committed by Lucas
parent 36cf09ab26
commit 079afa0d8c
1 changed files with 5 additions and 1 deletions

View File

@ -19,9 +19,13 @@
deno = nixpkgs.legacyPackages.${system}.deno; deno = nixpkgs.legacyPackages.${system}.deno;
cargoTomlContents = builtins.readFile ./crates/aiken/Cargo.toml;
version = (builtins.fromTOML cargoTomlContents).package.version;
aiken = pkgs.rustPlatform.buildRustPackage { aiken = pkgs.rustPlatform.buildRustPackage {
inherit version;
name = "aiken"; name = "aiken";
version = "1.0.13-alpha";
buildInputs = with pkgs; [ openssl ] ++ osxDependencies; buildInputs = with pkgs; [ openssl ] ++ osxDependencies;
nativeBuildInputs = with pkgs; [ pkg-config openssl.dev ]; nativeBuildInputs = with pkgs; [ pkg-config openssl.dev ];