1{ stdenv, fetchFromGitHub, makeWrapper, curl, spidermonkey }:
2
3stdenv.mkDerivation rec {
4
5 name = "plowshare4-${version}";
6 version = "1.1.0";
7
8 src = fetchFromGitHub {
9 owner = "mcrapet";
10 repo = "plowshare";
11 rev = "v${version}";
12 sha256 = "1xxkdv4q97dfzbcdnmy5079a59fwh8myxlvdr2dlxdv70fb72sq9";
13 };
14
15 buildInputs = [ makeWrapper ];
16
17 phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
18
19 installPhase = ''
20 make PREFIX="$out" install
21
22 for fn in plow{del,down,list,up}; do
23 wrapProgram "$out/bin/$fn" --prefix PATH : "${curl}/bin:${spidermonkey}/bin"
24 done
25 '';
26
27 meta = {
28 description = ''
29 A command-line download/upload tool for popular file sharing websites
30 '';
31 license = stdenv.lib.licenses.gpl3;
32 maintainers = [ stdenv.lib.maintainers.aforemny ];
33 };
34}