summaryrefslogtreecommitdiffstats
path: root/makefu/5pkgs/ns-usbloader/default.nix
blob: b3890d11b658187c889c13edc1dea9e24bfc5575 (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
33
34
35
{ lib, stdenv, fetchurl, makeWrapper, wrapGAppsHook, glib , jre }:

stdenv.mkDerivation rec {
  name = "ns-usbloader-${version}";
  version = "5.2";

  src = fetchurl {
    url = "https://github.com/developersu/ns-usbloader/releases/download/v${version}/ns-usbloader-${version}.jar";
    sha256 = "06kzshlvqfwcjjddzqqgq13pqa5qjlajpyn6ksqxy5p5hgarj6i6";
  };


  buildInputs = [ jre ];

  dontUnpack = true;

  installPhase = ''
    runHook preInstall
    install -D $src $out/ns-usbloader/ns-usbloader.jar
    makeWrapper ${jre}/bin/java $out/bin/ns-usbloader \
      --add-flags "-jar $out/ns-usbloader/ns-usbloader.jar"
    runHook postInstall
  '';
  nativeBuildInputs = [ glib wrapGAppsHook makeWrapper ];


  meta = with lib; {
    description = "Awoo Installer and GoldLeaf uploader of the NSPs (and other files), RCM payload injector, application for split/merge files";
    homepage = https://github.com/developersu/ns-usbloader;
    maintainers = [ maintainers.makefu ];
    platforms = platforms.linux;
    license = with licenses; [ gpl3 ];
  };

}