nixpkgs/pkgs/applications/networking/ipfs/default.nix

37 lines
899 B
Nix
Raw Normal View History

2020-05-11 07:03:30 +00:00
{ stdenv, buildGoModule, fetchurl, nixosTests }:
2016-06-06 00:46:06 +00:00
buildGoModule rec {
pname = "ipfs";
version = "0.5.1";
2017-10-02 18:35:45 +00:00
rev = "v${version}";
2016-06-06 00:46:06 +00:00
2020-05-11 07:03:30 +00:00
# go-ipfs makes changes to it's source tarball that don't match the git source.
src = fetchurl {
url = "https://github.com/ipfs/go-ipfs/releases/download/${rev}/go-ipfs-source.tar.gz";
sha256 = "0lpilycjbc1g9adp4d5kryfprixj18hg3235fnivakmv7fy2akkm";
2016-06-06 00:46:06 +00:00
};
2020-05-11 07:03:30 +00:00
# tarball contains multiple files/directories
postUnpack = ''
mkdir ipfs-src
mv * ipfs-src || true
cd ipfs-src
2020-05-07 14:26:09 +00:00
'';
2020-05-11 07:03:30 +00:00
sourceRoot = ".";
subPackages = [ "cmd/ipfs" ];
2020-03-13 19:37:56 +00:00
2020-05-08 09:49:10 +00:00
passthru.tests.ipfs = nixosTests.ipfs;
2020-05-08 08:34:42 +00:00
2020-05-11 07:03:30 +00:00
vendorSha256 = null;
2016-06-06 00:46:06 +00:00
meta = with stdenv.lib; {
description = "A global, versioned, peer-to-peer filesystem";
homepage = "https://ipfs.io/";
2016-06-06 00:46:06 +00:00
license = licenses.mit;
2016-10-29 03:19:41 +00:00
platforms = platforms.unix;
maintainers = with maintainers; [ fpletz ];
2016-06-06 00:46:06 +00:00
};
}