nixos-config/pkgs/neomutt-export-patches.nix
2024-01-31 10:38:40 +01:00

22 lines
491 B
Nix

{ stdenv, perl, notmuch }:
let src = ../extra/bin/neomutt-export-patches.pl;
in stdenv.mkDerivation rec {
pname = "neomutt-export-patches";
version = "0.1";
dontUnpack = true;
doCheck = true;
checkInputs = [ (perl.withPackages (p: with p; [ PerlCritic ])) ];
checkPhase = ''
perlcritic ${src}
'';
buildInputs = [ (perl.withPackages (p: with p; [ IPCRun3 JSON ])) notmuch ];
postInstall = ''
mkdir -p $out/bin
install -Dm755 ${src} $out/bin/${pname}
'';
}