nixpkgs/pkgs/by-name/vi/vis/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
1.5 KiB
Nix
Raw Normal View History

2022-04-18 07:22:06 +00:00
{ lib, stdenv, fetchFromGitHub, pkg-config, makeWrapper
, copyDesktopItems, makeDesktopItem
, ncurses, libtermkey, lua, tre
, acl, libselinux
2016-07-17 20:57:32 +00:00
}:
2021-09-11 21:58:18 +00:00
let
luaEnv = lua.withPackages(ps: [ ps.lpeg ]);
2021-09-11 21:58:18 +00:00
in
stdenv.mkDerivation rec {
pname = "vis";
2024-05-02 02:55:32 +00:00
version = "0.9";
src = fetchFromGitHub {
2017-03-26 16:09:02 +00:00
rev = "v${version}";
2024-05-02 02:55:32 +00:00
sha256 = "sha256-SYM3zlzhp3NdyOjtXc+pOiWY4/WA/Ax+qAWe18ggq3g=";
repo = "vis";
owner = "martanne";
};
2022-04-18 07:22:06 +00:00
nativeBuildInputs = [ pkg-config makeWrapper copyDesktopItems ];
buildInputs = [
2016-07-17 20:57:32 +00:00
ncurses
libtermkey
2021-09-11 21:58:18 +00:00
luaEnv
2022-04-18 07:22:06 +00:00
tre
2021-01-15 13:21:58 +00:00
] ++ lib.optionals stdenv.isLinux [
2016-07-17 20:57:32 +00:00
acl
libselinux
];
postInstall = ''
wrapProgram $out/bin/vis \
2021-09-11 21:58:18 +00:00
--prefix LUA_CPATH ';' "${luaEnv}/lib/lua/${lua.luaversion}/?.so" \
--prefix LUA_PATH ';' "${luaEnv}/share/lua/${lua.luaversion}/?.lua" \
2016-09-17 04:16:25 +00:00
--prefix VIS_PATH : "\$HOME/.config:$out/share/vis"
'';
2022-04-18 07:22:06 +00:00
desktopItems = [
(makeDesktopItem {
name = "vis";
exec = "vis %U";
type = "Application";
icon = "accessories-text-editor";
comment = meta.description;
desktopName = "vis";
genericName = "Text editor";
categories = [ "Application" "Development" "IDE" ];
mimeTypes = [ "text/plain" "application/octet-stream" ];
startupNotify = false;
terminal = true;
})
];
2016-09-17 04:16:25 +00:00
meta = with lib; {
description = "A vim like editor";
homepage = "https://github.com/martanne/vis";
2016-07-17 20:57:32 +00:00
license = licenses.isc;
2016-09-17 04:16:25 +00:00
maintainers = with maintainers; [ vrthra ramkromberg ];
platforms = platforms.unix;
};
}