2013-05-03 23:04:17 +02:00
|
|
|
{ stdenv, fetchurl, fetchgit, go }:
|
2013-05-02 09:32:23 +02:00
|
|
|
|
2013-05-03 23:04:17 +02:00
|
|
|
let
|
|
|
|
|
|
|
|
# Code with BSD license
|
|
|
|
srcNatPMP = fetchgit {
|
2015-08-15 12:46:41 +02:00
|
|
|
url = https://github.com/jackpal/go-nat-pmp;
|
2013-05-03 23:04:17 +02:00
|
|
|
rev = "e04deda90d56";
|
|
|
|
sha256 = "1swwfyzaj3l40yh9np3x4fcracgs79nwryc85sxbdakx8wwxs2xb";
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
2013-05-02 09:32:23 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2014-01-18 16:05:22 +01:00
|
|
|
name = "filegive-0.7.4";
|
2013-05-02 09:32:23 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-01-18 16:05:22 +01:00
|
|
|
url = "http://viric.name/soft/filegive/${name}.tar.gz";
|
|
|
|
sha256 = "1z3vyqfdp271qa5ah0i6jmn9gh3gb296wcm33sd2zfjqapyh12hy";
|
2013-05-02 09:32:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ go ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
${stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "export GOARM=5"}
|
2013-05-03 23:04:17 +02: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 09:32:23 +02:00
|
|
|
go build -o filegive
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2014-06-30 14:56:10 +02:00
|
|
|
mkdir -p $out/bin
|
2013-05-02 09:32:23 +02:00
|
|
|
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";
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.agpl3Plus;
|
2013-05-04 08:08:52 +02:00
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
2013-05-02 09:32:23 +02:00
|
|
|
};
|
|
|
|
}
|