Make rom-properties
into Flake input :)
This commit is contained in:
parent
c3ed3ead67
commit
30c473e47b
7 changed files with 15 additions and 227 deletions
23
flake.nix
23
flake.nix
|
@ -48,6 +48,11 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
rom-properties = {
|
||||||
|
url = "github:Whovian9369/rom-properties-nix-flake";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
### Lix! Lix! Lix!
|
### Lix! Lix! Lix!
|
||||||
|
|
||||||
lix = {
|
lix = {
|
||||||
|
@ -103,7 +108,7 @@
|
||||||
# Lix
|
# Lix
|
||||||
lix, lix-module,
|
lix, lix-module,
|
||||||
# Added by me
|
# Added by me
|
||||||
agenix, home-manager, nix-index-database, xil, aaru, ... }:
|
agenix, home-manager, nix-index-database, xil, aaru, rom-properties, ... }:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
@ -173,13 +178,11 @@
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
inherit aaru;
|
inherit aaru;
|
||||||
inherit xil;
|
|
||||||
inherit nixpkgs;
|
|
||||||
pkgs = import nixpkgs {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
inherit agenix;
|
inherit agenix;
|
||||||
|
inherit nixpkgs;
|
||||||
|
inherit rom-properties;
|
||||||
|
inherit xil;
|
||||||
|
pkgs = import nixpkgs { system = "x86_64-linux"; config.allowUnfree = true; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -409,11 +412,8 @@
|
||||||
nxtik = pkgs.callPackage ./home/packages/nxtik/package.nix {};
|
nxtik = pkgs.callPackage ./home/packages/nxtik/package.nix {};
|
||||||
ps3dec = pkgs.callPackage ./home/packages/ps3dec/package.nix {};
|
ps3dec = pkgs.callPackage ./home/packages/ps3dec/package.nix {};
|
||||||
psfo = pkgs.callPackage ./home/packages/psfo/package.nix {};
|
psfo = pkgs.callPackage ./home/packages/psfo/package.nix {};
|
||||||
rom-properties = pkgs.callPackage ./home/packages/rom-properties/package.nix {};
|
|
||||||
sabretools = pkgs.callPackage ./home/packages/sabretools/package.nix {};
|
sabretools = pkgs.callPackage ./home/packages/sabretools/package.nix {};
|
||||||
# rom-properties_ninja = pkgs.callPackage ./home/packages/rom-properties/package.nix { useNinja = true; };
|
|
||||||
# rom-properties_gtracker = pkgs.callPackage ./home/packages/rom-properties/package.nix { useTracker = true; };
|
|
||||||
# rom-properties_ninja_gtracker = pkgs.callPackage ./home/packages/rom-properties/package.nix { useNinja = true; useTracker = true; };
|
|
||||||
new_rclone = pkgs.rclone.overrideAttrs ( oldAttrs: {
|
new_rclone = pkgs.rclone.overrideAttrs ( oldAttrs: {
|
||||||
patches = [ ./home/packages/new_rclone/patches/rclone_8ffe3e462cbf5688c37c54009db09d8dcb486860.diff ];
|
patches = [ ./home/packages/new_rclone/patches/rclone_8ffe3e462cbf5688c37c54009db09d8dcb486860.diff ];
|
||||||
} );
|
} );
|
||||||
|
@ -425,6 +425,7 @@
|
||||||
external_lix = lix.packages.x86_64-linux.nix;
|
external_lix = lix.packages.x86_64-linux.nix;
|
||||||
external_xil = xil.packages.x86_64-linux.xil;
|
external_xil = xil.packages.x86_64-linux.xil;
|
||||||
external_aaru = aaru.packages.x86_64-linux.git;
|
external_aaru = aaru.packages.x86_64-linux.git;
|
||||||
|
external_rom-properties = rom-properties.packages.x86_64-linux.default;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
options,
|
options,
|
||||||
osConfig,
|
osConfig,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
rom-properties,
|
||||||
specialArgs,
|
specialArgs,
|
||||||
system,
|
system,
|
||||||
xil
|
xil
|
||||||
|
|
|
@ -1,152 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
stdenv,
|
|
||||||
cmake,
|
|
||||||
curl,
|
|
||||||
fetchFromGitHub,
|
|
||||||
gettext,
|
|
||||||
glib,
|
|
||||||
libjpeg,
|
|
||||||
libpng,
|
|
||||||
libseccomp,
|
|
||||||
lz4,
|
|
||||||
lzo,
|
|
||||||
nettle,
|
|
||||||
pkg-config,
|
|
||||||
tinyxml-2,
|
|
||||||
zlib,
|
|
||||||
zstd,
|
|
||||||
|
|
||||||
# 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 {
|
|
||||||
pname = "rom-properties";
|
|
||||||
version = "git";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "GerbilSoft";
|
|
||||||
repo = "rom-properties";
|
|
||||||
rev = "82ddbbe6574ba64d12c09229ff275bd9f5ba3f1e";
|
|
||||||
hash = "sha256-Xj0xGcA/2hqk0gNLOOrqWxNjWONhH6J3VIF4Up/6NVU=";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
cmake
|
|
||||||
pkg-config
|
|
||||||
# So many "dev" package outputs, lol
|
|
||||||
nettle.dev
|
|
||||||
glib.dev
|
|
||||||
libselinux.dev
|
|
||||||
libsepol.dev
|
|
||||||
pcre2.dev
|
|
||||||
util-linux.dev
|
|
||||||
curl.dev
|
|
||||||
libjpeg.dev
|
|
||||||
libpng.dev
|
|
||||||
libseccomp.dev
|
|
||||||
lz4.dev
|
|
||||||
zlib.dev
|
|
||||||
zstd.dev
|
|
||||||
]
|
|
||||||
++ lib.optionals useNinja [ ninja ];
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
gettext
|
|
||||||
lzo
|
|
||||||
tinyxml-2
|
|
||||||
minizip-ng
|
|
||||||
inih
|
|
||||||
]
|
|
||||||
++ lib.optionals useTracker [ tracker ];
|
|
||||||
|
|
||||||
cmakeFlags = [
|
|
||||||
(lib.cmakeBool "INSTALL_APPARMOR" false)
|
|
||||||
(lib.cmakeBool "ENABLE_DECRYPTION" true)
|
|
||||||
(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":
|
|
||||||
"fix_debug_paths.diff" is needed to properly have some correct debug
|
|
||||||
paths, due to "cmake"'s weird path issues.
|
|
||||||
(See below references for "fix_rp-stub_symlink.diff".)
|
|
||||||
|
|
||||||
"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
|
|
||||||
double-path bug as described in
|
|
||||||
https://github.com/NixOS/nixpkgs/issues/144170
|
|
||||||
# CMake incorrect absolute include/lib paths tracking issue
|
|
||||||
https://github.com/NixOS/nixpkgs/pull/172347 and
|
|
||||||
# cmake: add check-pc-files hook to check broken pc files
|
|
||||||
https://github.com/NixOS/nixpkgs/pull/247474
|
|
||||||
# cmake: make check-pc-files hook also check .cmake files
|
|
||||||
*/
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "ROM Properties Page shell extension";
|
|
||||||
homepage = "https://github.com/GerbilSoft/rom-properties";
|
|
||||||
license = lib.licenses.gpl2Only;
|
|
||||||
maintainers = with lib.maintainers; [ ];
|
|
||||||
mainProgram = "rpcli";
|
|
||||||
platforms = lib.platforms.all;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
###################################################################
|
|
||||||
|
|
||||||
/* NOTES
|
|
||||||
|
|
||||||
*** ROM Properties Page Shell Extension v2.3.0+ ***
|
|
||||||
Build Summary:
|
|
||||||
- Target CPU architecture: amd64
|
|
||||||
- Building these UI frontends:
|
|
||||||
- Building command-line frontend: Yes
|
|
||||||
- GNOME Tracker API version: (none)
|
|
||||||
- libromdata is built as: shared library (.so)
|
|
||||||
- Security mechanism: seccomp()
|
|
||||||
- Decryption functionality: Enabled
|
|
||||||
- XML parsing: Enabled (system)
|
|
||||||
- PVRTC decoder: Enabled
|
|
||||||
- ZSTD decompression: Enabled (system)
|
|
||||||
- LZ4 decompression: Enabled (system)
|
|
||||||
- LZO decompression: Enabled (system)
|
|
||||||
Building these third-party libraries from extlib:
|
|
||||||
- minizip-ng
|
|
||||||
- inih
|
|
||||||
|
|
||||||
*/
|
|
|
@ -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
|
|
||||||
)
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
aaru,
|
aaru,
|
||||||
|
rom-properties,
|
||||||
agenix,
|
agenix,
|
||||||
pkgs,
|
pkgs,
|
||||||
system,
|
system,
|
||||||
|
@ -17,11 +18,7 @@ let
|
||||||
irdkit = pkgs.callPackage ./packages/irdkit/package.nix {};
|
irdkit = pkgs.callPackage ./packages/irdkit/package.nix {};
|
||||||
nxtik = pkgs.callPackage ./packages/nxtik/package.nix {};
|
nxtik = pkgs.callPackage ./packages/nxtik/package.nix {};
|
||||||
ps3dec = pkgs.callPackage ./packages/ps3dec/package.nix {};
|
ps3dec = pkgs.callPackage ./packages/ps3dec/package.nix {};
|
||||||
rom-properties = pkgs.callPackage ./packages/rom-properties/package.nix {};
|
|
||||||
sabretools = pkgs.callPackage ./packages/sabretools/package.nix {};
|
sabretools = pkgs.callPackage ./packages/sabretools/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 ];
|
||||||
}
|
}
|
||||||
|
@ -148,7 +145,6 @@ in
|
||||||
|
|
||||||
my_packages.nxtik
|
my_packages.nxtik
|
||||||
my_packages.ps3dec
|
my_packages.ps3dec
|
||||||
my_packages.rom-properties
|
|
||||||
my_packages.sabretools
|
my_packages.sabretools
|
||||||
my_packages.unnix_script # It's a one-line bash script
|
my_packages.unnix_script # It's a one-line bash script
|
||||||
# my_packages.hactoolnet
|
# my_packages.hactoolnet
|
||||||
|
@ -156,6 +152,7 @@ in
|
||||||
agenix.packages.${system}.default
|
agenix.packages.${system}.default
|
||||||
xil.packages.${system}.xil
|
xil.packages.${system}.xil
|
||||||
aaru.packages.${system}.git
|
aaru.packages.${system}.git
|
||||||
|
rom-properties.packages.x86_64-linux.default
|
||||||
];
|
];
|
||||||
|
|
||||||
# Disabled Packages
|
# Disabled Packages
|
||||||
|
|
Loading…
Reference in a new issue