summaryrefslogtreecommitdiffstats
path: root/makefu/5pkgs/nx_game_info/default.nix
blob: bf64dc90ec3584706cb39d1edf6cafa035e55fc1 (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
32
{ lib, stdenv, fetchurl , mono , unzip,
}:
stdenv.mkDerivation rec {
  pname = "NX_Game_Info";
  name = "${pname}-${version}";
  version = "0.7.1";

  src = fetchurl {
    url = "https://github.com/garoxas/NX_Game_Info/releases/download/v${version}/NX.Game.Info_${version}_cli.zip";
    sha256 = "179hkgraydm5hg5fcs1xwh07cx7rbcfwklfak83f0sl1pbya542h";
  };

  sourceRoot = ".";
  buildInputs = [ unzip ];
  buildPhase = ":";
  installPhase = ''
    mkdir -p $out/{bin,lib}
    cp * $out/lib/
    cat > $out/bin/nxgameinfo_cli <<EOF
    ${mono}/bin/mono $out/lib/nxgameinfo_cli.exe "\$@"
    EOF
    chmod +x $out/bin/nxgameinfo_cli
  '';

  meta = {
    description = "Tool to read information from Nintendo Switch game files";
    homepage = https://github.com/garoxas/NX_Game_Info;
    license = lib.licenses.gpl3;
    platforms = lib.platforms.linux;
    maintainers = with lib.maintainers; [ makefu ];
  };
}