3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/editors/mg/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, pkg-config, ncurses, buildPackages }:
2017-09-25 13:00:48 +01:00
2013-07-30 14:53:00 +01:00
stdenv.mkDerivation rec {
pname = "mg";
2021-12-30 20:42:34 +00:00
version = "7.0";
2013-07-30 14:53:00 +01:00
src = fetchFromGitHub {
owner = "ibara";
repo = "mg";
rev = "mg-${version}";
2021-12-30 20:42:34 +00:00
sha256 = "sha256-qnb0yB/NNJV257dsLmP84brajoRG03U+Ja1ACYbBvbE=";
2013-07-30 14:53:00 +01:00
};
2022-04-20 12:21:08 +01:00
postPatch = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
substituteInPlace configure --replace "./conftest" "echo"
'';
2017-09-25 13:00:48 +01:00
enableParallelBuilding = true;
makeFlags = [ "PKG_CONFIG=${buildPackages.pkg-config}/bin/${buildPackages.pkg-config.targetPrefix}pkg-config" ];
2013-07-30 14:53:00 +01:00
installPhase = ''
2017-09-25 13:00:48 +01:00
install -m 555 -Dt $out/bin mg
install -m 444 -Dt $out/share/man/man1 mg.1
2013-07-30 14:53:00 +01:00
'';
nativeBuildInputs = [ pkg-config ];
2017-09-25 13:00:48 +01:00
buildInputs = [ ncurses ];
2013-07-30 14:53:00 +01:00
meta = with lib; {
description = "Micro GNU/emacs, a portable version of the mg maintained by the OpenBSD team";
homepage = "https://man.openbsd.org/OpenBSD-current/man1/mg.1";
license = licenses.publicDomain;
platforms = platforms.all;
2013-07-30 14:53:00 +01:00
};
}