Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ariang: init at 1.1.3 #67616

Closed
wants to merge 1 commit into from
Closed

ariang: init at 1.1.3 #67616

wants to merge 1 commit into from

Conversation

@dawidsowa
Copy link
Contributor

@dawidsowa dawidsowa commented Aug 28, 2019

Motivation for this change

Added AriaNG web app.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

Copy link
Contributor

@jonringer jonringer left a comment

how is this supposed to be used? just curious. I'm also not familiar with using js frameworks through nix.

{ stdenv, fetchurl, unzip }:

stdenv.mkDerivation rec {
name = "ariang-${version}";

This comment has been minimized.

@jonringer

jonringer Aug 28, 2019
Contributor

Suggested change
name = "ariang-${version}";
pname = "ariang";
pkgs/servers/web-apps/ariang/default.nix Show resolved Hide resolved
@dawidsowa
Copy link
Contributor Author

@dawidsowa dawidsowa commented Aug 28, 2019

how is this supposed to be used? just curious. I'm also not familiar with using js frameworks through nix.

I use it like this:

      services.nginx.virtualHosts."aria2.${domain}" = {
        root = "${pkgs.ariang}";
      };
@dawidsowa dawidsowa force-pushed the dawidsowa:ariang branch from cfb0f31 to a295a5c Aug 28, 2019
sourceRoot = ".";
buildInputs = [ unzip ];

installPhase = ''

This comment has been minimized.

@jonringer

jonringer Aug 28, 2019
Contributor

Since you're just fetching a zip, i would convert this over to a fetchzip derivation such as:

{ lib, fetchzip }:

let
  version = "1.1.3";
in
fetchzip rec {
  name = "ariang-${version}";

  url = "https://github.com/mayswind/AriaNg/releases/download/${version}/AriaNg-${version}.zip";
  sha256 = "0s9wmrq2fv1bf5ngw8w9ld1q8i3s07rsq8qm102z6jvxpjm9bl1v";

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

the real savings is in the closure size:

$ nix path-info -Sh ./results/ariang
/nix/store/3pq759vrz0lng62r95c57f5jcsiqqm2s-ariang-1.1.3         220.2M
$ nix path-info -Sh ./result
/nix/store/nxmk3ibd4dmqy9h8chp0hqrqpcq11n0s-ariang-1.1.3           2.5M
@dawidsowa dawidsowa closed this Feb 3, 2020
@dawidsowa dawidsowa deleted the dawidsowa:ariang branch Oct 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.