Merge pull request #136744 from AndersonTorres/new-st

A plethora of ST forks
This commit is contained in:
Anderson Torres 2021-09-06 23:00:17 -03:00 committed by GitHub
commit 674586d428
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 208 additions and 13 deletions

View File

@ -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;

View File

@ -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

View File

@ -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;
};
}

View File

@ -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;
};
}

View File

@ -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;
};
}

View File

@ -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; {

View File

@ -1017,6 +1017,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;