mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
nix: we have a package that builds, but doesn't run
This commit is contained in:
@ -1,6 +1,11 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
, lib
|
, lib
|
||||||
|
, autoPatchelfHook
|
||||||
|
, libGL
|
||||||
|
, libX11
|
||||||
, zig
|
, zig
|
||||||
|
, git
|
||||||
|
, makeWrapper
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -9,22 +14,35 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
src = ./..;
|
src = ./..;
|
||||||
|
|
||||||
nativeBuildInputs = [ zig ];
|
nativeBuildInputs = [ autoPatchelfHook git makeWrapper zig ];
|
||||||
|
|
||||||
buildInputs = [];
|
buildInputs = [];
|
||||||
|
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
|
|
||||||
# preBuild = ''
|
buildPhase = ''
|
||||||
# export HOME=$TMPDIR
|
runHook preBuild
|
||||||
# '';
|
# Do nothing
|
||||||
|
runHook postBuild
|
||||||
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
zig build -Drelease-safe --prefix $out install
|
export SDK_PATH=${src}/vendor/mach-sdk
|
||||||
|
zig build -Drelease-safe \
|
||||||
|
--cache-dir $TMP/cache \
|
||||||
|
--global-cache-dir $TMP/global-cache \
|
||||||
|
--prefix $out \
|
||||||
|
install
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
wrapProgram $out/bin/ghostty \
|
||||||
|
--prefix LD_LIBRARY_PATH : ${libGL}/lib \
|
||||||
|
--prefix LD_LIBRARY_PATH : ${libX11}/lib
|
||||||
|
'';
|
||||||
|
|
||||||
outputs = [ "out" ];
|
outputs = [ "out" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
Reference in New Issue
Block a user