From 716d72c1368e595c96c2215893c9513cb86037d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Mon, 9 Dec 2024 15:50:57 +0100 Subject: [PATCH 1/6] kryptor: nixfmt (cherry picked from commit 9431dcc532d830af6585ddaaa6518af485d6263d) --- pkgs/by-name/kr/kryptor/package.nix | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/kr/kryptor/package.nix b/pkgs/by-name/kr/kryptor/package.nix index a130ba4370c52..bf61ebc10d12f 100644 --- a/pkgs/by-name/kr/kryptor/package.nix +++ b/pkgs/by-name/kr/kryptor/package.nix @@ -1,7 +1,8 @@ -{ lib -, buildDotnetModule -, fetchFromGitHub -, dotnetCorePackages +{ + lib, + buildDotnetModule, + fetchFromGitHub, + dotnetCorePackages, }: buildDotnetModule rec { @@ -19,9 +20,9 @@ buildDotnetModule rec { projectFile = "src/Kryptor.sln"; nugetDeps = ./deps.nix; - executables = ["kryptor"]; + executables = [ "kryptor" ]; - dotnetFlags = ["-p:IncludeNativeLibrariesForSelfExtract=true"]; + dotnetFlags = [ "-p:IncludeNativeLibrariesForSelfExtract=true" ]; meta = { changelog = "https://github.com/samuel-lucas6/Kryptor/releases/tag/v${version}"; @@ -29,7 +30,9 @@ buildDotnetModule rec { homepage = "https://github.com/samuel-lucas6/Kryptor"; license = lib.licenses.gpl3Only; mainProgram = "kryptor"; - maintainers = with lib.maintainers; [ arthsmn ]; + maintainers = with lib.maintainers; [ + arthsmn + ]; platforms = lib.platforms.all; }; } From b920af30de85503109890756b171e750da25bca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Mon, 9 Dec 2024 15:56:32 +0100 Subject: [PATCH 2/6] kryptor: refactor (cherry picked from commit bc259d48fa5fcb033584d98aa1aad9242b6fe1e1) --- pkgs/by-name/kr/kryptor/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/kr/kryptor/package.nix b/pkgs/by-name/kr/kryptor/package.nix index bf61ebc10d12f..27e0a1946f10b 100644 --- a/pkgs/by-name/kr/kryptor/package.nix +++ b/pkgs/by-name/kr/kryptor/package.nix @@ -12,7 +12,7 @@ buildDotnetModule rec { src = fetchFromGitHub { owner = "samuel-lucas6"; repo = "Kryptor"; - rev = "v${version}"; + tag = "v${version}"; hash = "sha256-BxUmDzmfvRelQDHb5uLcQ2YPL7ClxZNFGm/gQoDK8t8="; }; @@ -22,7 +22,7 @@ buildDotnetModule rec { executables = [ "kryptor" ]; - dotnetFlags = [ "-p:IncludeNativeLibrariesForSelfExtract=true" ]; + dotnetFlags = [ ]; meta = { changelog = "https://github.com/samuel-lucas6/Kryptor/releases/tag/v${version}"; From 0b21ffedda386e8ee039f3ac0b80f5ae153433e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Mon, 9 Dec 2024 15:57:03 +0100 Subject: [PATCH 3/6] kryptor: .NET 6 -> 8 (cherry picked from commit 23d1d5c8be0b100277e49f458df8a171efbec382) --- pkgs/by-name/kr/kryptor/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/kr/kryptor/package.nix b/pkgs/by-name/kr/kryptor/package.nix index 27e0a1946f10b..9e56a015a911c 100644 --- a/pkgs/by-name/kr/kryptor/package.nix +++ b/pkgs/by-name/kr/kryptor/package.nix @@ -16,13 +16,13 @@ buildDotnetModule rec { hash = "sha256-BxUmDzmfvRelQDHb5uLcQ2YPL7ClxZNFGm/gQoDK8t8="; }; - dotnet-sdk = dotnetCorePackages.sdk_6_0; + dotnet-sdk = dotnetCorePackages.sdk_8_0; projectFile = "src/Kryptor.sln"; nugetDeps = ./deps.nix; executables = [ "kryptor" ]; - dotnetFlags = [ ]; + dotnetFlags = [ "-p:TargetFramework=net8.0" ]; meta = { changelog = "https://github.com/samuel-lucas6/Kryptor/releases/tag/v${version}"; From 857f5e64a4c84b5f0448148e0a5eb0c471170899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Mon, 9 Dec 2024 17:13:25 +0100 Subject: [PATCH 4/6] kryptor: add update script (cherry picked from commit 2d8de12e2d4c150676f74fcf5e8215aceaac8cbb) --- pkgs/by-name/kr/kryptor/deps.nix | 38 +++++++++++++++++++++++------ pkgs/by-name/kr/kryptor/package.nix | 4 +++ pkgs/by-name/kr/kryptor/update.sh | 6 +++++ 3 files changed, 40 insertions(+), 8 deletions(-) create mode 100755 pkgs/by-name/kr/kryptor/update.sh diff --git a/pkgs/by-name/kr/kryptor/deps.nix b/pkgs/by-name/kr/kryptor/deps.nix index 190f7bea309dc..38e41fb90d734 100644 --- a/pkgs/by-name/kr/kryptor/deps.nix +++ b/pkgs/by-name/kr/kryptor/deps.nix @@ -1,9 +1,31 @@ -{ fetchNuGet }: [ - (fetchNuGet { pname = "Geralt"; version = "3.0.1"; hash = "sha256-jNiRhjqY4juSR68zHfkW+IKnnq2qXlXi3hXZrPyRlps="; }) - (fetchNuGet { pname = "libsodium"; version = "1.0.19"; hash = "sha256-EXeaeLf3kpeFw5ecr/D/hZbOdSH+t518pV6HwOxc8ec="; }) - (fetchNuGet { pname = "McMaster.Extensions.CommandLineUtils"; version = "4.1.0"; hash = "sha256-lPAL8r1/y6WmWpgKqYHzIa3iEz1+Soqkud4XnbpN/N4="; }) - (fetchNuGet { pname = "Microsoft.NET.ILLink.Tasks"; version = "8.0.6"; hash = "sha256-Red8XiAF5Td7yt7jSOgUSlgzSUV5F1Be1yv+WEzNjmo="; }) - (fetchNuGet { pname = "Microsoft.NETCore.App.Crossgen2.linux-x64"; version = "8.0.6"; hash = "sha256-6OQ+R8PUmZO6FjW4AmLdVFrwpzUQ/o8m8bZ2pYuISJg="; }) - (fetchNuGet { pname = "Monocypher"; version = "0.3.0"; hash = "sha256-InbhO6d2wZ96Zl69b+KIUVM6XRU1X1op6e15afx6hps="; }) - (fetchNuGet { pname = "System.ComponentModel.Annotations"; version = "5.0.0"; hash = "sha256-0pST1UHgpeE6xJrYf5R+U7AwIlH3rVC3SpguilI/MAg="; }) +# This file was automatically generated by passthru.fetch-deps. +# Please dont edit it manually, your changes might get overwritten! + +{ fetchNuGet }: +[ + (fetchNuGet { + pname = "Geralt"; + version = "2.1.0"; + hash = "sha256-BCXJKa9200GFqlm0GFAyAxGRzlorFxHct83VXyZZlvQ="; + }) + (fetchNuGet { + pname = "libsodium"; + version = "1.0.18.4"; + hash = "sha256-mdV0etNrKc5rjsIxhCkj7qafT+yv6PTuYCheveVjPwI="; + }) + (fetchNuGet { + pname = "McMaster.Extensions.CommandLineUtils"; + version = "4.0.2"; + hash = "sha256-e+UEOOxYPOEcX6QXTU8F+G5093qPSrfOqsYCLDcwSvQ="; + }) + (fetchNuGet { + pname = "Monocypher"; + version = "0.3.0"; + hash = "sha256-InbhO6d2wZ96Zl69b+KIUVM6XRU1X1op6e15afx6hps="; + }) + (fetchNuGet { + pname = "System.ComponentModel.Annotations"; + version = "5.0.0"; + hash = "sha256-0pST1UHgpeE6xJrYf5R+U7AwIlH3rVC3SpguilI/MAg="; + }) ] diff --git a/pkgs/by-name/kr/kryptor/package.nix b/pkgs/by-name/kr/kryptor/package.nix index 9e56a015a911c..f8776e5f54f91 100644 --- a/pkgs/by-name/kr/kryptor/package.nix +++ b/pkgs/by-name/kr/kryptor/package.nix @@ -24,6 +24,10 @@ buildDotnetModule rec { dotnetFlags = [ "-p:TargetFramework=net8.0" ]; + passthru = { + updateScript = ./update.sh; + }; + meta = { changelog = "https://github.com/samuel-lucas6/Kryptor/releases/tag/v${version}"; description = "Simple, modern, and secure encryption and signing tool that aims to be a better version of age and Minisign"; diff --git a/pkgs/by-name/kr/kryptor/update.sh b/pkgs/by-name/kr/kryptor/update.sh new file mode 100755 index 0000000000000..1e6e7d7646de8 --- /dev/null +++ b/pkgs/by-name/kr/kryptor/update.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env nix-shell +#!nix-shell --pure -i bash -p bash nix nix-update git cacert +set -euo pipefail + +nix-update kryptor +$(nix-build . -A kryptor.fetch-deps --no-out-link) From 558997a97855bf660ac2e00f88987b2b0081982d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Mon, 9 Dec 2024 17:15:44 +0100 Subject: [PATCH 5/6] kryptor: add version checking (cherry picked from commit 1f93aee30f4d5cb9b708a2b211a454f3487ce5c1) --- pkgs/by-name/kr/kryptor/package.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/by-name/kr/kryptor/package.nix b/pkgs/by-name/kr/kryptor/package.nix index f8776e5f54f91..798bae1b4b451 100644 --- a/pkgs/by-name/kr/kryptor/package.nix +++ b/pkgs/by-name/kr/kryptor/package.nix @@ -3,6 +3,7 @@ buildDotnetModule, fetchFromGitHub, dotnetCorePackages, + versionCheckHook, }: buildDotnetModule rec { @@ -24,6 +25,9 @@ buildDotnetModule rec { dotnetFlags = [ "-p:TargetFramework=net8.0" ]; + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + passthru = { updateScript = ./update.sh; }; From c80deb22a7f103f5f420a62f35f4ca7d51f19b16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Mon, 9 Dec 2024 17:17:45 +0100 Subject: [PATCH 6/6] kryptor: add maintainer gepbird (cherry picked from commit e7b93f44dcf60df7d133549dc43e09696709c3eb) --- pkgs/by-name/kr/kryptor/package.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/by-name/kr/kryptor/package.nix b/pkgs/by-name/kr/kryptor/package.nix index 798bae1b4b451..8efa4a1446549 100644 --- a/pkgs/by-name/kr/kryptor/package.nix +++ b/pkgs/by-name/kr/kryptor/package.nix @@ -40,6 +40,7 @@ buildDotnetModule rec { mainProgram = "kryptor"; maintainers = with lib.maintainers; [ arthsmn + gepbird ]; platforms = lib.platforms.all; };