Skip to content

Commit 68ba270

Browse files
committed
fix: read version from Cargo manifest
1 parent 538e3a5 commit 68ba270

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

flake.nix

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
outputs =
2626
{
27+
self,
2728
nixpkgs,
2829
fenix,
2930
flake-utils,
@@ -51,14 +52,13 @@
5152
{
5253
packages.partner-chains = customRustPlatform.buildRustPackage rec {
5354
pname = "partner-chains";
54-
version = "1.7";
55+
version = (builtins.fromTOML (builtins.readFile ./Cargo.toml)).workspace.package.version;
5556
src = ./.;
56-
# preBuild = ''
57-
# export SUBSTRATE_CLI_GIT_COMMIT_HASH=${dirtyShortRev or shortRev}
58-
# '';
57+
preBuild = ''
58+
export SUBSTRATE_CLI_GIT_COMMIT_HASH=${self.dirtyShortRev or self.shortRev}
59+
'';
5960

6061
useFetchCargoVendor = false;
61-
#cargoHash = "sha256-Kg8Z4IWJZ2Ml70JUf8dmIYI6QSYVflq+0lCk790taAc=";
6262
cargoLock = {
6363
lockFile = ./Cargo.lock;
6464
outputHashes = {
@@ -67,7 +67,6 @@
6767
};
6868
};
6969
buildType = "production";
70-
#buildAndTestSubdir = dir;
7170
doCheck = false;
7271
patches = [];
7372

0 commit comments

Comments
 (0)