git.iko.soy/typeable/nixpkgs
on master help sign in
Merge master into staging-next
commit1630ab9b47ab303ea0589909e3d243081edf1101 authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> dateSun 13 Mar 2022, 06:05 (5 years ago) parent6f7d10405fa107
21 files changed+738−206
maintainers/maintainer-list.nix+6 nixos/doc/manual/from_md/release-notes/rl-2205.section.xml+10 nixos/doc/manual/release-notes/rl-2205.section.md+5 nixos/modules/services/web-servers/pomerium.nix+7−3 pkgs/applications/editors/jetbrains/darwin.nix+37 pkgs/applications/editors/jetbrains/default.nix+76−71 pkgs/applications/editors/jetbrains/common.nix → pkgs/applications/editors/jetbrains/linux.nix+6−8 pkgs/applications/editors/jetbrains/update.pl−101 pkgs/applications/editors/jetbrains/update.py+97 pkgs/applications/editors/jetbrains/versions.json+296 pkgs/applications/science/computer-architecture/qtrvsim/default.nix+30 pkgs/applications/virtualization/firecracker/default.nix+1−1 pkgs/applications/virtualization/flintlock/default.nix+49 pkgs/applications/virtualization/open-vm-tools/default.nix+20−5 pkgs/data/misc/v2ray-geoip/default.nix+3−3 pkgs/development/interpreters/guile/2.2.nix+2−2 pkgs/development/interpreters/guile/3.0.nix+23−5 pkgs/servers/http/pomerium/default.nix+5−5 pkgs/tools/networking/sockperf/default.nix+2−2 pkgs/tools/security/pomerium-cli/default.nix+58 pkgs/top-level/all-packages.nix+5
maintainers/maintainer-list.nix+6
@@ -5631,6 +5631,12 @@
56315631 github = "jduan";
56325632 githubId = 452450;
56335633 };
5634+ jdupak = {
5635+ name = "Jakub Dupak";
5636+ email = "dev@jakubdupak.com";
5637+ github = "jdupak";
5638+ githubId = 22683640;
5639+ };
56345640 jecaro = {
56355641 email = "jeancharles.quillet@gmail.com";
56365642 github = "jecaro";
nixos/doc/manual/from_md/release-notes/rl-2205.section.xml+10
@@ -1374,6 +1374,16 @@
13741374 warning.
13751375 </para>
13761376 </listitem>
1377+ <listitem>
1378+ <para>
1379+ The <literal>pomerium-cli</literal> command has been moved out
1380+ of the <literal>pomerium</literal> package into the
1381+ <literal>pomerium-cli</literal> package, following upstream’s
1382+ repository split. If you are using the
1383+ <literal>pomerium-cli</literal> command, you should now
1384+ install the <literal>pomerium-cli</literal> package.
1385+ </para>
1386+ </listitem>
13771387 <listitem>
13781388 <para>
13791389 The option
nixos/doc/manual/release-notes/rl-2205.section.md+5
@@ -503,6 +503,11 @@ In addition to numerous new and upgraded packages, this release has the followin
503503 Reason is that the old name has been deprecated upstream.
504504 Using the old option name will still work, but produce a warning.
505505
506+- The `pomerium-cli` command has been moved out of the `pomerium` package into
507+ the `pomerium-cli` package, following upstream's repository split. If you are
508+ using the `pomerium-cli` command, you should now install the `pomerium-cli`
509+ package.
510+
506511- The option
507512 [services.networking.networkmanager.enableFccUnlock](#opt-networking.networkmanager.enableFccUnlock)
508513 was added to support FCC unlock procedures. Since release 1.18.4, the ModemManager
nixos/modules/services/web-servers/pomerium.nix+7−3
@@ -69,11 +69,16 @@ in
6969 CERTIFICATE_KEY_FILE = "key.pem";
7070 };
7171 startLimitIntervalSec = 60;
72+ script = ''
73+ if [[ -v CREDENTIALS_DIRECTORY ]]; then
74+ cd "$CREDENTIALS_DIRECTORY"
75+ fi
76+ exec "${pkgs.pomerium}/bin/pomerium" -config "${cfgFile}"
77+ '';
7278
7379 serviceConfig = {
7480 DynamicUser = true;
7581 StateDirectory = [ "pomerium" ];
76− ExecStart = "${pkgs.pomerium}/bin/pomerium -config ${cfgFile}";
7782
7883 PrivateUsers = false; # breaks CAP_NET_BIND_SERVICE
7984 MemoryDenyWriteExecute = false; # breaks LuaJIT
@@ -99,7 +104,6 @@ in
99104 AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ];
100105 CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" ];
101106
102− WorkingDirectory = mkIf (cfg.useACMEHost != null) "$CREDENTIALS_DIRECTORY";
103107 LoadCredential = optionals (cfg.useACMEHost != null) [
104108 "fullchain.pem:/var/lib/acme/${cfg.useACMEHost}/fullchain.pem"
105109 "key.pem:/var/lib/acme/${cfg.useACMEHost}/key.pem"
@@ -124,7 +128,7 @@ in
124128 Type = "oneshot";
125129 TimeoutSec = 60;
126130 ExecCondition = "/run/current-system/systemd/bin/systemctl -q is-active pomerium.service";
127− ExecStart = "/run/current-system/systemd/bin/systemctl restart pomerium.service";
131+ ExecStart = "/run/current-system/systemd/bin/systemctl --no-block restart pomerium.service";
128132 };
129133 };
130134 });
pkgs/applications/editors/jetbrains/darwin.nixnew file+37
@@ -0,0 +1,37 @@
1+{ lib
2+, stdenvNoCC
3+, undmg
4+, ...
5+}:
6+
7+{ meta
8+, name
9+, product
10+, productShort ? product
11+, src
12+, version
13+, ...
14+}:
15+
16+let
17+ loname = lib.toLower productShort;
18+in
19+ stdenvNoCC.mkDerivation {
20+ inherit meta src version;
21+ desktopName = product;
22+ installPhase = ''
23+ runHook preInstall
24+ APP_DIR="$out/Applications/${product}.app"
25+ mkdir -p "$APP_DIR"
26+ cp -Tr "${product}.app" "$APP_DIR"
27+ mkdir -p "$out/bin"
28+ cat << EOF > "$out/bin/${loname}"
29+ open -na '$APP_DIR' --args "\$@"
30+ EOF
31+ chmod +x "$out/bin/${loname}"
32+ runHook postInstall
33+ '';
34+ nativeBuildInputs = [ undmg ];
35+ pname = lib.concatStringsSep "-" (lib.init (lib.splitString "-" name));
36+ sourceRoot = ".";
37+ }
pkgs/applications/editors/jetbrains/default.nix+76−71
@@ -10,7 +10,18 @@
1010with lib;
1111
1212let
13− mkJetBrainsProduct = callPackage ./common.nix { inherit vmopts; };
13+ platforms = lib.platforms.linux ++ [ "x86_64-darwin" "aarch64-darwin" ];
14+ ideaPlatforms = [ "x86_64-darwin" "i686-darwin" "i686-linux" "x86_64-linux" "aarch64-darwin" ];
15+
16+ inherit (stdenv.hostPlatform) system;
17+
18+ versions = builtins.fromJSON (readFile (./versions.json));
19+ versionKey = if stdenv.isLinux then "linux" else system;
20+ products = versions.${versionKey} or (throw "Unsupported system: ${system}");
21+
22+ package = if stdenv.isDarwin then ./darwin.nix else ./linux.nix;
23+ mkJetBrainsProduct = callPackage package { inherit vmopts; };
24+
1425 # Sorted alphabetically
1526
1627 buildClion = { name, version, src, license, description, wmClass, ... }:
@@ -19,13 +30,12 @@ let
1930 product = "CLion";
2031 meta = with lib; {
2132 homepage = "https://www.jetbrains.com/clion/";
22− inherit description license;
33+ inherit description license platforms;
2334 longDescription = ''
2435 Enhancing productivity for every C and C++
2536 developer on Linux, macOS and Windows.
2637 '';
2738 maintainers = with maintainers; [ edwtjo mic92 ];
28− platforms = platforms.linux;
2939 };
3040 }).overrideAttrs (attrs: {
3141 nativeBuildInputs = (attrs.nativeBuildInputs or []) ++ optionals (stdenv.isLinux) [
@@ -58,14 +68,13 @@ let
5868 product = "DataGrip";
5969 meta = with lib; {
6070 homepage = "https://www.jetbrains.com/datagrip/";
61− inherit description license;
71+ inherit description license platforms;
6272 longDescription = ''
6373 DataGrip is a new IDE from JetBrains built for database admins.
6474 It allows you to quickly migrate and refactor relational databases,
6575 construct efficient, statically checked SQL queries and much more.
6676 '';
6777 maintainers = with maintainers; [ ];
68− platforms = platforms.linux;
6978 };
7079 });
7180
@@ -75,7 +84,7 @@ let
7584 product = "Goland";
7685 meta = with lib; {
7786 homepage = "https://www.jetbrains.com/go/";
78− inherit description license;
87+ inherit description license platforms;
7988 longDescription = ''
8089 Goland is the codename for a new commercial IDE by JetBrains
8190 aimed at providing an ergonomic environment for Go development.
@@ -83,10 +92,9 @@ let
8392 and tool integrations specific for the Go language
8493 '';
8594 maintainers = [ maintainers.miltador ];
86− platforms = platforms.linux;
8795 };
8896 }).overrideAttrs (attrs: {
89− postFixup = (attrs.postFixup or "") + ''
97+ postFixup = (attrs.postFixup or "") + lib.optionalString stdenv.isLinux ''
9098 interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
9199 patchelf --set-interpreter $interp $out/goland*/plugins/go/lib/dlv/linux/dlv
92100
@@ -98,10 +106,10 @@ let
98106 '';
99107 });
100108
101− buildIdea = { name, version, src, license, description, wmClass, ... }:
109+ buildIdea = { name, version, src, license, description, wmClass, product, ... }:
102110 (mkJetBrainsProduct {
103− inherit name version src wmClass jdk;
104− product = "IDEA";
111+ inherit name version src wmClass jdk product;
112+ productShort = "IDEA";
105113 extraLdPath = [ zlib ];
106114 extraWrapperArgs = [
107115 ''--set M2_HOME "${maven}/maven"''
@@ -116,18 +124,18 @@ let
116124 with JUnit, TestNG, popular SCMs, Ant & Maven. Also known
117125 as IntelliJ.
118126 '';
119− maintainers = with maintainers; [ edwtjo gytis-ivaskevicius ];
120− platforms = [ "x86_64-darwin" "i686-darwin" "i686-linux" "x86_64-linux" ];
127+ maintainers = with maintainers; [ edwtjo gytis-ivaskevicius steinybot ];
128+ platforms = ideaPlatforms;
121129 };
122130 });
123131
124− buildMps = { name, version, src, license, description, wmClass, ... }:
132+ buildMps = { name, version, src, license, description, wmClass, product, ... }:
125133 (mkJetBrainsProduct rec {
126− inherit name version src wmClass jdk;
127− product = "MPS";
134+ inherit name version src wmClass jdk product;
135+ productShort = "MPS";
128136 meta = with lib; {
129137 homepage = "https://www.jetbrains.com/mps/";
130− inherit license description;
138+ inherit license description platforms;
131139 longDescription = ''
132140 A metaprogramming system which uses projectional editing
133141 which allows users to overcome the limits of language
@@ -135,7 +143,6 @@ let
135143 diagrams.
136144 '';
137145 maintainers = with maintainers; [ rasendubi ];
138− platforms = platforms.linux;
139146 };
140147 });
141148
@@ -145,24 +152,23 @@ let
145152 product = "PhpStorm";
146153 meta = with lib; {
147154 homepage = "https://www.jetbrains.com/phpstorm/";
148− inherit description license;
155+ inherit description license platforms;
149156 longDescription = ''
150157 PhpStorm provides an editor for PHP, HTML and JavaScript
151158 with on-the-fly code analysis, error prevention and
152159 automated refactorings for PHP and JavaScript code.
153160 '';
154161 maintainers = with maintainers; [ schristo ma27 ];
155− platforms = platforms.linux;
156162 };
157163 });
158164
159− buildPycharm = { name, version, src, license, description, wmClass, ... }:
165+ buildPycharm = { name, version, src, license, description, wmClass, product, ... }:
160166 (mkJetBrainsProduct {
161− inherit name version src wmClass jdk;
162− product = "PyCharm";
167+ inherit name version src wmClass jdk product;
168+ productShort = "PyCharm";
163169 meta = with lib; {
164170 homepage = "https://www.jetbrains.com/pycharm/";
165− inherit description license;
171+ inherit description license platforms;
166172 longDescription = ''
167173 Python IDE with complete set of tools for productive
168174 development with Python programming language. In addition, the
@@ -177,11 +183,8 @@ let
177183 and productive development!
178184 '';
179185 maintainers = with maintainers; [ ];
180− platforms = platforms.linux;
181186 };
182− }).override {
183− propagatedUserEnvPkgs = [ python3 ];
184− };
187+ });
185188
186189 buildRider = { name, version, src, license, description, wmClass, ... }:
187190 (mkJetBrainsProduct {
@@ -189,7 +192,7 @@ let
189192 product = "Rider";
190193 meta = with lib; {
191194 homepage = "https://www.jetbrains.com/rider/";
192− inherit description license;
195+ inherit description license platforms;
193196 longDescription = ''
194197 JetBrains Rider is a new .NET IDE based on the IntelliJ
195198 platform and ReSharper. Rider supports .NET Core,
@@ -199,7 +202,6 @@ let
199202 ASP.NET Core web applications.
200203 '';
201204 maintainers = [ maintainers.miltador ];
202− platforms = platforms.linux;
203205 };
204206 }).overrideAttrs (attrs: {
205207 postPatch = lib.optionalString (!stdenv.isDarwin) (attrs.postPatch + ''
@@ -215,10 +217,9 @@ let
215217 product = "RubyMine";
216218 meta = with lib; {
217219 homepage = "https://www.jetbrains.com/ruby/";
218− inherit description license;
220+ inherit description license platforms;
219221 longDescription = description;
220222 maintainers = with maintainers; [ edwtjo ];
221− platforms = platforms.linux;
222223 };
223224 });
224225
@@ -228,14 +229,13 @@ let
228229 product = "WebStorm";
229230 meta = with lib; {
230231 homepage = "https://www.jetbrains.com/webstorm/";
231− inherit description license;
232+ inherit description license platforms;
232233 longDescription = ''
233234 WebStorm provides an editor for HTML, JavaScript (incl. Node.js),
234235 and CSS with on-the-fly code analysis, error prevention and
235236 automated refactorings for JavaScript code.
236237 '';
237238 maintainers = with maintainers; [ abaldeau ];
238− platforms = platforms.linux;
239239 };
240240 }).overrideAttrs (attrs: {
241241 postPatch = (attrs.postPatch or "") + optionalString (stdenv.isLinux) ''
@@ -244,6 +244,7 @@ let
244244 rm -r jbr
245245 '';
246246 });
247+
247248in
248249
249250{
@@ -251,12 +252,12 @@ in
251252
252253 clion = buildClion rec {
253254 name = "clion-${version}";
254− version = "2021.3.3"; /* updated by script */
255+ version = products.clion.version;
255256 description = "C/C++ IDE. New. Intelligent. Cross-platform";
256257 license = lib.licenses.unfree;
257258 src = fetchurl {
258− url = "https://download.jetbrains.com/cpp/CLion-${version}.tar.gz";
259− sha256 = "03gil00srq3jljc13iyb7v1yc6l6yhdhqm9d1ld2j2pympl6p61m"; /* updated by script */
259+ url = products.clion.url;
260+ sha256 = products.clion.sha256;
260261 };
261262 wmClass = "jetbrains-clion";
262263 update-channel = "CLion RELEASE"; # channel's id as in http://www.jetbrains.com/updates/updates.xml
@@ -264,12 +265,12 @@ in
264265
265266 datagrip = buildDataGrip rec {
266267 name = "datagrip-${version}";
267− version = "2021.3.4"; /* updated by script */
268+ version = products.datagrip.version;
268269 description = "Your Swiss Army Knife for Databases and SQL";
269270 license = lib.licenses.unfree;
270271 src = fetchurl {
271− url = "https://download.jetbrains.com/datagrip/${name}.tar.gz";
272− sha256 = "09dkxj5vn99gkgc1yd18w7gqkw2vzci0z9q2fcih0zn7lvqp0im3"; /* updated by script */
272+ url = products.datagrip.url;
273+ sha256 = products.datagrip.sha256;
273274 };
274275 wmClass = "jetbrains-datagrip";
275276 update-channel = "DataGrip RELEASE";
@@ -277,12 +278,12 @@ in
277278
278279 goland = buildGoland rec {
279280 name = "goland-${version}";
280− version = "2021.3.3"; /* updated by script */
281+ version = products.goland.version;
281282 description = "Up and Coming Go IDE";
282283 license = lib.licenses.unfree;
283284 src = fetchurl {
284− url = "https://download.jetbrains.com/go/${name}.tar.gz";
285− sha256 = "18z4mvxhds5fgdwcfywc4pj8s9ifvsknhradgzmxsvji0fbp0awx"; /* updated by script */
285+ url = products.goland.url;
286+ sha256 = products.goland.sha256;
286287 };
287288 wmClass = "jetbrains-goland";
288289 update-channel = "GoLand RELEASE";
@@ -290,12 +291,13 @@ in
290291
291292 idea-community = buildIdea rec {
292293 name = "idea-community-${version}";
293− version = "2021.3.2"; /* updated by script */
294+ product = "IntelliJ IDEA CE";
295+ version = products.idea-community.version;
294296 description = "Integrated Development Environment (IDE) by Jetbrains, community edition";
295297 license = lib.licenses.asl20;
296298 src = fetchurl {
297− url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz";
298− sha256 = "1j889b2r950bl9wiqq1z8v8s2qicidfcdar300cy666i8rc25qlr"; /* updated by script */
299+ url = products.idea-community.url;
300+ sha256 = products.idea-community.sha256;
299301 };
300302 wmClass = "jetbrains-idea-ce";
301303 update-channel = "IntelliJ IDEA RELEASE";
@@ -303,12 +305,13 @@ in
303305
304306 idea-ultimate = buildIdea rec {
305307 name = "idea-ultimate-${version}";
306− version = "2021.3.2"; /* updated by script */
308+ product = "IntelliJ IDEA";
309+ version = products.idea-ultimate.version;
307310 description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license";
308311 license = lib.licenses.unfree;
309312 src = fetchurl {
310− url = "https://download.jetbrains.com/idea/ideaIU-${version}-no-jbr.tar.gz";
311− sha256 = "0w36qnqgkvw6j1ks09h515237bhqfaixrimzg2r494ic98amvkps"; /* updated by script */
313+ url = products.idea-ultimate.url;
314+ sha256 = products.idea-ultimate.sha256;
312315 };
313316 wmClass = "jetbrains-idea";
314317 update-channel = "IntelliJ IDEA RELEASE";
@@ -316,13 +319,13 @@ in
316319
317320 mps = buildMps rec {
318321 name = "mps-${version}";
319− version = "2021.3"; /* updated by script */
320− versionMajorMinor = "2021.3"; /* updated by script */
322+ product = "MPS ${products.mps.version-major-minor}";
323+ version = products.mps.version;
321324 description = "Create your own domain-specific language";
322325 license = lib.licenses.asl20;
323326 src = fetchurl {
324− url = "https://download.jetbrains.com/mps/${versionMajorMinor}/MPS-${version}.tar.gz";
325− sha256 = "0zw5xqdlhjfg0smfjl8xy7drf9spiwqbmqq8z22x4zb61lpvdbp9"; /* updated by script */
327+ url = products.mps.url;
328+ sha256 = products.mps.sha256;
326329 };
327330 wmClass = "jetbrains-mps";
328331 update-channel = "MPS RELEASE";
@@ -330,12 +333,12 @@ in
330333
331334 phpstorm = buildPhpStorm rec {
332335 name = "phpstorm-${version}";
333− version = "2021.3.2"; /* updated by script */
336+ version = products.phpstorm.version;
334337 description = "Professional IDE for Web and PHP developers";
335338 license = lib.licenses.unfree;
336339 src = fetchurl {
337− url = "https://download.jetbrains.com/webide/PhpStorm-${version}.tar.gz";
338− sha256 = "1qi0zq3gzcfnikky37g2dqgmzm7r1883k6asris8nph389qk86vn"; /* updated by script */
340+ url = products.phpstorm.url;
341+ sha256 = products.phpstorm.sha256;
339342 };
340343 wmClass = "jetbrains-phpstorm";
341344 update-channel = "PhpStorm RELEASE";
@@ -343,12 +346,13 @@ in
343346
344347 pycharm-community = buildPycharm rec {
345348 name = "pycharm-community-${version}";
346− version = "2021.3.2"; /* updated by script */
349+ product = "PyCharm CE";
350+ version = products.pycharm-community.version;
347351 description = "PyCharm Community Edition";
348352 license = lib.licenses.asl20;
349353 src = fetchurl {
350− url = "https://download.jetbrains.com/python/${name}.tar.gz";
351− sha256 = "1s36basydp7cxgbgdapjhkslx0x9vv3639xhm84ny76hf7s03bpi"; /* updated by script */
354+ url = products.pycharm-community.url;
355+ sha256 = products.pycharm-community.sha256;
352356 };
353357 wmClass = "jetbrains-pycharm-ce";
354358 update-channel = "PyCharm RELEASE";
@@ -356,12 +360,13 @@ in
356360
357361 pycharm-professional = buildPycharm rec {
358362 name = "pycharm-professional-${version}";
359− version = "2021.3.2"; /* updated by script */
363+ product = "PyCharm";
364+ version = products.pycharm-professional.version;
360365 description = "PyCharm Professional Edition";
361366 license = lib.licenses.unfree;
362367 src = fetchurl {
363− url = "https://download.jetbrains.com/python/${name}.tar.gz";
364− sha256 = "0rwykngqgby05mh47kls8wzi68gfka2z04k6kdmsxwn1hhx5gnbb"; /* updated by script */
368+ url = products.pycharm-professional.url;
369+ sha256 = products.pycharm-professional.sha256;
365370 };
366371 wmClass = "jetbrains-pycharm";
367372 update-channel = "PyCharm RELEASE";
@@ -369,12 +374,12 @@ in
369374
370375 rider = buildRider rec {
371376 name = "rider-${version}";
372− version = "2021.3.3"; /* updated by script */
377+ version = products.rider.version;
373378 description = "A cross-platform .NET IDE based on the IntelliJ platform and ReSharper";
374379 license = lib.licenses.unfree;
375380 src = fetchurl {
376− url = "https://download.jetbrains.com/rider/JetBrains.Rider-${version}.tar.gz";
377− sha256 = "13q6hk5l3fqmz818z5wj014jd5iglpdcpi8zlpgaim1jg5fpvi8x"; /* updated by script */
381+ url = products.rider.url;
382+ sha256 = products.rider.sha256;
378383 };
379384 wmClass = "jetbrains-rider";
380385 update-channel = "Rider RELEASE";
@@ -382,12 +387,12 @@ in
382387
383388 ruby-mine = buildRubyMine rec {
384389 name = "ruby-mine-${version}";
385− version = "2021.3.2"; /* updated by script */
390+ version = products.ruby-mine.version;
386391 description = "The Most Intelligent Ruby and Rails IDE";
387392 license = lib.licenses.unfree;
388393 src = fetchurl {
389− url = "https://download.jetbrains.com/ruby/RubyMine-${version}.tar.gz";
390− sha256 = "18ny40zl9hgkynkc5yyy2xqngl9diifh2gqrfnz7rfq14kp10xb9"; /* updated by script */
394+ url = products.ruby-mine.url;
395+ sha256 = products.ruby-mine.sha256;
391396 };
392397 wmClass = "jetbrains-rubymine";
393398 update-channel = "RubyMine RELEASE";
@@ -395,12 +400,12 @@ in
395400
396401 webstorm = buildWebStorm rec {
397402 name = "webstorm-${version}";
398− version = "2021.3.2"; /* updated by script */
403+ version = products.webstorm.version;
399404 description = "Professional IDE for Web and JavaScript development";
400405 license = lib.licenses.unfree;
401406 src = fetchurl {
402− url = "https://download.jetbrains.com/webstorm/WebStorm-${version}.tar.gz";
403− sha256 = "0q2hn48499hv7licpl84ly0bhiizya8a69dl2vjvgscj3cdkr98q"; /* updated by script */
407+ url = products.webstorm.url;
408+ sha256 = products.webstorm.sha256;
404409 };
405410 wmClass = "jetbrains-webstorm";
406411 update-channel = "WebStorm RELEASE";
pkgs/applications/editors/jetbrains/common.nix → pkgs/applications/editors/jetbrains/linux.nixrenamed+6−8
@@ -3,17 +3,15 @@
33, vmopts ? null
44}:
55
6−{ name, product, version, src, wmClass, jdk, meta, extraLdPath ? [], extraWrapperArgs ? [] }@args:
6+{ name, product, productShort ? product, version, src, wmClass, jdk, meta, extraLdPath ? [], extraWrapperArgs ? [] }@args:
77
88with lib;
99
10−let loName = toLower product;
11− hiName = toUpper product;
10+let loName = toLower productShort;
11+ hiName = toUpper productShort;
1212 mainProgram = concatStringsSep "-" (init (splitString "-" name));
1313 vmoptsName = loName
14− + ( if (with stdenv.hostPlatform; (is32bit || isDarwin))
15− then ""
16− else "64" )
14+ + lib.optionalString stdenv.hostPlatform.is64bit "64"
1715 + ".vmoptions";
1816in
1917
@@ -36,7 +34,7 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
3634
3735 nativeBuildInputs = [ makeWrapper patchelf unzip ];
3836
39− postPatch = lib.optionalString (!stdenv.isDarwin) ''
37+ postPatch = ''
4038 get_file_size() {
4139 local fname="$1"
4240 echo $(ls -l $fname | cut -d ' ' -f5)
@@ -73,7 +71,7 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
7371 item=${desktopItem}
7472
7573 makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${mainProgram}" \
76− --prefix PATH : "$out/libexec/${name}:${lib.optionalString (stdenv.isDarwin) "${jdk}/jdk/Contents/Home/bin:"}${lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \
74+ --prefix PATH : "$out/libexec/${name}:${lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \
7775 --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath ([
7876 # Some internals want libstdc++.so.6
7977 stdenv.cc.cc.lib libsecret e2fsprogs
pkgs/applications/editors/jetbrains/update.pldeleted−101
@@ -1,101 +0,0 @@
1−#!/usr/bin/env nix-shell
2−#!nix-shell -i perl -p perl perlPackages.LWPProtocolHttps perlPackages.FileSlurp
3−
4−use strict;
5−use List::Util qw(reduce);
6−use File::Slurp;
7−use LWP::Simple;
8−
9−my $only_free = grep { $_ eq "--only-free" } @ARGV;
10−
11−sub semantic_less {
12− my ($a, $b) = @_;
13− $a =~ s/\b(\d+)\b/sprintf("%010s", $1)/eg;
14− $b =~ s/\b(\d+)\b/sprintf("%010s", $1)/eg;
15− return $a lt $b;
16−}
17−
18−sub get_latest_versions {
19− my @channels = get("https://www.jetbrains.com/updates/updates.xml") =~ /(<channel .+?<\/channel>)/gs;
20− my %h = {};
21− for my $ch (@channels) {
22− my ($id) = $ch =~ /^<channel id="[^"]+" name="([^"]+)"/;
23− my @builds = $ch =~ /(<build .+?<\/build>)/gs;
24− my $latest_build = reduce {
25− my ($aversion) = $a =~ /^<build [^>]*version="([^"]+)"/; die "no version in $a" unless $aversion;
26− my ($bversion) = $b =~ /^<build [^>]*version="([^"]+)"/; die "no version in $b" unless $bversion;
27− semantic_less($aversion, $bversion) ? $b : $a;
28− } @builds;
29− next unless $latest_build;
30−
31− # version as in download url
32− my ($version) = $latest_build =~ /^<build [^>]*version="([^"]+)"/;
33− my ($fullNumber) = $latest_build =~ /^<build [^>]*fullNumber="([^"]+)"/;
34− my $latest_version_full1 = "$version-$fullNumber";
35− $latest_version_full1 =~ s/\s*EAP//;
36−
37− my ($latest_version) = $latest_build =~ /^<build [^>]*version="([^"]+)"/;
38− ($latest_version) = $latest_build =~ /^<build [^>]*fullNumber="([^"]+)"/ if $latest_version =~ / /;
39−
40− $h{$id} = $latest_version;
41− $h{"full1_" . $id} = $latest_version_full1;
42− }
43− return %h;
44−}
45−
46−my %latest_versions = get_latest_versions();
47−# for my $ch (sort keys %latest_versions) {
48−# print("$ch $latest_versions{$ch}\n");
49−# }
50−
51−sub update_nix_block {
52− my ($block) = @_;
53− my ($channel) = $block =~ /update-channel\s*=\s*"([^"]+)"/;
54− if ($channel) {
55− if ($latest_versions{$channel}) {
56− my ($version) = $block =~ /version\s*=\s*"([^"]+)"/;
57− die "no version in $block" unless $version;
58− if ($version eq $latest_versions{$channel}) {
59− print("$channel is up to date at $version\n");
60− } elsif ($only_free && $block =~ /licenses\.unfree/) {
61− print("$channel is unfree, skipping\n");
62− } else {
63− my $version_string = $latest_versions{$channel};
64− my $versionMajorMinor = $version_string =~ s/^([0-9]+[.][0-9]+).*/$1/r;
65−
66− print("updating $channel: $version -> $version_string\n");
67− my ($url) = $block =~ /url\s*=\s*"([^"]+)"/;
68− # try to interpret some nix
69− my ($name) = $block =~ /name\s*=\s*"([^"]+)"/;
70− $name =~ s/\$\{version\}/$version_string/;
71− # Some url pattern contain variables more than once
72− $url =~ s/\$\{name\}/$name/g;
73− $url =~ s/\$\{version\}/$version_string/g;
74− $url =~ s/\$\{versionMajorMinor\}/$versionMajorMinor/g;
75− die "$url still has some interpolation" if $url =~ /\$/;
76− my ($sha256) = get("$url.sha256") =~ /^([0-9a-f]{64})/;
77− unless ( $sha256 ) {
78− my $full_version = $latest_versions{"full1_" . $channel};
79− $url =~ s/$version_string/$full_version/;
80− ($sha256) = get("$url.sha256") =~ /^([0-9a-f]{64})/;
81− $version_string = $full_version;
82− }
83− die "invalid sha256 in $url.sha256" unless $sha256;
84− my ($sha256Base32) = readpipe("nix-hash --type sha256 --to-base32 $sha256");
85− chomp $sha256Base32;
86− print "Jetbrains published SHA256: $sha256\n";
87− print "Conversion into base32 yields: $sha256Base32\n";
88− $block =~ s#version\s*=\s*"([^"]+)".+$#version = "$version_string"; /* updated by script */#m;
89− $block =~ s#versionMajorMinor\s*=\s*"([^"]+)".+$#versionMajorMinor = "$versionMajorMinor"; /* updated by script */#m;
90− $block =~ s#sha256\s*=\s*"([^"]+)".+$#sha256 = "$sha256Base32"; /* updated by script */#m;
91− }
92− } else {
93− warn "unknown update-channel $channel";
94− }
95− }
96− return $block;
97−}
98−
99−my $nix = read_file 'default.nix';
100−$nix =~ s/(= build\w+ rec \{.+?\n \};\n)/update_nix_block($1)/gse;
101−write_file 'default.nix', $nix;
pkgs/applications/editors/jetbrains/update.pynew file+97
@@ -0,0 +1,97 @@
1+#! /usr/bin/env nix-shell
2+#! nix-shell -i python3 -p python3 python3.pkgs.packaging python3.pkgs.requests python3.pkgs.xmltodict
3+import hashlib
4+import json
5+import pathlib
6+import logging
7+import requests
8+import sys
9+import xmltodict
10+from packaging import version
11+
12+updates_url = "https://www.jetbrains.com/updates/updates.xml"
13+versions_file_path = pathlib.Path(__file__).parent.joinpath("versions.json").resolve()
14+
15+logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
16+
17+
18+def one_or_more(x):
19+ return x if isinstance(x, list) else [x]
20+
21+
22+def download_channels():
23+ logging.info("Checking for updates from %s", updates_url)
24+ updates_response = requests.get(updates_url)
25+ updates_response.raise_for_status()
26+ root = xmltodict.parse(updates_response.text)
27+ products = root["products"]["product"]
28+ return {
29+ channel["@name"]: channel
30+ for product in products
31+ for channel in one_or_more(product["channel"])
32+ }
33+
34+
35+def build_version(build):
36+ return version.parse(build["@version"])
37+
38+
39+def latest_build(channel):
40+ builds = one_or_more(channel["build"])
41+ latest = max(builds, key=build_version)
42+ return latest
43+
44+
45+def download_sha256(url):
46+ download_response = requests.get(url)
47+ download_response.raise_for_status()
48+ h = hashlib.sha256()
49+ h.update(download_response.content)
50+ return h.hexdigest()
51+
52+
53+channels = download_channels()
54+
55+
56+def update_product(name, product):
57+ update_channel = product["update-channel"]
58+ logging.info("Updating %s", name)
59+ channel = channels.get(update_channel)
60+ if channel is None:
61+ logging.error("Failed to find channel %s.", update_channel)
62+ logging.error("Check that the update-channel in %s matches the name in %s", versions_file_path, updates_url)
63+ else:
64+ try:
65+ build = latest_build(channel)
66+ version = build["@version"]
67+ parsed_version = build_version(build)
68+ version_major_minor = f"{parsed_version.major}.{parsed_version.minor}"
69+ download_url = product["url-template"].format(version = version, versionMajorMinor = version_major_minor)
70+ product["url"] = download_url
71+ product["version-major-minor"] = version_major_minor
72+ if "sha256" not in product or product.get("version") != version:
73+ logging.info("Found a newer version %s.", version)
74+ product["version"] = version
75+ product["sha256"] = download_sha256(download_url)
76+ else:
77+ logging.info("Already at the latest version %s.", version)
78+ except Exception as e:
79+ logging.exception("Update failed:", exc_info=e)
80+ logging.warning("Skipping %s due to the above error.", name)
81+ logging.warning("It may be out-of-date. Fix the error and rerun.")
82+
83+
84+def update_products(products):
85+ for name, product in products.items():
86+ update_product(name, product)
87+
88+
89+with open(versions_file_path, "r") as versions_file:
90+ versions = json.load(versions_file)
91+
92+for products in versions.values():
93+ update_products(products)
94+
95+with open(versions_file_path, "w") as versions_file:
96+ json.dump(versions, versions_file, indent=2)
97+ versions_file.write("\n")
pkgs/applications/editors/jetbrains/versions.jsonnew file+296
@@ -0,0 +1,296 @@
1+{
2+ "linux": {
3+ "clion": {
4+ "update-channel": "CLion RELEASE",
5+ "url-template": "https://download.jetbrains.com/cpp/CLion-{version}.tar.gz",
6+ "version": "2021.3.3",
7+ "sha256": "35986be8adfe0a291a0d2d550c1bf4861ae6c33ecbc71198a472e0ac01a0f10d",
8+ "url": "https://download.jetbrains.com/cpp/CLion-2021.3.3.tar.gz",
9+ "version-major-minor": "2021.3"
10+ },
11+ "datagrip": {
12+ "update-channel": "DataGrip RELEASE",
13+ "url-template": "https://download.jetbrains.com/datagrip/datagrip-{version}.tar.gz",
14+ "version": "2021.3.4",
15+ "sha256": "a34670f1a6c77e00237302a70f22fb5bf089dfe128341fd89b2f25bb8becb325",
16+ "url": "https://download.jetbrains.com/datagrip/datagrip-2021.3.4.tar.gz",
17+ "version-major-minor": "2021.3"
18+ },
19+ "goland": {
20+ "update-channel": "GoLand RELEASE",
21+ "url-template": "https://download.jetbrains.com/go/goland-{version}.tar.gz",
22+ "version": "2021.3.3",
23+ "sha256": "9d2b709703516eddeb7f4d6568a7de2e268de4258c7bc7787baee806fbaee4a3",
24+ "url": "https://download.jetbrains.com/go/goland-2021.3.3.tar.gz",
25+ "version-major-minor": "2021.3"
26+ },
27+ "idea-community": {
28+ "update-channel": "IntelliJ IDEA RELEASE",
29+ "url-template": "https://download.jetbrains.com/idea/ideaIC-{version}.tar.gz",
30+ "version": "2021.3.2",
31+ "sha256": "99e2225846d118e3190023abc65c8b2c62a1d1463f601c79a20b9494c54a08c9",
32+ "url": "https://download.jetbrains.com/idea/ideaIC-2021.3.2.tar.gz",
33+ "version-major-minor": "2021.3"
34+ },
35+ "idea-ultimate": {
36+ "update-channel": "IntelliJ IDEA RELEASE",
37+ "url-template": "https://download.jetbrains.com/idea/ideaIU-{version}-no-jbr.tar.gz",
38+ "version": "2021.3.2",
39+ "sha256": "face5d154a2c9244b278bfc6dca37218ae3344090526a0679086eff9b0c56670",
40+ "url": "https://download.jetbrains.com/idea/ideaIU-2021.3.2-no-jbr.tar.gz",
41+ "version-major-minor": "2021.3"
42+ },
43+ "mps": {
44+ "update-channel": "MPS RELEASE",
45+ "url-template": "https://download.jetbrains.com/mps/{versionMajorMinor}/MPS-{version}.tar.gz",
46+ "version": "2021.3",
47+ "sha256": "e9aeb62f0d667dd285f808e3ba308f572797dbf11d51e9aa06cf49481bee857f",
48+ "url": "https://download.jetbrains.com/mps/2021.3/MPS-2021.3.tar.gz",
49+ "version-major-minor": "2021.3"
50+ },
51+ "phpstorm": {
52+ "update-channel": "PhpStorm RELEASE",
53+ "url-template": "https://download.jetbrains.com/webide/PhpStorm-{version}.tar.gz",
54+ "version": "2021.3.2",
55+ "sha256": "761b347142035e8b74cc5a9939100af9d45f1f6ee29de1e78cd6b1ff06fe20e2",
56+ "url": "https://download.jetbrains.com/webide/PhpStorm-2021.3.2.tar.gz",
57+ "version-major-minor": "2021.3"
58+ },
59+ "pycharm-community": {
60+ "update-channel": "PyCharm RELEASE",
61+ "url-template": "https://download.jetbrains.com/python/pycharm-community-{version}.tar.gz",
62+ "version": "2021.3.2",
63+ "sha256": "f1ae01f471d01c6f09aab0a761c6dea9834ef584f2aaf6d6ebecdce6b55a66e8",
64+ "url": "https://download.jetbrains.com/python/pycharm-community-2021.3.2.tar.gz",
65+ "version-major-minor": "2021.3"
66+ },
67+ "pycharm-professional": {
68+ "update-channel": "PyCharm RELEASE",
69+ "url-template": "https://download.jetbrains.com/python/pycharm-professional-{version}.tar.gz",
70+ "version": "2021.3.2",
71+ "sha256": "6bd9573a84c1f2ae6b9b6612f0859aee21133f479ace43602dc0af879f9d9e67",
72+ "url": "https://download.jetbrains.com/python/pycharm-professional-2021.3.2.tar.gz",
73+ "version-major-minor": "2021.3"
74+ },
75+ "rider": {
76+ "update-channel": "Rider RELEASE",
77+ "url-template": "https://download.jetbrains.com/rider/JetBrains.Rider-{version}.tar.gz",
78+ "version": "2021.3.3",
79+ "sha256": "1dc57d5d7932d4a8dea51fc5cbdaa52f9626490092978f02fa15bb41cb84068f",
80+ "url": "https://download.jetbrains.com/rider/JetBrains.Rider-2021.3.3.tar.gz",
81+ "version-major-minor": "2021.3"
82+ },
83+ "ruby-mine": {
84+ "update-channel": "RubyMine RELEASE",
85+ "url-template": "https://download.jetbrains.com/ruby/RubyMine-{version}.tar.gz",
86+ "version": "2021.3.2",
87+ "sha256": "697510ee2401bb7cbe75193f015d8c2dd1677117defbc2a6f5f3c1443f20dea2",
88+ "url": "https://download.jetbrains.com/ruby/RubyMine-2021.3.2.tar.gz",
89+ "version-major-minor": "2021.3"
90+ },
91+ "webstorm": {
92+ "update-channel": "WebStorm RELEASE",
93+ "url-template": "https://download.jetbrains.com/webstorm/WebStorm-{version}.tar.gz",
94+ "version": "2021.3.2",
95+ "sha256": "18a53c1b1b92e9b7e516b425a390f23f46b880a704d1cb223d1ba64410b15060",
96+ "url": "https://download.jetbrains.com/webstorm/WebStorm-2021.3.2.tar.gz",
97+ "version-major-minor": "2021.3"
98+ }
99+ },
100+ "x86_64-darwin": {
101+ "clion": {
102+ "update-channel": "CLion RELEASE",
103+ "url-template": "https://download.jetbrains.com/cpp/CLion-{version}.dmg",
104+ "version": "2021.3.3",
105+ "sha256": "342a4d8549ae4623a5edfa7f9737887cf0a25c1a61bb414b54b742b1c5a1a84d",
106+ "url": "https://download.jetbrains.com/cpp/CLion-2021.3.3.dmg",
107+ "version-major-minor": "2021.3"
108+ },
109+ "datagrip": {
110+ "update-channel": "DataGrip RELEASE",
111+ "url-template": "https://download.jetbrains.com/datagrip/datagrip-{version}.dmg",
112+ "version": "2021.3.4",
113+ "sha256": "27e709d2ced66d37a615d8c56885828e49a08962708e28df1a20f324c626bf52",
114+ "url": "https://download.jetbrains.com/datagrip/datagrip-2021.3.4.dmg",
115+ "version-major-minor": "2021.3"
116+ },
117+ "goland": {
118+ "update-channel": "GoLand RELEASE",
119+ "url-template": "https://download.jetbrains.com/go/goland-{version}.dmg",
120+ "version": "2021.3.3",
121+ "sha256": "4b245b6fe0cf588adbf36e68f12397d5fd311b0b6d49f17ba374ebaa10d207c9",
122+ "url": "https://download.jetbrains.com/go/goland-2021.3.3.dmg",
123+ "version-major-minor": "2021.3"
124+ },
125+ "idea-community": {
126+ "update-channel": "IntelliJ IDEA RELEASE",
127+ "url-template": "https://download.jetbrains.com/idea/ideaIC-{version}.dmg",
128+ "version": "2021.3.2",
129+ "sha256": "20d8cee2bbedaeb0ea388f795e13d08eca5b59e59d4e980ac2d8bc07c9fed3e9",
130+ "url": "https://download.jetbrains.com/idea/ideaIC-2021.3.2.dmg",
131+ "version-major-minor": "2021.3"
132+ },
133+ "idea-ultimate": {
134+ "update-channel": "IntelliJ IDEA RELEASE",
135+ "url-template": "https://download.jetbrains.com/idea/ideaIU-{version}.dmg",
136+ "version": "2021.3.2",
137+ "sha256": "9f574562b866e6ccc3d2f9b4c245c45844d1d0fd54be3dbdcc893d40ba1cf54a",
138+ "url": "https://download.jetbrains.com/idea/ideaIU-2021.3.2.dmg",
139+ "version-major-minor": "2021.3"
140+ },
141+ "mps": {
142+ "update-channel": "MPS RELEASE",
143+ "url-template": "https://download.jetbrains.com/mps/{versionMajorMinor}/MPS-{version}-macos.dmg",
144+ "version": "2021.3",
145+ "sha256": "2c5517518fec31ac960e4309fa848ad831f9048ef15df1b362e12aa8f41d9dbd",
146+ "url": "https://download.jetbrains.com/mps/2021.3/MPS-2021.3-macos.dmg",
147+ "version-major-minor": "2021.3"
148+ },
149+ "phpstorm": {
150+ "update-channel": "PhpStorm RELEASE",
151+ "url-template": "https://download.jetbrains.com/webide/PhpStorm-{version}.dmg",
152+ "version": "2021.3.2",
153+ "sha256": "596a9d5fdc30d5fba65ddd482da90f9d555fed748b930587562022bfe7df4e14",
154+ "url": "https://download.jetbrains.com/webide/PhpStorm-2021.3.2.dmg",
155+ "version-major-minor": "2021.3"
156+ },
157+ "pycharm-community": {
158+ "update-channel": "PyCharm RELEASE",
159+ "url-template": "https://download.jetbrains.com/python/pycharm-community-{version}.dmg",
160+ "version": "2021.3.2",
161+ "sha256": "b8f41f5dddeda0ed5f5c81ba57d2560ccc6e227987882fb6bf305b5d1d8c6909",
162+ "url": "https://download.jetbrains.com/python/pycharm-community-2021.3.2.dmg",
163+ "version-major-minor": "2021.3"
164+ },
165+ "pycharm-professional": {
166+ "update-channel": "PyCharm RELEASE",
167+ "url-template": "https://download.jetbrains.com/python/pycharm-professional-{version}.dmg",
168+ "version": "2021.3.2",
169+ "sha256": "188b998660e7cfb7ac1364c818c008a5608ab2aeb17c6cc19d1d9dda547d3775",
170+ "url": "https://download.jetbrains.com/python/pycharm-professional-2021.3.2.dmg",
171+ "version-major-minor": "2021.3"
172+ },
173+ "rider": {
174+ "update-channel": "Rider RELEASE",
175+ "url-template": "https://download.jetbrains.com/rider/JetBrains.Rider-{version}.dmg",
176+ "version": "2021.3.3",
177+ "sha256": "41a0939cb6258a0fb303268c5a466a663cf3588af14bcbb351be4c3a1d158094",
178+ "url": "https://download.jetbrains.com/rider/JetBrains.Rider-2021.3.3.dmg",
179+ "version-major-minor": "2021.3"
180+ },
181+ "ruby-mine": {
182+ "update-channel": "RubyMine RELEASE",
183+ "url-template": "https://download.jetbrains.com/ruby/RubyMine-{version}.dmg",
184+ "version": "2021.3.2",
185+ "sha256": "ba27c14b21d66ca96a64ceb7dc5d9f0952254a5f405b3201f51d2ad3cc749a96",
186+ "url": "https://download.jetbrains.com/ruby/RubyMine-2021.3.2.dmg",
187+ "version-major-minor": "2021.3"
188+ },
189+ "webstorm": {
190+ "update-channel": "WebStorm RELEASE",
191+ "url-template": "https://download.jetbrains.com/webstorm/WebStorm-{version}.dmg",
192+ "version": "2021.3.2",
193+ "sha256": "932d4920f831d1ceae68a474444c37d986277d8d3288d3aab93dd43d99336a36",
194+ "url": "https://download.jetbrains.com/webstorm/WebStorm-2021.3.2.dmg",
195+ "version-major-minor": "2021.3"
196+ }
197+ },
198+ "aarch64-darwin": {
199+ "clion": {
200+ "update-channel": "CLion RELEASE",
201+ "url-template": "https://download.jetbrains.com/cpp/CLion-{version}-aarch64.dmg",
202+ "version": "2021.3.3",
203+ "sha256": "fbf651fa4a5925fe729be30ca8a6fa3be84dc4d7827dbcf74f4d28c52b903cc2",
204+ "url": "https://download.jetbrains.com/cpp/CLion-2021.3.3-aarch64.dmg",
205+ "version-major-minor": "2021.3"
206+ },
207+ "datagrip": {
208+ "update-channel": "DataGrip RELEASE",
209+ "url-template": "https://download.jetbrains.com/datagrip/datagrip-{version}-aarch64.dmg",
210+ "version": "2021.3.4",
211+ "sha256": "7a77ba9fce56c781ae6a4fc65eaab4bcc10780b6bd679b04d74146719e42890a",
212+ "url": "https://download.jetbrains.com/datagrip/datagrip-2021.3.4-aarch64.dmg",
213+ "version-major-minor": "2021.3"
214+ },
215+ "goland": {
216+ "update-channel": "GoLand RELEASE",
217+ "url-template": "https://download.jetbrains.com/go/goland-{version}-aarch64.dmg",
218+ "version": "2021.3.3",
219+ "sha256": "54397d48e20fb534206e13f84b35868b1eaea13175176487b1239b23db4e13db",
220+ "url": "https://download.jetbrains.com/go/goland-2021.3.3-aarch64.dmg",
221+ "version-major-minor": "2021.3"
222+ },
223+ "idea-community": {
224+ "update-channel": "IntelliJ IDEA RELEASE",
225+ "url-template": "https://download.jetbrains.com/idea/ideaIC-{version}-aarch64.dmg",
226+ "version": "2021.3.2",
227+ "sha256": "79e540fb0cd480837b3a954e4802f4f252073955393e8927c9c1b28c37112d51",
228+ "url": "https://download.jetbrains.com/idea/ideaIC-2021.3.2-aarch64.dmg",
229+ "version-major-minor": "2021.3"
230+ },
231+ "idea-ultimate": {
232+ "update-channel": "IntelliJ IDEA RELEASE",
233+ "url-template": "https://download.jetbrains.com/idea/ideaIU-{version}-aarch64.dmg",
234+ "version": "2021.3.2",
235+ "sha256": "511c6aed9c5cd4c7665a9bac9ba94582977013244cbe88b820eb5464fce91a1c",
236+ "url": "https://download.jetbrains.com/idea/ideaIU-2021.3.2-aarch64.dmg",
237+ "version-major-minor": "2021.3"
238+ },
239+ "mps": {
240+ "update-channel": "MPS RELEASE",
241+ "url-template": "https://download.jetbrains.com/mps/{versionMajorMinor}/MPS-{version}-macos-aarch64.dmg",
242+ "version": "2021.3",
243+ "url": "https://download.jetbrains.com/mps/2021.3/MPS-2021.3-macos-aarch64.dmg",
244+ "sha256": "3ace6d45db718dffd80bf126a76735fb65099de292112a01cc078aa61c475a70",
245+ "version-major-minor": "2021.3"
246+ },
247+ "phpstorm": {
248+ "update-channel": "PhpStorm RELEASE",
249+ "url-template": "https://download.jetbrains.com/webide/PhpStorm-{version}-aarch64.dmg",
250+ "version": "2021.3.2",
251+ "sha256": "ba15c3f843c85141a9adaec1c4611224a853bd98649148751e34ac304591a314",
252+ "url": "https://download.jetbrains.com/webide/PhpStorm-2021.3.2-aarch64.dmg",
253+ "version-major-minor": "2021.3"
254+ },
255+ "pycharm-community": {
256+ "update-channel": "PyCharm RELEASE",
257+ "url-template": "https://download.jetbrains.com/python/pycharm-community-{version}-aarch64.dmg",
258+ "version": "2021.3.2",
259+ "sha256": "407bf395cfb6d61f1c0861c7679b197238780e82a019e10162b8cd7130edb15a",
260+ "url": "https://download.jetbrains.com/python/pycharm-community-2021.3.2-aarch64.dmg",
261+ "version-major-minor": "2021.3"
262+ },
263+ "pycharm-professional": {
264+ "update-channel": "PyCharm RELEASE",
265+ "url-template": "https://download.jetbrains.com/python/pycharm-professional-{version}-aarch64.dmg",
266+ "version": "2021.3.2",
267+ "sha256": "12fa34d1e60a555bac230acea9cd46c7adfe9ca42ff3e458c79d33e5b88eb8db",
268+ "url": "https://download.jetbrains.com/python/pycharm-professional-2021.3.2-aarch64.dmg",
269+ "version-major-minor": "2021.3"
270+ },
271+ "rider": {
272+ "update-channel": "Rider RELEASE",
273+ "url-template": "https://download.jetbrains.com/rider/JetBrains.Rider-{version}-aarch64.dmg",
274+ "version": "2021.3.3",
275+ "sha256": "65603860d1fd3134c5659f5a06de7cac17f3183a01056b79cfe72242b99adb37",
276+ "url": "https://download.jetbrains.com/rider/JetBrains.Rider-2021.3.3-aarch64.dmg",
277+ "version-major-minor": "2021.3"
278+ },
279+ "ruby-mine": {
280+ "update-channel": "RubyMine RELEASE",
281+ "url-template": "https://download.jetbrains.com/ruby/RubyMine-{version}-aarch64.dmg",
282+ "version": "2021.3.2",
283+ "sha256": "33773222b2fa14300de5ed12ca96c3442b933f66cef67cebc9610e5cef51c75e",
284+ "url": "https://download.jetbrains.com/ruby/RubyMine-2021.3.2-aarch64.dmg",
285+ "version-major-minor": "2021.3"
286+ },
287+ "webstorm": {
288+ "update-channel": "WebStorm RELEASE",
289+ "url-template": "https://download.jetbrains.com/webstorm/WebStorm-{version}-aarch64.dmg",
290+ "version": "2021.3.2",
291+ "sha256": "f4788ec0c55123b1f4e14934792f65bf8040e2a2ee673e985b50b8feded60408",
292+ "url": "https://download.jetbrains.com/webstorm/WebStorm-2021.3.2-aarch64.dmg",
293+ "version-major-minor": "2021.3"
294+ }
295+ }
296+}
pkgs/applications/science/computer-architecture/qtrvsim/default.nixnew file+30
@@ -0,0 +1,30 @@
1+{ lib, stdenv, fetchFromGitHub, cmake, wrapQtAppsHook, qtbase }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "QtRVSim";
5+ version = "0.9.1";
6+
7+ src = fetchFromGitHub {
8+ owner = "cvut";
9+ repo = "qtrvsim";
10+ rev = "refs/tags/v${version}";
11+ sha256 = "AOksVS0drIBnK4RCxZw40yVxf4E8GjG9kU0rIZsY9gA=";
12+ };
13+
14+ nativeBuildInputs = [ cmake wrapQtAppsHook ];
15+
16+ buildInputs = [ qtbase ];
17+
18+ meta = with lib; {
19+ description = "RISC-V CPU simulator for education purposes";
20+ longDescription = ''
21+ RISC-V CPU simulator for education purposes with pipeline and cache visualization.
22+ Developed at FEE CTU for computer architecture classes.
23+ '';
24+ homepage = "https://github.com/cvut/qtrvsim";
25+ license = licenses.gpl3Plus;
26+ platforms = platforms.linux ++ platforms.darwin;
27+ maintainers = with maintainers; [ jdupak ];
28+ mainProgram = "qtrvsim_gui";
29+ };
30+}
pkgs/applications/virtualization/firecracker/default.nix+1−1
@@ -23,7 +23,7 @@ stdenv.mkDerivation {
2323 sourceRoot = ".";
2424 src = dlbin {
2525 x86_64-linux = "sha256-yeWVsrvH3yYlS2uH/TkSleHjXvIDnHWcZSvLgV+CGF0=";
26− aarch64-linux = "sha256-75UC+HeVUfUk1HRvTJsOHbHHkgr6me1OtxDF7lahf68=";
26+ aarch64-linux = "sha256-9ggRmijwXE9adVFv5XommgvdpeeWnWUFES+Ep2GrBVo=";
2727 };
2828
2929 dontConfigure = true;
pkgs/applications/virtualization/flintlock/default.nixnew file+49
@@ -0,0 +1,49 @@
1+{ lib
2+, cni-plugins
3+, buildGoModule
4+, firecracker
5+, containerd
6+, runc
7+, makeWrapper
8+, fetchFromGitHub
9+}:
10+
11+buildGoModule rec{
12+ pname = "flintlock";
13+ version = "0.1.0-alpha.9";
14+
15+ src = fetchFromGitHub {
16+ owner = "weaveworks";
17+ repo = "flintlock";
18+ rev = "v${version}";
19+ sha256 = "sha256-Xw3g2wh0fPUknSuAKoJL3jxVZS50wSPZ9Wz05zkTVXM=";
20+ };
21+
22+ vendorSha256 = "sha256-EjVlM6AD+O/z6+R5TRBmmRWbrP4C+qyvsnEjwOkDkUE=";
23+
24+ subPackages = [ "cmd/flintlock-metrics" "cmd/flintlockd" ];
25+
26+ ldflags = [ "-s" "-w" "-X github.com/weaveworks/flintlock/internal/version.Version=v${version}" ];
27+
28+ nativeBuildInputs = [
29+ makeWrapper
30+ ];
31+
32+ buildInputs = [
33+ firecracker
34+ ];
35+
36+ postInstall = ''
37+ for prog in flintlockd flintlock-metrics; do
38+ wrapProgram "$out/bin/$prog" --prefix PATH : ${lib.makeBinPath [ cni-plugins firecracker containerd runc ]}
39+ done
40+ '';
41+
42+ meta = with lib; {
43+ description = "Create and manage the lifecycle of MicroVMs backed by containerd";
44+ homepage = "https://github.com/weaveworks/flintlock";
45+ license = licenses.mpl20;
46+ platforms = [ "x86_64-linux" "aarch64-linux" ];
47+ maintainers = with maintainers; [ techknowlogick ];
48+ };
49+}
pkgs/applications/virtualization/open-vm-tools/default.nix+20−5
@@ -1,5 +1,5 @@
1−{ stdenv, lib, fetchFromGitHub, makeWrapper, autoreconfHook
2−, bash, fuse, libmspack, openssl, pam, xercesc, icu, libdnet, procps, libtirpc, rpcsvc-proto
1+{ stdenv, lib, fetchFromGitHub, fetchpatch, makeWrapper, autoreconfHook
2+, bash, fuse3, libmspack, openssl, pam, xercesc, icu, libdnet, procps, libtirpc, rpcsvc-proto
33, libX11, libXext, libXinerama, libXi, libXrender, libXrandr, libXtst
44, pkg-config, glib, gdk-pixbuf-xlib, gtk3, gtkmm3, iproute2, dbus, systemd, which
55, libdrm, udev
@@ -8,13 +8,13 @@
88
99stdenv.mkDerivation rec {
1010 pname = "open-vm-tools";
11− version = "11.3.5";
11+ version = "12.0.0";
1212
1313 src = fetchFromGitHub {
1414 owner = "vmware";
1515 repo = "open-vm-tools";
1616 rev = "stable-${version}";
17− sha256 = "03fahljrijq4ij8a4v8d7806mpf22ppkgr61n5s974g3xfdvpl13";
17+ sha256 = "sha256-agWTGf8x6bxZ7S5bU2scHt8IdLLe/hZdaEMfHIK9d8U=";
1818 };
1919
2020 sourceRoot = "${src.name}/open-vm-tools";
@@ -22,10 +22,24 @@ stdenv.mkDerivation rec {
2222 outputs = [ "out" "dev" ];
2323
2424 nativeBuildInputs = [ autoreconfHook makeWrapper pkg-config ];
25− buildInputs = [ fuse glib icu libdnet libdrm libmspack libtirpc openssl pam procps rpcsvc-proto udev xercesc ]
25+ buildInputs = [ fuse3 glib icu libdnet libdrm libmspack libtirpc openssl pam procps rpcsvc-proto udev xercesc ]
2626 ++ lib.optionals withX [ gdk-pixbuf-xlib gtk3 gtkmm3 libX11 libXext libXinerama libXi libXrender libXrandr libXtst ];
2727
28+ patches = [
29+ # glibc 2.35 and GCC 11 & 12 reporting possible array bounds overflow
30+ # Will be fixed in the release after 12.0.0
31+ (fetchpatch {
32+ url = "https://github.com/vmware/open-vm-tools/commit/de6d129476724668b8903e2a87654f50ba21b1b2.patch";
33+ sha256 = "1cqhm868g40kcp8qzzwq10zd4bah9ypaw1qawnli5d240mlkpfhh";
34+ })
35+ ];
36+
37+ prePatch = ''
38+ cd ..
39+ '';
40+
2841 postPatch = ''
42+ cd open-vm-tools
2943 sed -i 's,etc/vmware-tools,''${prefix}/etc/vmware-tools,' Makefile.am
3044 sed -i 's,^confdir = ,confdir = ''${prefix},' scripts/Makefile.am
3145 sed -i 's,usr/bin,''${prefix}/usr/bin,' scripts/Makefile.am
@@ -43,6 +57,7 @@ stdenv.mkDerivation rec {
4357 "--without-kernel-modules"
4458 "--without-xmlsecurity"
4559 "--with-udev-rules-dir=${placeholder "out"}/lib/udev/rules.d"
60+ "--with-fuse=fuse3"
4661 ] ++ lib.optional (!withX) "--without-x";
4762
4863 enableParallelBuilding = true;
pkgs/data/misc/v2ray-geoip/default.nix+3−3
@@ -2,13 +2,13 @@
22
33stdenv.mkDerivation rec {
44 pname = "v2ray-geoip";
5− version = "202203020509";
5+ version = "202203100039";
66
77 src = fetchFromGitHub {
88 owner = "v2fly";
99 repo = "geoip";
10− rev = "9dce4df2c1f409bad67f579910a4edf522251e7b";
11− sha256 = "sha256-fR0lzvVQjWA3KbzLhuvoB15Z+7RAv34Wf5W7KRZ//QA=";
10+ rev = "564c2c8de36d3680a1d5f209d6bb05e4f3f70dfc";
11+ sha256 = "sha256-JPpzIppgKQox8T6VC/kzhpLy+YAcuHdH5L6zqciOXow=";
1212 };
1313
1414 installPhase = ''
pkgs/development/interpreters/guile/2.2.nix+2−2
@@ -83,9 +83,9 @@ builder rec {
8383 # Explicitly link against libgcc_s, to work around the infamous
8484 # "libgcc_s.so.1 must be installed for pthread_cancel to work".
8585
86− # don't have "libgcc_s.so.1" on darwin
86+ # don't have "libgcc_s.so.1" on clang
8787 LDFLAGS = lib.optionalString
88− (!stdenv.isDarwin && !stdenv.hostPlatform.isStatic) "-lgcc_s";
88+ (stdenv.cc.isGNU && !stdenv.hostPlatform.isStatic) "-lgcc_s";
8989
9090 configureFlags = [
9191 "--with-libreadline-prefix=${lib.getDev readline}"
pkgs/development/interpreters/guile/3.0.nix+23−5
@@ -14,6 +14,7 @@
1414, pkg-config
1515, pkgsBuildBuild
1616, readline
17+, writeScript
1718}:
1819
1920let
@@ -24,11 +25,11 @@ let
2425in
2526builder rec {
2627 pname = "guile";
27− version = "3.0.7";
28+ version = "3.0.8";
2829
2930 src = fetchurl {
3031 url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz";
31− sha256 = "sha256-9X2GxwYgJxv863qb4MgXRKAz8IrcfOuoMsmRerPmkbc=";
32+ sha256 = "sha256-2qcGClbygE6bdMjX5/6L7tErQ6qyeJo4WFGD/MF7ihM=";
3233 };
3334
3435 outputs = [ "out" "dev" "info" ];
@@ -81,9 +82,9 @@ builder rec {
8182 # Explicitly link against libgcc_s, to work around the infamous
8283 # "libgcc_s.so.1 must be installed for pthread_cancel to work".
8384
84− # don't have "libgcc_s.so.1" on darwin
85+ # don't have "libgcc_s.so.1" on clang
8586 LDFLAGS = lib.optionalString
86− (!stdenv.isDarwin && !stdenv.hostPlatform.isStatic) "-lgcc_s";
87+ (stdenv.cc.isGNU && !stdenv.hostPlatform.isStatic) "-lgcc_s";
8788
8889 configureFlags = [
8990 "--with-libreadline-prefix=${lib.getDev readline}"
@@ -102,7 +103,10 @@ builder rec {
102103 ]
103104 # Disable JIT on Apple Silicon, as it is not yet supported
104105 # https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44505";
105− ++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) "--enable-jit=no";
106+ ++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) "--enable-jit=no"
107+ # At least on x86_64-darwin '-flto' autodetection is not correct:
108+ # https://github.com/NixOS/nixpkgs/pull/160051#issuecomment-1046193028
109+ ++ lib.optional (stdenv.isDarwin) "--disable-lto";
106110
107111 postInstall = ''
108112 wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin"
@@ -126,6 +130,20 @@ builder rec {
126130
127131 setupHook = ./setup-hook-3.0.sh;
128132
133+ passthru = {
134+ updateScript = writeScript "update-guile-3" ''
135+ #!/usr/bin/env nix-shell
136+ #!nix-shell -i bash -p curl pcre common-updater-scripts
137+
138+ set -eu -o pipefail
139+
140+ # Expect the text in format of '"https://ftp.gnu.org/gnu/guile/guile-3.0.8.tar.gz"'
141+ new_version="$(curl -s https://www.gnu.org/software/guile/download/ |
142+ pcregrep -o1 '"https://ftp.gnu.org/gnu/guile/guile-(3[.0-9]+).tar.gz"')"
143+ update-source-version ${pname} "$new_version"
144+ '';
145+ };
146+
129147 meta = with lib; {
130148 homepage = "https://www.gnu.org/software/guile/";
131149 description = "Embeddable Scheme implementation";
pkgs/servers/http/pomerium/default.nix+5−5
@@ -4,6 +4,7 @@
44, envoy
55, zip
66, nixosTests
7+, pomerium-cli
78}:
89
910let
@@ -11,18 +12,17 @@ let
1112in
1213buildGoModule rec {
1314 pname = "pomerium";
14− version = "0.15.7";
15+ version = "0.17.0";
1516 src = fetchFromGitHub {
1617 owner = "pomerium";
1718 repo = "pomerium";
1819 rev = "v${version}";
19− hash = "sha256:0adlk4ylny1z43x1dw3ny0s1932vhb61hpf5wdz4r65y8k9qyfgr";
20+ hash = "sha256:1hv76i6k9f0kp527nxlxqhklsvkh2cmfnqlszmlk2hxij31qnf8q";
2021 };
2122
22− vendorSha256 = "sha256:1fszfbra84pcs8v1h2kf7iy603vf9v2ysg6il76aqmqrxmb1p7nv";
23+ vendorSha256 = "sha256:1cq4m5a7z64yg3v1c68d15ilw78il6p53vaqzxgn338zjggr3kig";
2324 subPackages = [
2425 "cmd/pomerium"
25− "cmd/pomerium-cli"
2626 ];
2727
2828 ldflags = let
@@ -74,11 +74,11 @@ buildGoModule rec {
7474
7575 installPhase = ''
7676 install -Dm0755 $GOPATH/bin/pomerium $out/bin/pomerium
77− install -Dm0755 $GOPATH/bin/pomerium-cli $out/bin/pomerium-cli
7877 '';
7978
8079 passthru.tests = {
8180 inherit (nixosTests) pomerium;
81+ inherit pomerium-cli;
8282 };
8383
8484 meta = with lib; {
pkgs/tools/networking/sockperf/default.nix+2−2
@@ -4,13 +4,13 @@
44
55stdenv.mkDerivation rec {
66 pname = "sockperf";
7− version = "3.7";
7+ version = "3.8";
88
99 src = fetchFromGitHub {
1010 owner = "Mellanox";
1111 repo = "sockperf";
1212 rev = version;
13− sha256 = "MtpV21lCEAv7ARxk0dAxoOxxlqDM+skdQnPlqOvksjw=";
13+ sha256 = "sha256-S5ZSGctOOnMD+AqlSAkRHMW8O1Rt8/952fali0kv/EU=";
1414 };
1515
1616 nativeBuildInputs = [ autoreconfHook doxygen ];
pkgs/tools/security/pomerium-cli/default.nixnew file+58
@@ -0,0 +1,58 @@
1+{ buildGoModule
2+, fetchFromGitHub
3+, lib
4+, pomerium
5+}:
6+
7+let
8+ inherit (lib) concatStringsSep concatMap id mapAttrsToList;
9+in
10+buildGoModule rec {
11+ pname = "pomerium-cli";
12+ version = pomerium.version;
13+ src = fetchFromGitHub {
14+ owner = "pomerium";
15+ repo = "cli";
16+ rev = "v${version}";
17+ hash = "sha256:0230b22xjnpykj8bcdahzzlsvlrd63z2cmg6yb246c5ngjs835q1";
18+ };
19+
20+ vendorSha256 = "sha256:0xx22lmh6wip1d1bjrp4lgab3q9yilw54v4lg24lf3xhbsr5si9b";
21+ subPackages = [
22+ "cmd/pomerium-cli"
23+ ];
24+
25+ ldflags = let
26+ # Set a variety of useful meta variables for stamping the build with.
27+ setVars = {
28+ "github.com/pomerium/cli/version" = {
29+ Version = "v${version}";
30+ BuildMeta = "nixpkgs";
31+ ProjectName = "pomerium-cli";
32+ ProjectURL = "github.com/pomerium/cli";
33+ };
34+ };
35+ concatStringsSpace = list: concatStringsSep " " list;
36+ mapAttrsToFlatList = fn: list: concatMap id (mapAttrsToList fn list);
37+ varFlags = concatStringsSpace (
38+ mapAttrsToFlatList (package: packageVars:
39+ mapAttrsToList (variable: value:
40+ "-X ${package}.${variable}=${value}"
41+ ) packageVars
42+ ) setVars);
43+ in [
44+ "${varFlags}"
45+ ];
46+
47+ installPhase = ''
48+ install -Dm0755 $GOPATH/bin/pomerium-cli $out/bin/pomerium-cli
49+ '';
50+
51+ meta = with lib; {
52+ homepage = "https://pomerium.io";
53+ description = "Client-side helper for Pomerium authenticating reverse proxy";
54+ license = licenses.asl20;
55+ maintainers = with maintainers; [ lukegb ];
56+ platforms = platforms.unix;
57+ };
58+}
pkgs/top-level/all-packages.nix+5
@@ -5548,6 +5548,8 @@ with pkgs;
55485548
55495549 flawfinder = callPackage ../development/tools/flawfinder { };
55505550
5551+ flintlock = callPackage ../applications/virtualization/flintlock { };
5552+
55515553 flip-link = callPackage ../development/tools/flip-link { };
55525554
55535555 flips = callPackage ../tools/compression/flips { };
@@ -21617,6 +21619,7 @@ with pkgs;
2161721619 pflogsumm = callPackage ../servers/mail/postfix/pflogsumm.nix { };
2161821620
2161921621 pomerium = callPackage ../servers/http/pomerium { };
21622+ pomerium-cli = callPackage ../tools/security/pomerium-cli { };
2162021623
2162121624 postgrey = callPackage ../servers/mail/postgrey { };
2162221625
@@ -33805,6 +33808,8 @@ with pkgs;
3380533808
3380633809 qMasterPassword = libsForQt5.callPackage ../applications/misc/qMasterPassword { };
3380733810
33811+ qtrvsim = libsForQt5.callPackage ../applications/science/computer-architecture/qtrvsim { };
33812+
3380833813 py-wmi-client = callPackage ../tools/networking/py-wmi-client { };
3380933814
3381033815 qdl = callPackage ../tools/misc/qdl { };