forge
Explore
Log in

Don't you dare go Hollow

nix: fix NIRI_BUILD_COMMIT when tree is dirty/shortRev is not available

Browse files at this commit

b07bde3ee82dd73115e6b949e4f3f63695da35eaLuckShibaParent: bf142e0
flake.nixmodified+3 -2
@@ -20,6 +20,7 @@
20 rust-overlay,20 rust-overlay,
21 }:21 }:
22 let22 let
23+ revision = self.shortRev or self.dirtyShortRev or "unknown";
23 niri-package =24 niri-package =
24 {25 {
25 lib,26 lib,
@@ -46,7 +47,7 @@
46 47
47 rustPlatform.buildRustPackage {48 rustPlatform.buildRustPackage {
48 pname = "niri";49 pname = "niri";
49- version = self.shortRev or self.dirtyShortRev or "unknown";50+ version = revision;
50 51
51 src = lib.fileset.toSource {52 src = lib.fileset.toSource {
52 root = ./.;53 root = ./.;
@@ -148,7 +149,7 @@
148 "-Wl,--pop-state"149 "-Wl,--pop-state"
149 ]150 ]
150 );151 );
151- NIRI_BUILD_COMMIT = self.shortRev;152+ NIRI_BUILD_COMMIT = revision;
152 };153 };
153 154
154 passthru = {155 passthru = {