2016-07-17 22:57:32 +02:00
|
|
|
{ stdenv, fetchFromGitHub, unzip, pkgconfig, makeWrapper
|
|
|
|
, ncurses, libtermkey, lpeg, lua
|
|
|
|
, acl ? null, libselinux ? null
|
|
|
|
, version ? "2016-07-15"
|
|
|
|
, rev ? "5c2cee9461ef1199f2e80ddcda699595b11fdf08"
|
|
|
|
, sha256 ? "1jmsv72hq0c2f2rnpllvd70cmxbjwfhynzwaxx24f882zlggwsnd"
|
|
|
|
}:
|
2016-04-15 20:11:46 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "vis-nightly-${version}";
|
2016-07-17 22:57:32 +02:00
|
|
|
inherit version;
|
2016-04-15 20:11:46 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2016-07-17 22:57:32 +02:00
|
|
|
inherit sha256;
|
|
|
|
inherit rev;
|
2016-04-15 20:11:46 +02:00
|
|
|
repo = "vis";
|
|
|
|
owner = "martanne";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
buildInputs = [
|
2016-07-17 22:57:32 +02:00
|
|
|
unzip pkgconfig
|
|
|
|
ncurses
|
|
|
|
libtermkey
|
|
|
|
lua
|
|
|
|
lpeg
|
|
|
|
] ++ stdenv.lib.optional stdenv.isLinux [
|
|
|
|
acl
|
|
|
|
libselinux
|
2016-04-15 20:11:46 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
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 22:57:32 +02:00
|
|
|
meta = with stdenv.lib; {
|
2016-04-15 20:11:46 +02:00
|
|
|
description = "A vim like editor";
|
|
|
|
homepage = http://github.com/martanne/vis;
|
2016-07-17 22:57:32 +02:00
|
|
|
license = licenses.isc;
|
|
|
|
maintainers = [ maintainers.vrthra ];
|
2016-08-02 19:50:55 +02:00
|
|
|
platforms = platforms.unix;
|
2016-04-15 20:11:46 +02:00
|
|
|
};
|
|
|
|
}
|