2021-01-15 13:21:58 +00:00
|
|
|
{ lib, stdenv, fetchgit, dconf, gtksourceview3, at-spi2-core, gtksourceviewmm,
|
2021-11-11 04:35:34 +00:00
|
|
|
boost, libepoxy, cmake, aspell, llvmPackages, libgit2, pkg-config, pcre,
|
2019-03-23 04:50:12 +00:00
|
|
|
libXdmcp, libxkbcommon, libpthreadstubs, wrapGAppsHook, aspellDicts, gtkmm3,
|
2018-07-17 20:11:16 +00:00
|
|
|
coreutils, glibc, dbus, openssl, libxml2, gnumake, ctags }:
|
2017-04-16 18:56:08 +00:00
|
|
|
|
2021-01-15 13:21:58 +00:00
|
|
|
with lib;
|
2017-04-16 18:56:08 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "juicipp";
|
2017-04-16 18:56:08 +00:00
|
|
|
version = "1.2.3";
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/cppit/jucipp";
|
2017-04-16 18:56:08 +00:00
|
|
|
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;
|
2017-04-16 18:56:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/cppit/jucipp.git";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
deepClone = true;
|
|
|
|
sha256 = "0xp6ijnrggskjrvscp204bmdpz48l5a8nxr9abp17wni6akb5wiq";
|
|
|
|
};
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config wrapGAppsHook ];
|
2017-04-16 18:56:08 +00:00
|
|
|
buildInputs = [
|
2018-07-17 20:11:16 +00:00
|
|
|
dbus
|
2017-04-16 18:56:08 +00:00
|
|
|
openssl
|
|
|
|
libxml2
|
2019-03-23 04:50:12 +00:00
|
|
|
gtksourceview3
|
2018-02-25 02:23:58 +00:00
|
|
|
at-spi2-core
|
2017-04-16 18:56:08 +00:00
|
|
|
pcre
|
2021-11-11 04:35:34 +00:00
|
|
|
libepoxy
|
2017-04-16 18:56:08 +00:00
|
|
|
boost
|
|
|
|
libXdmcp
|
|
|
|
cmake
|
|
|
|
aspell
|
|
|
|
libgit2
|
|
|
|
libxkbcommon
|
2019-03-23 04:50:12 +00:00
|
|
|
gtkmm3
|
2017-04-16 18:56:08 +00:00
|
|
|
libpthreadstubs
|
2019-03-23 04:50:12 +00:00
|
|
|
gtksourceviewmm
|
2017-04-16 18:56:08 +00:00
|
|
|
llvmPackages.clang.cc
|
|
|
|
llvmPackages.lldb
|
2019-11-30 23:11:47 +00:00
|
|
|
dconf
|
2017-04-16 18:56:08 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
lintIncludes = let
|
|
|
|
p = "arguments.emplace_back(\"-I";
|
|
|
|
e = "\");";
|
2021-01-15 13:21:58 +00:00
|
|
|
v = lib.getVersion llvmPackages.clang;
|
2017-04-16 18:56:08 +00:00
|
|
|
in
|
llvmPackages: Multuple outputs for everythting
Also begin to start work on cross compilation, though that will have to
be finished later.
The patches are based on the first version of
https://reviews.llvm.org/D99484. It's very annoying to do the
back-porting but the review has uncovered nothing super major so I'm
fine sticking with what I've got.
Beyond making the outputs work, I also strove to re-sync the packages,
as they have been drifting pointlessly apart for some time.
----
Other misc notes, highly incomplete
- lvm-config-native and llvm-config are put in `dev` because they are
tools just for build time.
- Clang no longer has an lld dep. That was introduced in
db29857eb391ed002046090851a44c452b80bdbd, but if clang needs help
finding lld when it is used we should just pass it flags / put in the
resource dir. Providing it at build time increases critical path
length for no good reason.
----
A note on `nativeCC`:
`stdenv` takes tools from the previous stage, so:
1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.stdenv.cc`: `(?0, ?1, x)`
while:
1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.targetPackages`: `(x, x, ?2)`
3. `pkgsBuildBuild.targetPackages.stdenv.cc`: `(?1, x, x)`
2020-10-15 08:23:57 +00:00
|
|
|
p+llvmPackages.libcxx.dev+"/include/c++/v1"+e
|
|
|
|
+p+llvmPackages.clang-unwrapped.lib+"/lib/clang/"+v+"/include/"+e
|
2017-04-16 18:56:08 +00:00
|
|
|
+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" ];
|
2017-04-16 18:56:08 +00:00
|
|
|
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 ]}" \
|
2017-04-16 18:56:08 +00:00
|
|
|
--set NO_AT_BRIDGE 1 \
|
|
|
|
--set ASPELL_CONF "dict-dir ${aspellDicts.en}/lib/aspell"
|
|
|
|
'';
|
|
|
|
|
|
|
|
}
|