1 { stdenv, buildNpmPackage, fetchFromGitHub, electron, makeWrapper, python3, makeDesktopItem, lib }:
7 src = fetchFromGitHub {
11 hash = "sha256-/gMAGmTsaS9B0qHXHq2Z/77LgcAMKjF6Mt7OiJ9l4wU=";
15 sed -i '/"electron"/d' package.json
18 npmDepsHash = "sha256-sGDygjb9+tIBHykMUb3UGZrCF8btkFVObTdyx4Y3Q2c=";
19 makeCacheWritable = true;
21 env.ELECTRON_SKIP_BINARY_DOWNLOAD = 1;
23 nativeBuildInputs = [ makeWrapper ] ++ lib.optional stdenv.hostPlatform.isAarch64 python3;
25 desktopItem = makeDesktopItem {
29 desktopName = "Web Browser";
30 genericName = "Web Browser";
31 categories = [ "Network" "WebBrowser" ];
34 "application/xhtml+xml"
35 "x-scheme-handler/http"
36 "x-scheme-handler/https"
41 install -Dm0644 {${desktopItem},$out}/share/applications/vieb.desktop
43 pushd $out/lib/node_modules/vieb/app/img/icons
45 install -Dm0644 $file $out/share/icons/hicolor/''${file//.png}/apps/vieb.png
49 makeWrapper ${electron}/bin/electron $out/bin/vieb \
50 --add-flags $out/lib/node_modules/vieb/app \
51 --set npm_package_version ${version}
54 distPhase = ":"; # disable useless $out/tarballs directory
57 homepage = "https://vieb.dev/";
58 changelog = "https://github.com/Jelmerro/Vieb/releases/tag/${version}";
59 description = "Vim Inspired Electron Browser";
61 maintainers = with maintainers; [ gebner tejing ];
62 platforms = platforms.unix;
63 license = licenses.gpl3Plus;