From 2312cef179544db7bedf6c9464a12ad41cd7eea6 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Sun, 5 Sep 2021 00:01:54 -0300 Subject: [PATCH] lukesmithxyz-st: init at 0.0.0+unstable=2021-08-10 --- .../0000-makefile-fix-install.diff | 14 +++++ .../st/lukesmithxyz-st/default.nix | 56 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 3 + 3 files changed, 73 insertions(+) create mode 100644 pkgs/applications/terminal-emulators/st/lukesmithxyz-st/0000-makefile-fix-install.diff create mode 100644 pkgs/applications/terminal-emulators/st/lukesmithxyz-st/default.nix 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 000000000000..f451297dffa9 --- /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 000000000000..f285d0fc73b9 --- /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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a4c0ca19eade..57d9409e02b8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1015,6 +1015,9 @@ with pkgs; extraLibs = config.st.extraLibs or []; }; xst = callPackage ../applications/terminal-emulators/st/xst.nix { }; + lukesmithxyz-st = callPackage ../applications/terminal-emulators/st/lukesmithxyz-st { }; + mcaimi-st = callPackage ../applications/terminal-emulators/st/mcaimi-st.nix { }; + siduck76-st = callPackage ../applications/terminal-emulators/st/siduck76-st.nix { }; stupidterm = callPackage ../applications/terminal-emulators/stupidterm { gtk = gtk3;