Compare commits
3 Commits
eae2921ae2
...
8090f42cc2
Author | SHA1 | Date | |
---|---|---|---|
8090f42cc2 | |||
c67b2c2b0e | |||
af57ecdd22 |
File diff suppressed because it is too large
Load Diff
12
pkgs/applications/editors/jetbrains/update-jetbrains
Executable file
12
pkgs/applications/editors/jetbrains/update-jetbrains
Executable file
@ -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:
|
@ -7,6 +7,7 @@ import re
|
||||
import requests
|
||||
import subprocess as sp
|
||||
import sys
|
||||
import unicodedata
|
||||
import urllib
|
||||
|
||||
from lxml import etree
|
||||
@ -35,6 +36,7 @@ def to_slug(name):
|
||||
slug = name.replace(" ", "-").lstrip(".")
|
||||
for char in ",/;'\\<>:\"|!@#$%^&*()":
|
||||
slug = slug.replace(char, "")
|
||||
slug = unicodedata.normalize("NFD", slug).encode("ascii", "ignore").decode("utf-8")
|
||||
return slug
|
||||
|
||||
|
||||
@ -195,8 +197,10 @@ def prefetch(plugin, build, url=None):
|
||||
["nix-prefetch-url", "--name", plugin.filename(), url], capture_output=True,
|
||||
)
|
||||
if not res.stdout:
|
||||
raise IOError(f"nix-prefetch-url {plugin} failed: {res.stderr.decode('utf-8')}")
|
||||
return res.stdout.decode("utf-8").strip()
|
||||
raise IOError(
|
||||
f"nix-prefetch-url {plugin} failed: {res.stderr.decode('unicode-escape')}"
|
||||
)
|
||||
return res.stdout.decode("unicode-escape").strip()
|
||||
|
||||
|
||||
def custom_license(short, full, url, free=False):
|
||||
|
26
pkgs/applications/editors/jetbrains/updater.nix
Normal file
26
pkgs/applications/editors/jetbrains/updater.nix
Normal file
@ -0,0 +1,26 @@
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
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;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user