From d4bb874a57cf489afc3fbdd2edc31dcd7736687b Mon Sep 17 00:00:00 2001 From: Whovian9369 Date: Sat, 18 May 2024 17:40:09 -0400 Subject: [PATCH] Finally add `rom-properties` to `home.packages`! --- flake.nix | 2 +- home/packages/rom-properties/package.nix | 70 ++++++++++++++++++++++++ home/pkgs_and_programs.nix | 2 +- 3 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 home/packages/rom-properties/package.nix diff --git a/flake.nix b/flake.nix index 95b735d..843ba02 100644 --- a/flake.nix +++ b/flake.nix @@ -118,7 +118,7 @@ ird_tools = pkgs.callPackage ./home/packages/ird_tools/package.nix {}; ps3dec = pkgs.callPackage ./home/packages/ps3dec/package.nix {}; sabretools = pkgs.callPackage ./home/packages/sabretools/package.nix {}; - # rom-properties = callPackage ./home/packages/rom-properties/package.nix {}; + rom-properties = callPackage ./home/packages/rom-properties/package.nix {}; }; }; } diff --git a/home/packages/rom-properties/package.nix b/home/packages/rom-properties/package.nix new file mode 100644 index 0000000..2f24a30 --- /dev/null +++ b/home/packages/rom-properties/package.nix @@ -0,0 +1,70 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + gettext, + curl, + libjpeg, + libpng, + libseccomp, + lz4, + lzo, + nettle, + pkg-config, + tinyxml2, + zlib, + zstd, + glib +}: + +stdenv.mkDerivation { + pname = "rom-properties"; + version = "git"; + + src = fetchFromGitHub { + owner = "GerbilSoft"; + repo = "rom-properties"; + rev = "1df55be31d5aab88db1ba722267255389a812802"; + hash = ""; + }; + + nativeBuildInputs = [ + cmake + nettle.dev + pkg-config + glib.dev + ]; + + buildInputs = [ + gettext + curl.dev + libjpeg.dev + libpng.dev + libseccomp.dev + lz4.dev + lzo + tinyxml2 + zlib.dev + zstd.dev + ]; + + cmakeFlags = [ + "-DCMAKE_BUILD_TYPE=Release" + "-DINSTALL_APPARMOR=OFF" + ]; + + postPatch = '' + substituteInPlace "src/librpsecure/os-secure_linux.c" \ + --replace "SCMP_SYS(write)," "SCMP_SYS(write), SCMP_SYS(getdents64)," + ''; + + 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; + }; +} diff --git a/home/pkgs_and_programs.nix b/home/pkgs_and_programs.nix index 4d50aad..2c96d2c 100644 --- a/home/pkgs_and_programs.nix +++ b/home/pkgs_and_programs.nix @@ -13,7 +13,7 @@ let ird_tools = callPackage ./packages/ird_tools/package.nix {}; ps3dec = callPackage ./packages/ps3dec/package.nix {}; sabretools = callPackage ./packages/sabretools/package.nix {}; - # rom-properties = callPackage ./packages/rom-properties/package.nix {}; + rom-properties = callPackage ./packages/rom-properties/package.nix {}; }; callPackage = pkgs.callPackage;