Merge pull request #213783 from SuperSandro2000/nox-vte

nixos/vte: use vte without any GUI dependencies; nixos/no-x-libs: add vte
This commit is contained in:
Sandro 2024-02-17 20:55:54 +01:00 committed by GitHub
commit d12bb5b983
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 7 deletions

View File

@ -83,6 +83,7 @@ with lib;
# translateManpages -> perlPackages.po4a -> texlive-combined-basic -> texlive-core-big -> libX11
util-linux = super.util-linux.override { translateManpages = false; };
vim-full = super.vim-full.override { guiSupport = false; };
vte = super.vte.override { gtkVersion = null; };
zbar = super.zbar.override { enableVideo = false; withXorg = false; };
}));
};

View File

@ -1,5 +1,3 @@
# VTE
{ config, pkgs, lib, ... }:
with lib;
@ -9,7 +7,7 @@ let
vteInitSnippet = ''
# Show current working directory in VTE terminals window title.
# Supports both bash and zsh, requires interactive shell.
. ${pkgs.vte}/etc/profile.d/vte.sh
. ${pkgs.vte.override { gtkVersion = null; }}/etc/profile.d/vte.sh
'';
in

View File

@ -33,7 +33,8 @@ stdenv.mkDerivation (finalAttrs: {
pname = "vte";
version = "0.74.2";
outputs = [ "out" "dev" "devdoc" ];
outputs = [ "out" "dev" ]
++ lib.optional (gtkVersion != null) "devdoc";
src = fetchurl {
url = "mirror://gnome/sources/vte/${lib.versions.majorMinor finalAttrs.version}/vte-${finalAttrs.version}.tar.xz";
@ -68,6 +69,7 @@ stdenv.mkDerivation (finalAttrs: {
cairo
fribidi
gnutls
pango # duplicated with propagatedBuildInputs to support gtkVersion == null
pcre2
zlib
icu
@ -75,9 +77,10 @@ stdenv.mkDerivation (finalAttrs: {
systemd
];
propagatedBuildInputs = assert (gtkVersion == "3" || gtkVersion == "4"); [
# Required by vte-2.91.pc.
(if gtkVersion == "3" then gtk3 else gtk4)
# Required by vte-2.91.pc.
propagatedBuildInputs = lib.optionals (gtkVersion != null) [
(assert (gtkVersion == "3" || gtkVersion == "4");
if gtkVersion == "3" then gtk3 else gtk4)
glib
pango
];