nixpkgs/pkgs/applications/editors/vis/default.nix

51 lines
1.2 KiB
Nix
Raw Normal View History

2016-07-17 21:57:32 +01:00
{ stdenv, fetchFromGitHub, unzip, pkgconfig, makeWrapper
, ncurses, libtermkey, lpeg, lua
, acl ? null, libselinux ? null
, version ? "2016-07-15"
, rev ? "5c2cee9461ef1199f2e80ddcda699595b11fdf08"
, sha256 ? "1jmsv72hq0c2f2rnpllvd70cmxbjwfhynzwaxx24f882zlggwsnd"
}:
stdenv.mkDerivation rec {
name = "vis-nightly-${version}";
2016-07-17 21:57:32 +01:00
inherit version;
src = fetchFromGitHub {
2016-07-17 21:57:32 +01:00
inherit sha256;
inherit rev;
repo = "vis";
owner = "martanne";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
2016-07-17 21:57:32 +01:00
unzip pkgconfig
ncurses
libtermkey
lua
lpeg
] ++ stdenv.lib.optional stdenv.isLinux [
acl
libselinux
];
LUA_CPATH="${lpeg}/lib/lua/${lua.luaversion}/?.so;";
LUA_PATH="${lpeg}/share/lua/${lua.luaversion}/?.lua";
postInstall = ''
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 VIS_PATH : "$out/share/vis"
'';
2016-07-17 21:57:32 +01:00
meta = with stdenv.lib; {
description = "A vim like editor";
homepage = http://github.com/martanne/vis;
2016-07-17 21:57:32 +01:00
license = licenses.isc;
maintainers = [ maintainers.vrthra ];
};
}