nixpkgs-suyu/pkgs/applications/editors/neovim/qt.nix

47 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, cmake, qt5, pythonPackages, libmsgpack
, makeWrapper, neovim
}:
let # not very usable ATM
2016-12-03 14:16:45 +01:00
version = "0.2.4";
in
stdenv.mkDerivation {
name = "neovim-qt-${version}";
src = fetchFromGitHub {
owner = "equalsraf";
repo = "neovim-qt";
rev = "v${version}";
2016-12-03 14:16:45 +01:00
sha256 = "0yf9wwkl0lbbj3vyf8hxnlsk7jhk5ggivszyqxply69dbar9ww59";
};
# It tries to download libmsgpack; let's use ours.
postPatch = let use-msgpack = ''
cmake_minimum_required(VERSION 2.8.11)
project(neovim-qt-deps)
# Similar enough to FindMsgpack
set(MSGPACK_INCLUDE_DIRS ${libmsgpack}/include PARENT_SCOPE)
set(MSGPACK_LIBRARIES msgpackc PARENT_SCOPE)
'';
in "echo '${use-msgpack}' > third-party/CMakeLists.txt";
buildInputs = with pythonPackages; [
cmake qt5.qtbase
python msgpack jinja2 libmsgpack
makeWrapper
];
enableParallelBuilding = true;
postInstall = ''
wrapProgram "$out/bin/nvim-qt" --prefix PATH : "${neovim}/bin"
'';
meta = with stdenv.lib; {
description = "A prototype Qt5 GUI for neovim";
license = licenses.isc;
inherit (neovim.meta) platforms;
};
}