Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 45 lines 970 B view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 gitUpdater, 6}: 7 8stdenv.mkDerivation rec { 9 pname = "ctrtool"; 10 version = "1.2.1"; 11 12 src = fetchFromGitHub { 13 owner = "jakcron"; 14 repo = "Project_CTR"; 15 rev = "ctrtool-v${version}"; 16 sha256 = "HqqeQCEUof4EBUhuUAdTruMFgYIoXhtAN3yuWW6tD+Y="; 17 }; 18 19 sourceRoot = "${src.name}/ctrtool"; 20 21 enableParallelBuilding = true; 22 23 preBuild = '' 24 make -j $NIX_BUILD_CORES deps 25 ''; 26 27 # workaround for https://github.com/3DSGuy/Project_CTR/issues/145 28 env.NIX_CFLAGS_COMPILE = "-O0"; 29 30 installPhase = " 31 mkdir $out/bin -p 32 cp bin/ctrtool${stdenv.hostPlatform.extensions.executable} $out/bin/ 33 "; 34 35 passthru.updateScript = gitUpdater { rev-prefix = "ctrtool-v"; }; 36 37 meta = { 38 license = lib.licenses.mit; 39 description = "Tool to extract data from a 3ds rom"; 40 platforms = with lib.platforms; linux ++ darwin; 41 maintainers = with lib.maintainers; [ marius851000 ]; 42 mainProgram = "ctrtool"; 43 }; 44 45}