Merge pull request #293326 from FabianRig/init-technitium-dns-server

technitium-dns-server: init at 12.1
This commit is contained in:
K900 2024-03-21 11:32:15 +03:00 committed by GitHub
commit f16f1016e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 53 additions and 0 deletions

View file

@ -6227,6 +6227,12 @@
githubId = 303897;
name = "Fabián Heredia Montiel";
};
fabianrig = {
email = "fabianrig@posteo.de";
github = "fabianrig";
githubId = 88741530;
name = "Fabian Rigoll";
};
fadenb = {
email = "tristan.helmich+nixos@gmail.com";
github = "fadenb";

View file

@ -0,0 +1,47 @@
{
lib,
stdenvNoCC,
fetchurl,
makeWrapper,
dotnet-sdk_8,
}:
stdenvNoCC.mkDerivation rec {
pname = "technitium-dns-server";
version = "12.1";
src = fetchurl {
url = "https://download.technitium.com/dns/archive/${version}/DnsServerPortable.tar.gz";
hash = "sha256-G0M2xuYBZA3XXXaPs4pLrJmzAMbVJhiqISAvuCw3iZo=";
};
sourceRoot = ".";
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,share/${pname}-${version}}
cp -r * $out/share/${pname}-${version}/.
rm $out/share/${pname}-${version}/start.{sh,bat}
rm $out/share/${pname}-${version}/DnsServerApp.exe
rm $out/share/${pname}-${version}/env-vars
# Remove systemd.service in favor of a separate module (including firewall configuration).
rm $out/share/${pname}-${version}/systemd.service
makeWrapper "${dotnet-sdk_8}/bin/dotnet" $out/bin/technitium-dns-server \
--add-flags "$out/share/${pname}-${version}/DnsServerApp.dll"
runHook postInstall
'';
meta = {
changelog = "https://github.com/TechnitiumSoftware/DnsServer/blob/master/CHANGELOG.md";
description = "Authorative and Recursive DNS server for Privacy and Security";
homepage = "https://github.com/TechnitiumSoftware/DnsServer";
license = lib.licenses.gpl3Only;
mainProgram = "technitium-dns-server";
maintainers = with lib.maintainers; [ fabianrig ];
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
};
}