summary refs log tree commit diff
path: root/pkgs/applications/networking
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-03-02 23:51:04 +0100
committerGitHub <noreply@github.com>2019-03-02 23:51:04 +0100
commitaaca9c00f6ae27111a3148e22d97cb4a9a763f48 (patch)
treee92dd27a1ce425820ff294921f12dd0721ed42e6 /pkgs/applications/networking
parent9c74e20bb2092a219351e4b9a6774ea4a04f84f4 (diff)
parent2578ecab258ce8acf9d82058a45a71ac8736e269 (diff)
downloadnixpkgs-aaca9c00f6ae27111a3148e22d97cb4a9a763f48.tar
nixpkgs-aaca9c00f6ae27111a3148e22d97cb4a9a763f48.tar.gz
nixpkgs-aaca9c00f6ae27111a3148e22d97cb4a9a763f48.tar.bz2
nixpkgs-aaca9c00f6ae27111a3148e22d97cb4a9a763f48.tar.lz
nixpkgs-aaca9c00f6ae27111a3148e22d97cb4a9a763f48.tar.xz
nixpkgs-aaca9c00f6ae27111a3148e22d97cb4a9a763f48.tar.zst
nixpkgs-aaca9c00f6ae27111a3148e22d97cb4a9a763f48.zip
Merge pull request #56292 from jtojnar/luakit
luakit: 2017.08.10 → 2.1
Diffstat (limited to 'pkgs/applications/networking')
-rw-r--r--pkgs/applications/networking/browsers/luakit/default.nix56
1 files changed, 31 insertions, 25 deletions
diff --git a/pkgs/applications/networking/browsers/luakit/default.nix b/pkgs/applications/networking/browsers/luakit/default.nix
index f55d129df21..60e9c603e29 100644
--- a/pkgs/applications/networking/browsers/luakit/default.nix
+++ b/pkgs/applications/networking/browsers/luakit/default.nix
@@ -1,6 +1,7 @@
-{stdenv, fetchFromGitHub, pkgconfig, wrapGAppsHook, makeWrapper
-,help2man, lua5, luafilesystem, luajit, sqlite
-,webkitgtk, gtk3, gst_all_1, glib-networking}:
+{ stdenv, fetchFromGitHub, pkgconfig, wrapGAppsHook
+, help2man, lua5, luafilesystem, luajit, sqlite
+, webkitgtk, gtk3, gst_all_1, glib-networking
+}:
 
 let
   lualibs = [luafilesystem];
@@ -11,51 +12,56 @@ let
   luaCPath      = stdenv.lib.concatStringsSep ";" (map getLuaCPath lualibs);
 
 in stdenv.mkDerivation rec {
+  pname = "luakit";
+  version = "2.1";
 
-  name = "luakit-${version}";
-  version = "2017.08.10";
   src = fetchFromGitHub {
     owner = "luakit";
     repo = "luakit";
-    rev = "${version}";
-    sha256 = "09z88b50vf2y64vj79cymknyzk3py6azv4r50jng4cw9jx2ray7r";
+    rev = version;
+    sha256 = "05mm76g72fs48410pbij4mw0s3nqji3r7f3mnr2fvhv02xqj05aa";
   };
 
-  nativeBuildInputs = [pkgconfig help2man wrapGAppsHook makeWrapper];
+  nativeBuildInputs = [
+    pkgconfig help2man wrapGAppsHook
+  ];
 
-  buildInputs = [webkitgtk lua5 luafilesystem luajit sqlite gtk3
+  buildInputs = [
+    webkitgtk lua5 luafilesystem luajit sqlite gtk3
     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
     glib-networking # TLS support
   ];
 
-  postPatch =
-    #Kind of ugly seds here. There must be a better solution.
-  ''
-    patchShebangs ./build-utils
-    sed -i "2 s|require \"lib.lousy.util\"|dofile(\"./lib/lousy/util.lua\")|" ./build-utils/docgen/gen.lua;
-    sed -i "3 s|require \"lib.markdown\"|dofile(\"./lib/markdown.lua\")|" ./build-utils/docgen/gen.lua;
-    sed -i "1,2 s|require(\"lib.lousy.util\")|dofile(\"./lib/lousy/util.lua\")|" ./build-utils/find_files.lua;
+  preBuild = ''
+    # build-utils/docgen/gen.lua:2: module 'lib.lousy.util' not found
+    # TODO: why is not this the default?
+    LUA_PATH=?.lua
   '';
 
-  buildPhase = ''
-    make DEVELOPMENT_PATHS=0 USE_LUAJIT=1 INSTALLDIR=$out PREFIX=$out USE_GTK3=1
-  '';
+  makeFlags = [
+    "DEVELOPMENT_PATHS=0"
+    "USE_LUAJIT=1"
+    "INSTALLDIR=${placeholder "out"}"
+    "PREFIX=${placeholder "out"}"
+    "USE_GTK3=1"
+    "XDGPREFIX=${placeholder "out"}/etc/xdg"
+  ];
 
-  installPhase = let
+  preFixup = let
     luaKitPath = "$out/share/luakit/lib/?/init.lua;$out/share/luakit/lib/?.lua";
   in ''
-    make DEVELOPMENT_PATHS=0 INSTALLDIR=$out PREFIX=$out XDGPREFIX=$out/etc/xdg USE_GTK3=1 install
-    wrapProgram $out/bin/luakit                                         \
-      --prefix XDG_CONFIG_DIRS : "$out/etc/xdg"                         \
-      --set LUA_PATH '${luaKitPath};${luaPath};'                      \
+    gappsWrapperArgs+=(
+      --prefix XDG_CONFIG_DIRS : "$out/etc/xdg"
+      --set LUA_PATH '${luaKitPath};${luaPath};'
       --set LUA_CPATH '${luaCPath};'
+    )
   '';
 
   meta = with stdenv.lib; {
     description = "Fast, small, webkit based browser framework extensible in Lua";
-    homepage    = "http://luakit.org";
+    homepage    = http://luakit.org;
     license     = licenses.gpl3;
     platforms   = platforms.linux; # Only tested linux
   };