From d0b918f2c6240fa6469480f0bb87999b005c0849 Mon Sep 17 00:00:00 2001 From: Whovian9369 Date: Fri, 30 Aug 2024 00:07:19 -0400 Subject: [PATCH] Add `psfo`. --- flake.nix | 1 + home/packages/psfo/package.nix | 44 ++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 home/packages/psfo/package.nix diff --git a/flake.nix b/flake.nix index 83119bf..d1df7a4 100644 --- a/flake.nix +++ b/flake.nix @@ -408,6 +408,7 @@ irdkit = pkgs.callPackage ./home/packages/irdkit/package.nix {}; nxtik = pkgs.callPackage ./home/packages/nxtik/package.nix {}; ps3dec = pkgs.callPackage ./home/packages/ps3dec/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 {}; # rom-properties_ninja = pkgs.callPackage ./home/packages/rom-properties/package.nix { useNinja = true; }; diff --git a/home/packages/psfo/package.nix b/home/packages/psfo/package.nix new file mode 100644 index 0000000..5b7a43d --- /dev/null +++ b/home/packages/psfo/package.nix @@ -0,0 +1,44 @@ +{ + lib, + fetchFromGitHub, + gcc13Stdenv, +}: + +gcc13Stdenv.mkDerivation { + pname = "sfo"; + version = "v1.02"; + + src = fetchFromGitHub { + name = "sfo"; + owner = "hippie68"; + repo = "sfo"; + rev = "b38cf18d8a5c60a7f05a604b8a67215b7fb67e0a"; + hash = "sha256-USW51qXBxWzbWBHo+Qa4Zm87YFfMDgrf2uW3R0vzPpA="; + }; + + # nativeBuildInputs = [ makeWrapper ]; + + buildPhase = '' + runHook preBuild + gcc sfo.c -O3 -s -o sfo + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/bin + cp -v sfo $out/bin/ + runHook postInstall + ''; + + meta = { + homepage = "https://github.com/hippie68/sfo"; + description = "DESCRIPTION PLACEHOLDER"; + longDescription = "DESCRIPTION PLACEHOLDER"; + license = lib.licenses.unfree; + # No license file in repo. + maintainers = [ lib.maintainers.whovian9369 ]; + mainProgram = "sfo"; + platforms = lib.platforms.linux; + }; +}