mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 07:46:12 +03:00
Merge pull request #1235 from jcollie/nix-full-version
Include the git commit hash in the Nix package.
This commit is contained in:
@ -31,6 +31,7 @@
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs-unstable,
|
||||
nixpkgs-stable,
|
||||
nixpkgs-zig-0-12,
|
||||
@ -54,6 +55,7 @@
|
||||
packages.${system} = rec {
|
||||
ghostty = pkgs-stable.callPackage ./nix/package.nix {
|
||||
inherit (pkgs-zig-0-12) zig_0_12;
|
||||
revision = self.shortRev or self.dirtyShortRev or "dirty";
|
||||
};
|
||||
default = ghostty;
|
||||
};
|
||||
|
@ -1,4 +1,5 @@
|
||||
{
|
||||
self,
|
||||
lib,
|
||||
stdenv,
|
||||
bzip2,
|
||||
@ -23,6 +24,7 @@
|
||||
ncurses,
|
||||
pkg-config,
|
||||
zig_0_12,
|
||||
revision ? "dirty",
|
||||
}: let
|
||||
# The Zig hook has no way to select the release type without actual
|
||||
# overriding of the default flags.
|
||||
@ -121,7 +123,7 @@ in
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
zigBuildFlags = "-Dversion-string=${finalAttrs.version}";
|
||||
zigBuildFlags = "-Dversion-string=${finalAttrs.version}-${revision}-nix";
|
||||
|
||||
preBuild = ''
|
||||
rm -rf $ZIG_GLOBAL_CACHE_DIR
|
||||
|
Reference in New Issue
Block a user