chore: add git rev to nix pkg version (#206)

This commit is contained in:
XYenon 2023-10-17 00:45:22 +08:00 committed by GitHub
parent 04a09b97fe
commit 952c3009e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,9 @@
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
yazi = pkgs.callPackage ./nix/yazi.nix { };
versionSuffix = "pre${builtins.substring 0 8 (self.lastModifiedDate or self.lastModified or "19700101")}_${self.shortRev or "dirty"}";
version = (builtins.fromTOML (builtins.readFile ./app/Cargo.toml)).package.version + versionSuffix;
yazi = pkgs.callPackage ./nix/yazi.nix { inherit version; };
in
{
packages.default = yazi;