nixpkgs/pkgs/by-name/mb/mblaze/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

80 lines
1.9 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 ];
};
}