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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, wrapQtAppsHook, qmake, qtmultimedia }:
2020-06-13 08:24:07 +00:00
stdenv.mkDerivation rec {
2020-06-13 08:24:07 +00:00
pname = "kristall";
2020-06-26 13:07:13 +00:00
version = "0.3";
2021-11-18 20:27:51 +00:00
2020-06-13 08:24:07 +00:00
src = fetchFromGitHub {
owner = "MasterQ32";
repo = "kristall";
2021-11-18 20:27:51 +00:00
rev = "V${version}";
2020-06-26 13:07:13 +00:00
sha256 = "07nf7w6ilzs5g6isnvsmhh4qa1zsprgjyf0zy7rhpx4ikkj8c8zq";
2020-06-13 08:24:07 +00:00
};
2021-11-18 20:27:51 +00:00
postPatch = lib.optionalString stdenv.cc.isClang ''
sed -i '1i #include <errno.h>' src/browsertab.cpp
'';
2021-11-18 21:49:34 +00:00
nativeBuildInputs = [ wrapQtAppsHook qmake ];
2021-11-18 20:27:51 +00:00
buildInputs = [ qtmultimedia ];
2020-06-13 08:24:07 +00:00
qmakeFlags = [ "src/kristall.pro" ];
2021-11-18 20:27:51 +00:00
installPhase = if stdenv.isDarwin then ''
mkdir -p $out/Applications
mv kristall.app $out/Applications
'' else ''
2020-06-13 08:24:07 +00:00
install -Dt $out/bin kristall
install -D Kristall.desktop $out/share/applications/net.random-projects.kristall.desktop
2021-11-18 20:27:51 +00:00
install -D src/icons/kristall.svg $out/share/icons/hicolor/scalable/apps/net.random-projects.kristall.svg
for size in 16 32 64 128; do
install -D src/icons/kristall-''${size}.png $out/share/icons/hicolor/''${size}x''${size}/apps/net.random-projects.kristall.png
done
2020-06-13 08:24:07 +00:00
'';
2021-11-18 20:27:51 +00:00
meta = with lib; {
description =
"Graphical small-internet client, supports gemini, http, https, gopher, finger";
homepage = "https://random-projects.net/projects/kristall.gemini";
maintainers = with maintainers; [ ehmry ];
license = licenses.gpl3Only;
inherit (qtmultimedia.meta) platforms;
};
2020-06-13 08:24:07 +00:00
}