aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/tools/misc/hdl-dump/default.nix
blob: 96e81fe8bd4c03e6b0df79b804ccfe473ab17330 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ stdenv
, fetchFromGitHub
, upx
}:

let
  version = "20202807";
  pname = "hdl-dump";
in stdenv.mkDerivation {
  inherit pname version;

  # Using AkuHAK's repo because playstation2's repo is outdated
  src = fetchFromGitHub {
    owner = "AKuHAK";
    repo = pname;
    rev = "be37e112a44772a1341c867dc3dfee7381ce9e59";
    sha256 = "0akxak6hm11h8z6jczxgr795s4a8czspwnhl3swqxp803dvjdx41";
  };

  buildInputs = [ upx ];

  makeFlags = [ "RELEASE=yes" ];

  installPhase = ''
    install -Dm755 hdl_dump -t $out/bin
  '';

  meta = with stdenv.lib; {
    homepage = "https://github.com/AKuHAK/hdl-dump";
    description = "PlayStation 2 HDLoader image dump/install utility";
    platforms = platforms.linux;
    license = licenses.gpl2Only;
    maintainers = with maintainers; [ makefu ];
  };
}