pkgs: neomutt-export-patches: convert to new buildPerlApplication helper
All checks were successful
flake / build (push) Successful in 3m1s

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
Christoph Heiss 2024-08-22 21:02:35 +02:00
parent d51b5ab8f9
commit 17a05c88db
Signed by: c8h4
GPG key ID: 6817E9C75C0785D7
2 changed files with 6 additions and 24 deletions

View file

@ -1,8 +1,3 @@
#!/usr/bin/env perl
use strict;
use warnings;
use JSON qw(from_json);
use File::Temp;
use File::Path qw(make_path);

View file

@ -1,21 +1,8 @@
{ stdenv, perl, notmuch }:
{ c8h4, 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}
'';
c8h4.buildPerlApplication {
name = "neomutt-export-patches";
runtimeInputs = [ notmuch ];
perlInputs = p: with p; [ IPCRun3 JSON ];
text = builtins.readFile ../extra/bin/neomutt-export-patches.pl;
}