From d26f8c444f868278b1dfe764daa049b40a986694 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Sat, 4 Sep 2021 18:43:33 -0300 Subject: st: small cosmetic rewrite --- pkgs/applications/terminal-emulators/st/default.nix | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'pkgs/applications/terminal-emulators') 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; -- cgit 1.4.1