aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/tools/archivers/ctrtool/default.nix
blob: 4b8eb4dfab2e30367a8d1ea5447b3fc3cd4685e8 (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
{ stdenv, fetchFromGitHub }:

stdenv.mkDerivation rec {
  pname = "ctrtool";
  version = "0.7";

  src = fetchFromGitHub {
    owner  = "jakcron";
    repo   = "Project_CTR";
    rev    = "ctrtool-v${version}";
    sha256 = "07aayck82w5xcp3si35d7ghybmrbqw91fqqvmbpjrjcixc6m42z7";
  };

  sourceRoot = "source/ctrtool";

  makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "CXX=${stdenv.cc.targetPrefix}c++"];
  enableParallelBuilding = true;

  installPhase = "
    mkdir $out/bin -p
    cp ctrtool${stdenv.hostPlatform.extensions.executable} $out/bin/
  ";

  meta = with stdenv.lib; {
    license = licenses.mit;
    description = "A tool to extract data from a 3ds rom";
    platforms = platforms.linux;
    maintainers = [ maintainers.marius851000 ];
  };

}