2017-04-22 00:44:19 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, gtk, gettext, ncurses, libiconv, libintlOrEmpty
|
2017-02-15 14:58:19 +01:00
|
|
|
, withBuildColors ? true
|
|
|
|
}:
|
2012-05-14 23:43:46 +02:00
|
|
|
|
2014-11-23 23:37:53 +01:00
|
|
|
assert withBuildColors -> ncurses != null;
|
|
|
|
|
2012-05-14 23:43:46 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2014-11-23 23:37:53 +01:00
|
|
|
name = "girara-${version}";
|
2017-02-15 14:58:19 +01:00
|
|
|
version = "0.2.7";
|
2012-05-14 23:43:46 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-02-15 14:58:19 +01:00
|
|
|
url = "http://pwmt.org/projects/girara/download/${name}.tar.gz";
|
|
|
|
sha256 = "1r9jbhf9n40zj4ddqv1q5spijpjm683nxg4hr5lnir4a551s7rlq";
|
2012-05-14 23:43:46 +02:00
|
|
|
};
|
|
|
|
|
2014-11-23 23:37:53 +01:00
|
|
|
preConfigure = ''
|
2017-02-15 14:58:19 +01:00
|
|
|
substituteInPlace colors.mk \
|
|
|
|
--replace 'ifdef TPUT_AVAILABLE' 'ifneq ($(TPUT_AVAILABLE), 0)'
|
2014-11-23 23:37:53 +01:00
|
|
|
'';
|
|
|
|
|
2017-09-05 23:26:13 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ gtk gettext libintlOrEmpty ]
|
2017-04-22 00:44:19 +02:00
|
|
|
++ stdenv.lib.optional stdenv.isDarwin libiconv;
|
|
|
|
|
|
|
|
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
|
2012-05-14 23:43:46 +02:00
|
|
|
|
2017-02-15 14:58:19 +01:00
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=$(out)"
|
|
|
|
(if withBuildColors
|
|
|
|
then "TPUT=${ncurses.out}/bin/tput"
|
|
|
|
else "TPUT_AVAILABLE=0")
|
|
|
|
];
|
2012-05-14 23:43:46 +02:00
|
|
|
|
2017-02-15 14:58:19 +01:00
|
|
|
meta = with stdenv.lib; {
|
2017-08-02 23:50:51 +02:00
|
|
|
homepage = https://pwmt.org/projects/girara/;
|
2012-05-14 23:43:46 +02:00
|
|
|
description = "User interface library";
|
|
|
|
longDescription = ''
|
|
|
|
girara is a library that implements a GTK+ based VIM-like user interface
|
|
|
|
that focuses on simplicity and minimalism.
|
|
|
|
'';
|
2014-11-23 23:37:53 +01:00
|
|
|
license = licenses.zlib;
|
2017-04-22 00:44:19 +02:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2014-11-23 23:37:53 +01:00
|
|
|
maintainers = [ maintainers.garbas ];
|
2012-05-14 23:43:46 +02:00
|
|
|
};
|
|
|
|
}
|