mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
st: small cosmetic rewrite
This commit is contained in:
parent
81254b1a1f
commit
d26f8c444f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user