nixpkgs/pkgs/by-name/te/technitium-dns-server/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

74 lines
2.0 KiB
Nix
Raw Normal View History

2024-03-04 21:03:28 +00:00
{
lib,
buildDotnetModule,
fetchFromGitHub,
dotnetCorePackages,
nixosTests,
2024-03-04 21:03:28 +00:00
}:
let
technitium-library = buildDotnetModule rec {
pname = "TechnitiumLibrary";
version = "40a7bc7a52cf5d2c371215ea7f5f6fdf71dc1d9c";
src = fetchFromGitHub {
owner = "TechnitiumSoftware";
repo = "TechnitiumLibrary";
rev = version;
hash = "sha256-FNCZH8LZXYyrz5SRIV8P7MruN+t6Qvl96Aa73q3InMI=";
name = "${pname}-${version}";
};
dotnet-sdk = dotnetCorePackages.sdk_8_0;
nugetDeps = ./library-nuget-deps.nix;
projectFile = [
"TechnitiumLibrary.ByteTree/TechnitiumLibrary.ByteTree.csproj"
"TechnitiumLibrary.Net/TechnitiumLibrary.Net.csproj"
];
};
in
buildDotnetModule rec {
2024-03-04 21:03:28 +00:00
pname = "technitium-dns-server";
version = "12.1";
src = fetchFromGitHub {
owner = "TechnitiumSoftware";
repo = "DnsServer";
rev = "refs/tags/v${version}";
hash = "sha256-TfVWGomvKV7QeJUyFMNDAnHKY3YTEwWPxTlW6RhmsR4=";
name = "${pname}-${version}";
2024-03-04 21:03:28 +00:00
};
dotnet-sdk = dotnetCorePackages.sdk_8_0;
dotnet-runtime = dotnetCorePackages.aspnetcore_8_0;
2024-03-04 21:03:28 +00:00
nugetDeps = ./nuget-deps.nix;
2024-03-04 21:03:28 +00:00
projectFile = [ "DnsServerApp/DnsServerApp.csproj" ];
2024-03-04 21:03:28 +00:00
# move dependencies from TechnitiumLibrary to the expected directory
preBuild = ''
mkdir -p ../TechnitiumLibrary/bin
cp -r ${technitium-library}/lib/TechnitiumLibrary/* ../TechnitiumLibrary/bin/
'';
2024-03-04 21:03:28 +00:00
postFixup = ''
mv $out/bin/DnsServerApp $out/bin/technitium-dns-server
2024-03-04 21:03:28 +00:00
'';
passthru.tests = {
inherit (nixosTests) technitium-dns-server;
};
2024-03-04 21:03:28 +00: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 ];
platforms = lib.platforms.linux;
2024-03-04 21:03:28 +00:00
};
}