biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / applications / editors / mg / default.nix
blobc54cd01dbf281c52f4ebd3bafd79369563ccf3f0
1 { lib, stdenv, fetchFromGitHub, pkg-config, ncurses, buildPackages }:
3 stdenv.mkDerivation rec {
4   pname = "mg";
5   version = "7.3";
7   src = fetchFromGitHub {
8     owner = "ibara";
9     repo = "mg";
10     rev = "mg-${version}";
11     sha256 = "sha256-88FrXN7h5uRLY8YMKSzUjBF4n18DEiiiDyoYr+7qXdQ=";
12   };
14   postPatch = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
15     substituteInPlace configure --replace "./conftest" "echo"
16   '';
18   enableParallelBuilding = true;
20   makeFlags = [ "PKG_CONFIG=${buildPackages.pkg-config}/bin/${buildPackages.pkg-config.targetPrefix}pkg-config" ];
22   installPhase = ''
23     install -m 555 -Dt $out/bin mg
24     install -m 444 -Dt $out/share/man/man1 mg.1
25   '';
26   nativeBuildInputs = [ pkg-config ];
28   buildInputs = [ ncurses ];
30   meta = with lib; {
31     description = "Micro GNU/emacs, a portable version of the mg maintained by the OpenBSD team";
32     homepage = "https://man.openbsd.org/OpenBSD-current/man1/mg.1";
33     license = licenses.publicDomain;
34     mainProgram = "mg";
35     platforms = platforms.all;
36   };