From 010665a5c950c91c0d0ed553fce5a59b777b988e Mon Sep 17 00:00:00 2001 From: xeals Date: Mon, 25 Jan 2021 15:26:57 +1100 Subject: [PATCH] jetbrains: add update script wrapper The main script only does a single program, and requires being fed the name. This is a wrapper to get those names. --- .../editors/jetbrains/update-jetbrains | 12 +++++++++ .../editors/jetbrains/updater.nix | 26 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100755 pkgs/applications/editors/jetbrains/update-jetbrains create mode 100644 pkgs/applications/editors/jetbrains/updater.nix diff --git a/pkgs/applications/editors/jetbrains/update-jetbrains b/pkgs/applications/editors/jetbrains/update-jetbrains new file mode 100755 index 0000000..398f4bb --- /dev/null +++ b/pkgs/applications/editors/jetbrains/update-jetbrains @@ -0,0 +1,12 @@ +#!/usr/bin/env nix-shell +#!nix-shell --show-trace ./updater.nix -i bash + +set -e + +for app in $APPS; do + ./updater-jetbrains $app -o ${app#-[0-9.]*}-generated.nix +done + +# Local Variables: +# mode: sh +# End: diff --git a/pkgs/applications/editors/jetbrains/updater.nix b/pkgs/applications/editors/jetbrains/updater.nix new file mode 100644 index 0000000..5456e9c --- /dev/null +++ b/pkgs/applications/editors/jetbrains/updater.nix @@ -0,0 +1,26 @@ +{ pkgs ? import { } }: +let + inherit (pkgs.stdenv) lib; +in +pkgs.mkShell { + buildInputs = [ + pkgs.bash + ]; + + APPS = lib.mapAttrsToList + (k: v: v.name) + { + inherit (pkgs.jetbrains) + clion + datagrip + goland + idea-community + idea-ultimate + phpstorm + pycharm-community + pycharm-professional + rider + ruby-mine + webstorm; + }; +}