mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 23:36:17 +01:00
Merge pull request #19931 from mguentner/ipfs_update
ipfs: i20160112 -> 0.4.4, fetchgx
This commit is contained in:
commit
aa2b8d25d6
4 changed files with 54 additions and 6 deletions
|
@ -1,22 +1,31 @@
|
|||
{ stdenv, buildGoPackage, fetchFromGitHub }:
|
||||
{ stdenv, buildGoPackage, fetchFromGitHub, fetchgx }:
|
||||
|
||||
buildGoPackage rec {
|
||||
name = "ipfs-${version}";
|
||||
version = "i20160112--${stdenv.lib.strings.substring 0 7 rev}";
|
||||
rev = "7070b4d878baad57dcc8da80080dd293aa46cabd";
|
||||
version = "0.4.4";
|
||||
rev = "d905d485192616abaea25f7e721062a9e1093ab9";
|
||||
|
||||
goPackagePath = "github.com/ipfs/go-ipfs";
|
||||
|
||||
extraSrcPaths = [
|
||||
(fetchgx {
|
||||
inherit name src;
|
||||
sha256 = "0mm1rs2mbs3rmxfcji5yal9ai3v1w75kk05bfyhgzmcjvi6lwpyb";
|
||||
})
|
||||
];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ipfs";
|
||||
repo = "go-ipfs";
|
||||
inherit rev;
|
||||
sha256 = "1b7aimnbz287fy7p27v3qdxnz514r5142v3jihqxanbk9g384gcd";
|
||||
sha256 = "06iq7fmq7p0854aqrnmd0f0jvnxy9958wvw7ibn754fdfii9l84l";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A global, versioned, peer-to-peer filesystem";
|
||||
homepage = https://ipfs.io/;
|
||||
license = licenses.mit;
|
||||
broken = true;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ fpletz ];
|
||||
};
|
||||
}
|
||||
|
|
30
pkgs/build-support/fetchgx/default.nix
Normal file
30
pkgs/build-support/fetchgx/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ stdenv, gx, gx-go, go, cacert }:
|
||||
|
||||
{ name, src, sha256 }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "${name}-gxdeps";
|
||||
inherit src;
|
||||
|
||||
buildInputs = [ go gx gx-go ];
|
||||
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "recursive";
|
||||
outputHash = sha256;
|
||||
|
||||
phases = [ "unpackPhase" "buildPhase" "installPhase" ];
|
||||
|
||||
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||
|
||||
buildPhase = ''
|
||||
export GOPATH=$(pwd)/vendor
|
||||
mkdir vendor
|
||||
gx install
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mv vendor $out
|
||||
'';
|
||||
|
||||
preferLocalBuild = true;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ go, govers, parallel, lib, fetchgit, fetchhg }:
|
||||
{ go, govers, parallel, lib, fetchgit, fetchhg, rsync }:
|
||||
|
||||
{ name, buildInputs ? [], nativeBuildInputs ? [], passthru ? {}, preFixup ? ""
|
||||
|
||||
|
@ -17,6 +17,10 @@
|
|||
# Extra sources to include in the gopath
|
||||
, extraSrcs ? [ ]
|
||||
|
||||
# Extra gopaths containing src subfolder
|
||||
# with sources to include in the gopath
|
||||
, extraSrcPaths ? [ ]
|
||||
|
||||
# go2nix dependency file
|
||||
, goDeps ? null
|
||||
|
||||
|
@ -86,6 +90,9 @@ go.stdenv.mkDerivation (
|
|||
mv goPath/* "go/src/${goPackagePath}"
|
||||
rmdir goPath
|
||||
|
||||
'') + (lib.optionalString (extraSrcPaths != []) ''
|
||||
${rsync}/bin/rsync -a ${lib.concatMapStrings (p: "${p}/src") extraSrcPaths} go
|
||||
|
||||
'') + ''
|
||||
export GOPATH=$NIX_BUILD_TOP/go:$GOPATH
|
||||
|
||||
|
|
|
@ -250,6 +250,8 @@ in
|
|||
fetchNuGet = callPackage ../build-support/fetchnuget { };
|
||||
buildDotnetPackage = callPackage ../build-support/build-dotnet-package { };
|
||||
|
||||
fetchgx = callPackage ../build-support/fetchgx { };
|
||||
|
||||
resolveMirrorURLs = {url}: fetchurl {
|
||||
showURLs = true;
|
||||
inherit url;
|
||||
|
|
Loading…
Reference in a new issue