initial commit
This commit is contained in:
commit
619500f49a
2 changed files with 112 additions and 0 deletions
61
flake.lock
generated
Normal file
61
flake.lock
generated
Normal file
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1720957393,
|
||||
"narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "693bc46d169f5af9c992095736e82c3488bf7dbb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
51
flake.nix
Normal file
51
flake.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
description = "Flake for PS3 HDD Reader";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
||||
version = "1.0.0";
|
||||
ps3hddreader-zip = pkgs.fetchurl {
|
||||
url = "https://www.psx-place.com/resources/ps3-hdd-reader.1278/download?version=2333";
|
||||
hash = "sha256-wqIx6K9VUNevC7AV2zxfncgWGxDw9goW6tB2DfTPWSM=";
|
||||
};
|
||||
ps3hddreader-bin = pkgs.stdenv.mkDerivation {
|
||||
pname = "ps3-hdd-reader";
|
||||
inherit version;
|
||||
|
||||
src = ps3hddreader-zip;
|
||||
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
|
||||
'';
|
||||
};
|
||||
in {
|
||||
legacyPackages.ps3hddreader = ps3hddreader-bin;
|
||||
packages = rec {
|
||||
ps3hddreader = ps3hddreader-bin;
|
||||
default = ps3hddreader;
|
||||
};
|
||||
apps = rec {
|
||||
ps3hddreader = flake-utils.lib.mkApp { drv = ps3hddreader-bin; };
|
||||
default = ps3hddreader;
|
||||
};
|
||||
});
|
||||
}
|
Loading…
Add table
Reference in a new issue