nimPackages.getdns: init at 20221222

This commit is contained in:
Emery Hemingway 2022-12-22 14:37:43 -06:00
parent 819ddb2d65
commit bacf529356
3 changed files with 31 additions and 1 deletions

View File

@ -1,7 +1,7 @@
# Getdns and Stubby are released together, see https://getdnsapi.net/releases/
{ lib, stdenv, fetchurl, cmake, darwin, doxygen, libidn2, libyaml, openssl
, systemd, unbound, yq }:
, systemd, unbound, yq, nimPackages }:
let
metaCommon = with lib; {
maintainers = with maintainers; [ leenaars ehmry ];
@ -38,6 +38,8 @@ in rec {
postInstall = "rm -r $out/share/doc";
passthru.tests.nim = nimPackages.getdns;
meta = with lib;
metaCommon // {
description = "A modern asynchronous DNS API";

View File

@ -0,0 +1,25 @@
{ lib, buildNimPackage, fetchFromSourcehut, pkg-config, getdns }:
buildNimPackage rec {
pname = "getdns";
version = "20221222";
src = fetchFromSourcehut {
owner = "~ehmry";
repo = pname + "-nim";
rev = version;
hash = "sha256-y7yzY1PcodIK2kC9409FuTpLn0TsWHGiEPnrULrob+k=";
};
propagatedNativeBuildInputs = [ pkg-config ];
propagatedBuildInputs = [ getdns ];
doCheck = true;
checkPhase = "nim c tests/test_example_synchronous";
# The test requires network but check if it builds.
meta = {
inherit (getdns.meta) homepage license platforms;
description = "Nim wrapper over the getdns library";
maintainers = with lib.maintainers; [ ehmry ];
};
}

View File

@ -26,6 +26,9 @@ lib.makeScope newScope (self:
frosty = callPackage ../development/nim-packages/frosty { };
getdns = callPackage ../development/nim-packages/getdns {
inherit (pkgs) getdns; };
hts-nim = callPackage ../development/nim-packages/hts-nim { };
jester = callPackage ../development/nim-packages/jester { };