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