about summary refs log tree commit diff
path: root/pkgs/applications/terminal-emulators
diff options
context:
space:
mode:
authorAndersonTorres <torres.anderson.85@protonmail.com>2021-09-05 00:01:54 -0300
committerAndersonTorres <torres.anderson.85@protonmail.com>2021-09-06 00:18:26 -0300
commit2312cef179544db7bedf6c9464a12ad41cd7eea6 (patch)
tree633198cb13b456c0154ab1870c3bb1ca36e835d0 /pkgs/applications/terminal-emulators
parent72dfd9f635c1d1f702e05445865f076ca3d0565b (diff)
lukesmithxyz-st: init at 0.0.0+unstable=2021-08-10
Diffstat (limited to 'pkgs/applications/terminal-emulators')
-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
2 files changed, 70 insertions, 0 deletions
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;
+  };
+}