default.nix (677B)
1 { nixpkgs ? import <nixpkgs> {} }: 2 let drv = 3 { stdenv 4 , perlPackages 5 , makeWrapper 6 , perl 7 , rsync 8 , openssh 9 , fetchFromGitHub 10 }: 11 stdenv.mkDerivation rec { 12 name = "sharefile-${version}"; 13 version = "1.3.0"; 14 buildInputs = [ perl perlPackages.URI perlPackages.URIEscapeXS makeWrapper rsync openssh ]; 15 16 src = ./.; 17 18 installPhase = '' 19 mkdir -p $out/bin 20 21 cp sharefile $out/bin 22 cp hashshare $out/bin 23 cp hashname $out/bin 24 cp share_last_ss $out/bin 25 26 for prog in $(echo "$out/bin/"*) 27 do 28 wrapProgram "$prog" \ 29 --prefix PERL5LIB : "$PERL5LIB" \ 30 --prefix PATH : "$out/bin:{perl}/bin" 31 done 32 ''; 33 }; 34 in 35 nixpkgs.callPackage drv {}