Initial commit
This commit is contained in:
commit
e5ab764deb
4 changed files with 126 additions and 0 deletions
3
default.nix
Normal file
3
default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
nixpkgs.overlays = [ (import ./pkgs) ];
|
||||
}
|
22
pkgs/default.nix
Normal file
22
pkgs/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
# This overlay provides a set of stable ressources to make bravo-vpn work
|
||||
# reliably.
|
||||
|
||||
self: super:
|
||||
|
||||
{
|
||||
qutebrowserWE = super.qutebrowser.override { withWebEngineDefault = true; };
|
||||
kitty = super.callPackage ./kitty {};
|
||||
iosevka-hskl = let
|
||||
tags = [
|
||||
"ss08" # Use Pragmata Pro Style
|
||||
"term" # Disable ligature/ligation
|
||||
];
|
||||
in
|
||||
super.iosevka.override {
|
||||
nodejs = super.nodejs-8_x;
|
||||
design = tags;
|
||||
set = "PPStyle";
|
||||
};
|
||||
|
||||
}
|
||||
|
45
pkgs/kitty/default.nix
Executable file
45
pkgs/kitty/default.nix
Executable file
|
@ -0,0 +1,45 @@
|
|||
{ stdenv, fetchFromGitHub, pkgs, python3Packages, glfw, libunistring, harfbuzz, fontconfig, zlib, pkgconfig, ncurses, imagemagick, makeWrapper, xsel, libstartup_notification, libX11, libXrandr, libXinerama, libXcursor, libxkbcommon, libXi, libXext }:
|
||||
|
||||
with python3Packages;
|
||||
buildPythonApplication rec {
|
||||
version = "0.7.0";
|
||||
name = "kitty-${version}";
|
||||
format = "other";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kovidgoyal";
|
||||
repo = "kitty";
|
||||
rev = "v${version}";
|
||||
sha256 = "0x92w30caym042bmln6nw6f3v764sg06c2kb9hrwpmh6nhlxcs90";
|
||||
};
|
||||
|
||||
buildInputs = [ fontconfig glfw ncurses libunistring harfbuzz libX11 libXrandr libXinerama libXcursor libxkbcommon libXi libXext ];
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace kitty/utils.py \
|
||||
--replace "find_library('startup-notification-1')" "'${libstartup_notification}/lib/libstartup-notification-1.so'"
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
python3 setup.py linux-package
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out
|
||||
cp -r linux-package/{bin,share,lib} $out
|
||||
wrapProgram "$out/bin/kitty" --prefix PATH : "$out/bin:${stdenv.lib.makeBinPath [ imagemagick xsel ]}"
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/kovidgoyal/kitty;
|
||||
description = "A modern, hackable, featureful, OpenGL based terminal emulator";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ tex ];
|
||||
};
|
||||
}
|
||||
|
56
pkgs/kitty/harfbuzz.nix
Executable file
56
pkgs/kitty/harfbuzz.nix
Executable file
|
@ -0,0 +1,56 @@
|
|||
{ stdenv, fetchurl, pkgconfig, glib, freetype, cairo, libintlOrEmpty
|
||||
, icu, graphite2, harfbuzz # The icu variant uses and propagates the non-icu one.
|
||||
, withIcu ? false # recommended by upstream as default, but most don't needed and it's big
|
||||
, withGraphite2 ? true # it is small and major distros do include it
|
||||
}:
|
||||
|
||||
let
|
||||
version = "1.5.1";
|
||||
inherit (stdenv.lib) optional optionals optionalString;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "harfbuzz${optionalString withIcu "-icu"}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-${version}.tar.bz2";
|
||||
sha256 = "56838dfdad2729b8866763c82d623354d138a4d99d9ffb710c7d377b5cfc7c51";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
outputBin = "dev";
|
||||
|
||||
configureFlags = [
|
||||
( "--with-graphite2=" + (if withGraphite2 then "yes" else "no") ) # not auto-detected by default
|
||||
( "--with-icu=" + (if withIcu then "yes" else "no") )
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ glib freetype cairo ] # recommended by upstream
|
||||
++ libintlOrEmpty;
|
||||
propagatedBuildInputs = []
|
||||
++ optional withGraphite2 graphite2
|
||||
++ optionals withIcu [ icu harfbuzz ]
|
||||
;
|
||||
|
||||
# Slightly hacky; some pkgs expect them in a single directory.
|
||||
postInstall = optionalString withIcu ''
|
||||
rm "$out"/lib/libharfbuzz.* "$dev/lib/pkgconfig/harfbuzz.pc"
|
||||
ln -s {'${harfbuzz.out}',"$out"}/lib/libharfbuzz.la
|
||||
ln -s {'${harfbuzz.dev}',"$dev"}/lib/pkgconfig/harfbuzz.pc
|
||||
${optionalString stdenv.isDarwin ''
|
||||
ln -s {'${harfbuzz.out}',"$out"}/lib/libharfbuzz.dylib
|
||||
ln -s {'${harfbuzz.out}',"$out"}/lib/libharfbuzz.0.dylib
|
||||
''}
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "An OpenType text shaping engine";
|
||||
homepage = http://www.freedesktop.org/wiki/Software/HarfBuzz;
|
||||
downloadPage = "https://www.freedesktop.org/software/harfbuzz/release/";
|
||||
maintainers = [ maintainers.eelco ];
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
inherit version;
|
||||
updateWalker = true;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue