1 { lib, stdenv, fetchFromGitHub
33 stdenv.mkDerivation rec {
37 src = fetchFromGitHub {
38 owner = "cemu-project";
41 hash = "sha256-0N/bJJHWMHF+ZlVxNHV8t/1jFr3ER3GNF8CPAHVSsak=";
45 # glslangTargets want SPIRV-Tools-opt to be defined:
46 # > The following imported targets are referenced, but are missing:
82 "-DCMAKE_C_FLAGS_RELEASE=-DNDEBUG"
83 "-DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG"
85 "-DENABLE_FERAL_GAMEMODE=ON"
88 # "All data created and maintained by Cemu will be in the directory where the executable file is located"
92 preConfigure = with lib; let
93 tag = last (splitString "-" version);
95 rm -rf dependencies/imgui
96 ln -s ${imgui}/include/imgui dependencies/imgui
97 substituteInPlace src/Common/version.h --replace " (experimental)" "-${tag} (experimental)"
98 substituteInPlace dependencies/gamemode/lib/gamemode_client.h --replace "libgamemode.so.0" "${gamemode.lib}/lib/libgamemode.so.0"
104 install -Dm755 ../bin/Cemu_release $out/bin/Cemu
105 ln -s $out/bin/Cemu $out/bin/cemu
107 mkdir -p $out/share/applications
108 substitute ../dist/linux/info.cemu.Cemu.desktop $out/share/applications/info.cemu.Cemu.desktop \
109 --replace "Exec=Cemu" "Exec=$out/bin/Cemu"
111 install -Dm644 ../dist/linux/info.cemu.Cemu.metainfo.xml -t $out/share/metainfo
112 install -Dm644 ../src/resource/logo_icon.png $out/share/icons/hicolor/128x128/apps/info.cemu.Cemu.png
118 libs = [ vulkan-loader ] ++ cubeb.passthru.backendLibs;
121 --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath libs}"
125 passthru.updateScript = nix-update-script { };
128 description = "Cemu is a Wii U emulator";
129 homepage = "https://cemu.info";
130 license = licenses.mpl20;
131 platforms = [ "x86_64-linux" ];
132 maintainers = with maintainers; [ zhaofengli baduhai ];
133 mainProgram = "cemu";