From 58dd7ee233b65165b85498f4148d8fa873b2680b Mon Sep 17 00:00:00 2001 From: user Date: Sat, 18 May 2024 19:30:00 +0200 Subject: [PATCH] jetbrains --- flake.lock | 18 +++++++++--------- pkgs/jetbrains-client/Dockerfile | 7 +++---- pkgs/jetbrains-client/apply_neo2_awk_hack.sh | 6 +++--- pkgs/jetbrains-override-neo2.nix | 13 +++++++++++-- 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index 7ed20d8..8095234 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1703527373, - "narHash": "sha256-AjypRssRtS6F3xkf7rE3/bXkIF2WJOZLbTIspjcE1zM=", + "lastModified": 1710349883, + "narHash": "sha256-bjbdS2mC76xNJwt1d/uZa+JdHR8CCyYbF4Ey/NgOJus=", "owner": "nix-community", "repo": "home-manager", - "rev": "80679ea5074ab7190c4cce478c600057cfb5edae", + "rev": "2f0db7d418e781354d8a3c50e611e3b1cd413087", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1703255338, - "narHash": "sha256-Z6wfYJQKmDN9xciTwU3cOiOk+NElxdZwy/FiHctCzjU=", + "lastModified": 1710272261, + "narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6df37dc6a77654682fe9f071c62b4242b5342e04", + "rev": "0ad13a6833440b8e238947e47bea7f11071dc2b2", "type": "github" }, "original": { @@ -54,11 +54,11 @@ }, "nur": { "locked": { - "lastModified": 1703620235, - "narHash": "sha256-QTTz8m1WxJGbAbRWJIQtM7Dum2bDmcsVYu3mppzKTGg=", + "lastModified": 1710355483, + "narHash": "sha256-MGYdTEctVmP19adfwmRQ6MrYLdkZIDsZq9pb7yD6dGc=", "owner": "nix-community", "repo": "NUR", - "rev": "5eec32231557faed7d0eeae215396b6477890ec7", + "rev": "1afb6fbae070378ea90fcb289a5e13e355a172a1", "type": "github" }, "original": { diff --git a/pkgs/jetbrains-client/Dockerfile b/pkgs/jetbrains-client/Dockerfile index e0fbda6..1cff1c7 100644 --- a/pkgs/jetbrains-client/Dockerfile +++ b/pkgs/jetbrains-client/Dockerfile @@ -1,7 +1,6 @@ # fix a specific version for reproducability FROM debian:bookworm-20230919 - RUN apt-get update && apt-get install -y \ sudo curl wget bash vim htop tree fontconfig libfreetype6 \ libxext6 libxrender1 libxtst6 libfreetype6 libxi6 @@ -33,8 +32,8 @@ RUN rm -rf jetbrains-clients-downloader-linux-x86_64-1867* backends ################################ Apply the neo2-awk-hack ################################## ############################################################################################ -COPY ./apply_neo2_awk_hack.sh /app/apply_neo2_awk_hack.sh -RUN /app/apply_neo2_awk_hack.sh -RUN rm apply_neo2_awk_hack.sh +# COPY ./apply_neo2_awk_hack.sh /app/apply_neo2_awk_hack.sh +# RUN /app/apply_neo2_awk_hack.sh +# RUN rm /app/apply_neo2_awk_hack.sh ENTRYPOINT ["/app/idea-IU-233.13135.103/bin/jetbrains_client.sh"] diff --git a/pkgs/jetbrains-client/apply_neo2_awk_hack.sh b/pkgs/jetbrains-client/apply_neo2_awk_hack.sh index a249dd1..c888902 100755 --- a/pkgs/jetbrains-client/apply_neo2_awk_hack.sh +++ b/pkgs/jetbrains-client/apply_neo2_awk_hack.sh @@ -2,12 +2,12 @@ IDEA_PATH="/app/idea-IU-233.13135.103" -EXECUTABLES=("jetbrains_client" "idea") +EXECUTABLES=("jetbrains_client") # "idea") mkdir /home/user/.ideaNeo wget -O /home/user/.ideaNeo/neo2-awt-hack-0.5.jar "https://github.com/chenkelmann/neo2-awt-hack/blob/master/releases/neo2-awt-hack-0.5-java8oracle.jar?raw=true" -echo "sha256-/2OGd2Nl7tRqkB73LJjLXMlRwFHwOdX9cnXRk5BP3S8= neo2-awt-hack-0.5.jar" | sha256sum -c +# echo "sha256 -/2OGd2Nl7tRqkB73LJjLXMlRwFHwOdX9cnXRk5BP3S8= neo2-awt-hack-0.5.jar" | sha256sum -c for EXECUTABLE in "${EXECUTABLES[@]}"; do @@ -24,5 +24,5 @@ for EXECUTABLE in "${EXECUTABLES[@]}"; do cat temp_last_lines.txt >> "$IDEA_PATH/bin/$EXECUTABLE.sh" # cleanup - rm temp_last_lines.txt + # rm temp_last_lines.txt done diff --git a/pkgs/jetbrains-override-neo2.nix b/pkgs/jetbrains-override-neo2.nix index b2345b8..8d6cdac 100644 --- a/pkgs/jetbrains-override-neo2.nix +++ b/pkgs/jetbrains-override-neo2.nix @@ -1,4 +1,4 @@ -{ fetchurl, jetbrains }: +{ fetchurl, jetbrains, lib }: let neo2AwtHackJar = fetchurl { @@ -32,5 +32,14 @@ in { idea-ultimate = jetbrains.idea-ultimate.overrideAttrs (overrideFn "idea-ultimate" "idea"); - clion = jetbrains.clion.overrideAttrs (overrideFn "clion" "clion"); + # clion = jetbrains.clion.overrideAttrs (overrideFn "clion" "clion"); + + + clion = let + clionWithNeo2AwtHack = jetbrains.clion.overrideAttrs (overrideFn "clion" "clion"); + in lib.overrideDerivation clionWithNeo2AwtHack (oldAttrs: { + buildInputs = oldAttrs.buildInputs or [ ] ++ [ (jetbrains.plugins.addPlugins jetbrains.clion [ + # "github-copilot" + ]) ]; + }); }