Compare commits
No commits in common. "0bb17c2e910fcfe413aec0ad2b152c7a3b3e1c58" and "e637ddcc5816c808a0448891078304212074368d" have entirely different histories.
0bb17c2e91
...
e637ddcc58
5 changed files with 50 additions and 149 deletions
|
@ -1,11 +1,10 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
cmake,
|
|
||||||
curl,
|
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
|
cmake,
|
||||||
gettext,
|
gettext,
|
||||||
glib,
|
curl,
|
||||||
libjpeg,
|
libjpeg,
|
||||||
libpng,
|
libpng,
|
||||||
libseccomp,
|
libseccomp,
|
||||||
|
@ -13,25 +12,10 @@
|
||||||
lzo,
|
lzo,
|
||||||
nettle,
|
nettle,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
tinyxml-2,
|
tinyxml2,
|
||||||
zlib,
|
zlib,
|
||||||
zstd,
|
zstd,
|
||||||
|
glib
|
||||||
# Not really required afaik, but I like quieting the warnings :)
|
|
||||||
pcre2,
|
|
||||||
minizip-ng,
|
|
||||||
libselinux,
|
|
||||||
libsepol,
|
|
||||||
util-linux,
|
|
||||||
inih,
|
|
||||||
|
|
||||||
# Use "Ninja" for the build.
|
|
||||||
useNinja ? false,
|
|
||||||
ninja,
|
|
||||||
|
|
||||||
# Enable GNOME "Tracker".
|
|
||||||
useTracker ? false,
|
|
||||||
tracker
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
|
@ -41,72 +25,40 @@ stdenv.mkDerivation {
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "GerbilSoft";
|
owner = "GerbilSoft";
|
||||||
repo = "rom-properties";
|
repo = "rom-properties";
|
||||||
rev = "10c20ccc3b5550e7950e036a56b0a34714edb263";
|
rev = "1df55be31d5aab88db1ba722267255389a812802";
|
||||||
hash = "sha256-uoyD2xuPkdoKidyG1Dlckk5ImKnGw/rk8G27IS1cTes=";
|
hash = "sha256-e2K2XRPLLSXM+lWv5aFiU3PwotuUT0V8INAFc9QKmYY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
pkg-config
|
|
||||||
# So many "dev" package outputs, lol
|
|
||||||
nettle.dev
|
nettle.dev
|
||||||
|
pkg-config
|
||||||
glib.dev
|
glib.dev
|
||||||
libselinux.dev
|
];
|
||||||
libsepol.dev
|
|
||||||
pcre2.dev
|
buildInputs = [
|
||||||
util-linux.dev
|
gettext
|
||||||
curl.dev
|
curl.dev
|
||||||
libjpeg.dev
|
libjpeg.dev
|
||||||
libpng.dev
|
libpng.dev
|
||||||
libseccomp.dev
|
libseccomp.dev
|
||||||
lz4.dev
|
lz4.dev
|
||||||
|
lzo
|
||||||
|
tinyxml2
|
||||||
zlib.dev
|
zlib.dev
|
||||||
zstd.dev
|
zstd.dev
|
||||||
]
|
];
|
||||||
++ lib.optionals useNinja [ ninja ];
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
gettext
|
|
||||||
lzo
|
|
||||||
tinyxml-2
|
|
||||||
minizip-ng
|
|
||||||
inih
|
|
||||||
]
|
|
||||||
++ lib.optionals useTracker [ tracker ];
|
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
(lib.cmakeBool "INSTALL_APPARMOR" false)
|
"-DCMAKE_BUILD_TYPE=Release"
|
||||||
(lib.cmakeBool "ENABLE_DECRYPTION" true)
|
"-DINSTALL_APPARMOR=OFF"
|
||||||
(lib.cmakeBool "ENABLE_EXTRA_SECURITY" true)
|
|
||||||
(lib.cmakeBool "ENABLE_JPEG" true)
|
|
||||||
(lib.cmakeBool "ENABLE_XML" true)
|
|
||||||
(lib.cmakeBool "ENABLE_UNICE68" true)
|
|
||||||
(lib.cmakeBool "ENABLE_LIBMSPACK" true)
|
|
||||||
(lib.cmakeBool "ENABLE_PVRTC" true)
|
|
||||||
(lib.cmakeBool "ENABLE_ZSTD" true)
|
|
||||||
(lib.cmakeBool "ENABLE_LZ4" true)
|
|
||||||
(lib.cmakeBool "ENABLE_LZO" true)
|
|
||||||
(lib.cmakeBool "ENABLE_NLS" true)
|
|
||||||
(lib.cmakeBool "ENABLE_OPENMP" true)
|
|
||||||
] ++ lib.optionals useTracker [ (lib.cmakeFeature "TRACKER_INSTALL_API_VERSION" "3") ];
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
./patches/fix_debug_paths.diff
|
|
||||||
./patches/fix_getdents64_build.diff
|
|
||||||
./patches/fix_rp-stub_symlink.diff
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
About "patches":
|
About "postPatch"... patches.
|
||||||
"fix_debug_paths.diff" is needed to properly have some correct debug
|
"src/librpsecure/os-secure_linux.c" change is needed to complete the
|
||||||
paths, due to "cmake"'s weird path issues.
|
build as it's not being detected automatically. (WSL Issue????)
|
||||||
(See below references for "fix_rp-stub_symlink.diff".)
|
"src/rp-stub/CMakeLists.txt" change is needed to properly symlink
|
||||||
|
|
||||||
"fix_getdents64_build.diff" is needed to properly complete and then run
|
|
||||||
the build as it's not being detected automatically.
|
|
||||||
(Maybe it's an issue with WSL?)
|
|
||||||
|
|
||||||
"fix_rp-stub_symlink.diff" is needed to properly symlink
|
|
||||||
`result/libexec/rp-thumbnail` to `result/bin/rp-stub` due to the odd
|
`result/libexec/rp-thumbnail` to `result/bin/rp-stub` due to the odd
|
||||||
double-path bug as described in
|
double-path bug as described in
|
||||||
https://github.com/NixOS/nixpkgs/issues/144170
|
https://github.com/NixOS/nixpkgs/issues/144170
|
||||||
|
@ -116,6 +68,13 @@ stdenv.mkDerivation {
|
||||||
https://github.com/NixOS/nixpkgs/pull/247474
|
https://github.com/NixOS/nixpkgs/pull/247474
|
||||||
# cmake: make check-pc-files hook also check .cmake files
|
# cmake: make check-pc-files hook also check .cmake files
|
||||||
*/
|
*/
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace "src/librpsecure/os-secure_linux.c" \
|
||||||
|
--replace-fail "SCMP_SYS(write)," \
|
||||||
|
"SCMP_SYS(write), SCMP_SYS(getdents64),"
|
||||||
|
substituteInPlace "src/rp-stub/CMakeLists.txt" \
|
||||||
|
--replace-fail "{CMAKE_INSTALL_PREFIX}/\$" ""
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "ROM Properties Page shell extension";
|
description = "ROM Properties Page shell extension";
|
||||||
|
@ -127,26 +86,29 @@ stdenv.mkDerivation {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
###################################################################
|
|
||||||
|
|
||||||
/* NOTES
|
/*
|
||||||
|
|
||||||
*** ROM Properties Page Shell Extension v2.3.0+ ***
|
Notes:
|
||||||
Build Summary:
|
|
||||||
- Target CPU architecture: amd64
|
"$STORE_PATH" in these notes reference "nix/store/pnyxqz1vi124i18zdbl8ad1vypai73yg-rom-properties-git"
|
||||||
- Building these UI frontends:
|
"$CMAKE_INSTALL_BINDIR" matches variable in Cmake flags
|
||||||
- Building command-line frontend: Yes
|
"$CMAKE_INSTALL_LIBDIR" matches variable in Cmake flags
|
||||||
- GNOME Tracker API version: (none)
|
"$CMAKE_INSTALL_LIBEXECDIR" matches variable in Cmake flags
|
||||||
- libromdata is built as: shared library (.so)
|
=============================================================
|
||||||
- Security mechanism: seccomp()
|
/$CMAKE_INSTALL_LIBDIR/debug/$STORE_PATH/$CMAKE_INSTALL_LIBEXECDIR/rp-download.debug
|
||||||
- Decryption functionality: Enabled
|
/$CMAKE_INSTALL_LIBDIR/debug/$STORE_PATH/$CMAKE_INSTALL_LIBDIR/libromdata.debug
|
||||||
- XML parsing: Enabled (system)
|
/$CMAKE_INSTALL_LIBDIR/debug/$STORE_PATH/$CMAKE_INSTALL_BINDIR/rpcli.debug
|
||||||
- PVRTC decoder: Enabled
|
/$CMAKE_INSTALL_LIBDIR/debug/$STORE_PATH/$CMAKE_INSTALL_BINDIR/rp-thumbnail.debug
|
||||||
- ZSTD decompression: Enabled (system)
|
/$CMAKE_INSTALL_LIBDIR/debug/$STORE_PATH/$CMAKE_INSTALL_BINDIR/rp-config.debug
|
||||||
- LZ4 decompression: Enabled (system)
|
|
||||||
- LZO decompression: Enabled (system)
|
What I think I want the debug paths to end up as:
|
||||||
Building these third-party libraries from extlib:
|
$CMAKE_INSTALL_LIBDIR/debug/libexec/rp-download.debug
|
||||||
- minizip-ng
|
$CMAKE_INSTALL_LIBDIR/debug/lib/libromdata.debug
|
||||||
- inih
|
$CMAKE_INSTALL_LIBDIR/debug/bin/rpcli.debug
|
||||||
|
$CMAKE_INSTALL_LIBDIR/debug/bin/rp-thumbnail.debug
|
||||||
|
$CMAKE_INSTALL_LIBDIR/debug/bin/rp-config.debug
|
||||||
|
|
||||||
|
... Do I even need to build the debug executables anyway?
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
diff --git a/cmake/macros/DirInstallPaths.cmake b/cmake/macros/DirInstallPaths.cmake
|
|
||||||
index 7aefd5de6..1b180e3d2 100644
|
|
||||||
--- a/cmake/macros/DirInstallPaths.cmake
|
|
||||||
+++ b/cmake/macros/DirInstallPaths.cmake
|
|
||||||
@@ -65,10 +65,10 @@ IF(UNIX AND NOT APPLE)
|
|
||||||
SET(DIR_INSTALL_XDG_MIME "share/mime")
|
|
||||||
SET(DIR_INSTALL_XDG_DESKTOP "share/applications")
|
|
||||||
SET(DIR_INSTALL_XDG_APPSTREAM "share/metainfo")
|
|
||||||
- SET(DIR_INSTALL_EXE_DEBUG "lib/debug/${CMAKE_INSTALL_PREFIX}/${DIR_INSTALL_EXE}")
|
|
||||||
- SET(DIR_INSTALL_DLL_DEBUG "lib/debug/${CMAKE_INSTALL_PREFIX}/${DIR_INSTALL_DLL}")
|
|
||||||
- SET(DIR_INSTALL_LIB_DEBUG "lib/debug/${CMAKE_INSTALL_PREFIX}/${DIR_INSTALL_LIB}")
|
|
||||||
- SET(DIR_INSTALL_LIBEXEC_DEBUG "lib/debug/${CMAKE_INSTALL_PREFIX}/${DIR_INSTALL_LIBEXEC}")
|
|
||||||
+ SET(DIR_INSTALL_EXE_DEBUG "lib/debug/bin")
|
|
||||||
+ SET(DIR_INSTALL_DLL_DEBUG "lib/debug/lib")
|
|
||||||
+ SET(DIR_INSTALL_LIB_DEBUG "lib/debug/lib")
|
|
||||||
+ SET(DIR_INSTALL_LIBEXEC_DEBUG "lib/debug/libexec")
|
|
||||||
|
|
||||||
# AppArmor profile directory
|
|
||||||
SET(DIR_INSTALL_APPARMOR "/etc/apparmor.d")
|
|
||||||
@@ -88,10 +88,10 @@ ELSEIF(APPLE)
|
|
||||||
UNSET(DIR_INSTALL_XDG_MIME)
|
|
||||||
UNSET(DIR_INSTALL_XDG_DESKTOP)
|
|
||||||
UNSET(DIR_INSTALL_XDG_APPSTREAM)
|
|
||||||
- SET(DIR_INSTALL_EXE_DEBUG "lib/debug/${CMAKE_INSTALL_PREFIX}/${DIR_INSTALL_EXE}")
|
|
||||||
- SET(DIR_INSTALL_DLL_DEBUG "lib/debug/${CMAKE_INSTALL_PREFIX}/${DIR_INSTALL_DLL}")
|
|
||||||
- SET(DIR_INSTALL_LIB_DEBUG "lib/debug/${CMAKE_INSTALL_PREFIX}/${DIR_INSTALL_LIB}")
|
|
||||||
- SET(DIR_INSTALL_LIBEXEC_DEBUG "lib/debug/${CMAKE_INSTALL_PREFIX}/${DIR_INSTALL_LIBEXEC}")
|
|
||||||
+ SET(DIR_INSTALL_EXE_DEBUG "lib/debug/bin")
|
|
||||||
+ SET(DIR_INSTALL_DLL_DEBUG "lib/debug/lib")
|
|
||||||
+ SET(DIR_INSTALL_LIB_DEBUG "lib/debug/lib")
|
|
||||||
+ SET(DIR_INSTALL_LIBEXEC_DEBUG "lib/debug/libexec")
|
|
||||||
ELSEIF(WIN32)
|
|
||||||
# Win32-style install paths.
|
|
||||||
# Files are installed relative to root, since the
|
|
|
@ -1,12 +0,0 @@
|
||||||
diff --git a/src/librpsecure/os-secure_linux.c b/src/librpsecure/os-secure_linux.c
|
|
||||||
index bd245ff40..0a4c7159f 100644
|
|
||||||
--- a/src/librpsecure/os-secure_linux.c
|
|
||||||
+++ b/src/librpsecure/os-secure_linux.c
|
|
||||||
@@ -71,6 +71,7 @@ int rp_secure_enable(rp_secure_param_t param)
|
|
||||||
SCMP_SYS(read),
|
|
||||||
SCMP_SYS(rt_sigreturn),
|
|
||||||
SCMP_SYS(write),
|
|
||||||
+ SCMP_SYS(getdents64),
|
|
||||||
|
|
||||||
SCMP_SYS(access),
|
|
||||||
SCMP_SYS(faccessat), // Linux on aarch64 does not have an access() syscall
|
|
|
@ -1,13 +0,0 @@
|
||||||
diff --git a/src/rp-stub/CMakeLists.txt b/src/rp-stub/CMakeLists.txt
|
|
||||||
index acad9bdcd..d611b38cf 100644
|
|
||||||
--- a/src/rp-stub/CMakeLists.txt
|
|
||||||
+++ b/src/rp-stub/CMakeLists.txt
|
|
||||||
@@ -39,7 +39,7 @@ INCLUDE(DirInstallPaths)
|
|
||||||
# Create symlinks for rp-thumbnail and rp-config.
|
|
||||||
# Reference: https://stackoverflow.com/questions/34578362/how-can-i-package-a-symlink-with-cpack
|
|
||||||
ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
|
|
||||||
- COMMAND ln -sf "${CMAKE_INSTALL_PREFIX}/${DIR_INSTALL_EXE}/${PROJECT_NAME}" rp-thumbnail
|
|
||||||
+ COMMAND ln -sf "${DIR_INSTALL_EXE}/${PROJECT_NAME}" rp-thumbnail
|
|
||||||
WORKING_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
|
|
||||||
VERBATIM
|
|
||||||
)
|
|
|
@ -15,9 +15,6 @@ let
|
||||||
ps3dec = pkgs.callPackage ./packages/ps3dec/package.nix {};
|
ps3dec = pkgs.callPackage ./packages/ps3dec/package.nix {};
|
||||||
sabretools = pkgs.callPackage ./packages/sabretools/package.nix {};
|
sabretools = pkgs.callPackage ./packages/sabretools/package.nix {};
|
||||||
rom-properties = pkgs.callPackage ./packages/rom-properties/package.nix {};
|
rom-properties = pkgs.callPackage ./packages/rom-properties/package.nix {};
|
||||||
# rom-properties_ninja = pkgs.callPackage ./package.nix { useNinja = true; };
|
|
||||||
# rom-properties_gtracker = pkgs.callPackage ./package.nix { useTracker = true; };
|
|
||||||
# rom-properties_ninja_gtracker = pkgs.callPackage ./package.nix { useNinja = true; useTracker = true; };
|
|
||||||
new_rclone = pkgs.rclone.overrideAttrs (oldAttrs: rec {
|
new_rclone = pkgs.rclone.overrideAttrs (oldAttrs: rec {
|
||||||
patches = [ ./packages/new_rclone/patches/rclone_8ffe3e462cbf5688c37c54009db09d8dcb486860.diff ];
|
patches = [ ./packages/new_rclone/patches/rclone_8ffe3e462cbf5688c37c54009db09d8dcb486860.diff ];
|
||||||
}
|
}
|
||||||
|
@ -150,6 +147,7 @@ in
|
||||||
# Not needed on WSL, even though I'd like it on WSL sometimes.
|
# Not needed on WSL, even though I'd like it on WSL sometimes.
|
||||||
pkgs.yt-dlp
|
pkgs.yt-dlp
|
||||||
# Not needed on WSL
|
# Not needed on WSL
|
||||||
|
|
||||||
my_packages.hactoolnet-bin
|
my_packages.hactoolnet-bin
|
||||||
# Not needed on WSL as I currently use the Windows version.
|
# Not needed on WSL as I currently use the Windows version.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue