nixpkgs/pkgs/applications/editors/mg/default.nix

33 lines
941 B
Nix
Raw Normal View History

{ stdenv, fetchurl, pkgconfig, ncurses, buildPackages, libbsd }:
2017-09-25 05:00:48 -07:00
2013-07-30 06:53:00 -07:00
stdenv.mkDerivation rec {
pname = "mg";
version = "20180927";
2013-07-30 06:53:00 -07:00
src = fetchurl {
url = "https://github.com/hboetes/mg/archive/${version}.tar.gz";
sha256 = "fbb09729ea00fe42dcdbc96ac7fc1d2b89eac651dec49e4e7af52fad4f5788f6";
2013-07-30 06:53:00 -07:00
};
2017-09-25 05:00:48 -07:00
enableParallelBuilding = true;
2019-03-16 08:39:59 -07:00
makeFlags = [ "PKG_CONFIG=${buildPackages.pkgconfig}/bin/pkg-config" ];
2013-07-30 06:53:00 -07:00
installPhase = ''
2017-09-25 05:00:48 -07:00
install -m 555 -Dt $out/bin mg
install -m 444 -Dt $out/share/man/man1 mg.1
2013-07-30 06:53:00 -07:00
'';
nativeBuildInputs = [ pkgconfig ];
2017-09-25 05:00:48 -07:00
patches = ./darwin_no_libbsd.patch;
buildInputs = [ ncurses ] ++ stdenv.lib.optional (!stdenv.isDarwin) libbsd;
2013-07-30 06:53:00 -07:00
meta = with stdenv.lib; {
description = "Micro GNU/emacs, a portable version of the mg maintained by the OpenBSD team";
2017-09-25 05:00:48 -07:00
homepage = "https://homepage.boetes.org/software/mg";
license = licenses.publicDomain;
platforms = platforms.all;
2013-07-30 06:53:00 -07:00
};
}