8 stdenv.mkDerivation rec {
10 version = "unstable-2021-11-21";
12 src = fetchFromGitHub {
15 rev = "735aaa0648a5a6c996b48add9465db86524999f6";
16 sha256 = "sha256-cS8FFIEgDWva0j9JXhS+s7Y4Oh+mNhFaKRI7BF2hqvs=";
19 buildInputs = [ lz4 ];
22 # pkg-config is not supported, so we'll manually devendor lz4
23 cp ${lz4.src}/lib/lz4.{h,c} .
28 install -D nx2elf $out/bin/nx2elf
32 homepage = "https://github.com/shuffle2/nx2elf";
33 description = "Convert Nintendo Switch executable files to ELFs";
34 license = licenses.unfree; # No license specified upstream
35 platforms = [ "x86_64-linux" ]; # Should work on Darwin as well, but this is untested. aarch64-linux fails.
37 mainProgram = "nx2elf";