packages: add undertale-mod-tool avalonia cusotm package
This commit is contained in:
@@ -0,0 +1,122 @@
|
||||
{
|
||||
lib,
|
||||
buildDotnetModule,
|
||||
fetchFromGitHub,
|
||||
dotnetCorePackages,
|
||||
autoPatchelfHook,
|
||||
stdenv,
|
||||
sdl3,
|
||||
fontconfig,
|
||||
libglvnd,
|
||||
mesa,
|
||||
sndio,
|
||||
libGL,
|
||||
libx11,
|
||||
libice,
|
||||
libsm,
|
||||
libxcursor,
|
||||
libxrandr,
|
||||
libxft,
|
||||
vulkan-headers,
|
||||
vulkan-loader,
|
||||
}:
|
||||
let
|
||||
rev = "eec5e7d07b63cb4caf82250914dba8ddd4044bbb";
|
||||
|
||||
buildDotnetModule' = buildDotnetModule.override {
|
||||
addNuGetDeps = dotnetCorePackages.addNuGetDeps.override {
|
||||
fetchNupkg =
|
||||
let
|
||||
baseOverrides = builtins.removeAttrs dotnetCorePackages.fetchNupkg.overrides or { } [ ];
|
||||
in
|
||||
dotnetCorePackages.fetchNupkg.override {
|
||||
overrides = baseOverrides // {
|
||||
"SkiaSharp.NativeAssets.Linux" =
|
||||
package:
|
||||
package.overrideAttrs (
|
||||
old:
|
||||
lib.optionalAttrs stdenv.hostPlatform.isLinux {
|
||||
autoPatchelfIgnoreMissingDeps = (old.autoPatchelfIgnoreMissingDeps or [ ]) ++ [
|
||||
"libc.musl-x86_64.so.1"
|
||||
];
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
buildDotnetModule' {
|
||||
pname = "undertale-mod-tool";
|
||||
version = "8.9.10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "luizzeroxis";
|
||||
repo = "UndertaleModTool";
|
||||
inherit rev;
|
||||
hash = "sha256-QLQZC5C3o9U2PC+rZWfKFbul7BaIHxbu9u8AZaKFtmI=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
projectFile = "UndertaleModToolAvalonia/UndertaleModToolAvalonia.csproj";
|
||||
nugetDeps = ./deps.json;
|
||||
dotnet-sdk = dotnetCorePackages.sdk_10_0;
|
||||
executables = [ "UndertaleModToolAvalonia" ];
|
||||
|
||||
autoPatchelfIgnoreMissingDeps = [
|
||||
"libsteam_api.so"
|
||||
"libGLES_CM.so.1"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ autoPatchelfHook ];
|
||||
|
||||
buildInputs = [
|
||||
stdenv.cc.cc.lib # provides libstdc++.so.6
|
||||
fontconfig
|
||||
sdl3
|
||||
libx11
|
||||
libglvnd
|
||||
libGL
|
||||
mesa
|
||||
sndio
|
||||
vulkan-headers
|
||||
vulkan-loader
|
||||
];
|
||||
|
||||
runtimeDependencies = [
|
||||
stdenv.cc.cc.lib
|
||||
libx11
|
||||
sdl3
|
||||
];
|
||||
|
||||
runtimeDeps = [
|
||||
sdl3
|
||||
libx11
|
||||
libxcursor
|
||||
libice
|
||||
libsm
|
||||
libxrandr
|
||||
libxft
|
||||
fontconfig
|
||||
];
|
||||
|
||||
dotnetBuildFlags = [
|
||||
"-p:BuildHash=${rev}"
|
||||
"-p:PublishSingleFile=false"
|
||||
"/p:RuntimeIdentifier="
|
||||
"--no-self-contained"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
# Disable this temporarily
|
||||
#ln -s $out/bin/UndertaleModToolAvalonia $out/bin/undertalemodtool
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Avalonia cross-platform GUI port of UndertaleModTool";
|
||||
homepage = "https://github.com/luizzeroxis/UndertaleModTool/tree/avalonia";
|
||||
license = licenses.gpl3Only;
|
||||
platforms = platforms.linux;
|
||||
mainProgram = "undertalemodtool";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user