Skip to content

Commit

Permalink
fix: Use self.rev first, otherwise fallback on self.dirtyRev, otherwi…
Browse files Browse the repository at this point in the history
…se fallback on hardcoded value for nix flake version
  • Loading branch information
jukefr authored and froz42 committed Dec 11, 2024
1 parent 820f6b6 commit c023b90
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
system: let
pkgs = nixpkgs.legacyPackages.${system};
llvm = pkgs.llvm_18;
#commit = pkgs.lib.removeSuffix "-dirty" self.dirtyShortRev;
commit = builtins.substring 0 12 (pkgs.lib.removeSuffix "-dirty" self.dirtyRev);
commit =
if self ? rev then builtins.substring 0 12 self.rev
else if self ? dirtyRev then builtins.substring 0 12 (pkgs.lib.removeSuffix "-dirty" self.dirtyRev)
else "1.1.4";
funcheck_drv = pkgs.stdenv.mkDerivation (final: {
pname = "funcheck";
version = commit;
Expand Down

0 comments on commit c023b90

Please sign in to comment.