nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 78 lines 1.7 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fetchurl, 6 meson, 7 ninja, 8 vala, 9 pkg-config, 10 wrapGAppsHook3, 11 libzim-glib, 12 sqlite, 13 webkitgtk_4_1, 14 tinysparql, 15 libxml2, 16 libisocodes, 17 libhandy, 18 glib-networking, 19}: 20 21stdenv.mkDerivation (finalAttrs: { 22 pname = "web-archives"; 23 version = "0.5.1"; 24 25 src = fetchFromGitHub { 26 owner = "birros"; 27 repo = "web-archives"; 28 tag = "v${finalAttrs.version}"; 29 hash = "sha256-aP42WiSmpkAw7FtxUftIsHKDztt60xKcL8Zq2iTSRn8="; 30 }; 31 32 web-archive-darkreader = fetchurl { 33 # This is the same with build-aux/darkreader/Makefile 34 url = "https://github.com/birros/web-archives-darkreader/releases/download/v0.0.1/web-archives-darkreader_v0.0.1.js"; 35 hash = "sha256-juhAqs2eCYZKerLnX3NvaW3NS0uOhqB7pyf/PRDvMqE="; 36 }; 37 38 postPatch = '' 39 substituteInPlace meson.build \ 40 --replace-fail \ 41 "'make', '-C', 'build-aux/darkreader'" \ 42 "'cp', '${finalAttrs.web-archive-darkreader}', 'build-aux/darkreader/web-archives-darkreader.js'" 43 ''; 44 45 nativeBuildInputs = [ 46 meson 47 ninja 48 vala 49 pkg-config 50 wrapGAppsHook3 51 ]; 52 53 buildInputs = [ 54 libzim-glib 55 sqlite 56 webkitgtk_4_1 57 tinysparql 58 libxml2 59 libisocodes 60 libhandy 61 glib-networking 62 ]; 63 64 strictDeps = true; 65 66 passthru = { 67 inherit (finalAttrs) web-archive-darkreader; 68 }; 69 70 meta = { 71 description = "Web archives reader offering the ability to browse offline millions of articles"; 72 homepage = "https://github.com/birros/web-archives"; 73 license = lib.licenses.gpl3Plus; 74 mainProgram = "web-archives"; 75 maintainers = with lib.maintainers; [ aleksana ]; 76 platforms = lib.platforms.unix; 77 }; 78})