2021-03-30 16:53:38 +02:00
|
|
|
{ stdenv, lib, fetchFromSourcehut, pkg-config, openssl, mime-types, scdoc }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gmnisrv";
|
2021-11-12 16:27:39 +01:00
|
|
|
version = "1.0";
|
2021-03-30 16:53:38 +02:00
|
|
|
|
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~sircmpwn";
|
|
|
|
repo = "gmnisrv";
|
2021-11-12 16:27:39 +01:00
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-V9HXXYQIo3zeqZjJEn+dhemNg6AU+ee3FRmBmXgLuYQ=";
|
2021-03-30 16:53:38 +02:00
|
|
|
};
|
|
|
|
|
2021-11-12 16:27:39 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace config.sh \
|
|
|
|
--replace "pkg-config" "${stdenv.cc.targetPrefix}pkg-config"
|
|
|
|
'';
|
|
|
|
|
2021-03-30 16:53:38 +02:00
|
|
|
MIMEDB = "${mime-types}/etc/mime.types";
|
2021-05-28 12:09:30 +02:00
|
|
|
nativeBuildInputs = [ pkg-config scdoc ];
|
|
|
|
buildInputs = [ openssl mime-types ];
|
2021-03-30 16:53:38 +02:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A simple Gemini protocol server";
|
|
|
|
homepage = "https://git.sr.ht/~sircmpwn/gmnisrv";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ bsima jb55 ];
|
2021-05-28 12:09:30 +02:00
|
|
|
platforms = platforms.linux;
|
2021-03-30 16:53:38 +02:00
|
|
|
};
|
|
|
|
}
|