about summary refs log tree commit diff
path: root/pkgs/tools/games/ps3iso-utils/default.nix
blob: 63093b59b2cc8d6528e0d59420ae1045791b90ab (plain) (blame)
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
36
37
38
{ stdenv
, fetchFromGitHub
, unstableGitUpdater
, lib
}:
stdenv.mkDerivation {
  pname = "ps3iso-utils";
  version = "277db7de";

  src = fetchFromGitHub {
    owner = "bucanero";
    repo = "ps3iso-utils";
    rev = "878090980a9042c61901920fed1b034af215e8c7";
    hash = "sha256-HUx5BqHBvVMUHReuJL0RcyxXOnufSt1Zi/ieAlI2eoc=";
  };

  buildPhase = ''
    mkdir -p bin/
    find . -type f -name "*.c" -exec \
    sh -c 'OFILE=`basename "{}" ".c"` && $CC "{}" -o bin/"$OFILE"' \;
  '';

  installPhase = ''
    mkdir -p $out/bin
    cp bin/* $out/bin
  '';

  passthru.updateScript = unstableGitUpdater { };

  meta = with lib; {
    description = "Estwald's PS3ISO utilities";
    homepage = "https://github.com/bucanero/ps3iso-utils";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ soupglasses ];
    platforms = platforms.all;
  };
}