about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/ariang/default.nix
blob: bb0058833e4f7f1047533ebc177e3cac621cac70 (plain) (blame)
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
38
39
40
41
{ lib
, stdenv
, fetchFromGitHub
, buildNpmPackage
, nix-update-script
}:

buildNpmPackage rec {
  pname = "ariang";
  version = "1.3.6";

  src = fetchFromGitHub {
    owner = "mayswind";
    repo = "AriaNg";
    rev = version;
    hash = "sha256-+wwtBEZgU83FNQ5f9oQh5G4RQdCODzoqcV1XfwWKUKg=";
  };

  npmDepsHash = "sha256-KfzD8g6eAWvNjrGaVNt5x4I9o2E273S02o4nkn7BFSs=";

  makeCacheWritable = true;

  installPhase = ''
    runHook preInstall

    mkdir -p $out/share
    cp -r dist $out/share/ariang

    runHook postInstall
  '';

  passthru.updateScript = nix-update-script {};

  meta = with lib; {
    description = "a modern web frontend making aria2 easier to use";
    homepage = "http://ariang.mayswind.net/";
    license = licenses.mit;
    maintainers = with maintainers; [ stunkymonkey ];
    platforms = platforms.unix;
  };
}