From ba1f215af28ee97ea80650ff6d1c55077c5a752b 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} | 5 +-- .../te/technitium-dns-server/package.nix | 35 ++++++++++++---- 3 files changed, 29 insertions(+), 51 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} (86%) 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 86% 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 index dbfecc1b26058f..a2f245912aba65 100644 --- a/pkgs/by-name/te/technitium-dns-server-library/nuget-deps.nix +++ b/pkgs/by-name/te/technitium-dns-server/library-nuget-deps.nix @@ -1,6 +1,5 @@ # This file was automatically generated by passthru.fetch-deps. # Please dont edit it manually, your changes might get overwritten! -{ fetchNuGet }: -[ -] +{ fetchNuGet }: [ +] \ No newline at end of file diff --git a/pkgs/by-name/te/technitium-dns-server/package.nix b/pkgs/by-name/te/technitium-dns-server/package.nix index 283791658a1c1a..fb87aef0f4a5cf 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}"; }; @@ -29,7 +50,7 @@ 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/ + cp -r ${technitium-library}/lib/TechnitiumLibrary/* ../TechnitiumLibrary/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"; @@ -51,4 +70,4 @@ buildDotnetModule rec { maintainers = with lib.maintainers; [ fabianrig ]; platforms = lib.platforms.linux; }; -} +} \ No newline at end of file