filegive: use buildGoPackage
This commit is contained in:
parent
8b3cacfdcf
commit
c054af4e58
|
@ -1,16 +1,6 @@
|
||||||
{ stdenv, fetchurl, fetchgit, go }:
|
{ buildGoPackage, stdenv, fetchurl }:
|
||||||
|
|
||||||
let
|
buildGoPackage rec {
|
||||||
|
|
||||||
# Code with BSD license
|
|
||||||
srcNatPMP = fetchgit {
|
|
||||||
url = https://github.com/jackpal/go-nat-pmp;
|
|
||||||
rev = "e04deda90d56";
|
|
||||||
sha256 = "1swwfyzaj3l40yh9np3x4fcracgs79nwryc85sxbdakx8wwxs2xb";
|
|
||||||
};
|
|
||||||
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
name = "filegive-0.7.4";
|
name = "filegive-0.7.4";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
|
@ -18,30 +8,15 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "1z3vyqfdp271qa5ah0i6jmn9gh3gb296wcm33sd2zfjqapyh12hy";
|
sha256 = "1z3vyqfdp271qa5ah0i6jmn9gh3gb296wcm33sd2zfjqapyh12hy";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ go ];
|
goDeps = ./deps.nix;
|
||||||
|
|
||||||
buildPhase = ''
|
goPackagePath = "viric.name/soft/filegive";
|
||||||
${stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "export GOARM=5"}
|
|
||||||
|
|
||||||
mkdir $TMPDIR/go
|
meta = with stdenv.lib; {
|
||||||
export GOPATH=$TMPDIR/go
|
|
||||||
|
|
||||||
GONATPMP=$GOPATH/src/code.google.com/p/go-nat-pmp
|
|
||||||
mkdir -p $GONATPMP
|
|
||||||
cp -R ${srcNatPMP}/* $GONATPMP/
|
|
||||||
go build -o filegive
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
cp filegive $out/bin
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
homepage = http://viric.name/cgi-bin/filegive;
|
homepage = http://viric.name/cgi-bin/filegive;
|
||||||
description = "Easy p2p file sending program";
|
description = "Easy p2p file sending program";
|
||||||
license = stdenv.lib.licenses.agpl3Plus;
|
license = licenses.agpl3Plus;
|
||||||
maintainers = with stdenv.lib.maintainers; [viric];
|
maintainers = [ maintainers.viric ];
|
||||||
platforms = with stdenv.lib.platforms; linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
# This file was generated by https://github.com/kamilchm/go2nix v1.3.0
|
||||||
|
[
|
||||||
|
{
|
||||||
|
goPackagePath = "code.google.com/p/go-nat-pmp";
|
||||||
|
fetch = {
|
||||||
|
type = "git";
|
||||||
|
url = "https://github.com/jackpal/go-nat-pmp";
|
||||||
|
rev = "e04deda90d5683d6e375732740814a89eea7bafd";
|
||||||
|
sha256 = "1swwfyzaj3l40yh9np3x4fcracgs79nwryc85sxbdakx8wwxs2xb";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
]
|
Loading…
Reference in New Issue