2019-02-24 11:47:11 +01:00
|
|
|
{ stdenv, fetchFromGitHub, pkgconfig, wrapGAppsHook
|
2019-06-13 13:01:10 +02:00
|
|
|
, help2man, luafilesystem, luajit, sqlite
|
2019-02-24 11:47:11 +01:00
|
|
|
, webkitgtk, gtk3, gst_all_1, glib-networking
|
|
|
|
}:
|
2018-03-18 12:17:59 +01:00
|
|
|
|
2019-06-13 13:01:10 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-02-24 11:47:11 +01:00
|
|
|
pname = "luakit";
|
2019-02-24 11:49:12 +01:00
|
|
|
version = "2.1";
|
2019-02-24 11:47:11 +01:00
|
|
|
|
2018-03-18 12:17:59 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "luakit";
|
|
|
|
repo = "luakit";
|
2019-02-24 11:47:11 +01:00
|
|
|
rev = version;
|
2019-02-24 11:49:12 +01:00
|
|
|
sha256 = "05mm76g72fs48410pbij4mw0s3nqji3r7f3mnr2fvhv02xqj05aa";
|
2018-03-18 12:17:59 +01:00
|
|
|
};
|
|
|
|
|
2019-02-24 11:47:11 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgconfig help2man wrapGAppsHook
|
|
|
|
];
|
2018-03-18 12:17:59 +01:00
|
|
|
|
2019-02-24 11:47:11 +01:00
|
|
|
buildInputs = [
|
2019-06-13 13:01:10 +02:00
|
|
|
webkitgtk luafilesystem luajit sqlite gtk3
|
2018-03-18 12:17:59 +01:00
|
|
|
gst_all_1.gstreamer gst_all_1.gst-plugins-base
|
|
|
|
gst_all_1.gst-plugins-good gst_all_1.gst-plugins-bad gst_all_1.gst-plugins-ugly
|
|
|
|
gst_all_1.gst-libav
|
2018-12-30 15:20:55 +01:00
|
|
|
glib-networking # TLS support
|
|
|
|
];
|
2018-03-18 12:17:59 +01:00
|
|
|
|
2019-02-24 11:47:11 +01:00
|
|
|
preBuild = ''
|
|
|
|
# build-utils/docgen/gen.lua:2: module 'lib.lousy.util' not found
|
2019-06-13 13:01:10 +02:00
|
|
|
# TODO: why is not this the default? The test runner adds
|
|
|
|
# ';./lib/?.lua;./lib/?/init.lua' to package.path, but the build-utils
|
|
|
|
# scripts don't add an equivalent
|
2019-08-21 15:09:15 +02:00
|
|
|
export LUA_PATH="$LUA_PATH;./?.lua;./?/init.lua"
|
2018-03-18 12:17:59 +01:00
|
|
|
'';
|
|
|
|
|
2019-02-24 11:47:11 +01:00
|
|
|
makeFlags = [
|
|
|
|
"DEVELOPMENT_PATHS=0"
|
|
|
|
"USE_LUAJIT=1"
|
|
|
|
"INSTALLDIR=${placeholder "out"}"
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
"USE_GTK3=1"
|
|
|
|
"XDGPREFIX=${placeholder "out"}/etc/xdg"
|
|
|
|
];
|
2018-03-18 12:17:59 +01:00
|
|
|
|
2019-02-24 11:47:11 +01:00
|
|
|
preFixup = let
|
2018-03-18 12:17:59 +01:00
|
|
|
luaKitPath = "$out/share/luakit/lib/?/init.lua;$out/share/luakit/lib/?.lua";
|
|
|
|
in ''
|
2019-02-24 11:47:11 +01:00
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix XDG_CONFIG_DIRS : "$out/etc/xdg"
|
2019-08-21 15:09:15 +02:00
|
|
|
--prefix LUA_PATH ';' "${luaKitPath};$LUA_PATH"
|
|
|
|
--prefix LUA_CPATH ';' "$LUA_CPATH"
|
2019-02-24 11:47:11 +01:00
|
|
|
)
|
2018-03-18 12:17:59 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Fast, small, webkit based browser framework extensible in Lua";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://luakit.github.io/";
|
2018-03-18 12:17:59 +01:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux; # Only tested linux
|
|
|
|
};
|
|
|
|
}
|