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
ariang: init at 1.1.3 #67616
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name = "ariang-${version}"; | |
pname = "ariang"; |
I use it like this: services.nginx.virtualHosts."aria2.${domain}" = {
root = "${pkgs.ariang}";
}; |
sourceRoot = "."; | ||
buildInputs = [ unzip ]; | ||
|
||
installPhase = '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Motivation for this change
Added AriaNG web app.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @