aboutsummaryrefslogtreecommitdiff
path: root/pkgs/applications/editors/jetbrains/common.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/editors/jetbrains/common.nix')
-rw-r--r--pkgs/applications/editors/jetbrains/common.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/applications/editors/jetbrains/common.nix b/pkgs/applications/editors/jetbrains/common.nix
index be20800cde2..bca85c01016 100644
--- a/pkgs/applications/editors/jetbrains/common.nix
+++ b/pkgs/applications/editors/jetbrains/common.nix
@@ -1,4 +1,4 @@
-{ stdenv, makeDesktopItem, makeWrapper, patchelf, p7zip
+{ stdenv, lib, makeDesktopItem, makeWrapper, patchelf, p7zip
, coreutils, gnugrep, which, git, unzip, libsecret, libnotify
}:
@@ -28,7 +28,7 @@ with stdenv; lib.makeOverridable mkDerivation rec {
nativeBuildInputs = [ makeWrapper patchelf p7zip unzip ];
- patchPhase = ''
+ patchPhase = lib.optionalString (!stdenv.isDarwin) ''
get_file_size() {
local fname="$1"
echo $(ls -l $fname | cut -d ' ' -f5)
@@ -63,7 +63,7 @@ with stdenv; lib.makeOverridable mkDerivation rec {
item=${desktopItem}
makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${execName}" \
- --prefix PATH : "$out/libexec/${name}:${stdenv.lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \
+ --prefix PATH : "$out/libexec/${name}:${lib.optionalString (stdenv.isDarwin) "${jdk}/jdk/Contents/Home/bin:"}${stdenv.lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \
--prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [
# Some internals want libstdc++.so.6
stdenv.cc.cc.lib libsecret
@@ -77,4 +77,6 @@ with stdenv; lib.makeOverridable mkDerivation rec {
ln -s "$item/share/applications" $out/share
'';
+} // stdenv.lib.optionalAttrs (!(meta.license.free or true)) {
+ preferLocalBuild = true;
}