2020-12-13 12:46:32 +00:00
|
|
|
{ mkYarnPackage, fetchFromGitHub, electron, makeWrapper, makeDesktopItem, lib }:
|
|
|
|
|
|
|
|
mkYarnPackage rec {
|
|
|
|
pname = "vieb";
|
2021-07-01 05:12:47 +01:00
|
|
|
version = "5.3.0";
|
2020-12-13 12:46:32 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-06-21 06:21:29 +01:00
|
|
|
owner = "Jelmerro";
|
2020-12-13 12:46:32 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-07-01 05:12:47 +01:00
|
|
|
sha256 = "sha256-NKWqSnUO8SScEodHYSptRHwVNOa5C4M61ac85d+wYK0=";
|
2020-12-13 12:46:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
packageJSON = ./package.json;
|
|
|
|
yarnLock = ./yarn.lock;
|
|
|
|
yarnNix = ./yarn.nix;
|
|
|
|
yarnFlags = [ "--production" "--offline" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "vieb";
|
|
|
|
exec = "vieb %U";
|
|
|
|
icon = "vieb";
|
|
|
|
desktopName = "Web Browser";
|
|
|
|
genericName = "Web Browser";
|
|
|
|
categories = "Network;WebBrowser;";
|
|
|
|
mimeType = lib.concatStringsSep ";" [
|
|
|
|
"text/html"
|
|
|
|
"application/xhtml+xml"
|
|
|
|
"x-scheme-handler/http"
|
|
|
|
"x-scheme-handler/https"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -Dm0644 {${desktopItem},$out}/share/applications/vieb.desktop
|
|
|
|
|
|
|
|
pushd $out/libexec/vieb/node_modules/vieb/app/img/icons
|
|
|
|
for file in *.png; do
|
|
|
|
install -Dm0644 $file $out/share/icons/hicolor/''${file//.png}/apps/vieb.png
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
|
|
|
|
makeWrapper ${electron}/bin/electron $out/bin/vieb \
|
|
|
|
--add-flags $out/libexec/vieb/node_modules/vieb/app
|
|
|
|
'';
|
|
|
|
|
|
|
|
distPhase = ":"; # disable useless $out/tarballs directory
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://vieb.dev/";
|
2021-06-21 06:21:29 +01:00
|
|
|
changelog = "https://github.com/Jelmerro/Vieb/releases/tag/${version}";
|
2020-12-13 12:46:32 +00:00
|
|
|
description = "Vim Inspired Electron Browser";
|
2021-05-05 22:17:42 +01:00
|
|
|
maintainers = with maintainers; [ gebner fortuneteller2k ];
|
2020-12-13 12:46:32 +00:00
|
|
|
platforms = platforms.unix;
|
2021-05-05 22:17:42 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2020-12-13 12:46:32 +00:00
|
|
|
};
|
|
|
|
}
|