pkgs: deploy-sink: convert to new buildPerlApplication
helper
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
parent
fa12895af3
commit
d51b5ab8f9
|
@ -1,8 +1,3 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Archive::Tar;
|
||||
use File::Find qw(finddepth);
|
||||
use File::Temp;
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue