1{
2 lib,
3 stdenv,
4 buildDotnetModule,
5 fetchFromGitHub,
6 autoPatchelfHook,
7 wrapGAppsHook,
8 dotnetCorePackages,
9 fontconfig,
10 gtk3,
11 libunwind,
12 openssl,
13 xinput,
14 xorg,
15}:
16buildDotnetModule rec {
17 pname = "opentracker";
18 version = "1.8.5";
19
20 src = fetchFromGitHub {
21 owner = "trippsc2";
22 repo = pname;
23 rev = "refs/tags/${version}";
24 hash = "sha512-nWkPgVYdnBJibyJRdLPe3O3RioDPbzumSritRejmr4CeiPb7aUTON7HjivcV/GKor1guEYu+TJ+QxYrqO/eppg==";
25 };
26
27 patches = [./remove-project.patch];
28
29 dotnet-runtime = dotnetCorePackages.runtime_6_0;
30
31 nugetDeps = ./deps.nix;
32
33 projectFile = "OpenTracker.sln";
34 executables = ["OpenTracker"];
35
36 doCheck = true;
37 disabledTests = [
38 "OpenTracker.UnitTests.Models.Nodes.Factories.SLightWorldConnectionFactoryTests.GetNodeConnections_ShouldReturnExpectedValue"
39 "OpenTracker.UnitTests.Models.Sections.Factories.ItemSectionFactoryTests.GetItemSection_ShouldReturnExpected"
40 ];
41
42 nativeBuildInputs = [
43 autoPatchelfHook
44 wrapGAppsHook
45 ];
46
47 buildInputs = [
48 stdenv.cc.cc.lib
49 fontconfig
50 gtk3
51 libunwind
52 ];
53
54 runtimeDeps =
55 [
56 gtk3
57 openssl
58 xinput
59 ]
60 ++ (with xorg; [
61 libICE
62 libSM
63 libX11
64 libXi
65 ]);
66
67 # Attempts to patchelf unneeded SOs
68 autoPatchelfIgnoreMissingDeps = [
69 "libc.musl-x86_64.so.1"
70 "libintl.so.8"
71 ];
72
73 meta = with lib; {
74 description = "A tracking application for A Link to the Past Randomizer";
75 homepage = "https://github.com/trippsc2/OpenTracker";
76 sourceProvenance = with sourceTypes; [
77 fromSource
78 # deps
79 binaryBytecode
80 binaryNativeCode
81 ];
82 license = licenses.mit;
83 maintainers = [maintainers.ivar];
84 mainProgram = "OpenTracker";
85 platforms = ["x86_64-linux"];
86 };
87}