mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03:00
Add package: luakit
This patch adds the luakit browser. It has to be build using lua5.1, I tried 5.2 but I couldn't run luakit due to a runtime error with it. It also uses gtk3 here, override to use gtk2, which should also work. Suggested-by: Benno Fünfstück <benno.fuenfstueck@gmail.com>
This commit is contained in:
parent
1335946d61
commit
b5baa2c5e4
55
pkgs/applications/networking/browsers/luakit/default.nix
Normal file
55
pkgs/applications/networking/browsers/luakit/default.nix
Normal file
@ -0,0 +1,55 @@
|
||||
{ stdenv , fetchurl , git , glib_networking , gsettings_desktop_schemas , gtk,
|
||||
help2man , libunique , lua5 , luafilesystem , luajit , luasqlite3, makeWrapper,
|
||||
pkgconfig , sqlite , webkit }:
|
||||
|
||||
let
|
||||
lualibs = [ luafilesystem luasqlite3 ];
|
||||
getPath = lib : type : "${lib}/lib/lua/${lua5.luaversion}/?.${type};${lib}/share/lua/${lua5.luaversion}/?.${type}";
|
||||
getLuaPath = lib : getPath lib "lua";
|
||||
getLuaCPath = lib : getPath lib "so";
|
||||
luaPath = stdenv.lib.concatStringsSep ";" (map getLuaPath lualibs);
|
||||
luaCPath = stdenv.lib.concatStringsSep ";" (map getLuaCPath lualibs);
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
|
||||
name = "luakit-2012.09.13";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Fast, small, webkit based browser framework extensible in Lua.";
|
||||
homepage = "http://luakit.org";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ matthiasbeyer ];
|
||||
platforms = platforms.linux; # I only tested linux
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/mason-larobina/luakit/archive/2012.09.13-r1.tar.gz";
|
||||
sha256 = "067g3bp5w20jypc8rx54dpbn3ysbgxzchgpq7sld5yh2z36s1l52";
|
||||
};
|
||||
|
||||
buildInputs = [ git gsettings_desktop_schemas gtk help2man libunique lua5
|
||||
luafilesystem luajit luasqlite3 makeWrapper pkgconfig sqlite webkit ];
|
||||
|
||||
postPatch = ''
|
||||
sed -i -e "s/DESTDIR/INSTALLDIR/" ./Makefile
|
||||
sed -i -e "s|/etc/xdg/luakit/|$out/etc/xdg/luakit/|" lib/lousy/util.lua
|
||||
patchShebangs ./build-utils
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
make DEVELOPMENT_PATHS=0 USE_LUAJIT=1 INSTALLDIR=$out DESTDIR=$out PREFIX=$out USE_GTK3=1
|
||||
'';
|
||||
|
||||
installPhase = let
|
||||
luaKitPath = "$out/share/luakit/lib/?/init.lua;$out/share/luakit/lib/?.lua";
|
||||
in ''
|
||||
make DEVELOPMENT_PATHS=0 INSTALLDIR=$out DESTDIR=$out PREFIX=$out USE_GTK3=1 install
|
||||
wrapProgram $out/bin/luakit \
|
||||
--prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
|
||||
--prefix XDG_DATA_DIRS : "${gsettings_desktop_schemas}/share:$out/usr/share/:$out/share/:$GSETTINGS_SCHEMAS_PATH" \
|
||||
--prefix XDG_CONFIG_DIRS : "$out/etc/xdg" \
|
||||
--set LUA_PATH '"${luaKitPath};${luaPath};"' \
|
||||
--set LUA_CPATH '"${luaCPath};"'
|
||||
'';
|
||||
|
||||
}
|
@ -10531,6 +10531,13 @@ let
|
||||
|
||||
lrzsz = callPackage ../tools/misc/lrzsz { };
|
||||
|
||||
luakit = callPackage ../applications/networking/browsers/luakit {
|
||||
inherit (lua51Packages) luafilesystem luasqlite3;
|
||||
lua5 = lua5_1;
|
||||
gtk = gtk3;
|
||||
webkit = webkitgtk2;
|
||||
};
|
||||
|
||||
luminanceHDR = callPackage ../applications/graphics/luminance-hdr { };
|
||||
|
||||
lxdvdrip = callPackage ../applications/video/lxdvdrip { };
|
||||
|
Loading…
Reference in New Issue
Block a user