Compare commits
	
		
			2 Commits
		
	
	
		
			jetbrains
			...
			144bde0c6d
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						
						
							
						
						144bde0c6d
	
				 | 
					
					
						|||
| 
						
						
							
						
						ea98e965cb
	
				 | 
					
					
						
@@ -7,7 +7,6 @@ import re
 | 
				
			|||||||
import requests
 | 
					import requests
 | 
				
			||||||
import subprocess as sp
 | 
					import subprocess as sp
 | 
				
			||||||
import sys
 | 
					import sys
 | 
				
			||||||
import unicodedata
 | 
					 | 
				
			||||||
import urllib
 | 
					import urllib
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from lxml import etree
 | 
					from lxml import etree
 | 
				
			||||||
@@ -36,7 +35,6 @@ def to_slug(name):
 | 
				
			|||||||
    slug = name.replace(" ", "-").lstrip(".")
 | 
					    slug = name.replace(" ", "-").lstrip(".")
 | 
				
			||||||
    for char in ",/;'\\<>:\"|!@#$%^&*()":
 | 
					    for char in ",/;'\\<>:\"|!@#$%^&*()":
 | 
				
			||||||
        slug = slug.replace(char, "")
 | 
					        slug = slug.replace(char, "")
 | 
				
			||||||
    slug = unicodedata.normalize("NFD", slug).encode("ascii", "ignore").decode("utf-8")
 | 
					 | 
				
			||||||
    return slug
 | 
					    return slug
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -197,10 +195,8 @@ def prefetch(plugin, build, url=None):
 | 
				
			|||||||
        ["nix-prefetch-url", "--name", plugin.filename(), url], capture_output=True,
 | 
					        ["nix-prefetch-url", "--name", plugin.filename(), url], capture_output=True,
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
    if not res.stdout:
 | 
					    if not res.stdout:
 | 
				
			||||||
        raise IOError(
 | 
					        raise IOError(f"nix-prefetch-url {plugin} failed: {res.stderr.decode('utf-8')}")
 | 
				
			||||||
            f"nix-prefetch-url {plugin} failed: {res.stderr.decode('unicode-escape')}"
 | 
					    return res.stdout.decode("utf-8").strip()
 | 
				
			||||||
        )
 | 
					 | 
				
			||||||
    return res.stdout.decode("unicode-escape").strip()
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def custom_license(short, full, url, free=False):
 | 
					def custom_license(short, full, url, free=False):
 | 
				
			||||||
							
								
								
									
										41
									
								
								pkgs/applications/editors/jetbrains/common-plugins.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								pkgs/applications/editors/jetbrains/common-plugins.nix
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,41 @@
 | 
				
			|||||||
 | 
					{ lib, stdenv, fetchzip }:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					self:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					let
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  commonBuild = import ../../../build-support/jetbrains/plugin.nix {
 | 
				
			||||||
 | 
					    inherit lib stdenv fetchzip;
 | 
				
			||||||
 | 
					    jetbrainsPlatforms = [
 | 
				
			||||||
 | 
					      "clion"
 | 
				
			||||||
 | 
					      "datagrip"
 | 
				
			||||||
 | 
					      "goland"
 | 
				
			||||||
 | 
					      "idea-community"
 | 
				
			||||||
 | 
					      "idea-ultimate"
 | 
				
			||||||
 | 
					      "phpstorm"
 | 
				
			||||||
 | 
					      "pycharm-community"
 | 
				
			||||||
 | 
					      "pycharm-professional"
 | 
				
			||||||
 | 
					      "rider"
 | 
				
			||||||
 | 
					      "ruby-mine"
 | 
				
			||||||
 | 
					      "webstorm"
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  generateCommon = lib.makeOverridable ({
 | 
				
			||||||
 | 
					    common ? ./manual-common-packages.nix
 | 
				
			||||||
 | 
					  }: let
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    imported = import common {
 | 
				
			||||||
 | 
					      inherit (self) callPackage;
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    super = imported;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    overrides = { };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    jetbrainsPlugins = super // overrides;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  in jetbrainsPlugins // { inherit commonBuild; });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					in generateCommon { }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -1,12 +0,0 @@
 | 
				
			|||||||
#!/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:
 | 
					 | 
				
			||||||
@@ -1,26 +0,0 @@
 | 
				
			|||||||
{ 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;
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -39,7 +39,7 @@ runCommand
 | 
				
			|||||||
  for plugin in $plugins; do
 | 
					  for plugin in $plugins; do
 | 
				
			||||||
    local pluginName=$(basename $plugin)
 | 
					    local pluginName=$(basename $plugin)
 | 
				
			||||||
    pluginName=''${pluginName#*-}
 | 
					    pluginName=''${pluginName#*-}
 | 
				
			||||||
    pluginName=''${pluginName%-[0-9.]*}
 | 
					    pluginName=''${pluginName%-([0-9].)*}
 | 
				
			||||||
    ln -s $plugin $out/$packageName/plugins/$pluginName
 | 
					    ln -s $plugin $out/$packageName/plugins/$pluginName
 | 
				
			||||||
  done
 | 
					  done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user