about summary refs log tree commit diff
path: root/pkgs/applications/terminal-emulators
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/terminal-emulators')
-rw-r--r--pkgs/applications/terminal-emulators/darktile/default.nix68
-rw-r--r--pkgs/applications/terminal-emulators/foot/default.nix51
-rw-r--r--pkgs/applications/terminal-emulators/hyper/default.nix4
-rw-r--r--pkgs/applications/terminal-emulators/st/default.nix21
-rw-r--r--pkgs/applications/terminal-emulators/st/lukesmithxyz-st/0000-makefile-fix-install.diff14
-rw-r--r--pkgs/applications/terminal-emulators/st/lukesmithxyz-st/default.nix56
-rw-r--r--pkgs/applications/terminal-emulators/st/mcaimi-st.nix49
-rw-r--r--pkgs/applications/terminal-emulators/st/siduck76-st.nix51
-rw-r--r--pkgs/applications/terminal-emulators/st/xst.nix27
9 files changed, 309 insertions, 32 deletions
diff --git a/pkgs/applications/terminal-emulators/darktile/default.nix b/pkgs/applications/terminal-emulators/darktile/default.nix
new file mode 100644
index 0000000000000..f632329495010
--- /dev/null
+++ b/pkgs/applications/terminal-emulators/darktile/default.nix
@@ -0,0 +1,68 @@
+{ stdenv
+, buildGoModule
+, fetchFromGitHub
+, lib
+, go
+, pkg-config
+, libX11
+, libXcursor
+, libXrandr
+, libXinerama
+, libXi
+, libXext
+, libXxf86vm
+, libGL
+}:
+
+stdenv.mkDerivation rec {
+  pname = "darktile";
+  version = "0.0.10";
+
+  src = fetchFromGitHub {
+    owner = "liamg";
+    repo = "darktile";
+    rev = "v${version}";
+    sha256 = "0pdj4yv3qrq56gb67p85ara3g8qrzw5ha787bl2ls4vcx85q7303";
+  };
+
+  nativeBuildInputs = [ go pkg-config ];
+
+  buildInputs = [
+    libX11
+    libXcursor
+    libXrandr
+    libXinerama
+    libXi
+    libXext
+    libXxf86vm
+    libGL
+  ];
+
+  postPatch = ''
+    substituteInPlace scripts/build.sh \
+      --replace "bash" "sh"
+  '';
+
+  postConfigure = ''
+    export GOPATH=$TMP/go
+  '';
+
+  makeFlags = [ "HOME=$TMP" ];
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm755 darktile -t $out/bin
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "A GPU rendered terminal emulator designed for tiling window managers";
+    homepage = "https://github.com/liamg/darktile";
+    downloadPage = "https://github.com/liamg/darktile/releases";
+    changelog = "https://github.com/liamg/darktile/releases/tag/v${version}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ flexagoon ];
+  };
+}
diff --git a/pkgs/applications/terminal-emulators/foot/default.nix b/pkgs/applications/terminal-emulators/foot/default.nix
index 8e7bbed909789..ec75454514c4d 100644
--- a/pkgs/applications/terminal-emulators/foot/default.nix
+++ b/pkgs/applications/terminal-emulators/foot/default.nix
@@ -2,7 +2,6 @@
 , lib
 , fetchFromGitea
 , fetchurl
-, fetchpatch
 , runCommand
 , fcft
 , freetype
@@ -28,7 +27,7 @@
 }:
 
 let
-  version = "1.8.2";
+  version = "1.9.0";
 
   # build stimuli file for PGO build and the script to generate it
   # independently of the foot's build, so we can cache the result
@@ -89,6 +88,8 @@ let
   # using a compiler which foot's PGO build supports (clang or gcc)
   doPgo = allowPgo && (stdenv.hostPlatform == stdenv.buildPlatform)
     && compilerName != "unknown";
