fix nix package

This commit is contained in:
Robin Appelman 2025-11-01 16:54:01 +01:00
commit a885a5aabd

View file

@ -1,11 +1,16 @@
{ {
rustPlatform, makeRustPlatform,
rust-bin,
lib, lib,
}: let }: let
inherit (lib.sources) sourceByRegex; inherit (lib.sources) sourceByRegex;
inherit (builtins) fromTOML readFile; inherit (builtins) fromTOML readFile;
src = sourceByRegex ../. ["Cargo.*" "(src|templates)(/.*)?"]; src = sourceByRegex ../. ["Cargo.*" "(src|templates)(/.*)?"];
cargoPackage = (fromTOML (readFile ../Cargo.toml)).package; cargoPackage = (fromTOML (readFile ../Cargo.toml)).package;
rustPlatform = makeRustPlatform {
cargo = rust-bin.stable.latest.minimal;
rustc = rust-bin.stable.latest.minimal;
};
in in
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = cargoPackage.name; pname = cargoPackage.name;