clean up
This commit is contained in:
parent
1518d7958d
commit
3195918fff
2 changed files with 29 additions and 38 deletions
27
default.nix
Normal file
27
default.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{ 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
|
||||||
|
'';
|
||||||
|
}
|
38
flake.nix
38
flake.nix
|
@ -9,43 +9,7 @@
|
||||||
outputs = { self, nixpkgs, flake-utils }:
|
outputs = { self, nixpkgs, flake-utils }:
|
||||||
flake-utils.lib.eachDefaultSystem (system: let
|
flake-utils.lib.eachDefaultSystem (system: let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
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 {
|
in {
|
||||||
legacyPackages.ps3hddreader = ps3hddreader-bin;
|
packages.default = import ./default.nix { inherit pkgs; };
|
||||||
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