Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1979ac619f0e
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 60d72d12dea2
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jan 13, 2020

  1. maintainers: add nloomans

    nloomans authored and teto committed Jan 13, 2020
    Copy the full SHA
    eec3db0 View commit details
  2. hakuneko: 1.4.2 -> 5.0.8

    HakuNeko switched to electron. Since this is the latest release the
    broken status can be dropped. The original maintainer (Ruben Astudillo)
    dropped support for the package so I decided to pick it up.
    
    I based this on the simplenote package, and implemented the setuid fix
    from the slack package.
    
    Closes #45332
    nloomans authored and teto committed Jan 13, 2020
    Copy the full SHA
    60d72d1 View commit details
Showing with 81 additions and 19 deletions.
  1. +6 −0 maintainers/maintainer-list.nix
  2. +75 −19 pkgs/tools/misc/hakuneko/default.nix
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
@@ -5088,6 +5088,12 @@
githubId = 7588406;
name = "Andrew R. M.";
};
nloomans = {
email = "noah@nixos.noahloomans.com";
github = "nloomans";
githubId = 7829481;
name = "Noah Loomans";
};
nmattia = {
email = "nicolas@nmattia.com";
github = "nmattia";
94 changes: 75 additions & 19 deletions pkgs/tools/misc/hakuneko/default.nix
Original file line number Diff line number Diff line change
@@ -1,28 +1,84 @@
{ stdenv, fetchurl, wxGTK30, openssl, curl }:

{ atomEnv
, autoPatchelfHook
, dpkg
, fetchurl
, makeDesktopItem
, makeWrapper
, udev
, stdenv
, wrapGAppsHook
}:
let
desktopItem = makeDesktopItem {
desktopName = "HakuNeko Desktop";
genericName = "Manga & Anime Downloader";
categories = "Network;FileTransfer;";
exec = "hakuneko";
icon = "hakuneko-desktop";
name = "hakuneko-desktop";
type = "Application";
};
in
stdenv.mkDerivation rec {
pname = "hakuneko";
version = "1.4.2";
version = "5.0.8";

src = fetchurl {
url = "mirror://sourceforge/hakuneko/hakuneko_${version}_src.tar.gz";
sha256 = "76a63fa05e91b082cb5a70a8abacef005354e99978ff8b1369f7aa0af7615d52";
};
src = {
"x86_64-linux" = fetchurl {
url = "https://github.com/manga-download/hakuneko/releases/download/v${version}/hakuneko-desktop_${version}_linux_amd64.deb";
sha256 = "924df1d7a0ab54b918529165317e4428b423c9045548d1e36bd634914f7957f0";
};
"i686-linux" = fetchurl {
url = "https://github.com/manga-download/hakuneko/releases/download/v${version}/hakuneko-desktop_${version}_linux_i386.deb";
sha256 = "988d8b0e8447dcd0a8d85927f5877bca9efb8e4b09ed3c80a6788390e54a48d2";
};
}."${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
'';

preConfigure = ''
substituteInPlace ./configure \
--replace /bin/bash $shell
'';
installPhase = ''
cp -R usr "$out"
# Overwrite existing .desktop file.
cp "${desktopItem}/share/applications/hakuneko-desktop.desktop" \
"$out/share/applications/hakuneko-desktop.desktop"
'';

buildInputs = [ wxGTK30 openssl curl ];
runtimeDependencies = [
udev.lib
];

meta = {
description = "Manga downloader";
homepage = https://sourceforge.net/projects/hakuneko/;
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.linux;
postFixup = ''
makeWrapper $out/lib/hakuneko-desktop/hakuneko $out/bin/hakuneko \
"''${gappsWrapperArgs[@]}"
'';

# This project was abandoned upstream.
broken = true;
meta = with stdenv.lib; {
description = "Manga & Anime Downloader";
homepage = "https://sourceforge.net/projects/hakuneko/";
license = licenses.unlicense;
maintainers = with maintainers; [
nloomans
];
platforms = [
"x86_64-linux"
"i686-linux"
];
};
}