diff options
Diffstat (limited to 'pkgs/applications/editors/jetbrains/default.nix')
-rw-r--r-- | pkgs/applications/editors/jetbrains/default.nix | 147 |
1 files changed, 76 insertions, 71 deletions
diff --git a/pkgs/applications/editors/jetbrains/default.nix b/pkgs/applications/editors/jetbrains/default.nix index 5f4700c1662..b47c1270790 100644 --- a/pkgs/applications/editors/jetbrains/default.nix +++ b/pkgs/applications/editors/jetbrains/default.nix @@ -10,7 +10,18 @@ with lib; let - mkJetBrainsProduct = callPackage ./common.nix { inherit vmopts; }; + platforms = lib.platforms.linux ++ [ "x86_64-darwin" "aarch64-darwin" ]; + ideaPlatforms = [ "x86_64-darwin" "i686-darwin" "i686-linux" "x86_64-linux" "aarch64-darwin" ]; + + inherit (stdenv.hostPlatform) system; + + versions = builtins.fromJSON (readFile (./versions.json)); + versionKey = if stdenv.isLinux then "linux" else system; + products = versions.${versionKey} or (throw "Unsupported system: ${system}"); + + package = if stdenv.isDarwin then ./darwin.nix else ./linux.nix; + mkJetBrainsProduct = callPackage package { inherit vmopts; }; + # Sorted alphabetically buildClion = { name, version, src, license, description, wmClass, ... }: @@ -19,13 +30,12 @@ let product = "CLion"; meta = with lib; { homepage = "https://www.jetbrains.com/clion/"; - inherit description license; + inherit description license platforms; longDescription = '' Enhancing productivity for every C and C++ developer on Linux, macOS and Windows. ''; maintainers = with maintainers; [ edwtjo mic92 ]; - platforms = platforms.linux; }; }).overrideAttrs (attrs: { nativeBuildInputs = (attrs.nativeBuildInputs or []) ++ optionals (stdenv.isLinux) [ @@ -58,14 +68,13 @@ let product = "DataGrip"; meta = with lib; { homepage = "https://www.jetbrains.com/datagrip/"; - inherit description license; + inherit description license platforms; longDescription = '' DataGrip is a new IDE from JetBrains built for database admins. It allows you to quickly migrate and refactor relational databases, construct efficient, statically checked SQL queries and much more. ''; maintainers = with maintainers; [ ]; - platforms = platforms.linux; }; }); @@ -75,7 +84,7 @@ let product = "Goland"; meta = with lib; { homepage = "https://www.jetbrains.com/go/"; - inherit description license; + inherit description license platforms; longDescription = '' Goland is the codename for a new commercial IDE by JetBrains aimed at providing an ergonomic environment for Go development. @@ -83,10 +92,9 @@ let and tool integrations specific for the Go language ''; maintainers = [ maintainers.miltador ]; - platforms = platforms.linux; }; }).overrideAttrs (attrs: { - postFixup = (attrs.postFixup or "") + '' + postFixup = (attrs.postFixup or "") + lib.optionalString stdenv.isLinux '' interp="$(cat $NIX_CC/nix-support/dynamic-linker)" patchelf --set-interpreter $interp $out/goland*/plugins/go/lib/dlv/linux/dlv @@ -98,10 +106,10 @@ let ''; }); - buildIdea = { name, version, src, license, description, wmClass, ... }: + buildIdea = { name, version, src, license, description, wmClass, product, ... }: (mkJetBrainsProduct { - inherit name version src wmClass jdk; - product = "IDEA"; + inherit name version src wmClass jdk product; + productShort = "IDEA"; extraLdPath = [ zlib ]; extraWrapperArgs = [ ''--set M2_HOME "${maven}/maven"'' @@ -116,18 +124,18 @@ let with JUnit, TestNG, popular SCMs, Ant & Maven. Also known as IntelliJ. ''; - maintainers = with maintainers; [ edwtjo gytis-ivaskevicius ]; - platforms = [ "x86_64-darwin" "i686-darwin" "i686-linux" "x86_64-linux" ]; + maintainers = with maintainers; [ edwtjo gytis-ivaskevicius steinybot ]; + platforms = ideaPlatforms; }; }); - buildMps = { name, version, src, license, description, wmClass, ... }: + buildMps = { name, version, src, license, description, wmClass, product, ... }: (mkJetBrainsProduct rec { - inherit name version src wmClass jdk; - product = "MPS"; + inherit name version src wmClass jdk product; + productShort = "MPS"; meta = with lib; { homepage = "https://www.jetbrains.com/mps/"; - inherit license description; + inherit license description platforms; longDescription = '' A metaprogramming system which uses projectional editing which allows users to overcome the limits of language @@ -135,7 +143,6 @@ let diagrams. ''; maintainers = with maintainers; [ rasendubi ]; - platforms = platforms.linux; }; }); @@ -145,24 +152,23 @@ let product = "PhpStorm"; meta = with lib; { homepage = "https://www.jetbrains.com/phpstorm/"; - inherit description license; + inherit description license platforms; longDescription = '' PhpStorm provides an editor for PHP, HTML and JavaScript with on-the-fly code analysis, error prevention and automated refactorings for PHP and JavaScript code. ''; maintainers = with maintainers; [ schristo ma27 ]; - platforms = platforms.linux; }; }); - buildPycharm = { name, version, src, license, description, wmClass, ... }: + buildPycharm = { name, version, src, license, description, wmClass, product, ... }: (mkJetBrainsProduct { - inherit name version src wmClass jdk; - product = "PyCharm"; + inherit name version src wmClass jdk product; + productShort = "PyCharm"; meta = with lib; { homepage = "https://www.jetbrains.com/pycharm/"; - inherit description license; + inherit description license platforms; longDescription = '' Python IDE with complete set of tools for productive development with Python programming language. In addition, the @@ -177,11 +183,8 @@ let and productive development! ''; maintainers = with maintainers; [ ]; - platforms = platforms.linux; }; - }).override { - propagatedUserEnvPkgs = [ python3 ]; - }; + }); buildRider = { name, version, src, license, description, wmClass, ... }: (mkJetBrainsProduct { @@ -189,7 +192,7 @@ let product = "Rider"; meta = with lib; { homepage = "https://www.jetbrains.com/rider/"; - inherit description license; + inherit description license platforms; longDescription = '' JetBrains Rider is a new .NET IDE based on the IntelliJ platform and ReSharper. Rider supports .NET Core, @@ -199,7 +202,6 @@ let ASP.NET Core web applications. ''; maintainers = [ maintainers.miltador ]; - platforms = platforms.linux; }; }).overrideAttrs (attrs: { postPatch = lib.optionalString (!stdenv.isDarwin) (attrs.postPatch + '' @@ -215,10 +217,9 @@ let product = "RubyMine"; meta = with lib; { homepage = "https://www.jetbrains.com/ruby/"; - inherit description license; + inherit description license platforms; longDescription = description; maintainers = with maintainers; [ edwtjo ]; - platforms = platforms.linux; }; }); @@ -228,14 +229,13 @@ let product = "WebStorm"; meta = with lib; { homepage = "https://www.jetbrains.com/webstorm/"; - inherit description license; + inherit description license platforms; longDescription = '' WebStorm provides an editor for HTML, JavaScript (incl. Node.js), and CSS with on-the-fly code analysis, error prevention and automated refactorings for JavaScript code. ''; maintainers = with maintainers; [ abaldeau ]; - platforms = platforms.linux; }; }).overrideAttrs (attrs: { postPatch = (attrs.postPatch or "") + optionalString (stdenv.isLinux) '' @@ -244,6 +244,7 @@ let rm -r jbr ''; }); + in { @@ -251,12 +252,12 @@ in clion = buildClion rec { name = "clion-${version}"; - version = "2021.3.3"; /* updated by script */ + version = products.clion.version; description = "C/C++ IDE. New. Intelligent. Cross-platform"; license = lib.licenses.unfree; src = fetchurl { - url = "https://download.jetbrains.com/cpp/CLion-${version}.tar.gz"; - sha256 = "03gil00srq3jljc13iyb7v1yc6l6yhdhqm9d1ld2j2pympl6p61m"; /* updated by script */ + url = products.clion.url; + sha256 = products.clion.sha256; }; wmClass = "jetbrains-clion"; update-channel = "CLion RELEASE"; # channel's id as in http://www.jetbrains.com/updates/updates.xml @@ -264,12 +265,12 @@ in datagrip = buildDataGrip rec { name = "datagrip-${version}"; - version = "2021.3.4"; /* updated by script */ + version = products.datagrip.version; description = "Your Swiss Army Knife for Databases and SQL"; license = lib.licenses.unfree; src = fetchurl { - url = "https://download.jetbrains.com/datagrip/${name}.tar.gz"; - sha256 = "09dkxj5vn99gkgc1yd18w7gqkw2vzci0z9q2fcih0zn7lvqp0im3"; /* updated by script */ + url = products.datagrip.url; + sha256 = products.datagrip.sha256; }; wmClass = "jetbrains-datagrip"; update-channel = "DataGrip RELEASE"; @@ -277,12 +278,12 @@ in goland = buildGoland rec { name = "goland-${version}"; - version = "2021.3.3"; /* updated by script */ + version = products.goland.version; description = "Up and Coming Go IDE"; license = lib.licenses.unfree; src = fetchurl { - url = "https://download.jetbrains.com/go/${name}.tar.gz"; - sha256 = "18z4mvxhds5fgdwcfywc4pj8s9ifvsknhradgzmxsvji0fbp0awx"; /* updated by script */ + url = products.goland.url; + sha256 = products.goland.sha256; }; wmClass = "jetbrains-goland"; update-channel = "GoLand RELEASE"; @@ -290,12 +291,13 @@ in idea-community = buildIdea rec { name = "idea-community-${version}"; - version = "2021.3.2"; /* updated by script */ + product = "IntelliJ IDEA CE"; + version = products.idea-community.version; description = "Integrated Development Environment (IDE) by Jetbrains, community edition"; license = lib.licenses.asl20; src = fetchurl { - url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz"; - sha256 = "1j889b2r950bl9wiqq1z8v8s2qicidfcdar300cy666i8rc25qlr"; /* updated by script */ + url = products.idea-community.url; + sha256 = products.idea-community.sha256; }; wmClass = "jetbrains-idea-ce"; update-channel = "IntelliJ IDEA RELEASE"; @@ -303,12 +305,13 @@ in idea-ultimate = buildIdea rec { name = "idea-ultimate-${version}"; - version = "2021.3.2"; /* updated by script */ + product = "IntelliJ IDEA"; + version = products.idea-ultimate.version; description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license"; license = lib.licenses.unfree; src = fetchurl { - url = "https://download.jetbrains.com/idea/ideaIU-${version}-no-jbr.tar.gz"; - sha256 = "0w36qnqgkvw6j1ks09h515237bhqfaixrimzg2r494ic98amvkps"; /* updated by script */ + url = products.idea-ultimate.url; + sha256 = products.idea-ultimate.sha256; }; wmClass = "jetbrains-idea"; update-channel = "IntelliJ IDEA RELEASE"; @@ -316,13 +319,13 @@ in mps = buildMps rec { name = "mps-${version}"; - version = "2021.3"; /* updated by script */ - versionMajorMinor = "2021.3"; /* updated by script */ + product = "MPS ${products.mps.version-major-minor}"; + version = products.mps.version; description = "Create your own domain-specific language"; license = lib.licenses.asl20; src = fetchurl { - url = "https://download.jetbrains.com/mps/${versionMajorMinor}/MPS-${version}.tar.gz"; - sha256 = "0zw5xqdlhjfg0smfjl8xy7drf9spiwqbmqq8z22x4zb61lpvdbp9"; /* updated by script */ + url = products.mps.url; + sha256 = products.mps.sha256; }; wmClass = "jetbrains-mps"; update-channel = "MPS RELEASE"; @@ -330,12 +333,12 @@ in phpstorm = buildPhpStorm rec { name = "phpstorm-${version}"; - version = "2021.3.2"; /* updated by script */ + version = products.phpstorm.version; description = "Professional IDE for Web and PHP developers"; license = lib.licenses.unfree; src = fetchurl { - url = "https://download.jetbrains.com/webide/PhpStorm-${version}.tar.gz"; - sha256 = "1qi0zq3gzcfnikky37g2dqgmzm7r1883k6asris8nph389qk86vn"; /* updated by script */ + url = products.phpstorm.url; + sha256 = products.phpstorm.sha256; }; wmClass = "jetbrains-phpstorm"; update-channel = "PhpStorm RELEASE"; @@ -343,12 +346,13 @@ in pycharm-community = buildPycharm rec { name = "pycharm-community-${version}"; - version = "2021.3.2"; /* updated by script */ + product = "PyCharm CE"; + version = products.pycharm-community.version; description = "PyCharm Community Edition"; license = lib.licenses.asl20; src = fetchurl { - url = "https://download.jetbrains.com/python/${name}.tar.gz"; - sha256 = "1s36basydp7cxgbgdapjhkslx0x9vv3639xhm84ny76hf7s03bpi"; /* updated by script */ + url = products.pycharm-community.url; + sha256 = products.pycharm-community.sha256; }; wmClass = "jetbrains-pycharm-ce"; update-channel = "PyCharm RELEASE"; @@ -356,12 +360,13 @@ in pycharm-professional = buildPycharm rec { name = "pycharm-professional-${version}"; - version = "2021.3.2"; /* updated by script */ + product = "PyCharm"; + version = products.pycharm-professional.version; description = "PyCharm Professional Edition"; license = lib.licenses.unfree; src = fetchurl { - url = "https://download.jetbrains.com/python/${name}.tar.gz"; - sha256 = "0rwykngqgby05mh47kls8wzi68gfka2z04k6kdmsxwn1hhx5gnbb"; /* updated by script */ + url = products.pycharm-professional.url; + sha256 = products.pycharm-professional.sha256; }; wmClass = "jetbrains-pycharm"; update-channel = "PyCharm RELEASE"; @@ -369,12 +374,12 @@ in rider = buildRider rec { name = "rider-${version}"; - version = "2021.3.3"; /* updated by script */ + version = products.rider.version; description = "A cross-platform .NET IDE based on the IntelliJ platform and ReSharper"; license = lib.licenses.unfree; src = fetchurl { - url = "https://download.jetbrains.com/rider/JetBrains.Rider-${version}.tar.gz"; - sha256 = "13q6hk5l3fqmz818z5wj014jd5iglpdcpi8zlpgaim1jg5fpvi8x"; /* updated by script */ + url = products.rider.url; + sha256 = products.rider.sha256; }; wmClass = "jetbrains-rider"; update-channel = "Rider RELEASE"; @@ -382,12 +387,12 @@ in ruby-mine = buildRubyMine rec { name = "ruby-mine-${version}"; - version = "2021.3.2"; /* updated by script */ + version = products.ruby-mine.version; description = "The Most Intelligent Ruby and Rails IDE"; license = lib.licenses.unfree; src = fetchurl { - url = "https://download.jetbrains.com/ruby/RubyMine-${version}.tar.gz"; - sha256 = "18ny40zl9hgkynkc5yyy2xqngl9diifh2gqrfnz7rfq14kp10xb9"; /* updated by script */ + url = products.ruby-mine.url; + sha256 = products.ruby-mine.sha256; }; wmClass = "jetbrains-rubymine"; update-channel = "RubyMine RELEASE"; @@ -395,12 +400,12 @@ in webstorm = buildWebStorm rec { name = "webstorm-${version}"; - version = "2021.3.2"; /* updated by script */ + version = products.webstorm.version; description = "Professional IDE for Web and JavaScript development"; license = lib.licenses.unfree; src = fetchurl { - url = "https://download.jetbrains.com/webstorm/WebStorm-${version}.tar.gz"; - sha256 = "0q2hn48499hv7licpl84ly0bhiizya8a69dl2vjvgscj3cdkr98q"; /* updated by script */ + url = products.webstorm.url; + sha256 = products.webstorm.sha256; }; wmClass = "jetbrains-webstorm"; update-channel = "WebStorm RELEASE"; |