diff --git a/pkgs/by-name/li/libisocodes/package.nix b/pkgs/by-name/li/libisocodes/package.nix new file mode 100644 index 000000000000..4b4d4003d833 --- /dev/null +++ b/pkgs/by-name/li/libisocodes/package.nix @@ -0,0 +1,53 @@ +{ + lib, + stdenv, + fetchFromGitHub, + vala, + pkg-config, + gobject-introspection, + libxml2, + libgee, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "libisocodes"; + version = "1.2.5"; + + src = fetchFromGitHub { + owner = "toddy15"; + repo = "libisocodes"; + rev = "v${finalAttrs.version}"; + hash = "sha256-a2gVqiZXDiH1byEw/s3MqDQBBZ/bmnw8OyllGYfYykQ="; + }; + + nativeBuildInputs = [ + vala + pkg-config + gobject-introspection + ]; + + buildInputs = [ + libxml2 + libgee + ]; + + meta = { + description = "Easily access XML data of the iso-codes package"; + longDescription = '' + This library can be used to easily access XML data of + the iso-codes package. It will provide an abstraction + layer to handle both the version 3 and the upcoming + version 4 of iso-codes. Moreover, all available + translations can be used as well. + + This library makes use of the GObject introspection + features, so that it is accessible from a variety of + programming languages, for example C, Vala, Ruby, + Python, Perl, Lua, JavaScript, PHP and many more. + ''; + homepage = "https://github.com/toddy15/libisocodes"; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ aleksana ]; + platforms = lib.platforms.unix; + }; +}) diff --git a/pkgs/by-name/li/libzim-glib/package.nix b/pkgs/by-name/li/libzim-glib/package.nix new file mode 100644 index 000000000000..39894323c227 --- /dev/null +++ b/pkgs/by-name/li/libzim-glib/package.nix @@ -0,0 +1,50 @@ +{ + lib, + stdenv, + fetchFromGitHub, + meson, + ninja, + vala, + pkg-config, + gobject-introspection, + glib, + zimlib, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "libzim-glib"; + version = "4.0.0"; + + src = fetchFromGitHub { + owner = "birros"; + repo = "libzim-glib"; + rev = "v${finalAttrs.version}"; + hash = "sha256-C1f/ULTJIHvt/LCSRw3dsGAWUkb1i4xaCmW1+QBZd2c="; + }; + + outputs = [ "out" "dev" ]; + + nativeBuildInputs = [ + meson + ninja + vala + pkg-config + gobject-introspection + ]; + + buildInputs = [ + glib + zimlib + ]; + + # requires downloading test sample of a specific zimlib version + doCheck = false; + + meta = { + description = "Partial GObject/C bindings for libzim"; + homepage = "https://github.com/birros/libzim-glib"; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ aleksana ]; + platforms = lib.platforms.unix; + }; +}) 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 000000000000..2c052474489b --- /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; + }; +}) diff --git a/pkgs/development/libraries/zimlib/default.nix b/pkgs/development/libraries/zimlib/default.nix index fdcad63a279f..a118c51ff136 100644 --- a/pkgs/development/libraries/zimlib/default.nix +++ b/pkgs/development/libraries/zimlib/default.nix @@ -64,6 +64,6 @@ stdenv.mkDerivation rec { homepage = "https://www.openzim.org/wiki/Zimlib"; license = licenses.gpl2; maintainers = with maintainers; [ greg ]; - platforms = platforms.linux; + platforms = platforms.unix; }; }