2024-03-04 14:03:28 -07:00
|
|
|
{
|
|
|
|
lib,
|
2024-04-05 00:28:38 -06:00
|
|
|
buildDotnetModule,
|
|
|
|
fetchFromGitHub,
|
|
|
|
dotnetCorePackages,
|
2024-11-16 10:31:39 -07:00
|
|
|
technitium-dns-server-library,
|
2024-04-04 00:35:07 -06:00
|
|
|
nixosTests,
|
2024-11-16 10:31:39 -07:00
|
|
|
nix-update-script,
|
2024-03-04 14:03:28 -07:00
|
|
|
}:
|
2024-04-05 00:28:38 -06:00
|
|
|
buildDotnetModule rec {
|
2024-03-04 14:03:28 -07:00
|
|
|
pname = "technitium-dns-server";
|
2024-11-16 10:31:39 -07:00
|
|
|
version = "13.2";
|
2024-03-04 14:03:28 -07:00
|
|
|
|
2024-04-05 00:28:38 -06:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "TechnitiumSoftware";
|
|
|
|
repo = "DnsServer";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-11-16 10:31:39 -07:00
|
|
|
hash = "sha256-oxLMBs+XkzvlfSst6ZD56ZIgiXwm0Px8Tn3Trdd/6H8=";
|
2024-04-05 00:28:38 -06:00
|
|
|
name = "${pname}-${version}";
|
2024-03-04 14:03:28 -07:00
|
|
|
};
|
|
|
|
|
2024-04-05 00:28:38 -06:00
|
|
|
dotnet-sdk = dotnetCorePackages.sdk_8_0;
|
|
|
|
dotnet-runtime = dotnetCorePackages.aspnetcore_8_0;
|
2024-03-04 14:03:28 -07:00
|
|
|
|
2024-04-05 00:28:38 -06:00
|
|
|
nugetDeps = ./nuget-deps.nix;
|
2024-03-04 14:03:28 -07:00
|
|
|
|
2024-04-05 00:28:38 -06:00
|
|
|
projectFile = [ "DnsServerApp/DnsServerApp.csproj" ];
|
2024-03-04 14:03:28 -07:00
|
|
|
|
2024-04-05 00:28:38 -06:00
|
|
|
# move dependencies from TechnitiumLibrary to the expected directory
|
|
|
|
preBuild = ''
|
|
|
|
mkdir -p ../TechnitiumLibrary/bin
|
2024-11-16 10:31:39 -07:00
|
|
|
cp -r ${technitium-dns-server-library}/lib/${technitium-dns-server-library.pname}/* ../TechnitiumLibrary/bin/
|
2024-04-05 00:28:38 -06:00
|
|
|
'';
|
2024-03-04 14:03:28 -07:00
|
|
|
|
2024-04-05 00:28:38 -06:00
|
|
|
postFixup = ''
|
|
|
|
mv $out/bin/DnsServerApp $out/bin/technitium-dns-server
|
2024-03-04 14:03:28 -07:00
|
|
|
'';
|
|
|
|
|
2024-04-04 00:35:07 -06:00
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests) technitium-dns-server;
|
|
|
|
};
|
|
|
|
|
2024-11-16 10:31:39 -07:00
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
2024-03-04 14:03:28 -07:00
|
|
|
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 ];
|
2024-04-05 00:28:38 -06:00
|
|
|
platforms = lib.platforms.linux;
|
2024-03-04 14:03:28 -07:00
|
|
|
};
|
|
|
|
}
|