build: don't duplicate cargo files in the store

This commit is contained in:
electria 2026-09-28 13:07:29 -07:00
commit 1bb69e7357
Signed by: electria
SSH key fingerprint: SHA256:8LlB3ucPbBHqozqkhsNbaV5oG3SlzzqUj8FZDL6IPQs

View file

@ -12,14 +12,14 @@
let let
pkgs = import inputs.nixpkgs { inherit system; }; pkgs = import inputs.nixpkgs { inherit system; };
cargoToml = fromTOML (builtins.readFile ./Cargo.toml); src = ./.;
cargoToml = fromTOML (builtins.readFile "${src}/Cargo.toml");
name = cargoToml.package.name; name = cargoToml.package.name;
crate = pkgs.rustPlatform.buildRustPackage { crate = pkgs.rustPlatform.buildRustPackage {
inherit name; inherit name src;
src = ./.;
cargoLock.lockFile = ./Cargo.lock; cargoLock.lockFile = "${src}/Cargo.lock";
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
m4 m4