1 { lib, stdenv, fetchFromGitHub, gitUpdater }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
10 rev = "ctrtool-v${version}";
11 sha256 = "wjU/DJHrAHE3MSB7vy+swUDVPzw0Jrv4ymOjhfr0BBk=";
14 sourceRoot = "${src.name}/ctrtool";
16 enableParallelBuilding = true;
19 make -j $NIX_BUILD_CORES deps
22 # workaround for https://github.com/3DSGuy/Project_CTR/issues/145
23 env.NIX_CFLAGS_COMPILE = "-O0";
27 cp bin/ctrtool${stdenv.hostPlatform.extensions.executable} $out/bin/
30 passthru.updateScript = gitUpdater { rev-prefix = "ctrtool-v"; };
33 license = licenses.mit;
34 description = "Tool to extract data from a 3ds rom";
35 platforms = platforms.linux;
36 maintainers = [ maintainers.marius851000 ];
37 mainProgram = "ctrtool";