Files
nixpkgs/pkgs/by-name/ar/ariang/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

78 lines
1.7 KiB
Nix

{
lib,
fetchFromGitHub,
buildNpmPackage,
copyDesktopItems,
imagemagick,
xdg-utils,
makeDesktopItem,
nix-update-script,
}:
buildNpmPackage rec {
pname = "ariang";
version = "1.3.11";
src = fetchFromGitHub {
owner = "mayswind";
repo = "AriaNg";
tag = version;
hash = "sha256-TisgE5VFOe/1LbDq43AHASMVhC85BglETYFcvsQpwMw=";
};
npmDepsHash = "sha256-wWy9XxwZvUo89kgxApHd3qZ2Bb4NgifQ96WRDsZvTGU=";
makeCacheWritable = true;
nativeBuildInputs = [
copyDesktopItems
imagemagick
];
installPhase = ''
runHook preInstall
mkdir -p $out/share
cp -r dist $out/share/${pname}
for size in 16 24 36 48 72; do
mkdir -p $out/share/icons/hicolor/''${size}x''${size}/apps
magick $out/share/${pname}/tileicon.png -resize ''${size}x''${size} \
$out/share/icons/hicolor/''${size}x''${size}/apps/${pname}.png
done
mkdir -p $out/bin
makeWrapper ${xdg-utils}/bin/xdg-open $out/bin/${pname} \
--add-flags "file://$out/share/${pname}/index.html"
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = pname;
desktopName = "AriaNg";
genericName = meta.description;
comment = meta.description;
exec = pname;
icon = pname;
terminal = false;
type = "Application";
categories = [
"Network"
"WebBrowser"
];
})
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Modern web frontend making aria2 easier to use";
homepage = "http://ariang.mayswind.net/";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ stunkymonkey ];
platforms = lib.platforms.unix;
};
}