2017-05-17 20:26:11 +01:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, doxygen, makeWrapper
|
2018-08-18 00:53:33 +01:00
|
|
|
, msgpack, neovim, pythonPackages, qtbase }:
|
2015-11-06 09:46:12 +00:00
|
|
|
|
2017-02-10 18:39:15 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2015-11-06 09:46:12 +00:00
|
|
|
name = "neovim-qt-${version}";
|
2018-12-15 07:01:19 +00:00
|
|
|
version = "0.2.11";
|
2015-11-06 09:46:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2017-02-10 18:39:15 +00:00
|
|
|
owner = "equalsraf";
|
|
|
|
repo = "neovim-qt";
|
|
|
|
rev = "v${version}";
|
2018-12-15 07:01:19 +00:00
|
|
|
sha256 = "0pc1adxc89p2rdvb6nxyqr9sjzqz9zw2dg7a4ardxsl3a8jga1wh";
|
2015-11-06 09:46:12 +00:00
|
|
|
};
|
|
|
|
|
2017-02-10 18:39:15 +00:00
|
|
|
cmakeFlags = [
|
2018-08-19 16:40:50 +01:00
|
|
|
"-DUSE_SYSTEM_MSGPACK=1"
|
2017-02-10 18:39:15 +00:00
|
|
|
];
|
2015-11-06 09:46:12 +00:00
|
|
|
|
|
|
|
buildInputs = with pythonPackages; [
|
2018-08-18 00:53:33 +01:00
|
|
|
neovim qtbase msgpack
|
2017-02-10 18:39:15 +00:00
|
|
|
] ++ (with pythonPackages; [
|
|
|
|
jinja2 msgpack python
|
|
|
|
]);
|
|
|
|
|
2017-05-17 20:26:11 +01:00
|
|
|
nativeBuildInputs = [ cmake doxygen makeWrapper ];
|
2015-11-06 09:46:12 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2017-03-08 12:26:18 +00:00
|
|
|
preConfigure = ''
|
2017-09-09 02:31:09 +01:00
|
|
|
# we rip out a number of tests that fail in the build env
|
|
|
|
# the GUI tests will never work but the others should - they did before neovim 0.2.0
|
|
|
|
# was released
|
|
|
|
sed -i test/CMakeLists.txt \
|
|
|
|
-e '/^add_xtest_gui/d' \
|
2018-08-19 16:40:50 +01:00
|
|
|
-e '/tst_neovimobject/d' \
|
2017-09-09 02:31:09 +01:00
|
|
|
-e '/tst_neovimconnector/d' \
|
|
|
|
-e '/tst_callallmethods/d' \
|
|
|
|
-e '/tst_encoding/d'
|
2017-03-08 12:26:18 +00:00
|
|
|
'';
|
2017-02-10 18:39:15 +00:00
|
|
|
|
2017-09-09 02:31:09 +01:00
|
|
|
doCheck = true;
|
|
|
|
|
2018-08-19 16:40:50 +01:00
|
|
|
postInstall = if stdenv.isDarwin then ''
|
|
|
|
mkdir -p $out/Applications
|
|
|
|
mv $out/bin/nvim-qt.app $out/Applications
|
|
|
|
rmdir $out/bin || :
|
|
|
|
|
|
|
|
wrapProgram "$out/Applications/nvim-qt.app/Contents/MacOS/nvim-qt" \
|
|
|
|
--prefix PATH : "${neovim}/bin"
|
|
|
|
'' else ''
|
2017-05-17 20:26:11 +01:00
|
|
|
wrapProgram "$out/bin/nvim-qt" \
|
2017-03-08 09:34:54 +00:00
|
|
|
--prefix PATH : "${neovim}/bin"
|
2015-11-06 09:46:12 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2017-02-10 18:39:15 +00:00
|
|
|
description = "Neovim client library and GUI, in Qt5";
|
2017-09-09 02:31:09 +01:00
|
|
|
license = licenses.isc;
|
2017-02-10 18:39:15 +00:00
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
2015-11-06 09:46:12 +00:00
|
|
|
inherit (neovim.meta) platforms;
|
2017-02-10 18:39:15 +00:00
|
|
|
inherit version;
|
2015-11-06 09:46:12 +00:00
|
|
|
};
|
|
|
|
}
|