mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
make dev/install to add a dev install
This commit is contained in:
8
Makefile
8
Makefile
@ -3,6 +3,14 @@ init:
|
||||
git submodule update --init --recursive
|
||||
.PHONY: init
|
||||
|
||||
# Slightly cursed way that we setup a dev version of this locally on NixOS.
|
||||
dev/install:
|
||||
zig build -Dcpu=baseline
|
||||
patchelf --set-rpath "${LD_LIBRARY_PATH}" zig-out/bin/ghostty
|
||||
mkdir -p ${HOME}/bin
|
||||
cp zig-out/bin/ghostty ${HOME}/bin/devtty
|
||||
.PHONY: dev/install
|
||||
|
||||
# glad updates the GLAD loader. To use this, place the generated glad.zip
|
||||
# in this directory next to the Makefile, remove vendor/glad and run this target.
|
||||
#
|
||||
|
@ -22,7 +22,18 @@
|
||||
, libXi
|
||||
, libXinerama
|
||||
, libXrandr
|
||||
}: mkShell rec {
|
||||
}:
|
||||
let
|
||||
# See package.nix. Keep in sync.
|
||||
rpathLibs = [
|
||||
libGL
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
libX11
|
||||
libXcursor
|
||||
libXi
|
||||
libXrandr
|
||||
];
|
||||
in mkShell rec {
|
||||
name = "ghostty";
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -50,5 +61,7 @@
|
||||
libXrandr
|
||||
];
|
||||
|
||||
LD_LIBRARY_PATH = "${libX11}/lib:${libGL}/lib";
|
||||
# This should be set onto the rpath of the ghostty binary if you want
|
||||
# it to be "portable" across the system.
|
||||
LD_LIBRARY_PATH = lib.makeLibraryPath rpathLibs;
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
# TODO(mitchellh): This currenly doesn't fully work. It generates a binary
|
||||
# that smashes the stack on run. I'm not sure why.
|
||||
{ stdenv
|
||||
, lib
|
||||
, libGL
|
||||
|
Reference in New Issue
Block a user