gbeplus: add for some reason
This commit is contained in:
parent
01959e74e8
commit
c4a85fe74d
|
@ -65,6 +65,7 @@
|
|||
attic-client = final.attic.override { clientOnly = true; };
|
||||
cups-dymo-patched = final.callPackage ./packages/cups-dymo { };
|
||||
cynthion = final.callPackage ./packages/cynthion { };
|
||||
gbeplus = final.callPackage ./packages/gbeplus { };
|
||||
hactoolnet = final.callPackage ./packages/hactoolnet { };
|
||||
ipsw = final.callPackage ./packages/ipsw { };
|
||||
jlink = final.callPackage ./packages/jlink { };
|
||||
|
|
42
packages/gbeplus/default.nix
Normal file
42
packages/gbeplus/default.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
qt5,
|
||||
SDL2,
|
||||
SDL2_net,
|
||||
SDL2_image,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gbe-plus";
|
||||
version = "1.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "shonumi";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-9g29V13Ux5BeSg6f/NW9Vi5YJGRYUEPYONGivMYIYPs=";
|
||||
};
|
||||
|
||||
patches = [ ./install-dirs.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/CMakeLists.txt src/qt/CMakeLists.txt \
|
||||
--replace "SDL2::SDL2main" ""
|
||||
'';
|
||||
|
||||
cmakeFlags = [ "-DCMAKE_INSTALL_SYSCONFDIR=${placeholder "out"}/etc" ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
qt5.wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
SDL2
|
||||
SDL2_net
|
||||
SDL2_image
|
||||
qt5.qtbase
|
||||
];
|
||||
}
|
24
packages/gbeplus/install-dirs.patch
Normal file
24
packages/gbeplus/install-dirs.patch
Normal file
|
@ -0,0 +1,24 @@
|
|||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 945cbde9..4e4c267e 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -13,9 +13,6 @@ endif()
|
||||
|
||||
set(SRCS main.cpp)
|
||||
|
||||
-SET(USER_HOME $ENV{HOME} CACHE STRING "Target User Home")
|
||||
-SET(USER $ENV{USER} CACHE STRING "Target User")
|
||||
-
|
||||
add_executable(gbe_plus ${SRCS})
|
||||
target_link_libraries(gbe_plus common gba dmg sgb nds min)
|
||||
target_link_libraries(gbe_plus SDL2::SDL2 SDL2::SDL2main)
|
||||
@@ -38,7 +35,6 @@ endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
install(TARGETS gbe_plus DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
- install(FILES gbe.ini DESTINATION ${USER_HOME}/.gbe_plus/)
|
||||
- install(DIRECTORY data DESTINATION ${USER_HOME}/.gbe_plus)
|
||||
- install(CODE "execute_process(COMMAND chown -R ${USER}:${USER} ${USER_HOME}/.gbe_plus)")
|
||||
+ install(FILES gbe.ini DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/.gbe_plus/)
|
||||
+ install(DIRECTORY data DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/.gbe_plus)
|
||||
endif()
|
Loading…
Reference in a new issue