Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
120 lines
3.3 KiB
Nix
120 lines
3.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildDotnetModule,
|
|
fetchFromGitHub,
|
|
dotnetCorePackages,
|
|
dbus,
|
|
fontconfig,
|
|
portaudio,
|
|
copyDesktopItems,
|
|
makeDesktopItem,
|
|
}:
|
|
|
|
buildDotnetModule rec {
|
|
pname = "OpenUtau";
|
|
version = "0.1.529";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "stakira";
|
|
repo = "OpenUtau";
|
|
rev = "build/${version}";
|
|
hash = "sha256-HE0KxPKU7tYZbYiCL8sm6I/NZiX0MJktt+5d6qB1A2E=";
|
|
};
|
|
|
|
nativeBuildInputs = [ copyDesktopItems ];
|
|
|
|
desktopItems = [
|
|
(makeDesktopItem {
|
|
name = "openutau";
|
|
desktopName = "OpenUtau";
|
|
startupWMClass = "openutau";
|
|
icon = "openutau";
|
|
genericName = "Utau";
|
|
comment = "Open source UTAU successor";
|
|
exec = "OpenUtau";
|
|
categories = [ "Music" ];
|
|
})
|
|
];
|
|
|
|
dotnet-sdk = dotnetCorePackages.sdk_8_0;
|
|
dotnet-runtime = dotnetCorePackages.runtime_8_0;
|
|
|
|
# [...]/Microsoft.NET.Sdk.targets(157,5): error MSB4018: The "GenerateDepsFile" task failed unexpectedly. [[...]/OpenUtau.Core.csproj]
|
|
# [...]/Microsoft.NET.Sdk.targets(157,5): error MSB4018: System.IO.IOException: The process cannot access the file '[...]/OpenUtau.Core.deps.json' because it is being used by another process. [[...]/OpenUtau.Core.csproj]
|
|
enableParallelBuilding = false;
|
|
|
|
projectFile = "OpenUtau.sln";
|
|
nugetDeps = ./deps.json;
|
|
|
|
executables = [ "OpenUtau" ];
|
|
|
|
runtimeDeps = [
|
|
dbus
|
|
portaudio
|
|
];
|
|
|
|
dotnetInstallFlags = [ "-p:PublishReadyToRun=false" ];
|
|
|
|
# socket cannot bind to localhost on darwin for tests
|
|
doCheck = !stdenv.hostPlatform.isDarwin;
|
|
|
|
# net8.0 replacement needed until upstream bumps to dotnet 8
|
|
postPatch = ''
|
|
substituteInPlace OpenUtau/OpenUtau.csproj OpenUtau.Test/OpenUtau.Test.csproj --replace \
|
|
'<TargetFramework>net6.0</TargetFramework>' \
|
|
'<TargetFramework>net8.0</TargetFramework>'
|
|
|
|
substituteInPlace OpenUtau/Program.cs --replace \
|
|
'/usr/bin/fc-match' \
|
|
'${lib.getExe' fontconfig "fc-match"}'
|
|
'';
|
|
|
|
# need to make sure proprietary worldline resampler is copied
|
|
postInstall =
|
|
let
|
|
runtime =
|
|
if (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64) then
|
|
"linux-x64"
|
|
else if (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) then
|
|
"linux-arm64"
|
|
else if stdenv.hostPlatform.isDarwin then
|
|
"osx"
|
|
else
|
|
null;
|
|
shouldInstallResampler = lib.optionalString (runtime != null) ''
|
|
cp runtimes/${runtime}/native/libworldline${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/OpenUtau/
|
|
'';
|
|
shouldInstallDesktopItem = lib.optionalString stdenv.hostPlatform.isLinux ''
|
|
install -Dm655 -t $out/share/icons/hicolor/scalable/apps Logo/openutau.svg
|
|
'';
|
|
in
|
|
''
|
|
${shouldInstallResampler}
|
|
${shouldInstallDesktopItem}
|
|
'';
|
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
meta = with lib; {
|
|
description = "Open source singing synthesis platform and UTAU successor";
|
|
homepage = "http://www.openutau.com/";
|
|
sourceProvenance = with sourceTypes; [
|
|
fromSource
|
|
# deps
|
|
binaryBytecode
|
|
# some deps and worldline resampler
|
|
binaryNativeCode
|
|
];
|
|
license = licenses.mit;
|
|
maintainers = [ ];
|
|
platforms = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
"x86_64-darwin"
|
|
"aarch64-darwin"
|
|
];
|
|
mainProgram = "OpenUtau";
|
|
};
|
|
}
|