nixpkgs/pkgs/applications/networking/browsers/vieb/default.nix

60 lines
1.6 KiB
Nix
Raw Normal View History

2020-12-13 13:46:32 +01:00
{ mkYarnPackage, fetchFromGitHub, electron, makeWrapper, makeDesktopItem, lib }:
mkYarnPackage rec {
pname = "vieb";
2021-07-01 06:12:47 +02:00
version = "5.3.0";
2020-12-13 13:46:32 +01:00
src = fetchFromGitHub {
2021-06-21 07:21:29 +02:00
owner = "Jelmerro";
2020-12-13 13:46:32 +01:00
repo = pname;
rev = version;
2021-07-01 06:12:47 +02:00
sha256 = "sha256-NKWqSnUO8SScEodHYSptRHwVNOa5C4M61ac85d+wYK0=";
2020-12-13 13:46:32 +01: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 07:21:29 +02:00
changelog = "https://github.com/Jelmerro/Vieb/releases/tag/${version}";
2020-12-13 13:46:32 +01:00
description = "Vim Inspired Electron Browser";
2021-05-05 23:17:42 +02:00
maintainers = with maintainers; [ gebner fortuneteller2k ];
2020-12-13 13:46:32 +01:00
platforms = platforms.unix;
2021-05-05 23:17:42 +02:00
license = licenses.gpl3Plus;
2020-12-13 13:46:32 +01:00
};
}