Unverified Commit a4dde5a1 authored by Maciej Krüger's avatar Maciej Krüger Committed by GitHub
Browse files

Merge pull request #253334 from nbraud/nixos/terminfo

parents 49f1b362 c5de4a5b
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -16,16 +16,24 @@ with lib;

  config = {

    # can be generated with: filter (drv: (builtins.tryEval (drv ? terminfo)).value) (attrValues pkgs)
    # can be generated with:
    # attrNames (filterAttrs
    #  (_: drv: (builtins.tryEval (isDerivation drv && drv ? terminfo)).value)
    #  pkgs)
    environment.systemPackages = mkIf config.environment.enableAllTerminfo (map (x: x.terminfo) (with pkgs; [
      alacritty
      contour
      foot
      kitty
      mtm
      rio
      rxvt-unicode-unwrapped
      rxvt-unicode-unwrapped-emoji
      st
      termite
      tmux
      wezterm
      yaft
    ]));

    environment.pathsToLink = [
+8 −0
Original line number Diff line number Diff line
@@ -47,6 +47,8 @@ mkDerivation rec {
    sha256 = "sha256-TpxVC0GFZD3jGISnDWHKEetgVVpznm5k/Vc2dwVfSG4=";
  };

  outputs = [ "out" "terminfo" ];

  nativeBuildInputs = [
    cmake
    pkg-config
@@ -86,6 +88,12 @@ mkDerivation rec {
    sed -i '/fixup_bundle/d' src/contour/CMakeLists.txt
  '';

  postInstall = ''
    mkdir -p $out/nix-support $terminfo/share
    mv $out/share/terminfo $terminfo/share/
    echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
  '';

  passthru.tests.test = nixosTests.terminal-emulators.contour;

  meta = with lib; {
+5 −1
Original line number Diff line number Diff line
@@ -23,6 +23,8 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-82NZeZc06ueFvss3QGPwvoM88i+ItPFpzSUbmTJOCOc=";
  };

  outputs = [ "out" "terminfo" ];

  inherit patches;

  configFile = lib.optionalString (conf != null)
@@ -51,7 +53,9 @@ stdenv.mkDerivation (finalAttrs: {
  ] ++ extraLibs;

  preInstall = ''
    export TERMINFO=$out/share/terminfo
    export TERMINFO=$terminfo/share/terminfo
    mkdir -p $TERMINFO $out/nix-support
    echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
  '';

  installFlags = [ "PREFIX=$(out)" ];
+8 −0
Original line number Diff line number Diff line
@@ -4,6 +4,8 @@ stdenv.mkDerivation rec {
  version = "0.2.9";
  pname = "yaft";

  outputs = [ "out" "terminfo" ];

  src = fetchFromGitHub {
    owner = "uobikiemukot";
    repo = "yaft";
@@ -15,6 +17,12 @@ stdenv.mkDerivation rec {

  installFlags = [ "PREFIX=$(out)" "MANPREFIX=$(out)/share/man" ];

  postInstall = ''
    mkdir -p $out/nix-support $terminfo/share
    mv $out/share/terminfo $terminfo/share/
    echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
  '';

  meta = {
    homepage = "https://github.com/uobikiemukot/yaft";
    description = "Yet another framebuffer terminal";