nixpkgs/pkgs/applications/editors/nano/default.nix
Joachim Fasting cf74e83057 nano: add option to do tiny build
Enabling tiny build reduces the binary to 107K on my system
(more than 50% size reduction).
2015-03-25 23:31:21 +01:00

34 lines
813 B
Nix

{ stdenv, fetchurl
, ncurses
, gettext ? null
, enableNls ? false
, enableTiny ? false
}:
assert enableNls -> (gettext != null);
with stdenv.lib;
stdenv.mkDerivation rec {
name = "nano-${version}";
version = "2.4.0";
src = fetchurl {
url = "mirror://gnu/nano/${name}.tar.gz";
sha256 = "1gbm9bcv4k55y01r5q8a8a9s3yrrgq3z5jxxiij3wl404r8gnxjh";
};
buildInputs = [ ncurses ] ++ optional enableNls gettext;
configureFlags = ''
--sysconfdir=/etc
${optionalString (!enableNls) "--disable-nls"}
${optionalString enableTiny "--enable-tiny"}
'';
meta = {
homepage = http://www.nano-editor.org/;
description = "A small, user-friendly console text editor";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ joachifm ];
platforms = platforms.all;
};
}