blob: 07ba2d35da367a348a4160a582028ac6ead0612d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
{ buildDotnetModule
, fetchFromGitHub
, dotnetCorePackages
, copyDesktopItems
, makeDesktopItem
, lib
, fontconfig
, libX11
, libXcursor
, libICE
, libSM
, runCommandLocal
}:
let
version = "6.4.8";
src = fetchFromGitHub {
owner = "retrospy";
repo = "RetroSpy";
rev = "v${version}";
hash = "sha256-0rdLdud78gnBX8CIdG81caJ1IRoIjGzb7coP4huEPDA=";
};
executables = [
"RetroSpy"
"GBPemu"
"GBPUpdater"
"UsbUpdater"
];
retrospy-icons = runCommandLocal "retrospy-icons" { } ''
mkdir -p $out/share/retrospy
${builtins.concatStringsSep "\n" (map (e: "cp ${src}/${e}.ico $out/share/retrospy/${e}.ico") executables)}
'';
in
buildDotnetModule {
pname = "retrospy";
inherit version;
inherit src;
nativeBuildInputs = [
copyDesktopItems
];
runtimeDeps = [
fontconfig
libX11
libICE
libXcursor
libSM
];
projectFile = [
"RetroSpyX/RetroSpyX.csproj"
"GBPemuX/GBPemuX.csproj"
"GBPUpdaterX2/GBPUpdaterX2.csproj"
"UsbUpdaterX2/UsbUpdaterX2.csproj"
];
dotnet-sdk = dotnetCorePackages.sdk_7_0;
dotnet-runtime = dotnetCorePackages.aspnetcore_7_0;
nugetDeps = ./deps.nix;
inherit executables;
passthru.updateScript = ./update.sh;
desktopItems = map
(e: (makeDesktopItem {
name = e;
exec = e;
icon = "${retrospy-icons}/share/retrospy/${e}.ico";
desktopName = "${e}";
categories = [ "Utility" ];
startupWMClass = e;
}))
executables;
meta = {
description = "Live controller viewer for Nintendo consoles as well as many other retro consoles and computers";
homepage = "https://retro-spy.com/";
license = lib.licenses.gpl3;
maintainers = [ lib.maintainers.naxdy ];
platforms = lib.platforms.linux;
};
}
|