File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 138
138
cp contrib/helix.png $out/share/icons/hicolor/256x256/apps
139
139
installShellCompletion contrib/completion/hx.{bash,fish,zsh}
140
140
'' ;
141
+ # set git revision for nix flake builds, see 'git_hash' in helix-loader/build.rs
142
+ HELIX_NIX_BUILD_REV = self . rev or self . dirtyRev or null ;
141
143
} ) ;
142
144
helix = makeOverridableHelix self . packages . ${ system } . helix-unwrapped { } ;
143
145
default = self . packages . ${ system } . helix ;
Original file line number Diff line number Diff line change @@ -20,7 +20,8 @@ fn main() {
20
20
. output ( )
21
21
. ok ( )
22
22
. filter ( |output| output. status . success ( ) )
23
- . and_then ( |x| String :: from_utf8 ( x. stdout ) . ok ( ) ) ;
23
+ . and_then ( |x| String :: from_utf8 ( x. stdout ) . ok ( ) )
24
+ . or_else ( || option_env ! ( "HELIX_NIX_BUILD_REV" ) . map ( |s| s. to_string ( ) ) ) ;
24
25
25
26
let calver = get_calver ( ) ;
26
27
let version: Cow < _ > = match & git_hash {
You can’t perform that action at this time.
0 commit comments