commit d22d2d791027d0820509aab8b92026e2bb1be226
parent 1cfeab2e0bd99f1701cda1716dd449890d0a95c3
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date: Mon, 20 Jul 2020 02:25:52 +0300
Add geminid
Diffstat:
3 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/nix/sources.json b/nix/sources.json
@@ -139,6 +139,20 @@
"url": "https://github.com/hugsy/gef/archive/3c43a8345b866ac51a10e4456285236de28176c3.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
+ "geminid": {
+ "branch": "master",
+ "builtin": false,
+ "date": "2020-07-11T06:32:59Z",
+ "description": "Gemini Server in C",
+ "homepage": "https://github.com/jovoro/geminid",
+ "owner": "jovoro",
+ "repo": "geminid",
+ "rev": "a0b2d654c0d57d7926711e38db7a41bf4a30e416",
+ "sha256": "1l1013hpa2k66hspywy88na7a9wfpbvw48mag60b3w7b3c8lxfjr",
+ "type": "tarball",
+ "url": "https://github.com/jovoro/geminid/archive/a0b2d654c0d57d7926711e38db7a41bf4a30e416.tar.gz",
+ "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
+ },
"geofabrik-estonia": {
"builtin": false,
"sha256": "0gkihjaa0fj1p1j9sza0jhf7j46339m87yx50s9iwsqai5gddjgm",
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -149,6 +149,7 @@ lib.makeScope newScope (
### SERVERS
+ geminid = callPackage ./servers/geminid { };
glauth = callPackage ./servers/glauth { };
mbtileserver = callPackage ./servers/mbtileserver { };
nakarte = callPackage ./servers/nakarte { };
diff --git a/pkgs/servers/geminid/default.nix b/pkgs/servers/geminid/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, libconfig, file, openssl, flex, sources }:
+let
+ pname = "geminid";
+ date = stdenv.lib.substring 0 10 sources.geminid.date;
+ version = "unstable-" + date;
+in
+stdenv.mkDerivation {
+ inherit pname version;
+ src = sources.geminid;
+
+ nativeBuildInputs = [ flex ];
+
+ buildInputs = [ libconfig file openssl.dev ];
+
+ makeFlags = [ "geminid" "CC=cc" "LEX=flex" ];
+
+ installPhase = ''
+ install -Dm755 geminid -t $out/bin
+ '';
+
+ meta = with stdenv.lib; {
+ inherit (sources.geminid) description homepage;
+ license = licenses.bsd3;
+ maintainers = with maintainers; [ sikmir ];
+ platforms = with platforms; linux ++ darwin;
+ };
+}