2021-03-20 17:26:41 +03:00
|
|
|
{ lib, stdenv, fetchFromGitHub, ocamlPackages, perl
|
|
|
|
, zlib, db
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (ocamlPackages)
|
|
|
|
ocaml
|
|
|
|
findlib
|
|
|
|
cryptokit
|
|
|
|
num
|
|
|
|
;
|
|
|
|
in
|
2016-11-28 05:28:40 +03:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 15:41:18 +03:00
|
|
|
pname = "sks";
|
2021-03-20 17:26:41 +03:00
|
|
|
version = "unstable-2021-02-04";
|
2016-11-28 05:28:40 +03:00
|
|
|
|
2021-03-20 17:26:41 +03:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SKS-Keyserver";
|
2016-11-28 05:28:40 +03:00
|
|
|
repo = "sks-keyserver";
|
2021-03-20 17:26:41 +03:00
|
|
|
rev = "c3ba6d5abb525dcb84745245631c410c11c07ec1";
|
|
|
|
sha256 = "0fql07sc69hv6jy7x5svb19977cdsz0p1j8wv53k045a6v7rw1jw";
|
2016-11-28 05:28:40 +03:00
|
|
|
};
|
|
|
|
|
2018-09-08 17:08:37 +03:00
|
|
|
# pkgs.db provides db_stat, not db$major.$minor_stat
|
2021-03-20 17:26:41 +03:00
|
|
|
patches = [
|
|
|
|
./adapt-to-nixos.patch
|
|
|
|
];
|
2018-09-08 17:08:37 +03:00
|
|
|
|
2018-09-08 15:14:01 +03:00
|
|
|
outputs = [ "out" "webSamples" ];
|
|
|
|
|
2021-03-20 17:26:41 +03:00
|
|
|
nativeBuildInputs = [ ocaml findlib perl ];
|
|
|
|
buildInputs = [ zlib db cryptokit num ];
|
2016-11-28 05:28:40 +03:00
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=$(out)" "MANDIR=$(out)/share/man" ];
|
|
|
|
preConfigure = ''
|
|
|
|
cp Makefile.local.unused Makefile.local
|
|
|
|
sed -i \
|
2017-10-24 14:10:42 +03:00
|
|
|
-e "s:^LIBDB=.*$:LIBDB=-ldb:g" \
|
2016-11-28 05:28:40 +03:00
|
|
|
Makefile.local
|
|
|
|
'';
|
|
|
|
|
|
|
|
preBuild = "make dep";
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkPhase = "./sks unit_test";
|
|
|
|
|
2018-09-08 15:14:01 +03:00
|
|
|
# Copy the web examples for the NixOS module
|
|
|
|
postInstall = "cp -R sampleWeb $webSamples";
|
|
|
|
|
2021-01-11 10:54:33 +03:00
|
|
|
meta = with lib; {
|
2017-10-24 14:10:42 +03:00
|
|
|
description = "An easily deployable & decentralized OpenPGP keyserver";
|
2016-11-28 05:28:40 +03:00
|
|
|
longDescription = ''
|
|
|
|
SKS is an OpenPGP keyserver whose goal is to provide easy to deploy,
|
|
|
|
decentralized, and highly reliable synchronization. That means that a key
|
|
|
|
submitted to one SKS server will quickly be distributed to all key
|
|
|
|
servers, and even wildly out-of-date servers, or servers that experience
|
|
|
|
spotty connectivity, can fully synchronize with rest of the system.
|
|
|
|
'';
|
|
|
|
inherit (src.meta) homepage;
|
2021-03-20 17:26:41 +03:00
|
|
|
license = licenses.gpl2Plus;
|
2016-11-28 05:28:40 +03:00
|
|
|
platforms = platforms.linux;
|
2023-10-24 14:09:45 +03:00
|
|
|
maintainers = with maintainers; [ ];
|
2016-11-28 05:28:40 +03:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|