mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
vis: simplify thanks to lua update
This commit is contained in:
parent
e9c921a301
commit
823d0d835c
@ -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"
|
||||
'';
|
||||
|
||||
|
@ -28187,9 +28187,7 @@ with pkgs;
|
||||
|
||||
neovim-remote = callPackage ../applications/editors/neovim/neovim-remote.nix { };
|
||||
|
||||
vis = callPackage ../applications/editors/vis {
|
||||
inherit (lua52Packages) lpeg;
|
||||
};
|
||||
vis = callPackage ../applications/editors/vis { };
|
||||
|
||||
viw = callPackage ../applications/editors/viw { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user