+
+  terminfoDir = "${placeholder "terminfo"}/share/terminfo";
 in
 stdenv.mkDerivation rec {
   pname = "foot";
@@ -99,18 +100,9 @@ stdenv.mkDerivation rec {
     owner = "dnkl";
     repo = pname;
     rev = version;
-    sha256 = "1k0alz991cslls4926c5gq02pdq0vfw9jfpprh2a1vb59xgikv7h";
+    sha256 = "0mkzq5lbgl5qp5nj8sk5gyg9hrrklmbjdqzlcr2a6rlmilkxlhwm";
   };
 
-  patches = [
-    # Fixes PGO builds with clang
-    (fetchpatch {
-      url = "https://codeberg.org/dnkl/foot/commit/2acd4b34c57659d86dca76c58e4363de9b0a1f17.patch";
-      sha256 = "13xi9ppaqx2p88cxbh6801ry9ral70ylh40agn6ij7pklybs4d7s";
-      includes = [ "pgo/pgo.c" ];
-    })
-  ];
-
   depsBuildBuild = [
     pkg-config
   ];
@@ -154,7 +146,15 @@ stdenv.mkDerivation rec {
 
   mesonFlags = [
     "-Db_lto=true"
-    "-Dterminfo-install-location=${placeholder "terminfo"}/share/terminfo"
+    # Prevent foot from installing its terminfo file into a custom location,
+    # we need to do this manually in postInstall.
+    # See https://codeberg.org/dnkl/foot/pulls/673,
+    # https://codeberg.org/dnkl/foot/src/tag/1.9.0/INSTALL.md#options
+    "-Dterminfo=disabled"
+    # Ensure TERM=foot is used
+    "-Ddefault-terminfo=foot"
+    # Tell foot what to set TERMINFO to
+    "-Dcustom-terminfo-install-location=${terminfoDir}"
   ];
 
   # build and run binary generating PGO profiles,
@@ -174,11 +174,11 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "terminfo" ];
 
-  # make sure nix-env and buildEnv also include the
-  # terminfo output when the package is installed
   postInstall = ''
-    mkdir -p "$out/nix-support"
-    echo "$terminfo" >> "$out/nix-support/propagated-user-env-packages"
+    # build and install foot's terminfo to the standard location
+    # instead of its custom location
+    mkdir -p "${terminfoDir}"
+    tic -o "${terminfoDir}" -x -e foot,foot-direct "$NIX_BUILD_TOP/$sourceRoot/foot.info"
   '';
 
   passthru.tests = {
@@ -189,6 +189,10 @@ stdenv.mkDerivation rec {
     clang-latest-compilation = foot.override {
       inherit (llvmPackages_latest) stdenv;
     };
+
+    noPgo = foot.override {
+      allowPgo = false;
+    };
   };
 
   meta = with lib; {
@@ -198,5 +202,18 @@ stdenv.mkDerivation rec {
     license = licenses.mit;
     maintainers = [ maintainers.sternenseemann ];
     platforms = platforms.linux;
+    # From (presumably) ncurses version 6.3, it will ship a foot
+    # terminfo file. This however won't include some non-standard
+    # capabilities foot's bundled terminfo file contains. Unless we
+    # want to have some features in e. g. vim or tmux stop working,
+    # we need to make sure that the foot terminfo overwrites ncurses'
+    # one. Due to <nixpkgs/nixos/modules/config/system-path.nix>
+    # ncurses is always added to environment.systemPackages on
+    # NixOS with its priority increased by 3, so we need to go
+    # one bigger.
+    # This doesn't matter a lot for local use since foot sets
+    # TERMINFO to a store path, but allows installing foot.terminfo
+    # on remote systems for proper foot terminfo support.
+    priority = (ncurses.meta.priority or 5) + 3 + 1;
   };
 }
diff --git a/pkgs/applications/terminal-emulators/hyper/default.nix b/pkgs/applications/terminal-emulators/hyper/default.nix
index 5aa14a0426134..1d200824535d3 100644
--- a/pkgs/applications/terminal-emulators/hyper/default.nix
+++ b/pkgs/applications/terminal-emulators/hyper/default.nix
@@ -15,11 +15,11 @@ let
 in
 stdenv.mkDerivation rec {
   pname = "hyper";
-  version = "3.1.2";
+  version = "3.1.3";
 
   src = fetchurl {
     url = "https://github.com/vercel/hyper/releases/download/v${version}/hyper_${version}_amd64.deb";
-    sha256 = "1mixy9hlgdbbnwdgidady7q828dkf09lx1pacwxw386jj7kp4y5g";
+    sha256 = "sha256-w+FISIeGf3K1dnykIEzU3KevyaFNl4X0beT6DdLW+zQ=";
   };
 
   nativeBuildInputs = [ dpkg ];
diff --git a/pkgs/applications/terminal-emulators/st/default.nix b/pkgs/applications/terminal-emulators/st/default.nix
index 591b68b49ab00..3a2180ce8d82e 100644
--- a/pkgs/applications/terminal-emulators/st/default.nix
+++ b/pkgs/applications/terminal-emulators/st/default.nix
@@ -2,34 +2,33 @@
 , stdenv
 , fetchurl
 , pkg-config
-, writeText
-, libX11
-, ncurses
 , fontconfig
 , freetype
+, libX11
 , libXft
+, ncurses
+, writeText
 , conf ? null
 , patches ? [ ]
 , extraLibs ? [ ]
 }:
 
-with lib;
-
 stdenv.mkDerivation rec {
   pname = "st";
   version = "0.8.4";
 
   src = fetchurl {
     url = "https://dl.suckless.org/st/${pname}-${version}.tar.gz";
-    sha256 = "19j66fhckihbg30ypngvqc9bcva47mp379ch5vinasjdxgn3qbfl";
+    hash = "sha256-1C087OtNamXjLpClM249RG22EsP72evBeAvGyaAzRqY=";
   };
 
   inherit patches;
 
-  configFile = optionalString (conf != null) (writeText "config.def.h" conf);
+  configFile = lib.optionalString (conf != null)
+    (writeText "config.def.h" conf);
 
-  postPatch = optionalString (conf != null) "cp ${configFile} config.def.h"
-    + optionalString stdenv.isDarwin ''
+  postPatch = lib.optionalString (conf != null) "cp ${configFile} config.def.h"
+    + lib.optionalString stdenv.isDarwin ''
     substituteInPlace config.mk --replace "-lrt" ""
   '';
 
@@ -52,11 +51,13 @@ stdenv.mkDerivation rec {
 
   installPhase = ''
     runHook preInstall
+
     TERMINFO=$out/share/terminfo make install PREFIX=$out
+
     runHook postInstall
   '';
 
-  meta = {
+  meta = with lib; {
     homepage = "https://st.suckless.org/";
     description = "Simple Terminal for X from Suckless.org Community";
     license = licenses.mit;
diff --git a/pkgs/applications/terminal-emulators/st/lukesmithxyz-st/0000-makefile-fix-install.diff b/pkgs/applications/terminal-emulators/st/lukesmithxyz-st/0000-makefile-fix-install.diff
new file mode 100644
index 0000000000000..f451297dffa9d
--- /dev/null
+++ b/pkgs/applications/terminal-emulators/st/lukesmithxyz-st/0000-makefile-fix-install.diff
@@ -0,0 +1,14 @@
+diff -Naur old/Makefile new/Makefile
+--- old/Makefile	1969-12-31 21:00:01.000000000 -0300
++++ new/Makefile	2021-09-06 00:10:26.972466947 -0300
+@@ -40,8 +40,8 @@
+ 	rm -rf st-$(VERSION)
+ 
+ install: st
+-	git submodule init
+-	git submodule update
++#	git submodule init
++#	git submodule update
+ 	mkdir -p $(DESTDIR)$(PREFIX)/bin
+ 	cp -f st $(DESTDIR)$(PREFIX)/bin
+ 	cp -f st-copyout $(DESTDIR)$(PREFIX)/bin
diff --git a/pkgs/applications/terminal-emulators/st/lukesmithxyz-st/default.nix b/pkgs/applications/terminal-emulators/st/lukesmithxyz-st/default.nix
new file mode 100644
index 0000000000000..f285d0fc73b92
--- /dev/null
+++ b/pkgs/applications/terminal-emulators/st/lukesmithxyz-st/default.nix
@@ -0,0 +1,56 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fontconfig
+, harfbuzz
+, libX11
+, libXext
+, libXft
+, ncurses
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lukesmithxyz-st";
+  version = "0.0.0+unstable=2021-08-10";
+
+  src = fetchFromGitHub {
+    owner = "LukeSmithxyz";
+    repo = "st";
+    rev = "e053bd6036331cc7d14f155614aebc20f5371d3a";
+    hash = "sha256-WwjuNxWoeR/ppJxJgqD20kzrn1kIfgDarkTOedX/W4k=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+  buildInputs = [
+    fontconfig
+    harfbuzz
+    libX11
+    libXext
+    libXft
+    ncurses
+  ];
+
+  patches = [
+    # eliminate useless calls to git inside Makefile
+    ./0000-makefile-fix-install.diff
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    TERMINFO=$out/share/terminfo make install PREFIX=$out
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/LukeSmithxyz/st";
+    description = "Luke Smith's fork of st";
+    license = licenses.mit;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/terminal-emulators/st/mcaimi-st.nix b/pkgs/applications/terminal-emulators/st/mcaimi-st.nix
new file mode 100644
index 0000000000000..847638f304f36
--- /dev/null
+++ b/pkgs/applications/terminal-emulators/st/mcaimi-st.nix
@@ -0,0 +1,49 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fontconfig
+, libX11
+, libXext
+, libXft
+, ncurses
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mcaimi-st";
+  version = "0.0.0+unstable=2021-08-30";
+
+  src = fetchFromGitHub {
+    owner = "mcaimi";
+    repo = "st";
+    rev = "1a8cad03692ee6d32c03a136cdc76bdb169e15d8";
+    hash = "sha256-xyVEvD8s1J9Wj9NB4Gg+0ldvde7M8IVpzCOTttC1IY0=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+  buildInputs = [
+    fontconfig
+    libX11
+    libXext
+    libXft
+    ncurses
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    TERMINFO=$out/share/terminfo make install PREFIX=$out
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/gnotclub/xst";
+    description = "Suckless Terminal fork";
+    license = licenses.mit;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/terminal-emulators/st/siduck76-st.nix b/pkgs/applications/terminal-emulators/st/siduck76-st.nix
new file mode 100644
index 0000000000000..55fcebff0e3d6
--- /dev/null
+++ b/pkgs/applications/terminal-emulators/st/siduck76-st.nix
@@ -0,0 +1,51 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fontconfig
+, harfbuzz
+, libX11
+, libXext
+, libXft
+, ncurses
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "siduck76-st";
+  version = "0.0.0+unstable=2021-08-20";
+
+  src = fetchFromGitHub {
+    owner = "siduck76";
+    repo = "st";
+    rev = "c9bda1de1f3f94ba507fa0eacc96d6a4f338637f";
+    hash = "sha256-5n+QkSlVhhku7adtl7TuWhDl3zdwFaXc7Ot1RaIN54A=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+  buildInputs = [
+    fontconfig
+    harfbuzz
+    libX11
+    libXext
+    libXft
+    ncurses
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    TERMINFO=$out/share/terminfo make install PREFIX=$out
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/siduck76/st";
+    description = "A fork of st with many add-ons";
+    license = licenses.mit;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/terminal-emulators/st/xst.nix b/pkgs/applications/terminal-emulators/st/xst.nix
index baa71a09b9ebe..b8bceda50dcd4 100644
--- a/pkgs/applications/terminal-emulators/st/xst.nix
+++ b/pkgs/applications/terminal-emulators/st/xst.nix
@@ -1,4 +1,13 @@
-{ lib, stdenv, fetchFromGitHub, pkg-config, libX11, ncurses, libXext, libXft, fontconfig }:
+{ lib
+, stdenv
+, fetchFromGitHub
+, fontconfig
+, libX11
+, libXext
+, libXft
+, ncurses
+, pkg-config
+}:
 
 stdenv.mkDerivation rec {
   pname = "xst";
@@ -11,11 +20,23 @@ stdenv.mkDerivation rec {
     sha256 = "nOJcOghtzFkl7B/4XeXptn2TdrGQ4QTKBo+t+9npxOA=";
   };
 
-  nativeBuildInputs = [ pkg-config ];
-  buildInputs = [ libX11 ncurses libXext libXft fontconfig ];
+  nativeBuildInputs = [
+    pkg-config
+  ];
+  buildInputs = [
+    fontconfig
+    libX11
+    libXext
+    libXft
+    ncurses
+  ];
 
   installPhase = ''
+    runHook preInstall
+
     TERMINFO=$out/share/terminfo make install PREFIX=$out
+
+    runHook postInstall
   '';
 
   meta = with lib; {