Merge pull request #169175 from sikmir/vis

vis: add tre to buildInputs
main
Sandro 2 years ago committed by GitHub
commit b59c0841ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      pkgs/applications/editors/vis/default.nix

@ -1,6 +1,7 @@
{ lib, stdenv, fetchFromGitHub, pkg-config, makeWrapper, makeDesktopItem { lib, stdenv, fetchFromGitHub, pkg-config, makeWrapper
, ncurses, libtermkey, lua , copyDesktopItems, makeDesktopItem
, acl ? null, libselinux ? null , ncurses, libtermkey, lua, tre
, acl, libselinux
}: }:
let let
@ -17,12 +18,13 @@ stdenv.mkDerivation rec {
owner = "martanne"; owner = "martanne";
}; };
nativeBuildInputs = [ pkg-config makeWrapper ]; nativeBuildInputs = [ pkg-config makeWrapper copyDesktopItems ];
buildInputs = [ buildInputs = [
ncurses ncurses
libtermkey libtermkey
luaEnv luaEnv
tre
] ++ lib.optionals stdenv.isLinux [ ] ++ lib.optionals stdenv.isLinux [
acl acl
libselinux libselinux
@ -33,16 +35,14 @@ stdenv.mkDerivation rec {
''; '';
postInstall = '' 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 \ wrapProgram $out/bin/vis \
--prefix LUA_CPATH ';' "${luaEnv}/lib/lua/${lua.luaversion}/?.so" \ --prefix LUA_CPATH ';' "${luaEnv}/lib/lua/${lua.luaversion}/?.so" \
--prefix LUA_PATH ';' "${luaEnv}/share/lua/${lua.luaversion}/?.lua" \ --prefix LUA_PATH ';' "${luaEnv}/share/lua/${lua.luaversion}/?.lua" \
--prefix VIS_PATH : "\$HOME/.config:$out/share/vis" --prefix VIS_PATH : "\$HOME/.config:$out/share/vis"
''; '';
desktopItem = makeDesktopItem { desktopItems = [
(makeDesktopItem {
name = "vis"; name = "vis";
exec = "vis %U"; exec = "vis %U";
type = "Application"; type = "Application";
@ -54,7 +54,8 @@ stdenv.mkDerivation rec {
mimeTypes = [ "text/plain" "application/octet-stream" ]; mimeTypes = [ "text/plain" "application/octet-stream" ];
startupNotify = false; startupNotify = false;
terminal = true; terminal = true;
}; })
];
meta = with lib; { meta = with lib; {
description = "A vim like editor"; description = "A vim like editor";

Loading…
Cancel
Save