diff options
author | Matthieu Coudron <mcoudron@hotmail.com> | 2021-09-11 23:58:18 +0200 |
---|---|---|
committer | Matthieu Coudron <mcoudron@hotmail.com> | 2021-09-12 02:21:57 +0200 |
commit | 823d0d835ce789726d8df681c6ba286f04d8998c (patch) | |
tree | ae6e8ff1f1a317732a1280163afec0869b9e60b4 /pkgs/applications/editors/vis | |
parent | e9c921a301f76e4708d6361e5278651244791e35 (diff) |
vis: simplify thanks to lua update
Diffstat (limited to 'pkgs/applications/editors/vis')
-rw-r--r-- | pkgs/applications/editors/vis/default.nix | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/pkgs/applications/editors/vis/default.nix b/pkgs/applications/editors/vis/default.nix index 9a020233f3b09..2bafbce8be5f5 100644 --- a/pkgs/applications/editors/vis/default.nix +++ b/pkgs/applications/editors/vis/default.nix @@ -1,8 +1,11 @@ { lib, stdenv, fetchFromGitHub, pkg-config, makeWrapper, makeDesktopItem -, ncurses, libtermkey, lpeg, lua +, ncurses, libtermkey, lua , acl ? null, libselinux ? null }: +let + luaEnv = lua.withPackages(ps: [ps.lpeg]); +in stdenv.mkDerivation rec { pname = "vis"; version = "0.7"; @@ -19,8 +22,7 @@ stdenv.mkDerivation rec { buildInputs = [ ncurses libtermkey - lua - lpeg + luaEnv ] ++ lib.optionals stdenv.isLinux [ acl libselinux @@ -30,16 +32,13 @@ stdenv.mkDerivation rec { patchShebangs ./configure ''; - LUA_CPATH="${lpeg}/lib/lua/${lua.luaversion}/?.so;"; - LUA_PATH="${lpeg}/share/lua/${lua.luaversion}/?.lua"; - postInstall = '' mkdir -p "$out/share/applications" cp $desktopItem/share/applications/* $out/share/applications echo wrapping $out/bin/vis with runtime environment wrapProgram $out/bin/vis \ - --prefix LUA_CPATH ';' "${lpeg}/lib/lua/${lua.luaversion}/?.so" \ - --prefix LUA_PATH ';' "${lpeg}/share/lua/${lua.luaversion}/?.lua" \ + --prefix LUA_CPATH ';' "${luaEnv}/lib/lua/${lua.luaversion}/?.so" \ + --prefix LUA_PATH ';' "${luaEnv}/share/lua/${lua.luaversion}/?.lua" \ --prefix VIS_PATH : "\$HOME/.config:$out/share/vis" ''; |