1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 17:14:08 +02:00

auto detect version

This commit is contained in:
Robin Appelman 2024-02-16 13:36:13 +01:00
commit b605290d43

View file

@ -6,13 +6,14 @@
lib, lib,
}: let }: let
inherit (lib.sources) sourceByRegex; inherit (lib.sources) sourceByRegex;
inherit (builtins) fromTOML readFile;
src = sourceByRegex ./. ["Cargo.*" "(src)(/.*)?"]; src = sourceByRegex ./. ["Cargo.*" "(src)(/.*)?"];
version = (fromTOML (readFile ./Cargo.toml)).package.version;
in in
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "haze"; pname = "haze";
version = "0.1.0";
inherit src; inherit src version;
cargoLock = { cargoLock = {
lockFile = ./Cargo.lock; lockFile = ./Cargo.lock;