diff options
Diffstat (limited to 'pkgs/by-name/we/web-archives/package.nix')
-rw-r--r-- | pkgs/by-name/we/web-archives/package.nix | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/pkgs/by-name/we/web-archives/package.nix b/pkgs/by-name/we/web-archives/package.nix new file mode 100644 index 0000000000000..2c052474489bc --- /dev/null +++ b/pkgs/by-name/we/web-archives/package.nix @@ -0,0 +1,78 @@ +{ + lib, + stdenv, + fetchFromGitHub, + fetchurl, + meson, + ninja, + vala, + pkg-config, + wrapGAppsHook3, + libzim-glib, + sqlite, + webkitgtk_4_1, + tracker, + libxml2, + libisocodes, + libhandy, + glib-networking, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "web-archives"; + version = "0.5.0"; + + src = fetchFromGitHub { + owner = "birros"; + repo = "web-archives"; + rev = "v${finalAttrs.version}"; + hash = "sha256-EYHChI+4tpjRp4KveHTB+5BSLtw0YLp5z2JJmA0xTlM="; + }; + + web-archive-darkreader = fetchurl { + # This is the same with build-aux/darkreader/Makefile + url = "https://github.com/birros/web-archives-darkreader/releases/download/v0.0.1/web-archives-darkreader_v0.0.1.js"; + hash = "sha256-juhAqs2eCYZKerLnX3NvaW3NS0uOhqB7pyf/PRDvMqE="; + }; + + postPatch = '' + substituteInPlace meson.build \ + --replace-fail \ + "'make', '-C', 'build-aux/darkreader'" \ + "'cp', '${finalAttrs.web-archive-darkreader}', 'build-aux/darkreader/web-archives-darkreader.js'" + ''; + + nativeBuildInputs = [ + meson + ninja + vala + pkg-config + wrapGAppsHook3 + ]; + + buildInputs = [ + libzim-glib + sqlite + webkitgtk_4_1 + tracker + libxml2 + libisocodes + libhandy + glib-networking + ]; + + strictDeps = true; + + passthru = { + inherit (finalAttrs) web-archive-darkreader; + }; + + meta = { + description = "Web archives reader offering the ability to browse offline millions of articles"; + homepage = "https://github.com/birros/web-archives"; + license = lib.licenses.gpl3Plus; + mainProgram = "web-archives"; + maintainers = with lib.maintainers; [ aleksana ]; + platforms = lib.platforms.unix; + }; +}) |