tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
cemu: init at 2.0-10
Zhaofeng Li
3 years ago
ced44049
9ae40c06
+133
3 changed files
expand all
collapse all
unified
split
pkgs
applications
emulators
cemu
cmakelists.patch
default.nix
top-level
all-packages.nix
+12
pkgs/applications/emulators/cemu/cmakelists.patch
···
1
1
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2
2
+
index 4b2b789..48d9be0 100644
3
3
+
--- a/CMakeLists.txt
4
4
+
+++ b/CMakeLists.txt
5
5
+
@@ -92,6 +92,7 @@ find_package(pugixml REQUIRED)
6
6
+
find_package(RapidJSON REQUIRED)
7
7
+
find_package(Boost COMPONENTS program_options filesystem nowide REQUIRED)
8
8
+
find_package(libzip REQUIRED)
9
9
+
+find_package(SPIRV-Tools-opt REQUIRED)
10
10
+
find_package(glslang REQUIRED)
11
11
+
find_package(ZLIB REQUIRED)
12
12
+
find_package(zstd MODULE REQUIRED) # MODULE so that zstd::zstd is available
+119
pkgs/applications/emulators/cemu/default.nix
···
1
1
+
{ lib, stdenv, fetchFromGitHub
2
2
+
, addOpenGLRunpath
3
3
+
, wrapGAppsHook
4
4
+
, cmake
5
5
+
, glslang
6
6
+
, nasm
7
7
+
, pkg-config
8
8
+
9
9
+
, SDL2
10
10
+
, boost
11
11
+
, cubeb
12
12
+
, curl
13
13
+
, fmt_9
14
14
+
, glm
15
15
+
, gtk3
16
16
+
, imgui
17
17
+
, libpng
18
18
+
, libzip
19
19
+
, libXrender
20
20
+
, pugixml
21
21
+
, rapidjson
22
22
+
, vulkan-headers
23
23
+
, wxGTK32
24
24
+
, zarchive
25
25
+
26
26
+
, vulkan-loader
27
27
+
}:
28
28
+
29
29
+
stdenv.mkDerivation rec {
30
30
+
pname = "cemu";
31
31
+
version = "2.0-10";
32
32
+
33
33
+
src = fetchFromGitHub {
34
34
+
owner = "cemu-project";
35
35
+
repo = "Cemu";
36
36
+
rev = "v${version}";
37
37
+
hash = "sha256-GJA/lJJqShuHeYirBW1kyVsU44kMpmAn916PSGOnKkY=";
38
38
+
};
39
39
+
40
40
+
patches = [
41
41
+
# glslangTargets want SPIRV-Tools-opt to be defined:
42
42
+
# > The following imported targets are referenced, but are missing:
43
43
+
# > SPIRV-Tools-opt
44
44
+
./cmakelists.patch
45
45
+
];
46
46
+
47
47
+
nativeBuildInputs = [
48
48
+
addOpenGLRunpath
49
49
+
wrapGAppsHook
50
50
+
cmake
51
51
+
glslang
52
52
+
nasm
53
53
+
pkg-config
54
54
+
];
55
55
+
56
56
+
buildInputs = [
57
57
+
SDL2
58
58
+
boost
59
59
+
cubeb
60
60
+
curl
61
61
+
fmt_9
62
62
+
glm
63
63
+
gtk3
64
64
+
imgui
65
65
+
libpng
66
66
+
libzip
67
67
+
libXrender
68
68
+
pugixml
69
69
+
rapidjson
70
70
+
vulkan-headers
71
71
+
wxGTK32
72
72
+
zarchive
73
73
+
];
74
74
+
75
75
+
cmakeFlags = [
76
76
+
"-DCMAKE_C_FLAGS_RELEASE=-DNDEBUG"
77
77
+
"-DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG"
78
78
+
"-DENABLE_VCPKG=OFF"
79
79
+
80
80
+
# PORTABLE:
81
81
+
# "All data created and maintained by Cemu will be in the directory where the executable file is located"
82
82
+
"-DPORTABLE=OFF"
83
83
+
];
84
84
+
85
85
+
preConfigure = ''
86
86
+
rm -rf dependencies/imgui
87
87
+
ln -s ${imgui}/include/imgui dependencies/imgui
88
88
+
'';
89
89
+
90
90
+
installPhase = ''
91
91
+
runHook preInstall
92
92
+
93
93
+
install -Dm755 ../bin/Cemu_release $out/bin/Cemu
94
94
+
ln -s $out/bin/Cemu $out/bin/cemu
95
95
+
96
96
+
mkdir -p $out/share/applications
97
97
+
substitute ../dist/linux/info.cemu.Cemu.desktop $out/share/applications/info.cemu.Cemu.desktop \
98
98
+
--replace "Exec=Cemu" "Exec=$out/bin/Cemu"
99
99
+
100
100
+
install -Dm644 ../dist/linux/info.cemu.Cemu.metainfo.xml -t $out/share/metainfo
101
101
+
install -Dm644 ../src/resource/logo_icon.png $out/share/icons/hicolor/128x128/apps/info.cemu.Cemu.png
102
102
+
103
103
+
runHook postInstall
104
104
+
'';
105
105
+
106
106
+
preFixup = let
107
107
+
libs = [ vulkan-loader ] ++ cubeb.passthru.backendLibs;
108
108
+
in ''
109
109
+
gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath libs}")
110
110
+
'';
111
111
+
112
112
+
meta = with lib; {
113
113
+
description = "Cemu is a Wii U emulator";
114
114
+
homepage = "https://cemu.info";
115
115
+
license = licenses.mpl20;
116
116
+
platforms = [ "x86_64-linux" ];
117
117
+
maintainers = with maintainers; [ zhaofengli baduhai ];
118
118
+
};
119
119
+
}
+2
pkgs/top-level/all-packages.nix
···
1503
1503
1504
1504
cdemu-daemon = callPackage ../applications/emulators/cdemu/daemon.nix { };
1505
1505
1506
1506
+
cemu = callPackage ../applications/emulators/cemu { };
1507
1507
+
1506
1508
cen64 = callPackage ../applications/emulators/cen64 { };
1507
1509
1508
1510
citra-canary = callPackage ../applications/emulators/citra {