lumafly: use dotnet sdk 9 as sdk 7 has been marked insecure (#360640)

This commit is contained in:
David McFarland 2024-12-13 10:47:02 -04:00 committed by GitHub
commit 59ab33c3b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,6 +9,7 @@
icoutils, icoutils,
copyDesktopItems, copyDesktopItems,
makeDesktopItem, makeDesktopItem,
writeScript,
}: }:
buildDotnetModule rec { buildDotnetModule rec {
pname = "lumafly"; pname = "lumafly";
@ -17,18 +18,33 @@ buildDotnetModule rec {
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "TheMulhima"; owner = "TheMulhima";
repo = "lumafly"; repo = "lumafly";
rev = "v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-GVPMAwxbq9XlKjMKd9G5yUol42f+6lSyHukN7NMCVDA="; hash = "sha256-GVPMAwxbq9XlKjMKd9G5yUol42f+6lSyHukN7NMCVDA=";
}; };
# Use .NET 9.0 since 7.0 is EOL
dotnetFlags = [ "-p:TargetFramework=net9.0" ];
projectFile = "Lumafly/Lumafly.csproj"; projectFile = "Lumafly/Lumafly.csproj";
nugetDeps = ./deps.nix; nugetDeps = ./deps.nix;
dotnet-sdk = dotnetCorePackages.sdk_7_0; dotnet-sdk = dotnetCorePackages.sdk_9_0;
dotnet-runtime = dotnetCorePackages.sdk_9_0;
selfContainedBuild = true; selfContainedBuild = true;
passthru.updateScript = writeScript "update-lumafly" ''
#!/usr/bin/env nix-shell
#!nix-shell --pure -i bash -p bash nix nix-update git cacert
set -eo pipefail
prev_version=$(nix eval --raw -f. lumafly.version)
nix-update lumafly
[[ $(nix eval --raw -f. lumafly.version) == "$prev_version" ]] ||
$(nix-build . -A lumafly.fetch-deps --no-out-link)
'';
runtimeDeps = [ runtimeDeps = [
zlib zlib
icu icu
@ -40,21 +56,25 @@ buildDotnetModule rec {
copyDesktopItems copyDesktopItems
]; ];
executables = [ "Lumafly" ];
postFixup = '' postFixup = ''
# Icon for the desktop file # Icon for the desktop file
icotool -x $src/Lumafly/Assets/Lumafly.ico icotool -x $src/Lumafly/Assets/Lumafly.ico
install -D Lumafly_1_32x32x32.png $out/share/icons/hicolor/32x32/apps/lumafly.png install -D Lumafly_1_32x32x32.png $out/share/icons/hicolor/32x32/apps/lumafly.png
''; '';
desktopItems = [(makeDesktopItem { desktopItems = [
desktopName = "Lumafly"; (makeDesktopItem {
name = "lumafly"; desktopName = "Lumafly";
exec = "Lumafly"; name = "lumafly";
icon = "lumafly"; exec = "Lumafly";
comment = meta.description; icon = "lumafly";
type = "Application"; comment = "A cross platform mod manager for Hollow Knight written in Avalonia";
categories = [ "Game" ]; type = "Application";
})]; categories = [ "Game" ];
})
];
meta = { meta = {
description = "A cross platform mod manager for Hollow Knight written in Avalonia"; description = "A cross platform mod manager for Hollow Knight written in Avalonia";