2013-05-03 22:04:17 +01:00
|
|
|
{ stdenv, fetchurl, fetchgit, go }:
|
2013-05-02 08:32:23 +01:00
|
|
|
|
2013-05-03 22:04:17 +01:00
|
|
|
let
|
|
|
|
|
|
|
|
# Code with BSD license
|
|
|
|
srcNatPMP = fetchgit {
|
2015-08-15 11:46:41 +01:00
|
|
|
url = https://github.com/jackpal/go-nat-pmp;
|
2013-05-03 22:04:17 +01:00
|
|
|
rev = "e04deda90d56";
|
|
|
|
sha256 = "1swwfyzaj3l40yh9np3x4fcracgs79nwryc85sxbdakx8wwxs2xb";
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
2013-05-02 08:32:23 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2014-01-18 15:05:22 +00:00
|
|
|
name = "filegive-0.7.4";
|
2013-05-02 08:32:23 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-01-18 15:05:22 +00:00
|
|
|
url = "http://viric.name/soft/filegive/${name}.tar.gz";
|
|
|
|
sha256 = "1z3vyqfdp271qa5ah0i6jmn9gh3gb296wcm33sd2zfjqapyh12hy";
|
2013-05-02 08:32:23 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ go ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
${stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "export GOARM=5"}
|
2013-05-03 22:04:17 +01:00
|
|
|
|
|
|
|
mkdir $TMPDIR/go
|
|
|
|
export GOPATH=$TMPDIR/go
|
|
|
|
|
|
|
|
GONATPMP=$GOPATH/src/code.google.com/p/go-nat-pmp
|
|
|
|
mkdir -p $GONATPMP
|
|
|
|
cp -R ${srcNatPMP}/* $GONATPMP/
|
2013-05-02 08:32:23 +01:00
|
|
|
go build -o filegive
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2014-06-30 13:56:10 +01:00
|
|
|
mkdir -p $out/bin
|
2013-05-02 08:32:23 +01:00
|
|
|
cp filegive $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://viric.name/cgi-bin/filegive;
|
2013-05-02 08:34:42 +01:00
|
|
|
description = "Easy p2p file sending program";
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.agpl3Plus;
|
2013-05-04 07:08:52 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
2013-05-02 08:32:23 +01:00
|
|
|
};
|
|
|
|
}
|