From 5bfa7afb82996e5318c34551220691e9a6e49f0a Mon Sep 17 00:00:00 2001 From: Whovian9369 Date: Sat, 18 May 2024 05:44:36 -0400 Subject: [PATCH] Add `ps3dec` to `home.packages` --- flake.nix | 1 + home/packages/ps3dec/package.nix | 48 ++++++++++++++++++++++++++++++++ home/pkgs_and_programs.nix | 2 ++ 3 files changed, 51 insertions(+) create mode 100644 home/packages/ps3dec/package.nix diff --git a/flake.nix b/flake.nix index ad62caa..372738e 100644 --- a/flake.nix +++ b/flake.nix @@ -116,6 +116,7 @@ packages.x86_64-linux = { irdkit = pkgs.callPackage ./home/packages/irdkit/package.nix {}; ird_tools = pkgs.callPackage ./home/packages/ird_tools/package.nix {}; + ps3dec = pkgs.callPackage ./home/packages/ps3dec/package.nix {}; # rom-properties = callPackage ./home/packages/rom-properties/package.nix {}; }; }; diff --git a/home/packages/ps3dec/package.nix b/home/packages/ps3dec/package.nix new file mode 100644 index 0000000..f8ec378 --- /dev/null +++ b/home/packages/ps3dec/package.nix @@ -0,0 +1,48 @@ +{ + lib, + cmake, + fetchFromGitHub, + mbedtls_2, + perl, + python3, + stdenv, + + ### Ninja + withNinja ? false + ninja, +}: + +stdenv.mkDerivation { + pname = "ps3dec"; + version = "unstable-2018-12-16"; + + src = fetchFromGitHub { + owner = "al3xtjames"; + repo = "PS3Dec"; + rev = "7d1d27f028aa86cd961a89795d0d19a9b3771446"; + hash = "sha256-kvkkB7NclFfbqf3vqwFjKOFwHUz1X+KRCwGopN7YCis="; + fetchSubmodules = true; + leaveDotGit = false; + }; + + nativeBuildInputs = [ + cmake + mbedtls_2 + perl + python3 + ] ++ lib.optionals stdenv.withNinja ninja; + + installPhase = '' + mkdir -p $out/bin + mv Release/PS3Dec $out/bin/ps3dec + ''; + + meta = { + description = "PS3Dec r5 source mirror"; + homepage = "https://github.com/al3xtjames/PS3Dec"; + license = lib.licenses.mit; + # Technically it was posted to the 3k3y forums without a license file, + # So technically it's probably "All Rights Reserved" but.... Meh whatever + maintainers = with lib.maintainers; [ whovian9369 ]; + }; +} diff --git a/home/pkgs_and_programs.nix b/home/pkgs_and_programs.nix index 4428728..47fcd08 100644 --- a/home/pkgs_and_programs.nix +++ b/home/pkgs_and_programs.nix @@ -11,6 +11,7 @@ let my_packages = { irdkit = callPackage ./packages/irdkit/package.nix {}; ird_tools = callPackage ./packages/ird_tools/package.nix {}; + ps3dec = callPackage ./home/packages/ps3dec/package.nix {}; # rom-properties = callPackage ./packages/rom-properties/package.nix {}; }; callPackage = pkgs.callPackage; @@ -110,6 +111,7 @@ in my_packages.irdkit my_packages.ird_tools + my_packages.ps3dec # my_packages.rom-properties agenix.packages.${system}.default