···
15
+
deps = mkNugetDeps {
16
+
name = "midisheetmusic-deps";
21
+
pname = "NUnit.Console";
23
+
hash = "sha256-FkzpEk12msmUp5I05ZzlGiG+UInoYhBmar/vB5Gt4H8=";
28
+
hash = "sha256-Kkft3QO9T5WwsvyPRNGT2nut7RS7OWArDjIYxvwA8qU=";
···
sha256 = "05c6zskj50g29f51lx8fvgzsi3f31z01zj6ssjjrgr7jfs7ak70p";
25
-
nativeCheckInputs = (with dotnetPackages; [ NUnitConsole ]);
···
for i in Classes/MidiPlayer.cs Classes/MidiSheetMusic.cs
34
-
substituteInPlace $i --replace "/usr/bin/timidity" "${timidity}/bin/timidity"
52
+
substituteInPlace $i --replace-fail "/usr/bin/timidity" "${timidity}/bin/timidity"
40
-
# include missing file with unit tests for building
41
-
# switch from mono nunit dll to standalone dll otherwise mono compiler barks
42
-
# run via nunit3 console, because mono nunit console wants access $HOME
61
+
# Resolves the warning "Fontconfig error: No writable cache directories"
62
+
export XDG_CACHE_HOME="$(mktemp -d)"
64
+
# Adds one file with tests that's missing from compiliation
65
+
# Makes sure NUnit framework from NuGet can be found
substituteInPlace UnitTestDLL.csproj \
45
-
--replace "</Compile>" '</Compile><Compile Include="Classes\UnitTest.cs"/>' \
46
-
--replace nunit.framework.dll "${dotnetPackages.NUnit}/lib/dotnet/NUnit/nunit.framework.dll"
67
+
--replace-fail '</Compile>' '</Compile><Compile Include="Classes\UnitTest.cs"/>' \
68
+
--replace-fail 'nunit.framework.dll' '${deps}/share/nuget/packages/nunit/2.6.4/lib/nunit.framework.dll'
48
-
nunit3-console bin/Debug/UnitTest.dll
71
+
# 2 tests are still failing, we exclude them for now
72
+
mono ${deps}/share/nuget/packages/nunit.console/3.0.1/tools/nunit3-console.exe bin/Debug/UnitTest.dll \
73
+
--where "test != 'MidiFileTest.TestChangeSoundTrack' && test != 'MidiFileTest.TestChangeSoundPerChannelTracks'"
51
-
# 2 tests of 47 are still failing
76
+
# This fixes tests that fail because of missing fonts
77
+
FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; };
mkdir -p $out/share/applications $out/share/pixmaps $out/bin
···
--add-flags $out/bin/.MidiSheetMusic.exe
description = "Convert MIDI Files to Piano Sheet Music for two hands";
mainProgram = "midisheetmusic.mono.exe";
homepage = "http://midisheetmusic.com";
76
-
license = licenses.gpl2;
78
-
platforms = platforms.linux;
101
+
license = lib.licenses.gpl2;
102
+
maintainers = [ lib.maintainers.mdarocha ];
103
+
platforms = lib.platforms.linux;