ps3hddreader-flake/default.nix
2025-03-17 11:33:25 -06:00

27 lines
553 B
Nix

{ pkgs ? import <nixpkgs> {} }:
pkgs.stdenv.mkDerivation {
pname = "ps3_hdd_reader";
version = "1.0.0";
src = pkgs.fetchurl {
url = "https://www.psx-place.com/resources/ps3-hdd-reader.1278/download?version=2333";
hash = "sha256-wqIx6K9VUNevC7AV2zxfncgWGxDw9goW6tB2DfTPWSM=";
};
nativeBuildInputs = with pkgs; [p7zip];
unpackPhase = ''
mkdir unpacked
7z x $src -ounpacked
'';
buildPhase = ''
cd unpacked/Linux/source
make
'';
installPhase = ''
mkdir -p $out/bin
cp ps3_hdd_reader $out/bin
'';
}