2018-04-29 22:09:25 +02:00
|
|
|
{ stdenv, fetchFromGitHub, buildGoPackage, libtool }:
|
2017-12-15 15:51:19 +01:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "notary";
|
2018-04-29 22:09:25 +02:00
|
|
|
version = "0.6.1";
|
|
|
|
gitcommit = "d6e1431f";
|
2017-12-15 15:51:19 +01:00
|
|
|
|
2018-01-12 20:16:20 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "theupdateframework";
|
|
|
|
repo = "notary";
|
|
|
|
rev = "v${version}";
|
2018-04-29 22:09:25 +02:00
|
|
|
sha256 = "1ak9dk6vjny5069hp3w36dbjawcnaq82l3i2qvf7mn7zfglbsnf9";
|
2017-12-15 15:51:19 +01:00
|
|
|
};
|
|
|
|
|
2018-04-29 22:09:25 +02:00
|
|
|
patches = [ ./no-git-usage.patch ];
|
2018-01-12 20:16:20 +01:00
|
|
|
|
2018-04-29 22:09:25 +02:00
|
|
|
buildInputs = [ libtool ];
|
2017-12-15 15:51:19 +01:00
|
|
|
buildPhase = ''
|
2018-04-29 22:09:25 +02:00
|
|
|
runHook preBuild
|
2018-03-11 15:16:24 +01:00
|
|
|
cd go/src/github.com/theupdateframework/notary
|
2018-04-29 22:09:25 +02:00
|
|
|
make client GITCOMMIT=${gitcommit}
|
|
|
|
runHook postBuild
|
2017-12-15 15:51:19 +01:00
|
|
|
'';
|
|
|
|
|
2018-04-29 22:09:25 +02:00
|
|
|
goPackagePath = "github.com/theupdateframework/notary";
|
|
|
|
|
2017-12-15 15:51:19 +01:00
|
|
|
installPhase = ''
|
2018-04-29 22:09:25 +02:00
|
|
|
runHook preInstall
|
2018-01-12 20:16:20 +01:00
|
|
|
install -D bin/notary $bin/bin/notary
|
2018-04-29 22:09:25 +02:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2019-03-31 18:02:56 +02:00
|
|
|
#doCheck = true; # broken by tzdata: 2018g -> 2019a
|
2018-04-29 22:09:25 +02:00
|
|
|
checkPhase = ''
|
|
|
|
make test PKGS=github.com/theupdateframework/notary/cmd/notary
|
2017-12-15 15:51:19 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2018-04-29 22:09:25 +02:00
|
|
|
description = "Notary is a project that allows anyone to have trust over arbitrary collections of data";
|
2018-01-12 20:16:20 +01:00
|
|
|
longDescription = ''
|
|
|
|
The Notary project comprises a server and a client for running and
|
|
|
|
interacting with trusted collections. See the service architecture
|
|
|
|
documentation for more information.
|
|
|
|
|
|
|
|
Notary aims to make the internet more secure by making it easy for people
|
|
|
|
to publish and verify content. We often rely on TLS to secure our
|
|
|
|
communications with a web server which is inherently flawed, as any
|
|
|
|
compromise of the server enables malicious content to be substituted for
|
|
|
|
the legitimate content.
|
|
|
|
|
|
|
|
With Notary, publishers can sign their content offline using keys kept
|
|
|
|
highly secure. Once the publisher is ready to make the content available,
|
|
|
|
they can push their signed trusted collection to a Notary Server.
|
|
|
|
|
|
|
|
Consumers, having acquired the publisher's public key through a secure
|
|
|
|
channel, can then communicate with any notary server or (insecure) mirror,
|
|
|
|
relying only on the publisher's key to determine the validity and
|
|
|
|
integrity of the received content.
|
|
|
|
'';
|
|
|
|
license = licenses.asl20;
|
|
|
|
homepage = https://github.com/theupdateframework/notary;
|
2018-04-29 22:09:25 +02:00
|
|
|
maintainers = with maintainers; [ vdemeester ma27 ];
|
|
|
|
platforms = platforms.unix;
|
2017-12-15 15:51:19 +01:00
|
|
|
};
|
|
|
|
}
|