summaryrefslogtreecommitdiffstats
path: root/makefu/5pkgs/ns-atmosphere-programmer/default.nix
blob: 88a408578fbfccb8d8660e544eb6481a7e66f3d2 (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
36
37
{ stdenv, fetchzip
, makeWrapper
, autoPatchelfHook
, xlibs
, gnome3
, libpng12
}:
stdenv.mkDerivation rec {
  name = "ns-atmosphere-programmer-${version}";
  version = "0.1";

  src = fetchzip {
    url = "https://archive.org/download/ns-atmosphere-programmer/ns-atmosphere-programmer-ubuntu-64bit-v01.zip";
    # original source: http://www.ns-atmosphere.com/media/content/ns-atmosphere-programmer-ubuntu-64bit-v01.zip
    sha256 = "1cnyydsmrcpfwpdiry7qybh179499wpbvlzq5rk442hq9ak416ri";
  };

  buildInputs = with xlibs; [ libX11 libXxf86vm libSM gnome3.gtk libpng12 ];
  nativeBuildInputs = [ autoPatchelfHook makeWrapper ];

  installPhase = ''
    install -D -m755 NS-Atmosphere $out/bin/NS-Atmosphere
    wrapProgram $out/bin/NS-Atmosphere --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" \
--suffix XDG_DATA_DIRS : '${gnome3.defaultIconTheme}/share'
  '';

  dontStrip = true;

  meta = with stdenv.lib; {
    description = "Payload programmer for ns-atmosphere injector for nintendo switch";
    homepage = http://www.ns-atmosphere.com;
    maintainers = [ maintainers.makefu ];
    platforms = platforms.linux;
    license = with licenses; [ unfree ];
  };

}