From 5f453694e2d2a9f754fd2fb85e258be6986a2b96 Mon Sep 17 00:00:00 2001 From: FabianRig <88741530+FabianRig@users.noreply.github.com> Date: Sun, 15 Dec 2024 20:41:06 +0100 Subject: [PATCH] technitium-dns-server: 13.2 -> 13.2.2, merge library and server --- .../technitium-dns-server-library/package.nix | 40 ------------------- .../library-nuget-deps.nix} | 0 .../te/technitium-dns-server/package.nix | 35 ++++++++++++---- 3 files changed, 27 insertions(+), 48 deletions(-) delete mode 100644 pkgs/by-name/te/technitium-dns-server-library/package.nix rename pkgs/by-name/te/{technitium-dns-server-library/nuget-deps.nix => technitium-dns-server/library-nuget-deps.nix} (100%) diff --git a/pkgs/by-name/te/technitium-dns-server-library/package.nix b/pkgs/by-name/te/technitium-dns-server-library/package.nix deleted file mode 100644 index 1abde74faa6e77..00000000000000 --- a/pkgs/by-name/te/technitium-dns-server-library/package.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ - lib, - buildDotnetModule, - fetchFromGitHub, - dotnetCorePackages, - nix-update-script, -}: -buildDotnetModule rec { - pname = "technitium-dns-server-library"; - version = "dns-server-v13.2"; - - src = fetchFromGitHub { - owner = "TechnitiumSoftware"; - repo = "TechnitiumLibrary"; - rev = "refs/tags/${version}"; - hash = "sha256-stfxYe0flE1daPuXw/GAgY52ZD7pkqnBIBvmSVPWWjI="; - name = "${pname}-${version}"; - }; - - dotnet-sdk = dotnetCorePackages.sdk_8_0; - - nugetDeps = ./nuget-deps.nix; - - projectFile = [ - "TechnitiumLibrary.ByteTree/TechnitiumLibrary.ByteTree.csproj" - "TechnitiumLibrary.Net/TechnitiumLibrary.Net.csproj" - ]; - - passthru.updateScript = nix-update-script { }; - - meta = { - changelog = "https://github.com/TechnitiumSoftware/DnsServer/blob/master/CHANGELOG.md"; - description = "Library for Authorative and Recursive DNS server for Privacy and Security"; - homepage = "https://github.com/TechnitiumSoftware/DnsServer"; - license = lib.licenses.gpl3Only; - mainProgram = "technitium-dns-server-library"; - maintainers = with lib.maintainers; [ fabianrig ]; - platforms = lib.platforms.linux; - }; -} diff --git a/pkgs/by-name/te/technitium-dns-server-library/nuget-deps.nix b/pkgs/by-name/te/technitium-dns-server/library-nuget-deps.nix similarity index 100% rename from pkgs/by-name/te/technitium-dns-server-library/nuget-deps.nix rename to pkgs/by-name/te/technitium-dns-server/library-nuget-deps.nix diff --git a/pkgs/by-name/te/technitium-dns-server/package.nix b/pkgs/by-name/te/technitium-dns-server/package.nix index 283791658a1c1a..179b478a167b20 100644 --- a/pkgs/by-name/te/technitium-dns-server/package.nix +++ b/pkgs/by-name/te/technitium-dns-server/package.nix @@ -3,19 +3,40 @@ buildDotnetModule, fetchFromGitHub, dotnetCorePackages, - technitium-dns-server-library, nixosTests, - nix-update-script, }: +let + technitium-library = buildDotnetModule rec { + pname = "TechnitiumLibrary"; + version = "13.2.2"; + + src = fetchFromGitHub { + owner = "TechnitiumSoftware"; + repo = "TechnitiumLibrary"; + rev = "refs/tags/dns-server-v${version}"; + hash = "sha256-KJNz4jhCKySYrYkT3BxqBh9QkeDV0XGHlRg9K0jLvBI="; + 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 { pname = "technitium-dns-server"; - version = "13.2"; + version = "13.2.2"; src = fetchFromGitHub { owner = "TechnitiumSoftware"; repo = "DnsServer"; rev = "refs/tags/v${version}"; - hash = "sha256-oxLMBs+XkzvlfSst6ZD56ZIgiXwm0Px8Tn3Trdd/6H8="; + hash = "sha256-oEsJ4P0eUXhIsXCkY3ciJaGmElu745nNiBtlDXpSb6k="; name = "${pname}-${version}"; }; @@ -28,8 +49,8 @@ buildDotnetModule rec { # move dependencies from TechnitiumLibrary to the expected directory preBuild = '' - mkdir -p ../TechnitiumLibrary/bin - cp -r ${technitium-dns-server-library}/lib/${technitium-dns-server-library.pname}/* ../TechnitiumLibrary/bin/ + mkdir -p ../${technitium-library.pname}/bin + cp -r ${technitium-library}/lib/TechnitiumLibrary/* ../${technitium-library.pname}/bin/ ''; postFixup = '' @@ -40,8 +61,6 @@ buildDotnetModule rec { inherit (nixosTests) technitium-dns-server; }; - passthru.updateScript = nix-update-script { }; - meta = { changelog = "https://github.com/TechnitiumSoftware/DnsServer/blob/master/CHANGELOG.md"; description = "Authorative and Recursive DNS server for Privacy and Security";