Files
nixpkgs/pkgs/by-name/ml/mle/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

58 lines
1.0 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
pcre2,
uthash,
lua5_4,
makeWrapper,
installShellFiles,
}:
stdenv.mkDerivation rec {
pname = "mle";
version = "1.7.2";
src = fetchFromGitHub {
owner = "adsr";
repo = "mle";
rev = "v${version}";
sha256 = "0rkk7mh6w5y1lrbdv7wmxdgl5cqzpzw0p26adazkqlfdyb6wbj9k";
};
# Fix location of Lua 5.4 header and library
postPatch = ''
substituteInPlace Makefile --replace "-llua5.4" "-llua";
substituteInPlace mle.h --replace "<lua5.4/" "<";
patchShebangs tests/*
'';
nativeBuildInputs = [
makeWrapper
installShellFiles
];
buildInputs = [
pcre2
uthash
lua5_4
];
doCheck = true;
installFlags = [ "prefix=${placeholder "out"}" ];
postInstall = ''
installManPage mle.1
'';
meta = with lib; {
description = "Small, flexible, terminal-based text editor";
homepage = "https://github.com/adsr/mle";
license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ adsr ];
mainProgram = "mle";
};
}