pkgs: deploy-sink: convert to new buildPerlApplication helper

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

View file

@ -1,8 +1,3 @@
#!/usr/bin/env perl
use strict;
use warnings;
use Archive::Tar;
use File::Find qw(finddepth);
use File::Temp;

View file

@ -1,23 +1,10 @@
{ stdenv, perl, rsync }:
{ c8h4, rsync }:
let src = ../extra/bin/deploy-sink.pl;
in stdenv.mkDerivation {
pname = "deploy-sink";
version = "0.1";
dontUnpack = true;
c8h4.buildPerlApplication {
name = "deploy-sink";
runtimeInputs = [ rsync ];
perlInputs = p: with p; [ IOInteractive ];
text = builtins.readFile ../extra/bin/deploy-sink.pl;
doCheck = true;
checkInputs = [ (perl.withPackages (p: with p; [ PerlCritic ])) ];
checkPhase = ''
perlcritic ${src}
'';
buildInputs = [ (perl.withPackages (p: with p; [ IOInteractive ])) rsync ];
postInstall = ''
mkdir -p $out/bin
install -Dm755 ${src} $out/bin/deploy-sink
'';
passthru.shellPath = "/bin/deploy-sink";
derivationArgs.passthru.shellPath = "/bin/deploy-sink";
}