jetbrains.clion: fix bundled tools
This commit is contained in:
parent
73a1307a02
commit
0cec85d0eb
@ -1,17 +1,19 @@
|
|||||||
{ lib, stdenv, callPackage, fetchurl, makeDesktopItem, makeWrapper, patchelf
|
{ lib, stdenv, callPackage, fetchurl, makeDesktopItem, makeWrapper, patchelf
|
||||||
, coreutils, gnugrep, which, git, python, unzip, p7zip
|
, coreutils, gnugrep, which, git, python, unzip, p7zip
|
||||||
, androidsdk, jdk
|
, androidsdk, jdk, cmake, libxml2, zlib, python2, ncurses
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert stdenv.isLinux;
|
assert stdenv.isLinux;
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
mkJetBrainsProduct = callPackage ./common.nix { };
|
mkJetBrainsProduct = callPackage ./common.nix { };
|
||||||
|
|
||||||
# Sorted alphabetically
|
# Sorted alphabetically
|
||||||
|
|
||||||
buildClion = { name, version, src, license, description, wmClass }:
|
buildClion = { name, version, src, license, description, wmClass }:
|
||||||
(mkJetBrainsProduct rec {
|
lib.overrideDerivation (mkJetBrainsProduct rec {
|
||||||
inherit name version src wmClass jdk;
|
inherit name version src wmClass jdk;
|
||||||
product = "CLion";
|
product = "CLion";
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
@ -21,9 +23,35 @@ let
|
|||||||
Enhancing productivity for every C and C++
|
Enhancing productivity for every C and C++
|
||||||
developer on Linux, OS X and Windows.
|
developer on Linux, OS X and Windows.
|
||||||
'';
|
'';
|
||||||
maintainers = with maintainers; [ edwtjo ];
|
maintainers = with maintainers; [ edwtjo mic92 ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
|
}) (attrs: {
|
||||||
|
postFixup = (attrs.postFixup or "") + optionalString (stdenv.isLinux) ''
|
||||||
|
(
|
||||||
|
cd $out/clion-${version}
|
||||||
|
# bundled cmake does not find libc
|
||||||
|
rm -rf bin/cmake
|
||||||
|
ln -s ${cmake} bin/cmake
|
||||||
|
|
||||||
|
lldbLibPath=$out/clion-${version}/bin/lldb/lib
|
||||||
|
interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
|
||||||
|
ln -s ${ncurses.out}/lib/libncurses.so $lldbLibPath/libtinfo.so.5
|
||||||
|
|
||||||
|
patchelf --set-interpreter $interp \
|
||||||
|
--set-rpath "${lib.makeLibraryPath [ libxml2 zlib stdenv.cc.cc.lib ]}:$lldbLibPath" \
|
||||||
|
bin/lldb/bin/lldb-server
|
||||||
|
patchelf --set-interpreter $interp \
|
||||||
|
--set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}:$lldbLibPath" \
|
||||||
|
bin/lldb/LLDBFrontend
|
||||||
|
patchelf \
|
||||||
|
--set-rpath "${lib.makeLibraryPath [ libxml2 zlib stdenv.cc.cc.lib python2 ]}:$lldbLibPath" \
|
||||||
|
bin/lldb/lib/liblldb.so
|
||||||
|
|
||||||
|
patchelf --set-interpreter $interp bin/gdb/bin/gdb
|
||||||
|
patchelf --set-interpreter $interp bin/gdb/bin/gdbserver
|
||||||
|
)
|
||||||
|
'';
|
||||||
});
|
});
|
||||||
|
|
||||||
buildDataGrip = { name, version, src, license, description, wmClass }:
|
buildDataGrip = { name, version, src, license, description, wmClass }:
|
||||||
|
Loading…
Reference in New Issue
Block a user