diff --git a/extra/bin/deploy-sink.pl b/extra/bin/deploy-sink.pl index 8b07eac..a43b5a9 100644 --- a/extra/bin/deploy-sink.pl +++ b/extra/bin/deploy-sink.pl @@ -1,8 +1,3 @@ -#!/usr/bin/env perl - -use strict; -use warnings; - use Archive::Tar; use File::Find qw(finddepth); use File::Temp; diff --git a/pkgs/deploy-sink.nix b/pkgs/deploy-sink.nix index aff235e..46075c8 100644 --- a/pkgs/deploy-sink.nix +++ b/pkgs/deploy-sink.nix @@ -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"; }