mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
Port pond to buildGoPackage
This commit is contained in:
parent
67f34cbd0d
commit
9dfa4b487f
4 changed files with 50 additions and 80 deletions
|
@ -1,26 +1,22 @@
|
|||
{ stdenv, lib, fetchgit, fetchhg, go_1_3, trousers }:
|
||||
{ lib, goPackages, fetchgit, trousers }:
|
||||
|
||||
let deps = import ./deps.nix {
|
||||
inherit stdenv lib fetchgit fetchhg;
|
||||
};
|
||||
with goPackages;
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "pond";
|
||||
buildGoPackage rec {
|
||||
rev = "f4e441c77a2039814046ff8219629c547fe8b689";
|
||||
name = "pond-${lib.strings.substring 0 7 rev}";
|
||||
goPackagePath = "github.com/agl/pond";
|
||||
src = fetchgit {
|
||||
inherit rev;
|
||||
url = "git://github.com/agl/pond.git";
|
||||
sha256 = "f2dfc6cb96cc4b8ae732e41d1958b62036f40cb346df2e14f27b5964a1416026";
|
||||
};
|
||||
|
||||
buildInputs = [ go_1_3 trousers ];
|
||||
subPackages = [ "client" ];
|
||||
|
||||
unpackPhase = ''
|
||||
export GOPATH=$PWD
|
||||
echo $PWD
|
||||
cp -LR ${deps}/src src
|
||||
chmod u+w -R src
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
export GOPATH="$PWD"
|
||||
mkdir -p $out/bin
|
||||
go build --tags nogui -v -o $out/bin/pond-cli github.com/agl/pond/client
|
||||
'';
|
||||
buildInputs = [ trousers net crypto protobuf ed25519 ];
|
||||
|
||||
makeFlags = "--tags nogui";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Forward secure, asynchronous messaging for the discerning";
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
# This file was generated by go2nix.
|
||||
{ stdenv, lib, fetchgit, fetchhg}:
|
||||
|
||||
let
|
||||
goDeps = [
|
||||
{
|
||||
root = "github.com/agl/pond";
|
||||
src = fetchgit {
|
||||
url = "git://github.com/agl/pond.git";
|
||||
rev = "f4e441c77a2039814046ff8219629c547fe8b689";
|
||||
sha256 = "f2dfc6cb96cc4b8ae732e41d1958b62036f40cb346df2e14f27b5964a1416026";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/agl/ed25519";
|
||||
src = fetchgit {
|
||||
url = "git://github.com/agl/ed25519.git";
|
||||
rev = "d2b94fd789ea21d12fac1a4443dd3a3f79cda72c";
|
||||
sha256 = "83e3010509805d1d315c7aa85a356fda69d91b51ff99ed98a503d63adb3613e9";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "code.google.com/p/go.crypto";
|
||||
src = fetchhg {
|
||||
url = "https://code.google.com/p/go.crypto";
|
||||
rev = "31393df5baea";
|
||||
sha256 = "0b95dpsvxxapcjjvhj05fdmyn0mzffamc25hvxy7xgsl2l9yy3nw";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "code.google.com/p/go.net";
|
||||
src = fetchhg {
|
||||
url = "https://code.google.com/p/go.net";
|
||||
rev = "90e232e2462d";
|
||||
sha256 = "0hqvkaa0rbxwbi74xa6aqbkf63zk662x5hp3bp8vbhzkc4yl1h59";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "code.google.com/p/goprotobuf";
|
||||
src = fetchhg {
|
||||
url = "https://code.google.com/p/goprotobuf";
|
||||
rev = "36be16571e14";
|
||||
sha256 = "14yay2sgfbbs0bx3q03bdqn1kivyvxfdm34rmp2612gvinlll215";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "go-deps";
|
||||
|
||||
buildCommand =
|
||||
lib.concatStrings
|
||||
(map (dep: ''
|
||||
mkdir -p $out/src/`dirname ${dep.root}`
|
||||
ln -s ${dep.src} $out/src/${dep.root}
|
||||
'') goDeps);
|
||||
}
|
||||
|
|
@ -10938,7 +10938,7 @@ let
|
|||
inherit (xorg) libXpm;
|
||||
};
|
||||
|
||||
pond = callPackage ../applications/networking/pond { };
|
||||
pond = callPackage ../applications/networking/pond { goPackages = go13Packages; };
|
||||
|
||||
potrace = callPackage ../applications/graphics/potrace {};
|
||||
|
||||
|
|
|
@ -9,6 +9,17 @@ let self = _self // overrides; _self = with self; {
|
|||
|
||||
## OFFICIAL GO PACKAGES
|
||||
|
||||
crypto = buildGoPackage rec {
|
||||
rev = "31393df5baea";
|
||||
name = "go-crypto-${rev}";
|
||||
goPackagePath = "code.google.com/p/go.crypto";
|
||||
src = fetchhg {
|
||||
inherit rev;
|
||||
url = "https://${goPackagePath}";
|
||||
sha256 = "0b95dpsvxxapcjjvhj05fdmyn0mzffamc25hvxy7xgsl2l9yy3nw";
|
||||
};
|
||||
};
|
||||
|
||||
image = buildGoPackage rec {
|
||||
rev = "490b1ad139b3";
|
||||
name = "go.image-${rev}";
|
||||
|
@ -32,6 +43,18 @@ let self = _self // overrides; _self = with self; {
|
|||
propagatedBuildInputs = [ text ];
|
||||
};
|
||||
|
||||
protobuf = buildGoPackage rec {
|
||||
rev = "36be16571e14";
|
||||
name = "goprotobuf-${rev}";
|
||||
goPackagePath = "code.google.com/p/goprotobuf";
|
||||
src = fetchhg {
|
||||
inherit rev;
|
||||
url = "https://code.google.com/p/goprotobuf";
|
||||
sha256 = "14yay2sgfbbs0bx3q03bdqn1kivyvxfdm34rmp2612gvinlll215";
|
||||
};
|
||||
subPackages = [ "proto" "protoc-gen-go" ];
|
||||
};
|
||||
|
||||
text = buildGoPackage rec {
|
||||
rev = "024681b033be";
|
||||
name = "go.text-${rev}";
|
||||
|
@ -83,6 +106,17 @@ let self = _self // overrides; _self = with self; {
|
|||
propagatedBuildInputs = [ pflag ];
|
||||
};
|
||||
|
||||
ed25519 = buildGoPackage rec {
|
||||
rev = "d2b94fd789ea21d12fac1a4443dd3a3f79cda72c";
|
||||
name = "ed25519-${stdenv.lib.strings.substring 0 7 rev}";
|
||||
goPackagePath = "github.com/agl/ed25519";
|
||||
src = fetchgit {
|
||||
inherit rev;
|
||||
url = "git://${goPackagePath}.git";
|
||||
sha256 = "83e3010509805d1d315c7aa85a356fda69d91b51ff99ed98a503d63adb3613e9";
|
||||
};
|
||||
};
|
||||
|
||||
goconvey = buildGoPackage rec {
|
||||
version = "1.5.0";
|
||||
name = "goconvey-${version}";
|
||||
|
|
Loading…
Reference in a new issue