mirror of
https://github.com/Hopiu/lychee.git
synced 2026-03-17 05:00:26 +00:00
Extract version number programmatically
This commit is contained in:
parent
a8e648a2c7
commit
38645a1c1c
1 changed files with 7 additions and 1 deletions
|
|
@ -1,10 +1,16 @@
|
|||
{ pkgs }:
|
||||
let
|
||||
version =
|
||||
let
|
||||
cargoToml = builtins.readFile ./Cargo.toml;
|
||||
match = builtins.match ''.*version = "([^"]+)".*'' cargoToml;
|
||||
in
|
||||
if match != null then builtins.elemAt match 0 else throw "Version not found in Cargo.toml";
|
||||
in
|
||||
{
|
||||
app = pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "lychee";
|
||||
version = "0.17.0";
|
||||
inherit version;
|
||||
src = ./.;
|
||||
|
||||
cargoLock = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue