Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-24.11] kryptor: .NET 6 -> 8 #363917

Merged
merged 6 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 30 additions & 8 deletions pkgs/by-name/kr/kryptor/deps.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 21 additions & 9 deletions pkgs/by-name/kr/kryptor/package.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{ lib
, buildDotnetModule
, fetchFromGitHub
, dotnetCorePackages
{
lib,
buildDotnetModule,
fetchFromGitHub,
dotnetCorePackages,
versionCheckHook,
}:

buildDotnetModule rec {
Expand All @@ -11,25 +13,35 @@ buildDotnetModule rec {
src = fetchFromGitHub {
owner = "samuel-lucas6";
repo = "Kryptor";
rev = "v${version}";
tag = "v${version}";
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"];
executables = [ "kryptor" ];

dotnetFlags = ["-p:IncludeNativeLibrariesForSelfExtract=true"];
dotnetFlags = [ "-p:TargetFramework=net8.0" ];

doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];

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";
homepage = "https://github.com/samuel-lucas6/Kryptor";
license = lib.licenses.gpl3Only;
mainProgram = "kryptor";
maintainers = with lib.maintainers; [ arthsmn ];
maintainers = with lib.maintainers; [
arthsmn
gepbird
];
platforms = lib.platforms.all;
};
}
6 changes: 6 additions & 0 deletions pkgs/by-name/kr/kryptor/update.sh
Original file line number Diff line number Diff line change
@@ -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)
Loading