nixpkgs/pkgs/by-name/ct/ctrtool/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
941 B
Nix
Raw Normal View History

2024-06-11 22:13:13 +00:00
{ lib, stdenv, fetchFromGitHub, gitUpdater }:
2019-05-14 09:02:35 +00:00
stdenv.mkDerivation rec {
pname = "ctrtool";
2024-06-11 22:13:13 +00:00
version = "1.2.0";
2019-05-14 09:02:35 +00:00
src = fetchFromGitHub {
2019-08-08 15:23:14 +00:00
owner = "jakcron";
2019-05-14 09:02:35 +00:00
repo = "Project_CTR";
rev = "ctrtool-v${version}";
2024-06-11 22:13:13 +00:00
sha256 = "wjU/DJHrAHE3MSB7vy+swUDVPzw0Jrv4ymOjhfr0BBk=";
2019-05-14 09:02:35 +00:00
};
sourceRoot = "${src.name}/ctrtool";
2019-05-14 09:02:35 +00:00
enableParallelBuilding = true;
2024-06-11 22:13:13 +00:00
preBuild = ''
make -j $NIX_BUILD_CORES deps
'';
# workaround for https://github.com/3DSGuy/Project_CTR/issues/145
env.NIX_CFLAGS_COMPILE = "-O0";
2019-05-14 09:02:35 +00:00
installPhase = "
mkdir $out/bin -p
2024-06-11 22:13:13 +00:00
cp bin/ctrtool${stdenv.hostPlatform.extensions.executable} $out/bin/
2019-05-14 09:02:35 +00:00
";
2024-06-11 22:13:13 +00:00
passthru.updateScript = gitUpdater { rev-prefix = "ctrtool-v"; };
meta = with lib; {
2019-05-14 09:02:35 +00:00
license = licenses.mit;
description = "Tool to extract data from a 3ds rom";
platforms = platforms.linux;
maintainers = [ maintainers.marius851000 ];
2023-11-27 01:17:53 +00:00
mainProgram = "ctrtool";
2019-05-14 09:02:35 +00:00
};
}