2013-05-02 09:32:23 +02:00
|
|
|
{ stdenv, fetchurl, go }:
|
|
|
|
|
|
|
|
assert stdenv.isLinux && (stdenv.isi686 || stdenv.isx86_64 || stdenv.isArm);
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2013-05-02 12:15:50 +02:00
|
|
|
name = "filegive-0.3.1";
|
2013-05-02 09:32:23 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-05-02 12:15:50 +02:00
|
|
|
url = "http://viric.name/cgi-bin/filegive/tarball/filegive-0.3.1.tar.gz?uuid=v0.3.1";
|
2013-05-02 09:32:23 +02:00
|
|
|
name = "${name}.tar.gz";
|
2013-05-02 12:15:50 +02:00
|
|
|
sha256 = "14hsy7bkmhq03f2yf619kz8p11v8ndd59sdibck556z8dld7b6ya";
|
2013-05-02 09:32:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ go ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
${stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "export GOARM=5"}
|
|
|
|
go build -o filegive
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
ensureDir $out/bin
|
|
|
|
cp filegive $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://viric.name/cgi-bin/filegive;
|
2013-05-02 09:34:42 +02:00
|
|
|
description = "Easy p2p file sending program";
|
2013-05-02 09:32:23 +02:00
|
|
|
license = "BSD";
|
|
|
|
};
|
|
|
|
}
|