Files
nixpkgs/pkgs/by-name/mb/mblaze/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

79 lines
1.8 KiB
Nix

{
coreutils,
fetchFromGitHub,
file,
gawk,
gnugrep,
gnused,
installShellFiles,
lib,
libiconv,
makeWrapper,
stdenv,
ruby,
}:
stdenv.mkDerivation rec {
pname = "mblaze";
version = "1.3";
nativeBuildInputs = [
installShellFiles
makeWrapper
];
buildInputs = [
libiconv
ruby
];
src = fetchFromGitHub {
owner = "leahneukirchen";
repo = "mblaze";
rev = "v${version}";
sha256 = "sha256-398wiXJ/iG9ZfPGDZc57xH37lft3NpEZuLE0Qhb2GGc=";
};
makeFlags = [ "PREFIX=$(out)" ];
enableParallelBuilding = true;
postInstall = ''
installShellCompletion contrib/_mblaze
''
+ lib.optionalString (ruby != null) ''
install -Dt $out/bin contrib/msuck contrib/mblow
# The following wrappings are used to preserve the executable
# names (the value of $0 in a script). The script mcom is
# designed to be run directly or via symlinks such as mrep. Using
# symlinks changes the value of $0 in the script, and makes it
# behave differently. When using the wrapProgram tool, the resulting
# wrapper breaks this behaviour. The following wrappers preserve it.
mkdir -p $out/wrapped
for x in mcom mbnc mfwd mrep; do
mv $out/bin/$x $out/wrapped
makeWrapper $out/wrapped/$x $out/bin/$x \
--argv0 $out/bin/$x \
--prefix PATH : $out/bin \
--prefix PATH : ${
lib.makeBinPath [
coreutils
file
gawk
gnugrep
gnused
]
}
done
'';
meta = with lib; {
homepage = "https://github.com/leahneukirchen/mblaze";
description = "Unix utilities for processing and interacting with mail messages which are stored in maildir folders";
license = licenses.cc0;
platforms = platforms.all;
maintainers = [ maintainers.ajgrf ];
};
}