nix: add option to disable simd in libghostty-vt package

This commit is contained in:
Jeffrey C. Ollie
2026-04-04 15:01:14 -05:00
parent 0a492fdb33
commit 1bd7c19dac
3 changed files with 17 additions and 0 deletions

View File

@@ -770,12 +770,24 @@ jobs:
- name: Check to see if the library looks sane
run: nm result/lib/libghostty-vt.so.0.1.0 2>&1 | grep -q 'ghostty_terminal_new'
- name: Test ReleaseFast (no SIMD) build of libghostty-vt
run: nix build .#libghostty-vt-releasefast-no-simd
- name: Check to see if the library looks sane
run: nm result/lib/libghostty-vt.so.0.1.0 2>&1 | grep -q 'ghostty_terminal_new'
- name: Test Debug build of libghostty-vt
run: nix build .#libghostty-vt-debug
- name: Check to see if the library looks sane
run: nm result/lib/libghostty-vt.so.0.1.0 2>&1 | grep -q 'ghostty_terminal_new'
- name: Test Debug (no SIMD) build of libghostty-vt
run: nix build .#libghostty-vt-debug-no-simd
- name: Check to see if the library looks sane
run: nm result/lib/libghostty-vt.so.0.1.0 2>&1 | grep -q 'ghostty_terminal_new'
build-dist:
runs-on: namespace-profile-ghostty-sm
needs: test

View File

@@ -106,6 +106,9 @@
libghostty-vt-debug = pkgs.callPackage ./nix/libghostty-vt.nix (mkPkgArgs "Debug");
libghostty-vt-releasesafe = pkgs.callPackage ./nix/libghostty-vt.nix (mkPkgArgs "ReleaseSafe");
libghostty-vt-releasefast = pkgs.callPackage ./nix/libghostty-vt.nix (mkPkgArgs "ReleaseFast");
libghostty-vt-debug-no-simd = pkgs.callPackage ./nix/libghostty-vt.nix ((mkPkgArgs "Debug") // {simd = false;});
libghostty-vt-releasesafe-no-simd = pkgs.callPackage ./nix/libghostty-vt.nix ((mkPkgArgs "ReleaseSafe") // {simd = false;});
libghostty-vt-releasefast-no-simd = pkgs.callPackage ./nix/libghostty-vt.nix ((mkPkgArgs "ReleaseFast") // {simd = false;});
libghostty-vt = libghostty-vt-releasefast;
});

View File

@@ -7,6 +7,7 @@
zig_0_15,
revision ? "dirty",
optimize ? "Debug",
simd ? true,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ghostty";
@@ -55,6 +56,7 @@ stdenv.mkDerivation (finalAttrs: {
"-Doptimize=${optimize}"
"-Dapp-runtime=none"
"-Demit-lib-vt=true"
"-Dsimd=${lib.boolToString simd}"
];
outputs = [