3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/editors/jucipp/default.nix

77 lines
2.3 KiB
Nix
Raw Normal View History

2021-01-15 13:21:58 +00:00
{ lib, stdenv, fetchgit, dconf, gtksourceview3, at-spi2-core, gtksourceviewmm,
boost, epoxy, cmake, aspell, llvmPackages, libgit2, pkg-config, pcre,
2019-03-23 04:50:12 +00:00
libXdmcp, libxkbcommon, libpthreadstubs, wrapGAppsHook, aspellDicts, gtkmm3,
coreutils, glibc, dbus, openssl, libxml2, gnumake, ctags }:
2021-01-15 13:21:58 +00:00
with lib;
stdenv.mkDerivation rec {
pname = "juicipp";
version = "1.2.3";
meta = {
homepage = "https://github.com/cppit/jucipp";
description = "A lightweight, platform independent C++-IDE with support for C++11, C++14, and experimental C++17 features depending on libclang version";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ xnwdd ];
2021-03-19 16:51:55 +00:00
# error: token ""1.1"" is not valid in preprocessor expression
# TODO: fix pname being different from the attribute name
broken = true;
};
src = fetchgit {
url = "https://github.com/cppit/jucipp.git";
rev = "refs/tags/v${version}";
deepClone = true;
sha256 = "0xp6ijnrggskjrvscp204bmdpz48l5a8nxr9abp17wni6akb5wiq";
};
nativeBuildInputs = [ pkg-config wrapGAppsHook ];
buildInputs = [
dbus
openssl
libxml2
2019-03-23 04:50:12 +00:00
gtksourceview3
at-spi2-core
pcre
epoxy
boost
libXdmcp
cmake
aspell
libgit2
libxkbcommon
2019-03-23 04:50:12 +00:00
gtkmm3
libpthreadstubs
2019-03-23 04:50:12 +00:00
gtksourceviewmm
llvmPackages.clang.cc
llvmPackages.lldb
2019-11-30 23:11:47 +00:00
dconf
];
lintIncludes = let
p = "arguments.emplace_back(\"-I";
e = "\");";
2021-01-15 13:21:58 +00:00
v = lib.getVersion llvmPackages.clang;
in
p+llvmPackages.libcxx.dev+"/include/c++/v1"+e
+p+llvmPackages.clang-unwrapped.lib+"/lib/clang/"+v+"/include/"+e
+p+glibc.dev+"/include"+e;
preConfigure = ''
sed -i 's|liblldb LIBLLDB_LIBRARIES|liblldb LIBNOTHING|g' CMakeLists.txt
sed -i 's|> arguments;|> arguments; ${lintIncludes}|g' src/source_clang.cc
'';
2021-01-15 13:21:58 +00:00
cmakeFlags = [ "-DLIBLLDB_LIBRARIES=${lib.makeLibraryPath [ llvmPackages.lldb ]}/liblldb.so" ];
postInstall = ''
mv $out/bin/juci $out/bin/.juci
makeWrapper "$out/bin/.juci" "$out/bin/juci" \
2021-01-15 13:21:58 +00:00
--set PATH "${lib.makeBinPath [ ctags coreutils llvmPackages.clang.cc cmake gnumake llvmPackages.clang.bintools llvmPackages.clang ]}" \
--set NO_AT_BRIDGE 1 \
--set ASPELL_CONF "dict-dir ${aspellDicts.en}/lib/aspell"
'';
}