2020-01-12 01:21:20 +00:00
|
|
|
{ atomEnv
|
|
|
|
, autoPatchelfHook
|
|
|
|
, dpkg
|
|
|
|
, fetchurl
|
|
|
|
, makeDesktopItem
|
|
|
|
, makeWrapper
|
|
|
|
, udev
|
|
|
|
, stdenv
|
2020-08-12 18:29:52 +00:00
|
|
|
, lib
|
2020-01-12 01:21:20 +00:00
|
|
|
, wrapGAppsHook
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
desktopName = "HakuNeko Desktop";
|
|
|
|
genericName = "Manga & Anime Downloader";
|
2022-02-22 14:56:15 +00:00
|
|
|
categories = [ "Network" "FileTransfer" ];
|
2020-01-12 01:21:20 +00:00
|
|
|
exec = "hakuneko";
|
|
|
|
icon = "hakuneko-desktop";
|
|
|
|
name = "hakuneko-desktop";
|
|
|
|
};
|
|
|
|
in
|
2015-08-12 15:43:33 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "hakuneko";
|
2020-01-19 21:07:26 +00:00
|
|
|
version = "6.1.7";
|
2015-08-12 15:43:33 +00:00
|
|
|
|
2020-01-12 01:21:20 +00:00
|
|
|
src = {
|
|
|
|
"x86_64-linux" = fetchurl {
|
|
|
|
url = "https://github.com/manga-download/hakuneko/releases/download/v${version}/hakuneko-desktop_${version}_linux_amd64.deb";
|
2020-01-19 21:07:26 +00:00
|
|
|
sha256 = "06bb17d7a06bb0601053eaaf423f9176f06ff3636cc43ffc024438e1962dcd02";
|
2020-01-12 01:21:20 +00:00
|
|
|
};
|
|
|
|
"i686-linux" = fetchurl {
|
|
|
|
url = "https://github.com/manga-download/hakuneko/releases/download/v${version}/hakuneko-desktop_${version}_linux_i386.deb";
|
2020-01-19 21:07:26 +00:00
|
|
|
sha256 = "32017d26bafffaaf0a83dd6954d3926557014af4022a972371169c56c0e3d98b";
|
2020-01-12 01:21:20 +00:00
|
|
|
};
|
|
|
|
}."${stdenv.hostPlatform.system}";
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
dontPatchELF = true;
|
|
|
|
dontWrapGApps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoPatchelfHook
|
|
|
|
dpkg
|
|
|
|
makeWrapper
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = atomEnv.packages;
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
# The deb file contains a setuid binary, so 'dpkg -x' doesn't work here
|
|
|
|
dpkg --fsys-tarfile $src | tar --extract
|
|
|
|
'';
|
2015-08-12 15:43:33 +00:00
|
|
|
|
2020-01-12 01:21:20 +00:00
|
|
|
installPhase = ''
|
|
|
|
cp -R usr "$out"
|
|
|
|
# Overwrite existing .desktop file.
|
|
|
|
cp "${desktopItem}/share/applications/hakuneko-desktop.desktop" \
|
|
|
|
"$out/share/applications/hakuneko-desktop.desktop"
|
|
|
|
'';
|
2015-08-12 15:43:33 +00:00
|
|
|
|
2020-01-12 01:21:20 +00:00
|
|
|
runtimeDependencies = [
|
2020-08-12 18:29:52 +00:00
|
|
|
(lib.getLib udev)
|
2020-01-12 01:21:20 +00:00
|
|
|
];
|
2015-08-12 15:43:33 +00:00
|
|
|
|
2020-01-12 01:21:20 +00:00
|
|
|
postFixup = ''
|
|
|
|
makeWrapper $out/lib/hakuneko-desktop/hakuneko $out/bin/hakuneko \
|
|
|
|
"''${gappsWrapperArgs[@]}"
|
|
|
|
'';
|
2018-01-01 06:37:34 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-01-12 01:21:20 +00:00
|
|
|
description = "Manga & Anime Downloader";
|
|
|
|
homepage = "https://sourceforge.net/projects/hakuneko/";
|
2022-06-11 11:39:29 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2020-01-12 01:21:20 +00:00
|
|
|
license = licenses.unlicense;
|
|
|
|
maintainers = with maintainers; [
|
|
|
|
nloomans
|
|
|
|
];
|
|
|
|
platforms = [
|
|
|
|
"x86_64-linux"
|
|
|
|
"i686-linux"
|
|
|
|
];
|
2015-08-12 15:43:33 +00:00
|
|
|
};
|
|
|
|
}
|