From 2f9cebbb41131cc03a43c703a98a65b0736d01d4 Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Sun, 15 May 2022 14:41:01 -0700 Subject: [PATCH 01/82] UHDM: init at 2022.05.15 --- .../science/logic/uhdm/default.nix | 43 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/applications/science/logic/uhdm/default.nix diff --git a/pkgs/applications/science/logic/uhdm/default.nix b/pkgs/applications/science/logic/uhdm/default.nix new file mode 100644 index 000000000000..6e5ad9c6bfeb --- /dev/null +++ b/pkgs/applications/science/logic/uhdm/default.nix @@ -0,0 +1,43 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, python3 +}: + +stdenv.mkDerivation rec { + pname = "UHDM"; + version = "2022.05.15"; + + src = fetchFromGitHub { + owner = "chipsalliance"; + repo = pname; + rev = "18ec4cce8c9414c135dc0e69155f777195dfe328"; + hash = "sha256-ZWeMHHqgpdYlYzhRdTLXCe07dh0Pe8/ylU5TO3cAOmA="; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ + (python3.withPackages (p: with p; [ orderedmultidict ])) + ]; + + doCheck = true; + checkPhase = "make test"; + + postInstall = '' + mv $out/lib/uhdm/* $out/lib/ + rm -rf $out/lib/uhdm + ''; + + meta = { + description = "Universal Hardware Data Model"; + homepage = "https://github.com/chipsalliance/UHDM"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ matthuszagh ]; + platforms = lib.platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 54d17be1214d..51926ea5b2b7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33417,6 +33417,8 @@ with pkgs; symfpu = callPackage ../applications/science/logic/symfpu {}; + uhdm = callPackage ../applications/science/logic/uhdm {}; + mcy = callPackage ../applications/science/logic/mcy {}; lingeling = callPackage ../applications/science/logic/lingeling {}; From 2dcb43e59a0829fdb8996acb44fabce77edacb59 Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Sun, 15 May 2022 15:05:27 -0700 Subject: [PATCH 02/82] Surelog: init at 2022.05.15 --- .../science/logic/surelog/default.nix | 49 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/applications/science/logic/surelog/default.nix diff --git a/pkgs/applications/science/logic/surelog/default.nix b/pkgs/applications/science/logic/surelog/default.nix new file mode 100644 index 000000000000..f6eeee62aabf --- /dev/null +++ b/pkgs/applications/science/logic/surelog/default.nix @@ -0,0 +1,49 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, python3 +, pkg-config +, libuuid +, openjdk11 +}: + +stdenv.mkDerivation rec { + pname = "Surelog"; + version = "2022.05.15"; + + src = fetchFromGitHub { + owner = "chipsalliance"; + repo = pname; + rev = "15d3698ca5c7d45dd95b58c15e76131420cb001c"; + hash = "sha256-dfje9yZ8ZR7x1EUxDUpKNcOWKYTPwPG6T4HzudV59R4="; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ + cmake + pkg-config + ]; + + buildInputs = [ + libuuid + openjdk11 + (python3.withPackages (p: with p; [ + psutil + orderedmultidict + ])) + ]; + + postInstall = '' + mv $out/lib/surelog/* $out/lib/ + rm -rf $out/lib/surelog + ''; + + meta = { + description = "SystemVerilog 2017 Pre-processor, Parser, Elaborator, UHDM Compiler"; + homepage = "https://github.com/chipsalliance/Surelog"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ matthuszagh ]; + platforms = lib.platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 51926ea5b2b7..33c8a6a2755d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33419,6 +33419,8 @@ with pkgs; uhdm = callPackage ../applications/science/logic/uhdm {}; + surelog = callPackage ../applications/science/logic/surelog {}; + mcy = callPackage ../applications/science/logic/mcy {}; lingeling = callPackage ../applications/science/logic/lingeling {}; From 5d0452a9aebd5793442d9ae98ca9b73d79e294f8 Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Sun, 15 May 2022 21:13:08 -0700 Subject: [PATCH 03/82] symbiflow: add systemverilog plugin --- .../compilers/yosys/plugins/symbiflow.nix | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/pkgs/development/compilers/yosys/plugins/symbiflow.nix b/pkgs/development/compilers/yosys/plugins/symbiflow.nix index cecc1bee9219..ab03e7517133 100644 --- a/pkgs/development/compilers/yosys/plugins/symbiflow.nix +++ b/pkgs/development/compilers/yosys/plugins/symbiflow.nix @@ -8,25 +8,24 @@ , yosys , zlib , yosys-symbiflow +, uhdm +, surelog }: let src = fetchFromGitHub { - owner = "SymbiFlow"; - repo = "yosys-symbiflow-plugins"; - rev = "35c6c33811a8de7c80dff6a7bcf7aa6ec9b21233"; - hash = "sha256-g5dX9+R+gWt8e7Bhbbg60O9qa+Vi6Ar0M1sHhYlAre8="; + owner = "chipsalliance"; + repo = "yosys-f4pga-plugins"; + rev = "aadd1735b2b7af0472e56dc23f1035d6e1904712"; + hash = "sha256-gmpEx+8XDN7f+6e/YG25VKgdadwqApPqU3S6OB4AryA="; }; - version = "2022.01.06"; + version = "2022.05.13"; # Supported symbiflow plugins. # # The following are disabled: # # "ql-qlf" builds but fails to load the plugin, so is not currently supported. - # - # "UHDM" doesn't currently build, as the work to package UHDM and surelog has - # not (yet) been undertaken. plugins = [ "design_introspection" "fasm" @@ -36,7 +35,7 @@ # "ql-qlf" "sdc" "xdc" - # "UHDM" + "systemverilog" ]; static_gtest = gtest.dev.overrideAttrs (old: { @@ -51,7 +50,7 @@ in lib.genAttrs plugins (plugin: stdenv.mkDerivation (rec { enableParallelBuilding = true; nativeBuildInputs = [ which python3 ]; - buildInputs = [ yosys readline zlib ] ; + buildInputs = [ yosys readline zlib uhdm surelog ]; # xdc has an incorrect path to a test which has yet to be patched doCheck = plugin != "xdc"; @@ -102,5 +101,3 @@ in lib.genAttrs plugins (plugin: stdenv.mkDerivation (rec { maintainers = with maintainers; [ ollieB thoughtpolice ]; }; })) - - From 6626bf243ca7ea72edd66af2cf5bc58f76c14682 Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Sun, 21 Aug 2022 16:25:32 -0700 Subject: [PATCH 04/82] surelog: run unit tests --- pkgs/applications/science/logic/surelog/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/applications/science/logic/surelog/default.nix b/pkgs/applications/science/logic/surelog/default.nix index f6eeee62aabf..79cd135139e1 100644 --- a/pkgs/applications/science/logic/surelog/default.nix +++ b/pkgs/applications/science/logic/surelog/default.nix @@ -34,6 +34,14 @@ stdenv.mkDerivation rec { ])) ]; + doCheck = true; + checkPhase = '' + runHook preCheck + make -j $NIX_BUILD_CORES UnitTests + ctest --output-on-failure + runHook postCheck + ''; + postInstall = '' mv $out/lib/surelog/* $out/lib/ rm -rf $out/lib/surelog From e6364aab98f66c7efb15fb61e488718ed49cafff Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Sun, 21 Aug 2022 16:27:18 -0700 Subject: [PATCH 05/82] surelog: add gperftools build input --- pkgs/applications/science/logic/surelog/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/science/logic/surelog/default.nix b/pkgs/applications/science/logic/surelog/default.nix index 79cd135139e1..5f845510cc23 100644 --- a/pkgs/applications/science/logic/surelog/default.nix +++ b/pkgs/applications/science/logic/surelog/default.nix @@ -6,6 +6,7 @@ , pkg-config , libuuid , openjdk11 +, gperftools }: stdenv.mkDerivation rec { @@ -32,6 +33,7 @@ stdenv.mkDerivation rec { psutil orderedmultidict ])) + gperftools ]; doCheck = true; From f2ec2efd269a588d8d4710f3bc9e5ab4d3c0ec72 Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Sun, 21 Aug 2022 16:29:19 -0700 Subject: [PATCH 06/82] surelog: move openjdk and python packages to nativebuildinputs --- pkgs/applications/science/logic/surelog/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/science/logic/surelog/default.nix b/pkgs/applications/science/logic/surelog/default.nix index 5f845510cc23..c1dc98351d17 100644 --- a/pkgs/applications/science/logic/surelog/default.nix +++ b/pkgs/applications/science/logic/surelog/default.nix @@ -24,15 +24,15 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config - ]; - - buildInputs = [ - libuuid openjdk11 (python3.withPackages (p: with p; [ psutil orderedmultidict ])) + ]; + + buildInputs = [ + libuuid gperftools ]; From 818b0025e4c3952f6286bebdeb095ab60fea57f6 Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Sun, 21 Aug 2022 16:31:02 -0700 Subject: [PATCH 07/82] surelog: remove pkg from lib output --- pkgs/applications/science/logic/surelog/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/science/logic/surelog/default.nix b/pkgs/applications/science/logic/surelog/default.nix index c1dc98351d17..fae27d33e937 100644 --- a/pkgs/applications/science/logic/surelog/default.nix +++ b/pkgs/applications/science/logic/surelog/default.nix @@ -47,6 +47,7 @@ stdenv.mkDerivation rec { postInstall = '' mv $out/lib/surelog/* $out/lib/ rm -rf $out/lib/surelog + rm -rf $out/lib/pkg ''; meta = { From b684303d69a845bf83739d84402cf43cde9bb50c Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Sat, 3 Sep 2022 06:34:46 -0700 Subject: [PATCH 08/82] surelog: update version --- pkgs/applications/science/logic/surelog/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/science/logic/surelog/default.nix b/pkgs/applications/science/logic/surelog/default.nix index fae27d33e937..914022665a47 100644 --- a/pkgs/applications/science/logic/surelog/default.nix +++ b/pkgs/applications/science/logic/surelog/default.nix @@ -10,14 +10,14 @@ }: stdenv.mkDerivation rec { - pname = "Surelog"; - version = "2022.05.15"; + pname = "surelog"; + version = "v1.36"; src = fetchFromGitHub { owner = "chipsalliance"; repo = pname; - rev = "15d3698ca5c7d45dd95b58c15e76131420cb001c"; - hash = "sha256-dfje9yZ8ZR7x1EUxDUpKNcOWKYTPwPG6T4HzudV59R4="; + rev = version; + hash = "sha256-gMxpnSsJTXmg2VU7mQcw1J40OuqW6oo9/sGplLgV0ho="; fetchSubmodules = true; }; From 9ace7642c0704d43080c9fa7d7f07251559267b7 Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Sat, 3 Sep 2022 06:38:50 -0700 Subject: [PATCH 09/82] surelog: exclude darwin --- pkgs/applications/science/logic/surelog/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/science/logic/surelog/default.nix b/pkgs/applications/science/logic/surelog/default.nix index 914022665a47..976194fbef94 100644 --- a/pkgs/applications/science/logic/surelog/default.nix +++ b/pkgs/applications/science/logic/surelog/default.nix @@ -55,6 +55,6 @@ stdenv.mkDerivation rec { homepage = "https://github.com/chipsalliance/Surelog"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ matthuszagh ]; - platforms = lib.platforms.all; + platforms = lib.platforms.linux; }; } From 83a3076177429d0516c8ca72ca3fd87cc27e0af4 Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Sat, 3 Sep 2022 06:47:55 -0700 Subject: [PATCH 10/82] surelog: keep pkg in lib/surelog --- pkgs/applications/science/logic/surelog/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/applications/science/logic/surelog/default.nix b/pkgs/applications/science/logic/surelog/default.nix index 976194fbef94..ab82fe9f7480 100644 --- a/pkgs/applications/science/logic/surelog/default.nix +++ b/pkgs/applications/science/logic/surelog/default.nix @@ -46,8 +46,7 @@ stdenv.mkDerivation rec { postInstall = '' mv $out/lib/surelog/* $out/lib/ - rm -rf $out/lib/surelog - rm -rf $out/lib/pkg + mv $out/lib/pkg $out/lib/surelog/ ''; meta = { From 913c322cc9dae15e2b1ad902d25cbc4121b06501 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Wed, 14 Sep 2022 21:10:20 -0400 Subject: [PATCH 11/82] wine: enable Vulkan on Darwin --- pkgs/top-level/wine-packages.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/top-level/wine-packages.nix b/pkgs/top-level/wine-packages.nix index d50b979fdcec..c133e1472ebc 100644 --- a/pkgs/top-level/wine-packages.nix +++ b/pkgs/top-level/wine-packages.nix @@ -12,8 +12,7 @@ rec { fontconfigSupport = stdenv.isLinux; alsaSupport = stdenv.isLinux; openglSupport = true; - # Works on Darwin but disabled by default to prevent Hydra build failures due to MoltenVK. - vulkanSupport = stdenv.isLinux; + vulkanSupport = true; tlsSupport = true; cupsSupport = true; dbusSupport = stdenv.isLinux; @@ -41,7 +40,6 @@ rec { gphoto2Support = true; krb5Support = true; ldapSupport = true; - # Works on Darwin but disabled by default to prevent Hydra build failures due to MoltenVK. vkd3dSupport = stdenv.isLinux; embedInstallers = true; }; From 30eca8eb68519184b37fac1b447add1c7813ebdb Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Wed, 21 Sep 2022 04:56:46 -0700 Subject: [PATCH 12/82] uhdm: use tag for version --- pkgs/applications/science/logic/uhdm/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/science/logic/uhdm/default.nix b/pkgs/applications/science/logic/uhdm/default.nix index 6e5ad9c6bfeb..ada3858fdad5 100644 --- a/pkgs/applications/science/logic/uhdm/default.nix +++ b/pkgs/applications/science/logic/uhdm/default.nix @@ -7,13 +7,13 @@ stdenv.mkDerivation rec { pname = "UHDM"; - version = "2022.05.15"; + version = "0.9.1.37"; src = fetchFromGitHub { owner = "chipsalliance"; repo = pname; - rev = "18ec4cce8c9414c135dc0e69155f777195dfe328"; - hash = "sha256-ZWeMHHqgpdYlYzhRdTLXCe07dh0Pe8/ylU5TO3cAOmA="; + rev = "v${version}"; + hash = "sha256-mhbgjdbnjZShfwgdZEZshiNkRMPLT5oGcAnrvfrO7DM="; fetchSubmodules = true; }; From a3b780cf97cc81108a6fd97066069d8c0378e74a Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Wed, 21 Sep 2022 05:00:38 -0700 Subject: [PATCH 13/82] surelog: update to 1.37 --- pkgs/applications/science/logic/surelog/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/science/logic/surelog/default.nix b/pkgs/applications/science/logic/surelog/default.nix index ab82fe9f7480..438a874c4a4e 100644 --- a/pkgs/applications/science/logic/surelog/default.nix +++ b/pkgs/applications/science/logic/surelog/default.nix @@ -11,13 +11,13 @@ stdenv.mkDerivation rec { pname = "surelog"; - version = "v1.36"; + version = "1.37"; src = fetchFromGitHub { owner = "chipsalliance"; repo = pname; - rev = version; - hash = "sha256-gMxpnSsJTXmg2VU7mQcw1J40OuqW6oo9/sGplLgV0ho="; + rev = "v${version}"; + hash = "sha256-QYak0kWiL7C05zQmDd7Jl3a00rp4rMx0DJtd0K6lCII="; fetchSubmodules = true; }; From c526f70d1b2eab8d20557ae9b4b1b68598ee8e26 Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Tue, 27 Sep 2022 18:04:13 -0700 Subject: [PATCH 14/82] symbiflow: update to 2022.09.27 --- pkgs/development/compilers/yosys/plugins/symbiflow.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/development/compilers/yosys/plugins/symbiflow.nix b/pkgs/development/compilers/yosys/plugins/symbiflow.nix index ab03e7517133..97f0cdb7b5fa 100644 --- a/pkgs/development/compilers/yosys/plugins/symbiflow.nix +++ b/pkgs/development/compilers/yosys/plugins/symbiflow.nix @@ -4,7 +4,6 @@ , python3 , readline , stdenv -, which , yosys , zlib , yosys-symbiflow @@ -15,11 +14,11 @@ src = fetchFromGitHub { owner = "chipsalliance"; repo = "yosys-f4pga-plugins"; - rev = "aadd1735b2b7af0472e56dc23f1035d6e1904712"; - hash = "sha256-gmpEx+8XDN7f+6e/YG25VKgdadwqApPqU3S6OB4AryA="; + rev = "27208ce08200a5e89e3bd4f466bc68824df38c32"; + hash = "sha256-S7txjzlIp+idWIfp/DDOznluA3aMFfosMUt5dvi+g44="; }; - version = "2022.05.13"; + version = "2022.09.27"; # Supported symbiflow plugins. # @@ -49,7 +48,7 @@ in lib.genAttrs plugins (plugin: stdenv.mkDerivation (rec { inherit src version plugin; enableParallelBuilding = true; - nativeBuildInputs = [ which python3 ]; + nativeBuildInputs = [ python3 ]; buildInputs = [ yosys readline zlib uhdm surelog ]; # xdc has an incorrect path to a test which has yet to be patched From 3db955db9188191c9204e51e479e4e0efcadb6bd Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Tue, 27 Sep 2022 18:05:51 -0700 Subject: [PATCH 15/82] surelog: update to 1.40 --- pkgs/applications/science/logic/surelog/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/logic/surelog/default.nix b/pkgs/applications/science/logic/surelog/default.nix index 438a874c4a4e..b5130654c371 100644 --- a/pkgs/applications/science/logic/surelog/default.nix +++ b/pkgs/applications/science/logic/surelog/default.nix @@ -11,13 +11,13 @@ stdenv.mkDerivation rec { pname = "surelog"; - version = "1.37"; + version = "1.40"; src = fetchFromGitHub { owner = "chipsalliance"; repo = pname; rev = "v${version}"; - hash = "sha256-QYak0kWiL7C05zQmDd7Jl3a00rp4rMx0DJtd0K6lCII="; + hash = "sha256-5nhJilFIJJDCnJUEUgyPNtWSQUgWcvM6LDFgFatAl/k="; fetchSubmodules = true; }; From 49d809213240bb28f077022effc7fa43508c412d Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Tue, 27 Sep 2022 18:07:13 -0700 Subject: [PATCH 16/82] uhdm: update to 0.9.1.40 --- pkgs/applications/science/logic/uhdm/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/logic/uhdm/default.nix b/pkgs/applications/science/logic/uhdm/default.nix index ada3858fdad5..30f7c2057933 100644 --- a/pkgs/applications/science/logic/uhdm/default.nix +++ b/pkgs/applications/science/logic/uhdm/default.nix @@ -7,13 +7,13 @@ stdenv.mkDerivation rec { pname = "UHDM"; - version = "0.9.1.37"; + version = "0.9.1.40"; src = fetchFromGitHub { owner = "chipsalliance"; repo = pname; rev = "v${version}"; - hash = "sha256-mhbgjdbnjZShfwgdZEZshiNkRMPLT5oGcAnrvfrO7DM="; + hash = "sha256-CliKU2WM8B9012aDcS/mTyIf+JcsVsc4uRRi9+FRWbM="; fetchSubmodules = true; }; From 53e7c51ddcac1b05d03b2e166101293996e97d1f Mon Sep 17 00:00:00 2001 From: Alvar Penning Date: Mon, 3 Oct 2022 18:35:23 +0200 Subject: [PATCH 17/82] pythonPackage.pypcap: 1.2.3 -> 1.3.0 --- .../python-modules/pypcap/default.nix | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/pypcap/default.nix b/pkgs/development/python-modules/pypcap/default.nix index fbf6769ab4ca..84f94a76294c 100644 --- a/pkgs/development/python-modules/pypcap/default.nix +++ b/pkgs/development/python-modules/pypcap/default.nix @@ -2,32 +2,22 @@ , buildPythonPackage , dpkt , fetchFromGitHub -, fetchpatch , libpcap , pytestCheckHook }: buildPythonPackage rec { pname = "pypcap"; - version = "1.2.3"; - + version = "1.3.0"; src = fetchFromGitHub { owner = "pynetwork"; repo = pname; - rev = "v${version}"; - sha256 = "1zscfk10jpqwxgc8d84y8bffiwr92qrg2b24afhjwiyr352l67cf"; + # No release was tagged and PyPI doesn't contain tests. + rev = "968859f0ffb5b7c990506dffe82457b7de23a026"; + sha256 = "sha256-NfyEC3qEBm6TjebcDIsoz8tJWaJ625ZFPfx7AMyynWE="; }; - patches = [ - # Support for Python 3.9, https://github.com/pynetwork/pypcap/pull/102 - (fetchpatch { - name = "support-python-3.9.patch"; - url = "https://github.com/pynetwork/pypcap/pull/102/commits/e22f5d25f0d581d19ef337493434e72cd3a6ae71.patch"; - sha256 = "0n1syh1vcplgsf6njincpqphd2w030s3b2jyg86d7kbqv1w5wk0l"; - }) - ]; - postPatch = '' # Add the path to libpcap in the nix-store substituteInPlace setup.py --replace "('/usr', sys.prefix)" "'${libpcap}'" From 16f8a4b3e70f74941b8bc9bff707d7aa3c3dead2 Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Mon, 3 Oct 2022 11:35:48 -0700 Subject: [PATCH 18/82] uhdm: add patch to fix darwin build --- pkgs/applications/science/logic/uhdm/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/applications/science/logic/uhdm/default.nix b/pkgs/applications/science/logic/uhdm/default.nix index 30f7c2057933..47b9bb0d9423 100644 --- a/pkgs/applications/science/logic/uhdm/default.nix +++ b/pkgs/applications/science/logic/uhdm/default.nix @@ -33,6 +33,12 @@ stdenv.mkDerivation rec { rm -rf $out/lib/uhdm ''; + prePatch = '' + substituteInPlace CMakeLists.txt --replace \ + 'capnp compile' \ + 'capnp compile --src-prefix=''${GENDIR}/..' + ''; + meta = { description = "Universal Hardware Data Model"; homepage = "https://github.com/chipsalliance/UHDM"; From e5c2ffc28862bca2668ec2c4d8557bc6cdb73232 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sun, 2 Oct 2022 13:30:30 +0800 Subject: [PATCH 19/82] calcmysky: init at 0.1.0 --- .../science/astronomy/calcmysky/default.nix | 33 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/applications/science/astronomy/calcmysky/default.nix diff --git a/pkgs/applications/science/astronomy/calcmysky/default.nix b/pkgs/applications/science/astronomy/calcmysky/default.nix new file mode 100644 index 000000000000..528fc74394f8 --- /dev/null +++ b/pkgs/applications/science/astronomy/calcmysky/default.nix @@ -0,0 +1,33 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, wrapQtAppsHook +, glm +, eigen +, qtbase +}: + +stdenv.mkDerivation rec { + pname = "calcmysky"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "10110111"; + repo = "CalcMySky"; + rev = "v${version}"; + hash = "sha256-0tHxHek4wqJKLl54zF7wDYN+UPL2y35/YAb6Dtg4k48="; + }; + + nativeBuildInputs = [ cmake wrapQtAppsHook ]; + buildInputs = [ glm eigen qtbase ]; + + doCheck = true; + + meta = with lib;{ + description = "Simulator of light scattering by planetary atmospheres"; + homepage = "https://github.com/10110111/CalcMySky"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ nickcao ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fff8023f2a27..823ceeb2c283 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27061,6 +27061,8 @@ with pkgs; inherit (gnome2) libglade; }; + calcmysky = libsForQt5.callPackage ../applications/science/astronomy/calcmysky { }; + calcurse = callPackage ../applications/misc/calcurse { }; calculix = callPackage ../applications/science/math/calculix {}; From 15bf223df9bb125de89c7d64c05d68d9dc02137c Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sun, 2 Oct 2022 13:40:06 +0800 Subject: [PATCH 20/82] libsForQt5.qxlsx: init at 1.4.4 --- pkgs/development/libraries/qxlsx/default.nix | 40 ++++++++++++++++++++ pkgs/top-level/qt5-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/libraries/qxlsx/default.nix diff --git a/pkgs/development/libraries/qxlsx/default.nix b/pkgs/development/libraries/qxlsx/default.nix new file mode 100644 index 000000000000..b077b77517b8 --- /dev/null +++ b/pkgs/development/libraries/qxlsx/default.nix @@ -0,0 +1,40 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, qtbase +}: + +stdenv.mkDerivation rec { + pname = "qxlsx"; + version = "1.4.4"; + + src = fetchFromGitHub { + owner = "QtExcel"; + repo = "QXlsx"; + rev = "v${version}"; + hash = "sha256-01G7eJRrnee/acEeobYAYMY+93y+I0ASOTVRGuO+IcA="; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ qtbase ]; + + # Don't force Qt definitions onto users: https://github.com/QtExcel/QXlsx/commit/8e83402d + postPatch = '' + substituteInPlace QXlsx/CMakeLists.txt \ + --replace 'target_compile_definitions(QXlsx PUBLIC' 'target_compile_definitions(QXlsx PRIVATE' + ''; + + preConfigure = '' + cd QXlsx + ''; + + dontWrapQtApps = true; + + meta = with lib;{ + description = "Excel file(*.xlsx) reader/writer library using Qt 5 or 6"; + homepage = "https://qtexcel.github.io/QXlsx"; + license = licenses.mit; + maintainers = with maintainers; [ nickcao ]; + }; +} diff --git a/pkgs/top-level/qt5-packages.nix b/pkgs/top-level/qt5-packages.nix index 6d66eda3c356..b7398cf0b274 100644 --- a/pkgs/top-level/qt5-packages.nix +++ b/pkgs/top-level/qt5-packages.nix @@ -225,6 +225,8 @@ in (kdeFrameworks // plasmaMobileGear // plasma5 // plasma5.thirdParty // kdeGea qwt6_1 = callPackage ../development/libraries/qwt/6_1.nix { }; + qxlsx = callPackage ../development/libraries/qxlsx { }; + soqt = callPackage ../development/libraries/soqt { }; telepathy = callPackage ../development/libraries/telepathy/qt { }; From ffb43186dc018f1a83587542bbb6bcefb50dfead Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sun, 2 Oct 2022 14:37:56 +0800 Subject: [PATCH 21/82] stellarium: 0.22.2 -> 1.0 --- .../science/astronomy/stellarium/default.nix | 44 +++++++++++++++---- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/science/astronomy/stellarium/default.nix b/pkgs/applications/science/astronomy/stellarium/default.nix index b157be0fcb75..cabb281551d7 100644 --- a/pkgs/applications/science/astronomy/stellarium/default.nix +++ b/pkgs/applications/science/astronomy/stellarium/default.nix @@ -1,25 +1,51 @@ -{ stdenv, lib, fetchFromGitHub -, cmake, freetype, libpng, libGLU, libGL, openssl, perl, libiconv -, qtscript, qtserialport, qttools, qtcharts -, qtmultimedia, qtlocation, qtbase, wrapQtAppsHook +{ lib +, stdenv +, fetchFromGitHub +, cmake +, perl +, wrapQtAppsHook +, qtbase +, qtcharts +, qtlocation +, qtmultimedia +, qtscript +, qtserialport +, qtwebengine +, calcmysky +, qxlsx +, indilib +, libnova }: stdenv.mkDerivation rec { pname = "stellarium"; - version = "0.22.2"; + version = "1.0"; src = fetchFromGitHub { owner = "Stellarium"; repo = "stellarium"; rev = "v${version}"; - sha256 = "sha256-FBH5IB1keMzRP06DQK2e7HX8rwm5/sdTX+cB80uG0vw="; + sha256 = "sha256-6EAykJ0yWeU1EBR5+7JjWGUVBE1DKW+W8yJOt0smkaE="; }; - nativeBuildInputs = [ cmake perl wrapQtAppsHook ]; + nativeBuildInputs = [ + cmake + perl + wrapQtAppsHook + ]; buildInputs = [ - freetype libpng libGLU libGL openssl libiconv qtscript qtserialport qttools - qtmultimedia qtlocation qtbase qtcharts + qtbase + qtcharts + qtlocation + qtmultimedia + qtscript + qtserialport + qtwebengine + calcmysky + qxlsx + indilib + libnova ]; preConfigure = lib.optionalString stdenv.isDarwin '' From 8eda146bb2f723e72b28c73c7097664f62e0ddf5 Mon Sep 17 00:00:00 2001 From: Rhys Davies Date: Sun, 16 Oct 2022 20:52:14 +1300 Subject: [PATCH 22/82] matrix-appservice-irc: Compile typescript Signed-off-by: Rhys Davies --- pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix b/pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix index d76846bd2c4a..f8b0711f10bc 100644 --- a/pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix +++ b/pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix @@ -24,6 +24,9 @@ ourNodePackages.package.override { dontAutoPatchelf = true; postInstall = '' + # Compile typescript + npm run build + makeWrapper '${nodejs}/bin/node' "$out/bin/matrix-appservice-irc" \ --add-flags "$out/lib/node_modules/matrix-appservice-irc/app.js" ''; From 062f14268e34d9625e89f6374eb80dfb61a9a663 Mon Sep 17 00:00:00 2001 From: Rhys Davies Date: Sun, 16 Oct 2022 20:52:54 +1300 Subject: [PATCH 23/82] matrix-appservice-irc: Add rhysmdnz to maintainers Signed-off-by: Rhys Davies --- pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix b/pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix index f8b0711f10bc..6a91e2d8aa26 100644 --- a/pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix +++ b/pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix @@ -36,7 +36,7 @@ ourNodePackages.package.override { meta = with lib; { description = "Node.js IRC bridge for Matrix"; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ rhysmdnz ]; homepage = "https://github.com/matrix-org/matrix-appservice-irc"; license = licenses.asl20; platforms = platforms.linux; From 823f2b3700a4fb729d4fb85144bb1ae76deb36bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Fern=C3=A1ndez=20L=C3=B3pez?= Date: Fri, 21 Oct 2022 12:54:42 +0200 Subject: [PATCH 24/82] unison: M4 -> M4c --- pkgs/development/compilers/unison/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/unison/default.nix b/pkgs/development/compilers/unison/default.nix index 2c8150f764be..b26132ff66cf 100644 --- a/pkgs/development/compilers/unison/default.nix +++ b/pkgs/development/compilers/unison/default.nix @@ -6,18 +6,18 @@ stdenv.mkDerivation rec { pname = "unison-code-manager"; - milestone_id = "M4"; + milestone_id = "M4c"; version = "1.0.${milestone_id}-alpha"; src = if (stdenv.isDarwin) then fetchurl { url = "https://github.com/unisonweb/unison/releases/download/release/${milestone_id}/ucm-macos.tar.gz"; - sha256 = "A8i1jH9+W89M+XbmYx0knJsP5c/EdVE2T9L/EIL0USU="; + sha256 = "sha256-mkzIC/cPkpH0obEBqkvvKVh74LaV6jkfyEMLHmJn/nE="; } else fetchurl { url = "https://github.com/unisonweb/unison/releases/download/release/${milestone_id}/ucm-linux.tar.gz"; - sha256 = "OqtJiKAsefw2fVjhtsYUe+qLPqXBPFkHUaMh26EJBJ4="; + sha256 = "sha256-LfT/pMOvfBAwew6NW0VNvuB5c1AC7b+qKraP25+kytg="; }; # The tarball is just the prebuilt binary, in the archive root. From ea2ca5e6394a6bd63c068675addc151cf13a6e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?PedroHLC=20=E2=98=AD?= Date: Sat, 22 Oct 2022 11:43:23 -0300 Subject: [PATCH 25/82] spirv-llvm-translator: version depends on llvm version --- .../spirv-llvm-translator/default.nix | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/pkgs/development/compilers/spirv-llvm-translator/default.nix b/pkgs/development/compilers/spirv-llvm-translator/default.nix index ace6c773770a..a268dafbdef0 100644 --- a/pkgs/development/compilers/spirv-llvm-translator/default.nix +++ b/pkgs/development/compilers/spirv-llvm-translator/default.nix @@ -3,31 +3,40 @@ , cmake , pkg-config , lit -, llvm_11 +, llvm , spirv-headers , spirv-tools }: +let + llvmMajor = lib.versions.major llvm.version; + + branch = + if llvmMajor == "11" then { + version = "unstable-2022-05-04"; + rev = "99420daab98998a7e36858befac9c5ed109d4920"; # 265 commits ahead of v11.0.0 + hash = "sha256-/vUyL6Wh8hykoGz1QmT1F7lfGDEmG4U3iqmqrJxizOg="; + } else throw "Incompatible LLVM version."; +in stdenv.mkDerivation rec { pname = "SPIRV-LLVM-Translator"; - version = "unstable-2022-05-04"; + inherit (branch) version; src = fetchFromGitHub { owner = "KhronosGroup"; repo = "SPIRV-LLVM-Translator"; - rev = "99420daab98998a7e36858befac9c5ed109d4920"; - sha256 = "sha256-/vUyL6Wh8hykoGz1QmT1F7lfGDEmG4U3iqmqrJxizOg="; + inherit (branch) rev hash; }; - nativeBuildInputs = [ pkg-config cmake llvm_11.dev spirv-tools ]; + nativeBuildInputs = [ pkg-config cmake llvm.dev spirv-tools ]; - buildInputs = [ spirv-headers llvm_11 ]; + buildInputs = [ spirv-headers llvm ]; checkInputs = [ lit ]; cmakeFlags = [ "-DLLVM_INCLUDE_TESTS=ON" - "-DLLVM_DIR=${llvm_11.dev}" + "-DLLVM_DIR=${llvm.dev}" "-DBUILD_SHARED_LIBS=YES" "-DLLVM_SPIRV_BUILD_EXTERNAL=YES" # RPATH of binary /nix/store/.../bin/llvm-spirv contains a forbidden reference to /build/ From 40ee116f25a11632263f5dd2f824170b58daa085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?PedroHLC=20=E2=98=AD?= Date: Sat, 22 Oct 2022 11:46:23 -0300 Subject: [PATCH 26/82] spirv-llvm-translator_14: init at 14.0.0 --- .../compilers/spirv-llvm-translator/default.nix | 12 ++++++++++-- pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/spirv-llvm-translator/default.nix b/pkgs/development/compilers/spirv-llvm-translator/default.nix index a268dafbdef0..2100c7d9070a 100644 --- a/pkgs/development/compilers/spirv-llvm-translator/default.nix +++ b/pkgs/development/compilers/spirv-llvm-translator/default.nix @@ -12,7 +12,15 @@ let llvmMajor = lib.versions.major llvm.version; branch = - if llvmMajor == "11" then { + if llvmMajor == "15" then rec { + version = "15.0.0"; + rev = "v${version}"; + hash = "sha256-111yL6Wh8hykoGz1QmT1F7lfGDEmG4U3iqmqrJxizOg="; + } else if llvmMajor == "14" then rec{ + version = "14.0.0"; + rev = "v${version}"; + hash = "sha256-BhNAApgZ/w/92XjpoDY6ZEIhSTwgJ4D3/EfNvPmNM2o="; + } else if llvmMajor == "11" then { version = "unstable-2022-05-04"; rev = "99420daab98998a7e36858befac9c5ed109d4920"; # 265 commits ahead of v11.0.0 hash = "sha256-/vUyL6Wh8hykoGz1QmT1F7lfGDEmG4U3iqmqrJxizOg="; @@ -41,7 +49,7 @@ stdenv.mkDerivation rec { "-DLLVM_SPIRV_BUILD_EXTERNAL=YES" # RPATH of binary /nix/store/.../bin/llvm-spirv contains a forbidden reference to /build/ "-DCMAKE_SKIP_BUILD_RPATH=ON" - ]; + ] ++ lib.optionals (llvmMajor != "11") [ "-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=${spirv-headers.src}" ]; # FIXME: CMake tries to run "/llvm-lit" which of course doesn't exist doCheck = false; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 791d48213915..ba857b10e94f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15134,6 +15134,8 @@ with pkgs; spirv-llvm-translator = callPackage ../development/compilers/spirv-llvm-translator { }; + spirv-llvm-translator_14 = callPackage ../development/compilers/spirv-llvm-translator { llvm = llvm_14; }; + sqldeveloper = callPackage ../development/tools/database/sqldeveloper { jdk = oraclejdk; }; From f67b47156242cc8d825e73acc1ac5071448d950b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 26 Oct 2022 14:40:46 +0000 Subject: [PATCH 27/82] asciidoctorj: 2.5.6 -> 2.5.7 --- pkgs/tools/typesetting/asciidoctorj/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/typesetting/asciidoctorj/default.nix b/pkgs/tools/typesetting/asciidoctorj/default.nix index 3d02278ddc56..c09d6381bec4 100644 --- a/pkgs/tools/typesetting/asciidoctorj/default.nix +++ b/pkgs/tools/typesetting/asciidoctorj/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "asciidoctorj"; - version = "2.5.6"; + version = "2.5.7"; src = fetchzip { url = "mirror://maven/org/asciidoctor/${pname}/${version}/${pname}-${version}-bin.zip"; - sha256 = "sha256-oAakldNmSWMAgbHRZm9jY9QRFdQamrAsDyD0havivr0="; + sha256 = "sha256-LUbzS2XYSsSPyJmyvitS5or0S4o9SB2ycMkuAWyVB8w="; }; nativeBuildInputs = [ makeWrapper ]; From 0a234d45151897659e073cbdd505cbc535f5d418 Mon Sep 17 00:00:00 2001 From: Adam Stephens Date: Thu, 27 Oct 2022 17:07:12 -0400 Subject: [PATCH 28/82] squeezelite: 1.9.9.1403 -> 1.9.9.1411 --- pkgs/applications/audio/squeezelite/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/audio/squeezelite/default.nix b/pkgs/applications/audio/squeezelite/default.nix index e13a791ccbbc..a14519c6701b 100644 --- a/pkgs/applications/audio/squeezelite/default.nix +++ b/pkgs/applications/audio/squeezelite/default.nix @@ -34,13 +34,13 @@ stdenv.mkDerivation { pname = binName; # versions are specified in `squeezelite.h` # see https://github.com/ralph-irving/squeezelite/issues/29 - version = "1.9.9.1403"; + version = "1.9.9.1411"; src = fetchFromGitHub { owner = "ralph-irving"; repo = "squeezelite"; - rev = "bc72c0de3fff771540a2a45aaafafed539387b3c"; - hash = "sha256-205i61mbeQG2MzSE9NtPHSuNeyMbjZzbZVCFFzjqKqQ="; + rev = "ca44fc6e258bb413d6281d927063b25940f42e5c"; + hash = "sha256-aZ+2nyy6tK3VwgTCWGoNaU4//kkHUzd6DZSfTEIgbvY="; }; buildInputs = [ flac libmad libvorbis mpg123 ] From f71605b0b8fdeb0e253077faa3f9c923b81d356b Mon Sep 17 00:00:00 2001 From: Adam Stephens Date: Fri, 28 Oct 2022 09:47:51 -0400 Subject: [PATCH 29/82] maintainers: add adamcstephens --- maintainers/maintainer-list.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index d9903128c73d..e02ce42b861d 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -281,6 +281,13 @@ githubId = 124545; name = "Anthony Cowley"; }; + adamcstephens = { + email = "happy.plan4249@valkor.net"; + matrix = "@adam:valkor.net"; + github = "adamcstephens"; + githubId = 2071575; + name = "Adam C. Stephens"; + }; adamlwgriffiths = { email = "adam.lw.griffiths@gmail.com"; github = "adamlwgriffiths"; From e96af03d86f1b8f8af3e4cacc9defd7292b01abc Mon Sep 17 00:00:00 2001 From: Adam Stephens Date: Fri, 28 Oct 2022 09:48:07 -0400 Subject: [PATCH 30/82] squeezelite: update maintainers list --- pkgs/applications/audio/squeezelite/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/audio/squeezelite/default.nix b/pkgs/applications/audio/squeezelite/default.nix index a14519c6701b..f5f1feacb00c 100644 --- a/pkgs/applications/audio/squeezelite/default.nix +++ b/pkgs/applications/audio/squeezelite/default.nix @@ -82,7 +82,7 @@ stdenv.mkDerivation { description = "Lightweight headless squeezebox client emulator"; homepage = "https://github.com/ralph-irving/squeezelite"; license = with licenses; [ gpl3Plus ] ++ optional dsdSupport bsd2; - maintainers = with maintainers; [ samdoshi ]; + maintainers = with maintainers; [ adamcstephens ]; platforms = platforms.linux; }; } From e8646698979ccae68d7d65b2baf473fac731afd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Zimmermann?= Date: Fri, 28 Oct 2022 16:51:31 +0200 Subject: [PATCH 31/82] vscode-extensions.maximedenes.vscoq: init at 0.3.6 --- .../editors/vscode/extensions/default.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkgs/applications/editors/vscode/extensions/default.nix b/pkgs/applications/editors/vscode/extensions/default.nix index e2ff4cc72708..9453c52db040 100644 --- a/pkgs/applications/editors/vscode/extensions/default.nix +++ b/pkgs/applications/editors/vscode/extensions/default.nix @@ -1657,6 +1657,22 @@ let }; }; + maximedenes.vscoq = buildVscodeMarketplaceExtension { + mktplcRef = { + publisher = "maximedenes"; + name = "vscoq"; + version = "0.3.6"; + sha256 = "sha256-b0gCaEzt5yAj53oLFZSXSD3bum9J1fYes/uf9+OlUek="; + }; + meta = with lib; { + description = "VsCoq is an extension for Visual Studio Code (VS Code) and VSCodium with support for the Coq Proof Assistant."; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=maximedenes.vscoq"; + homepage = "https://github.com/coq-community/vscoq"; + license = licenses.mit; + maintainers = with maintainers; [ Zimmi48 ]; + }; + }; + mhutchie.git-graph = buildVscodeMarketplaceExtension { mktplcRef = { name = "git-graph"; From c988052ad56d9bc179e3bd05f5c5a24b8777b83a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Zimmermann?= Date: Fri, 28 Oct 2022 17:34:27 +0200 Subject: [PATCH 32/82] vscode-extensions.github.copilot: 1.46.6822 -> 1.56.7152 Update and add some meta-information and myself as a maintainer. --- .../editors/vscode/extensions/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/vscode/extensions/default.nix b/pkgs/applications/editors/vscode/extensions/default.nix index e2ff4cc72708..2816bf50e4bc 100644 --- a/pkgs/applications/editors/vscode/extensions/default.nix +++ b/pkgs/applications/editors/vscode/extensions/default.nix @@ -1222,10 +1222,16 @@ let mktplcRef = { publisher = "github"; name = "copilot"; - version = "1.46.6822"; - sha256 = "sha256-L71mC0190ZubqNVliu7es4SDsBTGVokePpcNupABI8Q="; + version = "1.56.7152"; + sha256 = "sha256-9WEvTcVY/yMF00GJVj4h57aWhfBYTSatbw10DjjAaAM="; + }; + meta = with lib; { + description = "GitHub Copilot uses OpenAI Codex to suggest code and entire functions in real-time right from your editor."; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=GitHub.copilot"; + homepage = "https://github.com/features/copilot"; + license = licenses.unfree; + maintainers = with maintainers; [ Zimmi48 ]; }; - meta = { license = lib.licenses.unfree; }; }; github-vscode-theme = buildVscodeMarketplaceExtension { From f59546ee356644600680bc0e232824bf679ef1a6 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Sun, 30 Oct 2022 10:52:27 -0400 Subject: [PATCH 33/82] python3Packages.ibis-framework: don't test dask backend --- pkgs/development/python-modules/ibis-framework/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/development/python-modules/ibis-framework/default.nix b/pkgs/development/python-modules/ibis-framework/default.nix index 87f2eb692620..84c1a7e93040 100644 --- a/pkgs/development/python-modules/ibis-framework/default.nix +++ b/pkgs/development/python-modules/ibis-framework/default.nix @@ -46,7 +46,6 @@ }: let testBackends = [ - "dask" "datafusion" "duckdb" "pandas" From 8e543ff00b9c260f0a69c530ad6a9eb648960224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Zimmermann?= Date: Mon, 31 Oct 2022 10:18:26 +0100 Subject: [PATCH 34/82] vscode-extensions.ms-toolsai.jupyter: 2022.5.1001411044 -> 2022.9.1202862440 --- .../editors/vscode/extensions/ms-toolsai-jupyter/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/vscode/extensions/ms-toolsai-jupyter/default.nix b/pkgs/applications/editors/vscode/extensions/ms-toolsai-jupyter/default.nix index ab3403852409..a427c1f8764a 100644 --- a/pkgs/applications/editors/vscode/extensions/ms-toolsai-jupyter/default.nix +++ b/pkgs/applications/editors/vscode/extensions/ms-toolsai-jupyter/default.nix @@ -7,8 +7,8 @@ in buildVscodeMarketplaceExtension { mktplcRef = { name = "jupyter"; publisher = "ms-toolsai"; - version = "2022.5.1001411044"; - sha256 = "0z6i7a5sba42yc2inp3yvw6lm6m0kings2iv18h4d6zyhm2lb61p"; + version = "2022.9.1202862440"; + sha256 = "sha256-0F6eTEXt0PJY0+1o/qZEuUcD9sjHSnUrI1OS4IO2WLc="; }; nativeBuildInputs = [ From b99d2241fd775569e43507cb430cfeae3aaafe9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Zimmermann?= Date: Mon, 31 Oct 2022 10:19:15 +0100 Subject: [PATCH 35/82] vscode-extensions.ms-python.python: 2022.15.12711056 -> 2022.17.13011006 --- .../applications/editors/vscode/extensions/python/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/vscode/extensions/python/default.nix b/pkgs/applications/editors/vscode/extensions/python/default.nix index e72c89511aed..00121d29a34f 100644 --- a/pkgs/applications/editors/vscode/extensions/python/default.nix +++ b/pkgs/applications/editors/vscode/extensions/python/default.nix @@ -19,8 +19,8 @@ vscode-utils.buildVscodeMarketplaceExtension rec { mktplcRef = { name = "python"; publisher = "ms-python"; - version = "2022.15.12711056"; - sha256 = "sha256-bksUMN+ZdkmElVD8BC4ihklQyWlKkcpep2VOwUzISnQ="; + version = "2022.17.13011006"; + sha256 = "sha256-f5vbXcqKwCnL+vsTcOX7rWUfoXNih5ZaWr3XUpCYB/M="; }; buildInputs = [ icu ]; From 0faea3752b7313ac03b6f292747d8a04cfc5b785 Mon Sep 17 00:00:00 2001 From: Jan Solanti Date: Mon, 31 Oct 2022 23:57:32 +0200 Subject: [PATCH 36/82] tauon: 7.4.2 -> 7.4.3 --- pkgs/applications/audio/tauon/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/tauon/default.nix b/pkgs/applications/audio/tauon/default.nix index 6c39fdcf5fc0..24c8e610a692 100644 --- a/pkgs/applications/audio/tauon/default.nix +++ b/pkgs/applications/audio/tauon/default.nix @@ -25,13 +25,13 @@ stdenv.mkDerivation rec { pname = "tauon"; - version = "7.4.2"; + version = "7.4.3"; src = fetchFromGitHub { owner = "Taiko2k"; repo = "TauonMusicBox"; rev = "v${version}"; - sha256 = "sha256-fEEu7GqK1leOop3kd1Ci9BAH2bP31jvTOg3DEL8lIF4="; + sha256 = "sha256-eB4fwW5UvylVslSEvDFdCVYcEK3M2H+8VJGHH13vvA0="; }; postUnpack = '' From ff30df57d1f071972945570fb4d04b8636700f28 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 29 Oct 2022 08:29:10 +0000 Subject: [PATCH 37/82] draco: 1.5.3 -> 1.5.5 --- pkgs/development/libraries/draco/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/draco/default.nix b/pkgs/development/libraries/draco/default.nix index dfce8765062f..a3cd2167cb76 100644 --- a/pkgs/development/libraries/draco/default.nix +++ b/pkgs/development/libraries/draco/default.nix @@ -16,14 +16,14 @@ let cmakeBool = b: if b then "ON" else "OFF"; in stdenv.mkDerivation rec { - version = "1.5.3"; + version = "1.5.5"; pname = "draco"; src = fetchFromGitHub { owner = "google"; repo = "draco"; rev = version; - sha256 = "sha256-LbWtZtgvZQdgwAGHVsouH6cAIVXP+9Q5n8KjzaBRrBQ="; + sha256 = "sha256-WYWEUfBPz/Pt7sE8snG3/LnOA3DEUm/SUVLtsH7zG5g="; fetchSubmodules = true; }; From be60d9ad17fea45d407fa36f1150cfbd2db0a21d Mon Sep 17 00:00:00 2001 From: Jan Solanti Date: Tue, 1 Nov 2022 02:32:17 +0200 Subject: [PATCH 38/82] draco: add meta.changelog --- pkgs/development/libraries/draco/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/draco/default.nix b/pkgs/development/libraries/draco/default.nix index a3cd2167cb76..1d6a2b4da91c 100644 --- a/pkgs/development/libraries/draco/default.nix +++ b/pkgs/development/libraries/draco/default.nix @@ -50,6 +50,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Library for compressing and decompressing 3D geometric meshes and point clouds"; homepage = "https://google.github.io/draco/"; + changelog = "https://github.com/google/draco/releases/tag/${version}"; license = licenses.asl20; maintainers = with maintainers; [ jansol ]; platforms = platforms.all; From 650fd131fb0deb3f13a7427a7a841b38c4cc808f Mon Sep 17 00:00:00 2001 From: figsoda Date: Tue, 1 Nov 2022 20:39:18 -0400 Subject: [PATCH 39/82] vimPlugins.nvim-treesitter: fix up update script and update grammars --- .../vim/plugins/nvim-treesitter/generated.nix | 37 ++++++++----------- .../vim/plugins/nvim-treesitter/update.py | 7 ++-- 2 files changed, 18 insertions(+), 26 deletions(-) diff --git a/pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix b/pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix index e818eff764a8..4fb96a7128c5 100644 --- a/pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix +++ b/pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix @@ -25,12 +25,12 @@ }; bash = buildGrammar { language = "bash"; - version = "f1a86d3"; + version = "77cf8a7"; source = fetchFromGitHub { owner = "tree-sitter"; repo = "tree-sitter-bash"; - rev = "f1a86d3cc5aeeb67e0e52442e893af7f813025b4"; - hash = "sha256-zzHA+kGw67WFyPVFRWRyKmhAjxp5jkv0K2yhGxNfFM4="; + rev = "77cf8a7cab8904baf1a721762e012644ac1d4c7b"; + hash = "sha256-UPMJ7iL8Y0NkAHtPDrkTjG1qFwr8rXuGqvsG+LTWqEY="; }; }; beancount = buildGrammar { @@ -503,12 +503,12 @@ }; help = buildGrammar { language = "help"; - version = "8df3266"; + version = "49cdef5"; source = fetchFromGitHub { owner = "neovim"; repo = "tree-sitter-vimdoc"; - rev = "8df3266b423d24c9ac3f3b4b9928e65eb1e5e741"; - hash = "sha256-t9SHuymK5pYlryWGpORGPYLgPZ3xBx0XH69s5RtRnEI="; + rev = "49cdef52ded4a886bf34bc474876b09f9270d48f"; + hash = "sha256-szNY2yw5i9pgF+MpaEAkP8BgSYEe6nrFW+17sbSZ6Yc="; }; }; hjson = buildGrammar { @@ -693,12 +693,12 @@ }; lua = buildGrammar { language = "lua"; - version = "887dfd4"; + version = "fb30e8c"; source = fetchFromGitHub { owner = "MunifTanjim"; repo = "tree-sitter-lua"; - rev = "887dfd4e83c469300c279314ff1619b1d0b85b91"; - hash = "sha256-5i+UN6Es+K7KDD1qz3ZrVn8IfGdTswcISUyV2sGtY9M="; + rev = "fb30e8cb605e2ebd6c643e6981325a63fbbde320"; + hash = "sha256-gT2WHH3rkFzb6iER0ryVU7bqVbh36RbTI9HSWMh3DsI="; }; }; m68k = buildGrammar { @@ -731,7 +731,6 @@ hash = "sha256-gKbjAcY/x9sIxiG7edolAQp2JWrx78mEGeCpayxFOuE="; }; location = "tree-sitter-markdown"; - }; markdown_inline = buildGrammar { language = "markdown_inline"; @@ -743,7 +742,6 @@ hash = "sha256-gKbjAcY/x9sIxiG7edolAQp2JWrx78mEGeCpayxFOuE="; }; location = "tree-sitter-markdown-inline"; - }; menhir = buildGrammar { language = "menhir"; @@ -815,7 +813,6 @@ hash = "sha256-gTmRBFFCBrA48Yn1MO2mMQPpa6u3uv5McC4BDuMXKuM="; }; location = "ocaml"; - }; ocaml_interface = buildGrammar { language = "ocaml_interface"; @@ -827,7 +824,6 @@ hash = "sha256-gTmRBFFCBrA48Yn1MO2mMQPpa6u3uv5McC4BDuMXKuM="; }; location = "interface"; - }; ocamllex = buildGrammar { language = "ocamllex"; @@ -1163,14 +1159,14 @@ }; swift = buildGrammar { language = "swift"; - version = "c88b5d7"; + version = "d7808f0"; source = fetchFromGitHub { owner = "alex-pinkus"; repo = "tree-sitter-swift"; nativeBuildInputs = [ nodejs tree-sitter ]; postFetch = "pushd $out && tree-sitter generate && popd"; - rev = "c88b5d73f193f5b0762b1a5f0299a275e6a728fb"; - hash = "sha256-OfFMGxL72SPZW4AtHoThhYtjmKWabStLKAB9TxmjMDw="; + rev = "d7808f030a44dc8768948042baa7566949785e2f"; + hash = "sha256-7Gjpf2isOpeOV3ZMTMibK+F4C4v8ywOPin2Wv86s+AM="; }; }; sxhkdrc = buildGrammar { @@ -1245,7 +1241,6 @@ hash = "sha256-Nx+K7Ic/ePKAXPIMlrRn6zELYE59f/FnnZ/LM5ELaU8="; }; location = "tsx"; - }; turtle = buildGrammar { language = "turtle"; @@ -1259,12 +1254,12 @@ }; twig = buildGrammar { language = "twig"; - version = "6a01f20"; + version = "035f549"; source = fetchFromGitHub { owner = "gbprod"; repo = "tree-sitter-twig"; - rev = "6a01f20e73038300d205d370212c361949be3035"; - hash = "sha256-M+57mGl4Sgn0yUGAyxHxE6ShR+E/ki4m8/x/f/KHetA="; + rev = "035f549ec8c043e734f04341d7ccdc669bb2ba91"; + hash = "sha256-XSE0E6a9o+WpvmMIXHu0N89VqzaIk9eFHofKAPHtT20="; }; }; typescript = buildGrammar { @@ -1277,7 +1272,6 @@ hash = "sha256-Nx+K7Ic/ePKAXPIMlrRn6zELYE59f/FnnZ/LM5ELaU8="; }; location = "typescript"; - }; v = buildGrammar { language = "v"; @@ -1289,7 +1283,6 @@ hash = "sha256-d1NeZixsN9992Q1UC5ZKGN4LNxlsvdL91QW2K8d1J9Y="; }; location = "tree_sitter_v"; - }; vala = buildGrammar { language = "vala"; diff --git a/pkgs/applications/editors/vim/plugins/nvim-treesitter/update.py b/pkgs/applications/editors/vim/plugins/nvim-treesitter/update.py index 6c35476d6069..dd88d74e8f17 100755 --- a/pkgs/applications/editors/vim/plugins/nvim-treesitter/update.py +++ b/pkgs/applications/editors/vim/plugins/nvim-treesitter/update.py @@ -4,10 +4,10 @@ import json import re import subprocess -from os import getenv +from os import environ from os.path import dirname, join -lockfile = json.load(open(join(getenv("NVIM_TREESITTER"), "lockfile.json"))) +lockfile = json.load(open(join(environ["NVIM_TREESITTER"], "lockfile.json"))) configs = json.loads( subprocess.check_output( @@ -98,8 +98,7 @@ def generate_grammar(item): location = info.get("location") if location: generated += f""" - location = "{location}"; -""" + location = "{location}";""" generated += """ }; From 8ce4a83e94f54223d9a3924ae0ef79e6f34182dc Mon Sep 17 00:00:00 2001 From: figsoda Date: Tue, 1 Nov 2022 21:09:23 -0400 Subject: [PATCH 40/82] vimPlugins.nvim-treesitter: create aliases for grammars --- .../vim/plugins/nvim-treesitter/overrides.nix | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix b/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix index f34fd25e8de7..a2b70c785ff1 100644 --- a/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix @@ -3,11 +3,26 @@ self: super: let - builtGrammars = callPackage ./generated.nix { + generatedGrammars = callPackage ./generated.nix { buildGrammar = callPackage ../../../../../development/tools/parsing/tree-sitter/grammar.nix { }; }; - allGrammars = lib.filter lib.isDerivation (lib.attrValues builtGrammars); + generatedDerivations = lib.filterAttrs (_: lib.isDerivation) generatedGrammars; + + builtGrammars = generatedGrammars // lib.listToAttrs + (lib.concatLists (lib.mapAttrsToList + (k: v: + let + replaced = lib.replaceStrings [ "_" ] [ "-" ] k; + in + map (lib.flip lib.nameValuePair v) + ([ ("tree-sitter-${k}") ] ++ lib.optionals (k != replaced) [ + replaced + "tree-sitter-${replaced}" + ])) + generatedDerivations)); + + allGrammars = lib.attrValues generatedDerivations; # Usage: # pkgs.vimPlugins.nvim-treesitter.withPlugins (p: [ p.c p.java ... ]) From 94e35d1aa2aca1eb91c42d2e6b8e13fa2e8cdc2f Mon Sep 17 00:00:00 2001 From: figsoda Date: Tue, 1 Nov 2022 21:31:59 -0400 Subject: [PATCH 41/82] vimPlugins.nvim-treesitter: add figsoda as a maintainer --- .../editors/vim/plugins/nvim-treesitter/overrides.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix b/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix index a2b70c785ff1..cdaba769ff52 100644 --- a/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix @@ -49,5 +49,7 @@ in withAllGrammars = withPlugins (_: allGrammars); }; + + meta.maintainers = with lib.maintainers; [ figsoda ]; } From cbc6d310c79474844409ca88c971a79811ec689c Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Wed, 2 Nov 2022 11:50:23 +0800 Subject: [PATCH 42/82] pdns: 4.6.3 -> 4.7.2 --- pkgs/servers/dns/pdns/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/dns/pdns/default.nix b/pkgs/servers/dns/pdns/default.nix index beee5d3a4d77..7ca466ef5a10 100644 --- a/pkgs/servers/dns/pdns/default.nix +++ b/pkgs/servers/dns/pdns/default.nix @@ -5,11 +5,11 @@ stdenv.mkDerivation rec { pname = "pdns"; - version = "4.6.3"; + version = "4.7.2"; src = fetchurl { url = "https://downloads.powerdns.com/releases/pdns-${version}.tar.bz2"; - hash = "sha256-rNBricoB0a32G5BmBGFPDh13oelO7srej/XVOhbbc4k="; + hash = "sha256-TcrjXr3ASRWHLXv24tC8pLBcY1ChAKXPnCnfU7qlPOI="; }; # redact configure flags from version output to reduce closure size patches = [ ./version.patch ]; From aaa9a95e0215eca74a8363bbd5d096dc6adabfdb Mon Sep 17 00:00:00 2001 From: taku0 Date: Sun, 30 Oct 2022 15:24:34 +0900 Subject: [PATCH 43/82] thunderbird, thunderbird-bin: fix desktop item Generate appropriate desktop item for Thunderbird. Fixes #194851. --- .../networking/browsers/firefox/wrapper.nix | 80 ++++++++++++------- 1 file changed, 53 insertions(+), 27 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index eeb72590df23..c52c7caef868 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -166,38 +166,64 @@ let in stdenv.mkDerivation { inherit pname version; - desktopItem = makeDesktopItem { + desktopItem = makeDesktopItem ({ name = applicationName; exec = "${launcherName} %U"; inherit icon; desktopName = "${desktopName}${nameSuffix}${lib.optionalString forceWayland " (Wayland)"}"; - genericName = "Web Browser"; - categories = [ "Network" "WebBrowser" ]; - mimeTypes = [ - "text/html" - "text/xml" - "application/xhtml+xml" - "application/vnd.mozilla.xul+xml" - "x-scheme-handler/http" - "x-scheme-handler/https" - "x-scheme-handler/ftp" - ]; + startupNotify = true; startupWMClass = wmClass; - actions = { - new-window = { - name = "New Window"; - exec = "${launcherName} --new-window %U"; - }; - new-private-window = { - name = "New Private Window"; - exec = "${launcherName} --private-window %U"; - }; - profile-manager-window = { - name = "Profile Manager"; - exec = "${launcherName} --ProfileManger"; - }; - }; - }; + terminal = false; + } // (if libName == "thunderbird" + then { + genericName = "Email Client"; + comment = "Read and write e-mails or RSS feeds, or manage tasks on calendars."; + categories = [ + "Network" "Chat" "Email" "Feed" "GTK" "News" + ]; + keywords = [ + "mail" "email" "e-mail" "messages" "rss" "calendar" + "address book" "addressbook" "chat" + ]; + mimeTypes = [ + "message/rfc822" + "x-scheme-handler/mailto" + "text/calendar" + "text/x-vcard" + ]; + actions = { + profile-manager-window = { + name = "Profile Manager"; + exec = "${launcherName} --ProfileManger"; + }; + }; + } + else { + genericName = "Web Browser"; + categories = [ "Network" "WebBrowser" ]; + mimeTypes = [ + "text/html" + "text/xml" + "application/xhtml+xml" + "application/vnd.mozilla.xul+xml" + "x-scheme-handler/http" + "x-scheme-handler/https" + ]; + actions = { + new-window = { + name = "New Window"; + exec = "${launcherName} --new-window %U"; + }; + new-private-window = { + name = "New Private Window"; + exec = "${launcherName} --private-window %U"; + }; + profile-manager-window = { + name = "Profile Manager"; + exec = "${launcherName} --ProfileManger"; + }; + }; + })); nativeBuildInputs = [ makeWrapper lndir jq ]; buildInputs = [ browser.gtk3 ]; From 4660aeb783949b5b7a4e55b7f724bc7bd75a61ad Mon Sep 17 00:00:00 2001 From: figsoda Date: Thu, 3 Nov 2022 11:14:25 -0400 Subject: [PATCH 44/82] cargo-guppy: init at unstable-2022-10-29 --- .../tools/rust/cargo-guppy/default.nix | 38 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/tools/rust/cargo-guppy/default.nix diff --git a/pkgs/development/tools/rust/cargo-guppy/default.nix b/pkgs/development/tools/rust/cargo-guppy/default.nix new file mode 100644 index 000000000000..62e7b970b516 --- /dev/null +++ b/pkgs/development/tools/rust/cargo-guppy/default.nix @@ -0,0 +1,38 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, pkg-config +, openssl +, stdenv +, darwin +}: + +rustPlatform.buildRustPackage rec { + pname = "cargo-guppy"; + version = "unstable-2022-10-29"; + + src = fetchFromGitHub { + owner = "guppy-rs"; + repo = "guppy"; + rev = "448d830de4867c32eaa57911a392e47c81d1a0e0"; + sha256 = "sha256-Ce6WO01gN8Ip5smAyGNEg87vyFXFDIq6ilHTbEStm/c="; + }; + + cargoSha256 = "sha256-DR/k6g2uWCOhM20qROybsH4gTvH+Kd+jaDHGZ4loK7g="; + + nativeBuildInputs = [ pkg-config ]; + + buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Security + ]; + + cargoBuildFlags = [ "-p" "cargo-guppy" ]; + cargoTestFlags = [ "-p" "cargo-guppy" ]; + + meta = with lib; { + description = "A command-line frontend for guppy"; + homepage = "https://github.com/guppy-rs/guppy/tree/main/cargo-guppy"; + license = with licenses; [ mit /* or */ asl20 ]; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ef335956c6ec..4373a673fb07 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14936,6 +14936,7 @@ with pkgs; }; cargo-kcov = callPackage ../development/tools/rust/cargo-kcov { }; cargo-graph = callPackage ../development/tools/rust/cargo-graph { }; + cargo-guppy = callPackage ../development/tools/rust/cargo-guppy { }; cargo-hack = callPackage ../development/tools/rust/cargo-hack { }; cargo-license = callPackage ../development/tools/rust/cargo-license { }; cargo-llvm-lines = callPackage ../development/tools/rust/cargo-llvm-lines { }; From d24951f9b139ab4ebd091fd9423be3f464625826 Mon Sep 17 00:00:00 2001 From: figsoda Date: Thu, 3 Nov 2022 12:14:26 -0400 Subject: [PATCH 45/82] cargo-hakari: 0.9.14 -> 0.9.15, add figsoda as a maintainer --- pkgs/development/tools/rust/cargo-hakari/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-hakari/default.nix b/pkgs/development/tools/rust/cargo-hakari/default.nix index 492bebaa83d6..2dd6647033ff 100644 --- a/pkgs/development/tools/rust/cargo-hakari/default.nix +++ b/pkgs/development/tools/rust/cargo-hakari/default.nix @@ -1,15 +1,15 @@ -{ lib, fetchCrate, rustPlatform }: +{ lib, rustPlatform, fetchCrate }: rustPlatform.buildRustPackage rec { pname = "cargo-hakari"; - version = "0.9.14"; + version = "0.9.15"; src = fetchCrate { inherit pname version; - sha256 = "sha256-C4UBvxGZDpGfYokTzHQNkUkZqBNuKbE4pzOJ04sTDoY="; + sha256 = "sha256-jPvQKc5jDWHIOmJPpgsR9usYzjjCKlSL04N6Opgyiac="; }; - cargoHash = "sha256-eQrRBmlP206MKDlXxcJ64jD6/6mv3V/sv9TsybIx+8Q="; + cargoHash = "sha256-tmBgmIwFW/0+WQUEJFf6rFtRhoGn41BvZUIng8MsxQM="; meta = with lib; { description = "Manage workspace-hack packages to speed up builds in large workspaces."; @@ -19,7 +19,8 @@ rustPlatform.buildRustPackage rec { and cumulatively by 20-25% or more. ''; homepage = "https://crates.io/crates/cargo-hakari"; + changelog = "https://github.com/guppy-rs/guppy/blob/cargo-hakari-${version}/tools/cargo-hakari/CHANGELOG.md"; license = with licenses; [ mit asl20 ]; - maintainers = with maintainers; [ macalinao ]; + maintainers = with maintainers; [ figsoda macalinao ]; }; } From 5debc99597a3040e2598c20e6e2b46a75a5c35a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?PedroHLC=20=E2=98=AD?= Date: Thu, 3 Nov 2022 15:41:27 -0300 Subject: [PATCH 46/82] nvidia_x11_legacy470: mark broken for 6.0 --- pkgs/os-specific/linux/nvidia-x11/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix index 99382ad4aae1..047aeb5ac10e 100644 --- a/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -77,6 +77,8 @@ rec { sha256_64bit = "sha256-vpjSR6Q9dJGmW/3Jl/tlMeFZQ0brEqD6qgRGcs21cJ8="; settingsSha256 = "sha256-OWSUmUBqAxsR3e6EPzcIotpd6nm4Le8hIj4pzJ5WnhE="; persistencedSha256 = "sha256-XsGYGgucDhvPpqtM9IBLfo3tbn7sIobpo5JW/XqOkTo="; + + broken = kernel.kernelAtLeast "6.0"; }; # Last one supporting x86 From 7baca5b1b4e5943fdc11d287ce12c8415ed3811b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?PedroHLC=20=E2=98=AD?= Date: Thu, 3 Nov 2022 15:50:32 -0300 Subject: [PATCH 47/82] nvidia_x11_vulkan_beta: 515.49.15 -> 515.49.24 --- pkgs/os-specific/linux/nvidia-x11/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix index 047aeb5ac10e..2a0f14574254 100644 --- a/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -55,11 +55,11 @@ rec { # Vulkan developer beta driver # See here for more information: https://developer.nvidia.com/vulkan-driver vulkan_beta = generic rec { - version = "515.49.15"; + version = "515.49.24"; persistencedVersion = "515.48.07"; settingsVersion = "515.48.07"; - sha256_64bit = "sha256-yQbNE+YsbHUc4scXvMZFGuuBRrFTa42g1XoMVZEO/zo="; - openSha256 = "sha256-2RvogIdTA7Rg4oq14TG7Kh31HWuj860xsK7/MYFitpQ="; + sha256_64bit = "sha256-hiTG1gZr02hyetOGvHzY8Be9jaWklhteqe24BRvpw+c="; + openSha256 = "sha256-4NFR4oY728E/yE3FoD3vph8NvSHGD0f0iK2FHqlgK94="; settingsSha256 = "sha256-XwdMsAAu5132x2ZHqjtFvcBJk6Dao7I86UksxrOkknU="; persistencedSha256 = "sha256-BTfYNDJKe4tOvV71/1JJSPltJua0Mx/RvDcWT5ccRRY="; url = "https://developer.nvidia.com/vulkan-beta-${lib.concatStrings (lib.splitString "." version)}-linux"; From bbc2675e1901b70bf8d11a21c2c7ff0577cce041 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Fri, 4 Nov 2022 09:07:27 +0800 Subject: [PATCH 48/82] nixos/pdns: add note about schema change to release note --- .../manual/from_md/release-notes/rl-2211.section.xml | 11 +++++++++++ nixos/doc/manual/release-notes/rl-2211.section.md | 2 ++ 2 files changed, 13 insertions(+) diff --git a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml index e9f4f707f52f..967c65b56cdd 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml @@ -1187,6 +1187,17 @@ environment. + + + PowerDNS has been updated from 4.6.x to + 4.7.x. Please be sure to review the + Upgrade + Notes provided by upstream before upgrading. Worth + specifically noting is that the new Catalog Zones feature + comes with a mandatory schema change for the gsql database + backends, which has to be manually applied. + + There is a new module for the thunar diff --git a/nixos/doc/manual/release-notes/rl-2211.section.md b/nixos/doc/manual/release-notes/rl-2211.section.md index 9b5257ca8e1e..5e3191d8277d 100644 --- a/nixos/doc/manual/release-notes/rl-2211.section.md +++ b/nixos/doc/manual/release-notes/rl-2211.section.md @@ -361,6 +361,8 @@ Available as [services.patroni](options.html#opt-services.patroni.enable). - The default package for `services.mullvad-vpn.package` was changed to `pkgs.mullvad`, allowing cross-platform usage of Mullvad. `pkgs.mullvad` only contains the Mullvad CLI tool, so users who rely on the Mullvad GUI will want to change it back to `pkgs.mullvad-vpn`, or add `pkgs.mullvad-vpn` to their environment. +- PowerDNS has been updated from `4.6.x` to `4.7.x`. Please be sure to review the [Upgrade Notes](https://doc.powerdns.com/authoritative/upgrading.html#to-4-7-0-or-master) provided by upstream before upgrading. Worth specifically noting is that the new Catalog Zones feature comes with a mandatory schema change for the gsql database backends, which has to be manually applied. + - There is a new module for the `thunar` program (the Xfce file manager), which depends on the `xfconf` dbus service, and also has a dbus service and a systemd unit. The option `services.xserver.desktopManager.xfce.thunarPlugins` has been renamed to `programs.thunar.plugins`, and in a future release it may be removed. - There is a new module for the `xfconf` program (the Xfce configuration storage system), which has a dbus service. From fcdfed5f8bfa7710031d6681e85305eb2a2770f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 3 Nov 2022 22:59:39 -0700 Subject: [PATCH 49/82] vimPlugins: update --- .../editors/vim/plugins/generated.nix | 258 +++++++++--------- 1 file changed, 129 insertions(+), 129 deletions(-) diff --git a/pkgs/applications/editors/vim/plugins/generated.nix b/pkgs/applications/editors/vim/plugins/generated.nix index 7b4bb66cdf6e..ad02db202540 100644 --- a/pkgs/applications/editors/vim/plugins/generated.nix +++ b/pkgs/applications/editors/vim/plugins/generated.nix @@ -281,12 +281,12 @@ final: prev: SchemaStore-nvim = buildVimPluginFrom2Nix { pname = "SchemaStore.nvim"; - version = "2022-10-31"; + version = "2022-11-03"; src = fetchFromGitHub { owner = "b0o"; repo = "SchemaStore.nvim"; - rev = "bfcd9a05ded8ff6cf89b302bee548c35177d9158"; - sha256 = "1mwj6dhk7wpyk766bq504i87hyw3rgspc64ml0kc5xf8wq1mxx4m"; + rev = "6d856dc67cb85539fae976cce268e853f14079e7"; + sha256 = "09xqfahq1i59bw7fpxh6g16g1j9habsxi68v8ghr1za5lspki768"; }; meta.homepage = "https://github.com/b0o/SchemaStore.nvim/"; }; @@ -341,12 +341,12 @@ final: prev: SpaceVim = buildVimPluginFrom2Nix { pname = "SpaceVim"; - version = "2022-11-01"; + version = "2022-11-02"; src = fetchFromGitHub { owner = "SpaceVim"; repo = "SpaceVim"; - rev = "88489db9c24e6c8cbc0b39cc9b8de96d3899cb06"; - sha256 = "16hn8zpmm9qynzakj8dp3d42pczcqdb3xj5k1di7yw810r8gdycf"; + rev = "49e0e52d512a370b53f315fcb83e0e84ebba4d86"; + sha256 = "19jmaabbwp8vl75ldm18vkl76xcgwfx0krihah52sdimfjy1az8i"; }; meta.homepage = "https://github.com/SpaceVim/SpaceVim/"; }; @@ -365,12 +365,12 @@ final: prev: SudoEdit-vim = buildVimPluginFrom2Nix { pname = "SudoEdit.vim"; - version = "2022-08-15"; + version = "2022-11-03"; src = fetchFromGitHub { owner = "chrisbra"; repo = "SudoEdit.vim"; - rev = "bcf23412e9f307036ae3dbd7968930c1fd48f02b"; - sha256 = "1zrf32d4v5751vivwl976sjy901vjrl1m5b2vzzmp7aic76rji7y"; + rev = "e0ffcda0c2f98bec80cb52d1af5f3af26bd38821"; + sha256 = "125npjj74zn6ldh0656m5f7bc5035wdh7v3bwhh70jkbw36c3vvm"; }; meta.homepage = "https://github.com/chrisbra/SudoEdit.vim/"; }; @@ -442,7 +442,7 @@ final: prev: owner = "ycm-core"; repo = "YouCompleteMe"; rev = "728b47728c31bcbc92fbc196c00230d601ca2a15"; - sha256 = "11g2gby9qffjs4197ajzk2hsmpsjgak33rxfbfijg82m9ypsf3gc"; + sha256 = "0mlhaxnafi6wdyxhjiy2jdpf7xqwlxh5cqjk658znb05x4kix0pp"; fetchSubmodules = true; }; meta.homepage = "https://github.com/ycm-core/YouCompleteMe/"; @@ -486,12 +486,12 @@ final: prev: aerial-nvim = buildVimPluginFrom2Nix { pname = "aerial.nvim"; - version = "2022-10-31"; + version = "2022-11-02"; src = fetchFromGitHub { owner = "stevearc"; repo = "aerial.nvim"; - rev = "159041f5f6e0ba914221f097886f1d31ce419c04"; - sha256 = "06b5hjsbk4k9zw64zfz8pq540wd2q3i5z4sv78n3kh0cbcjj9gmw"; + rev = "f15e49cbc0da8840531ed0bddf67735c604994d6"; + sha256 = "1lkyl27a3pn7lwcljpyy0q76c7f66jcik1nlbfq5nfr52h040061"; fetchSubmodules = true; }; meta.homepage = "https://github.com/stevearc/aerial.nvim/"; @@ -667,12 +667,12 @@ final: prev: asyncrun-vim = buildVimPluginFrom2Nix { pname = "asyncrun.vim"; - version = "2022-10-30"; + version = "2022-11-03"; src = fetchFromGitHub { owner = "skywind3000"; repo = "asyncrun.vim"; - rev = "4794a74dae54633c586eecd67e31d771323a2f72"; - sha256 = "1d3xm00xhwdm5yc08mzkvn5897rb58cjrlq86dlbypfrni512sv7"; + rev = "e74f19f430f98fbb5a2f4d3a725ea980876b7314"; + sha256 = "0fasalhsyf86sr5r2y1wh6ixbf2ys7abwvsf5lzav0za59542av4"; }; meta.homepage = "https://github.com/skywind3000/asyncrun.vim/"; }; @@ -907,12 +907,12 @@ final: prev: bufdelete-nvim = buildVimPluginFrom2Nix { pname = "bufdelete.nvim"; - version = "2022-10-07"; + version = "2022-11-02"; src = fetchFromGitHub { owner = "famiu"; repo = "bufdelete.nvim"; - rev = "e88dbe0ba5829119d8edb5fc69d3c8553e324a93"; - sha256 = "0qja5jvx8047v5qbch6flcg8fq00369ffcivrv2gkqkmggg4dvb6"; + rev = "027d356a5caec51881089886893c197f0c27fb48"; + sha256 = "1kg671nqjic4dn275ixf3iapj40q96mmpmi4bssz0pdd4gr37klm"; }; meta.homepage = "https://github.com/famiu/bufdelete.nvim/"; }; @@ -1723,12 +1723,12 @@ final: prev: coc-nvim = buildVimPluginFrom2Nix { pname = "coc.nvim"; - version = "2022-10-31"; + version = "2022-11-03"; src = fetchFromGitHub { owner = "neoclide"; repo = "coc.nvim"; - rev = "46571a51028dccca9c10c860a51ea3c8adc92de8"; - sha256 = "1agm4sban6sfg626hf78ayhr98hrvi263jv6i8hk0qhcgv26k32c"; + rev = "5f52e41be1ff19ce1f1bd3307144e7d96703b7fd"; + sha256 = "0nm8jgdgxbdlvcpl12fs2fgxww5nizjpqd2ywm2n7ca0lsjpqcx0"; }; meta.homepage = "https://github.com/neoclide/coc.nvim/"; }; @@ -2011,24 +2011,24 @@ final: prev: coq-artifacts = buildVimPluginFrom2Nix { pname = "coq.artifacts"; - version = "2022-11-01"; + version = "2022-11-04"; src = fetchFromGitHub { owner = "ms-jpq"; repo = "coq.artifacts"; - rev = "47e6f18e8583f9d48c7e71e632ceb4121dc1d6cc"; - sha256 = "1k425fr1fmq6k7j16m0ylj0z3g11lcdjflw873ivw0wc9kkh6z47"; + rev = "4e80d710635ef4599391c5da355abe5680931469"; + sha256 = "0zhscd3l9f5a0dn1zbc60p101s8447qjsjxhwivbpdyryl14ydqw"; }; meta.homepage = "https://github.com/ms-jpq/coq.artifacts/"; }; coq-thirdparty = buildVimPluginFrom2Nix { pname = "coq.thirdparty"; - version = "2022-11-01"; + version = "2022-11-04"; src = fetchFromGitHub { owner = "ms-jpq"; repo = "coq.thirdparty"; - rev = "eb27fa28ab08dfaf8911d0ac7f1196d8bc0290cc"; - sha256 = "04ylxsg8xkc7ca4gj4j1r86wagjb8b8vhqwwjxan66igr6lhy2m0"; + rev = "079553e07ac79f6416e7751d388e90849d9f2e91"; + sha256 = "0aw779wcsak7ypq24kjras9bq3ynvxkl7s3mrn26ddpkcdrpkdlz"; }; meta.homepage = "https://github.com/ms-jpq/coq.thirdparty/"; }; @@ -2047,12 +2047,12 @@ final: prev: coq_nvim = buildVimPluginFrom2Nix { pname = "coq_nvim"; - version = "2022-11-01"; + version = "2022-11-04"; src = fetchFromGitHub { owner = "ms-jpq"; repo = "coq_nvim"; - rev = "0fefc00e9082b9e80345dc7805b146a25773ac2f"; - sha256 = "1ffiyqz8yqq26v81sblgn1rf6f0nxsvlqcz3ag7bxlps24fdq48x"; + rev = "f1668e780b4fbc199ceac58ccba38be5fd5fe7c6"; + sha256 = "0qyam08y3j7z37iaajah2micq82a0jsl17qv4fjd7a2hamchzgcc"; }; meta.homepage = "https://github.com/ms-jpq/coq_nvim/"; }; @@ -2613,12 +2613,12 @@ final: prev: dracula-nvim = buildVimPluginFrom2Nix { pname = "dracula.nvim"; - version = "2022-10-31"; + version = "2022-11-02"; src = fetchFromGitHub { owner = "Mofiqul"; repo = "dracula.nvim"; - rev = "09cbd3d9434c781674fafe4da03d616e35a49d51"; - sha256 = "06wan9q59bisd9sfdvh8rmw8vj1ahxa87r35gywlkask2jjzq83b"; + rev = "7ff76dd8248efeabb322fec87b22d33c129536fe"; + sha256 = "1g94pxa1frc5ym506vdvfpsk7qby2wzhdv3fby5c09a1vnkz7npz"; }; meta.homepage = "https://github.com/Mofiqul/dracula.nvim/"; }; @@ -2666,7 +2666,7 @@ final: prev: owner = "editorconfig"; repo = "editorconfig-vim"; rev = "6bba2596601086ddfc882488b1444bf1ea43aab9"; - sha256 = "02a8v3z8kla7fsirl6lqk9ijj51flhn3mwb4dsc47k4fnpxr4qcp"; + sha256 = "16a1c1k9q6db99i0s7rm3j0g6wci8x41y71ky04hb9khqkzv3xm8"; fetchSubmodules = true; }; meta.homepage = "https://github.com/editorconfig/editorconfig-vim/"; @@ -2872,7 +2872,7 @@ final: prev: owner = "andviro"; repo = "flake8-vim"; rev = "5bc93f7f26ceb18ccbe116830eaf8ff2baa63994"; - sha256 = "1s7rb2ygky1jjjqpwhzp5lsf7js1g0yhnbf6x5lfwygz6646xpy3"; + sha256 = "142pgasl0b64a0zxmspdsi636axrgvdx6rh3hwjrb1zlsck19y1a"; fetchSubmodules = true; }; meta.homepage = "https://github.com/andviro/flake8-vim/"; @@ -3455,12 +3455,12 @@ final: prev: haskell-tools-nvim = buildVimPluginFrom2Nix { pname = "haskell-tools.nvim"; - version = "2022-11-01"; + version = "2022-11-04"; src = fetchFromGitHub { owner = "MrcJkb"; repo = "haskell-tools.nvim"; - rev = "249bf253c58b9e70d24a02c5231a75f69d170abe"; - sha256 = "0qyfy5ll3rj1svp0ahbq1f3l3ywk02wm5b2d58ccgw6zfcwndm4y"; + rev = "f7fa54b4efec69fb0fe5379a2d42baed4629ae76"; + sha256 = "07h0mbaxxkpsp0549dd366249pql58yvns1ip4y5jndzq1164c1r"; }; meta.homepage = "https://github.com/MrcJkb/haskell-tools.nvim/"; }; @@ -3960,24 +3960,24 @@ final: prev: lazy-lsp-nvim = buildVimPluginFrom2Nix { pname = "lazy-lsp.nvim"; - version = "2022-10-20"; + version = "2022-11-02"; src = fetchFromGitHub { owner = "dundalek"; repo = "lazy-lsp.nvim"; - rev = "20f66b6a1ce6b22b3c02d0f53c15dfa7c6a9f3c8"; - sha256 = "1yigp01qk2ljzb5sskgqic7igxwa4q8rkg4ga9czb3w4f84kpb09"; + rev = "7866efc6e5bef78e7f14ab2c0118c1fed15947c9"; + sha256 = "1d9qk7bffj2ppyd6m6r8g5ip804kqjn64a8k7ckd6jqxfl9w3xga"; }; meta.homepage = "https://github.com/dundalek/lazy-lsp.nvim/"; }; lazygit-nvim = buildVimPluginFrom2Nix { pname = "lazygit.nvim"; - version = "2022-10-25"; + version = "2022-11-02"; src = fetchFromGitHub { owner = "kdheepak"; repo = "lazygit.nvim"; - rev = "c7a8bfb6062e57f3f7cc735720893f2706e6fc8e"; - sha256 = "1hn6llvqbmghjjygy9vwx3y31sra647f3ys9626c5zn4x7a09kgh"; + rev = "56045b4a0d8fa7bfee37411267ca5c6d3c1fe789"; + sha256 = "1xpq3adm1d1dpfns2p3abm111dschwjqqns7c55f2biig9f3lapl"; }; meta.homepage = "https://github.com/kdheepak/lazygit.nvim/"; }; @@ -4584,12 +4584,12 @@ final: prev: mini-nvim = buildVimPluginFrom2Nix { pname = "mini.nvim"; - version = "2022-10-30"; + version = "2022-11-03"; src = fetchFromGitHub { owner = "echasnovski"; repo = "mini.nvim"; - rev = "3d6128b8f7c90ef8cdb0ebb7ea2f96544fa8d060"; - sha256 = "1y514ysh0jgx9bjh5mcnmiic4m9jzz0w2jmlsf9n42hpazbi6z22"; + rev = "993e8d200ff6d2a354e717b2beb7b31bd91b2ee4"; + sha256 = "02gbnc28bg9sjhjmclwrkf2nh3spqibhan0xy0qdnlswms2cpp6s"; }; meta.homepage = "https://github.com/echasnovski/mini.nvim/"; }; @@ -4956,12 +4956,12 @@ final: prev: neodev-nvim = buildVimPluginFrom2Nix { pname = "neodev.nvim"; - version = "2022-11-01"; + version = "2022-11-04"; src = fetchFromGitHub { owner = "folke"; repo = "neodev.nvim"; - rev = "d9d2afc71ad32ed1edb2feecfa7c5b30ce78583a"; - sha256 = "0bgfq9lihw77x9xyfizi0p5ixf7nx0spn4v3y1469mkmgab9zfm1"; + rev = "d41f7e1713f3421c3c8f71c3fe4a026084227a5d"; + sha256 = "17ffq90vhy5w42h3vqczlxpvj7vxl5sznhbbmlf90psl3s1f20sf"; }; meta.homepage = "https://github.com/folke/neodev.nvim/"; }; @@ -4980,12 +4980,12 @@ final: prev: neogit = buildVimPluginFrom2Nix { pname = "neogit"; - version = "2022-10-27"; + version = "2022-11-02"; src = fetchFromGitHub { owner = "TimUntersberger"; repo = "neogit"; - rev = "1acb13c07b34622fe1054695afcecff537d9a00a"; - sha256 = "1wihkwfqhxvaxazn2wsd18jh8qd9cc2rc1m0rd2bw3ywm7jm24aw"; + rev = "71651625b0cccb95bd1ae152d26bcf26d96e5182"; + sha256 = "06xiqy490jxiayabi135c01vmpvbqm55c20lzczms1f2zcrblkny"; }; meta.homepage = "https://github.com/TimUntersberger/neogit/"; }; @@ -5100,24 +5100,24 @@ final: prev: neotest = buildVimPluginFrom2Nix { pname = "neotest"; - version = "2022-10-27"; + version = "2022-11-03"; src = fetchFromGitHub { owner = "nvim-neotest"; repo = "neotest"; - rev = "0be9899e859da147ad28c23a30a1df2081c16741"; - sha256 = "08f7d8w82jk5jd2w4wrh8x4gyw0msv7m82cpzd1ahijg917818pd"; + rev = "7721205f6b8afc0dc6fa6f1f79d228c3714d6b0e"; + sha256 = "1xldwbmhdm05iimxjsdw03j4xbhf46ia075zqyp6x5zz9gdvcqd0"; }; meta.homepage = "https://github.com/nvim-neotest/neotest/"; }; neotest-haskell = buildVimPluginFrom2Nix { pname = "neotest-haskell"; - version = "2022-10-29"; + version = "2022-11-04"; src = fetchFromGitHub { owner = "MrcJkb"; repo = "neotest-haskell"; - rev = "550815b39a306dddffd133c29a9f8a4907ef4f1a"; - sha256 = "1zxlqqn490sahv3kp0hkxwqmy1a5wm4qixs4gn67vd5xl2d1jprh"; + rev = "74b10216995909d442ce9ffb966ae3194a6da319"; + sha256 = "184aw9vdvahcxmnhq787yh8861ai1xsai784zfkgzz1pg4s7rvbk"; }; meta.homepage = "https://github.com/MrcJkb/neotest-haskell/"; }; @@ -5364,12 +5364,12 @@ final: prev: null-ls-nvim = buildVimPluginFrom2Nix { pname = "null-ls.nvim"; - version = "2022-10-26"; + version = "2022-11-03"; src = fetchFromGitHub { owner = "jose-elias-alvarez"; repo = "null-ls.nvim"; - rev = "f1add2302e6a01531a007c51054392d2029dbed4"; - sha256 = "050lx51x28msshjr4cq04l93brlswbx9w3kzdp35q7mxfmcr6cyg"; + rev = "1ac465b1617b28f753cb875d8ac1d0f23c0b96d4"; + sha256 = "1f67d5ban0k1902363k3arkfpwkgqj6w1plnxnn11w1w5y3kvj9d"; }; meta.homepage = "https://github.com/jose-elias-alvarez/null-ls.nvim/"; }; @@ -5424,12 +5424,12 @@ final: prev: nvim-base16 = buildVimPluginFrom2Nix { pname = "nvim-base16"; - version = "2022-11-01"; + version = "2022-11-02"; src = fetchFromGitHub { owner = "RRethy"; repo = "nvim-base16"; - rev = "a1010173d1cf2fa719618644c2373611ea379402"; - sha256 = "17pwi0haqj7f4d81i148y5p6k5fczj6898p828gjxjm5f0blk2pj"; + rev = "bd172d833538c48bd3d589fbc8bc2f3a395ecc7b"; + sha256 = "1h9d127s9w7qiq54596wsdgjbmhxvd7ik055n923wr4r84087vcn"; }; meta.homepage = "https://github.com/RRethy/nvim-base16/"; }; @@ -5616,12 +5616,12 @@ final: prev: nvim-dap-ui = buildVimPluginFrom2Nix { pname = "nvim-dap-ui"; - version = "2022-10-27"; + version = "2022-11-03"; src = fetchFromGitHub { owner = "rcarriga"; repo = "nvim-dap-ui"; - rev = "f889edb4f2b7fafa2a8f8101aea2dc499849b2ec"; - sha256 = "18fi54hfybbywyafk0ik2bvgrl99i605qcs49i1a8gw3d6qx8zy1"; + rev = "6a8271505e95913b82305eff63406ef22baad778"; + sha256 = "139qh9m28zv11xy9rjplpwb4r7g4slxcwwfzvha53bzpshn0w2v6"; }; meta.homepage = "https://github.com/rcarriga/nvim-dap-ui/"; }; @@ -5808,12 +5808,12 @@ final: prev: nvim-lint = buildVimPluginFrom2Nix { pname = "nvim-lint"; - version = "2022-10-31"; + version = "2022-11-02"; src = fetchFromGitHub { owner = "mfussenegger"; repo = "nvim-lint"; - rev = "82f43b518460ff4e29f6b3b2b29018012cfd1a83"; - sha256 = "17ibqbpslzgccpv447dj7cjyysyhqr4nxysyi383k1rl4a46ksb4"; + rev = "56b6d3729e13c049901e0aa1bbea1b71e97b0cda"; + sha256 = "05j1r3lnq4955xlmhhkjf21qyyv6gj8xrsh61b5r8ys0m74ahx98"; }; meta.homepage = "https://github.com/mfussenegger/nvim-lint/"; }; @@ -5904,12 +5904,12 @@ final: prev: nvim-navic = buildVimPluginFrom2Nix { pname = "nvim-navic"; - version = "2022-10-29"; + version = "2022-11-02"; src = fetchFromGitHub { owner = "smiteshp"; repo = "nvim-navic"; - rev = "eebc4f15132c587c52fcd2ce2f0da78fc19a16c0"; - sha256 = "1pwshw6r90ycc315f0savp2iid4rchqplphq9ms36nb4x36894mq"; + rev = "2fad33454cd6e37527a2d41f310d77b552d8c1e0"; + sha256 = "1zdcnazqawkyab9gyfqi1mvnzzil9xvzj7mz7hjqd1w6g9r2c1ip"; }; meta.homepage = "https://github.com/smiteshp/nvim-navic/"; }; @@ -6072,12 +6072,12 @@ final: prev: nvim-treesitter = buildVimPluginFrom2Nix { pname = "nvim-treesitter"; - version = "2022-11-01"; + version = "2022-11-03"; src = fetchFromGitHub { owner = "nvim-treesitter"; repo = "nvim-treesitter"; - rev = "e7bdcee167ae41295a3e99ad460ae80d2bb961d7"; - sha256 = "1h2aab3zgw4q48pllx211kxqaa47ridfa8w610jb0594sqwhfynx"; + rev = "58f61e563fadd1788052586f4d6869a99022df3c"; + sha256 = "075645lkq6cr22kfab4kz7ay1cf5r0bg41r3nbhpdb52g1klrz5k"; }; meta.homepage = "https://github.com/nvim-treesitter/nvim-treesitter/"; }; @@ -6312,12 +6312,12 @@ final: prev: onedarkpro-nvim = buildVimPluginFrom2Nix { pname = "onedarkpro.nvim"; - version = "2022-10-28"; + version = "2022-11-03"; src = fetchFromGitHub { owner = "olimorris"; repo = "onedarkpro.nvim"; - rev = "62b12ba06cb617fdccfd1553f864e6492dcff2fa"; - sha256 = "1kvnycwid2s7iabaql3iwlin4n88czm56d0qd12hhz2sa6jrriy9"; + rev = "7610bd6b4d4a6e8b4de5c8c8d81f25de2682a7ab"; + sha256 = "07n36hlyavan02l7jf96lhkm629gkjc7d7lr6lc1fsibqzwfdxa2"; }; meta.homepage = "https://github.com/olimorris/onedarkpro.nvim/"; }; @@ -6372,12 +6372,12 @@ final: prev: orgmode = buildVimPluginFrom2Nix { pname = "orgmode"; - version = "2022-10-23"; + version = "2022-11-03"; src = fetchFromGitHub { owner = "nvim-orgmode"; repo = "orgmode"; - rev = "2479971860e1237e4f0dafb6cbf412dfc8a3d89c"; - sha256 = "1bjxmlrjpgsc70yjphb8y0mkyyy3amk49j4jsbjyh2qzdfh4bghs"; + rev = "da9a0cf060ccb27927f234a74714a74277c858f1"; + sha256 = "0glps3xlg2pd1gwzmpwvrq3ylcw4mzjwgdq4agdjjl6bh41vdjdq"; }; meta.homepage = "https://github.com/nvim-orgmode/orgmode/"; }; @@ -6642,7 +6642,7 @@ final: prev: owner = "python-mode"; repo = "python-mode"; rev = "85d2cd1a196ac1def79d4599b5be69395ed5b603"; - sha256 = "0gr4ag5qymdpx0mlfvx743y4s8bjd7v4a0yzd02jvmz3dyylvavw"; + sha256 = "0jk8pssliyar4qs42x9m1jgri446cr4yc7iv8l9wc9xn6r3qnm29"; fetchSubmodules = true; }; meta.homepage = "https://github.com/python-mode/python-mode/"; @@ -6662,12 +6662,12 @@ final: prev: pywal-nvim = buildVimPluginFrom2Nix { pname = "pywal.nvim"; - version = "2022-09-11"; + version = "2022-11-03"; src = fetchFromGitHub { owner = "AlphaTechnolog"; repo = "pywal.nvim"; - rev = "c10ea0b90bc049f882517a65fedbef18ba8f8511"; - sha256 = "1irbzhw1yrds80sncqadz7d2k9xr66h3zs8pnx0malfpvgs41fyk"; + rev = "d11b673c0e3d6eb8cbee7ea8cf4a8911f6ee24b9"; + sha256 = "00lfnbaw83iic68mvlgj75qp384g3xa5mjdhw2xmhnapghjgyv14"; }; meta.homepage = "https://github.com/AlphaTechnolog/pywal.nvim/"; }; @@ -6806,12 +6806,12 @@ final: prev: registers-nvim = buildVimPluginFrom2Nix { pname = "registers.nvim"; - version = "2022-11-01"; + version = "2022-11-03"; src = fetchFromGitHub { owner = "tversteeg"; repo = "registers.nvim"; - rev = "395e119782845fe8fa3b7d6d17c60745a2004515"; - sha256 = "0lxfs4rvnvgc7qmcyqspgza70m66khck57fx80v4d6whz9c5ncav"; + rev = "cacd595e794451ce2836539cff6ce0c0c45db046"; + sha256 = "19cwkwmbb626972k8svhm04aiqw174q953bsqxsx72d5sscaisss"; }; meta.homepage = "https://github.com/tversteeg/registers.nvim/"; }; @@ -6830,12 +6830,12 @@ final: prev: rest-nvim = buildNeovimPluginFrom2Nix { pname = "rest.nvim"; - version = "2022-09-24"; + version = "2022-11-03"; src = fetchFromGitHub { owner = "rest-nvim"; repo = "rest.nvim"; - rev = "4a23d38726c0b3c5a2de9f927de5b0b518bdf4f7"; - sha256 = "10s74zwpr9wnnwjvh079g1k9ffnjpbzpxazwbpr55z9ln02sc2vs"; + rev = "3d4bec4754b41fa1d1a2fe145cdcf3b269b3323a"; + sha256 = "0znrslxik741p8cncf60iii3v9x7ln629wixvm0cm4c6g1mk0x4x"; }; meta.homepage = "https://github.com/rest-nvim/rest.nvim/"; }; @@ -7312,12 +7312,12 @@ final: prev: srcery-vim = buildVimPluginFrom2Nix { pname = "srcery-vim"; - version = "2022-06-08"; + version = "2022-11-02"; src = fetchFromGitHub { owner = "srcery-colors"; repo = "srcery-vim"; - rev = "0ff514ff249d0e6b6cc4702d6606f196e3827fc8"; - sha256 = "0l5j9y414nxxiw0vxcygxfd09hn1wbwh3d6a735n6n3kn3z42ww5"; + rev = "cdb0bc36fda80eb58d38ecddfb1c7b2fab3a4d53"; + sha256 = "0x055kynvxym614vzxi1vv2zcndfadzjhwk92f4h6z5zvld7fpxj"; }; meta.homepage = "https://github.com/srcery-colors/srcery-vim/"; }; @@ -7505,12 +7505,12 @@ final: prev: tabby-nvim = buildVimPluginFrom2Nix { pname = "tabby.nvim"; - version = "2022-10-17"; + version = "2022-11-02"; src = fetchFromGitHub { owner = "nanozuki"; repo = "tabby.nvim"; - rev = "18c8effd11f801793e1a8b9adb4d6ef7fbedf57b"; - sha256 = "0r68260gc5ln2z338mm7xb4v4y3p8xzkx1wlwagqp35dhgrl2kpn"; + rev = "1718f42d4044ce612091fd7a7bff0dc7313ff5b8"; + sha256 = "01p7fkhflv23slsr54j7b4cvz0bl2nwn6x0zq1c373cjq3zq2x5a"; }; meta.homepage = "https://github.com/nanozuki/tabby.nvim/"; }; @@ -7546,7 +7546,7 @@ final: prev: owner = "codota"; repo = "tabnine-vim"; rev = "e27face391a4d9a3e43ff251010f77deddf0c88d"; - sha256 = "1204ibnsdksihyvnql22sarn2xgqajwvr0d975bnp35n593chymq"; + sha256 = "1y5haygvixnav9cck49yvvm14afyy5gyq8rwiybqvkd6vfxlv99f"; fetchSubmodules = true; }; meta.homepage = "https://github.com/codota/tabnine-vim/"; @@ -7795,12 +7795,12 @@ final: prev: telescope-manix = buildVimPluginFrom2Nix { pname = "telescope-manix"; - version = "2022-10-19"; + version = "2022-11-04"; src = fetchFromGitHub { owner = "MrcJkb"; repo = "telescope-manix"; - rev = "9f91408328be8719ca1f6c49a3ccc1df6392d5e9"; - sha256 = "03wkgmwq3fl92bd4d33ahfp328pdwcmpw0pcjqf9cfaplpi0fzk2"; + rev = "700279d1d8bc0267404672d2927b522e7ca87ee3"; + sha256 = "0d10lci5wf84wlixxqnrhn3frl735s5jmzg2yz2l79h37k84xydl"; }; meta.homepage = "https://github.com/MrcJkb/telescope-manix/"; }; @@ -8120,12 +8120,12 @@ final: prev: toggleterm-nvim = buildVimPluginFrom2Nix { pname = "toggleterm.nvim"; - version = "2022-10-26"; + version = "2022-11-03"; src = fetchFromGitHub { owner = "akinsho"; repo = "toggleterm.nvim"; - rev = "8f302c9a05ff53fc3f891cbf09c5f959b10392a3"; - sha256 = "1nvq4zridnz0pr9j9ivcl4b5w8srli8szhjy6ry22vw9c5xllzx3"; + rev = "3ba683827c623affb4d9aa518e97b34db2623093"; + sha256 = "043rchc7qbn65b7wfgvp6fdg67xijgd3i3jfm82i1rha7dlymb41"; }; meta.homepage = "https://github.com/akinsho/toggleterm.nvim/"; }; @@ -8744,12 +8744,12 @@ final: prev: vim-airline-themes = buildVimPluginFrom2Nix { pname = "vim-airline-themes"; - version = "2022-09-26"; + version = "2022-11-03"; src = fetchFromGitHub { owner = "vim-airline"; repo = "vim-airline-themes"; - rev = "cc5d3490c8f4c87d29d97df414941a9df8ceb390"; - sha256 = "13lslv7rr3ixcjgkklds2zsk9b0p9sx9lpl3fwzdnkcgh1x91vn8"; + rev = "5552f5e9aa1db1b8d588b9a645a88394452d2b05"; + sha256 = "0bzspa5mrhs52x9q6kxkwbxvqg79myim15jg35rf517sraga5v8s"; }; meta.homepage = "https://github.com/vim-airline/vim-airline-themes/"; }; @@ -9824,12 +9824,12 @@ final: prev: vim-floaterm = buildVimPluginFrom2Nix { pname = "vim-floaterm"; - version = "2022-10-30"; + version = "2022-11-03"; src = fetchFromGitHub { owner = "voldikss"; repo = "vim-floaterm"; - rev = "20cbfc777b783fd93259c83c96eef4a35c6ddbcd"; - sha256 = "02zwq4hq7zpqhmkir16bms8agvydc6fy51sgw6ycqib0hvsb34cd"; + rev = "280b34a0760801168a67f952542b6c49292aa5f3"; + sha256 = "19hb8bqkk6iqy8lm4gs6kiiw6igjjyvazw9fx6gnmf86pkajk3cw"; }; meta.homepage = "https://github.com/voldikss/vim-floaterm/"; }; @@ -10341,12 +10341,12 @@ final: prev: vim-illuminate = buildVimPluginFrom2Nix { pname = "vim-illuminate"; - version = "2022-11-01"; + version = "2022-11-02"; src = fetchFromGitHub { owner = "RRethy"; repo = "vim-illuminate"; - rev = "7a4eccd0fffe8b5dd14ad0d0400d3eab6d80c4b3"; - sha256 = "0a0d16vjr23a3q6mmz653xn1hmnd7h8dbkldvmsr4dx0spqfydp8"; + rev = "fb83d835eac50baeef49aac20c524a80727db0ac"; + sha256 = "0xk5hhsb3gv3yrfcr3gnxj9g9bcdab8nlfi06q5c7nqgy4fryp6n"; }; meta.homepage = "https://github.com/RRethy/vim-illuminate/"; }; @@ -10810,12 +10810,12 @@ final: prev: vim-maktaba = buildVimPluginFrom2Nix { pname = "vim-maktaba"; - version = "2022-10-31"; + version = "2022-11-02"; src = fetchFromGitHub { owner = "google"; repo = "vim-maktaba"; - rev = "88ad116a4b2b4777ce4d0ecf214963a0c9b4fd06"; - sha256 = "07mhpr326rjfh47izx4c9hdkb5zhpbl01k0h4bbi1lxbzvsxgs9k"; + rev = "5d416e84d024538f5e5cf25c394d081802f0a35e"; + sha256 = "13filvmaxr0dvc44f3ah80g8jhkrn3rqkwqj1a7wxjv6a6xa083z"; }; meta.homepage = "https://github.com/google/vim-maktaba/"; }; @@ -12854,12 +12854,12 @@ final: prev: pname = "vim-yapf"; version = "2018-10-04"; src = fetchFromGitHub { - owner = "mindriot101"; + owner = "simonrw"; repo = "vim-yapf"; rev = "b0c31bd73a6d1026765e659bd0a62c625ec057ad"; sha256 = "0ncv6kjyywljsq5fz71rkmgmqxm7msyscgndnj055bnx5sh9wk80"; }; - meta.homepage = "https://github.com/mindriot101/vim-yapf/"; + meta.homepage = "https://github.com/simonrw/vim-yapf/"; }; vim2hs = buildVimPluginFrom2Nix { @@ -13021,12 +13021,12 @@ final: prev: vimtex = buildVimPluginFrom2Nix { pname = "vimtex"; - version = "2022-10-31"; + version = "2022-11-03"; src = fetchFromGitHub { owner = "lervag"; repo = "vimtex"; - rev = "e148cf1fdc817b6668263817634538d09bafd115"; - sha256 = "15iikf6w8x75g7wjdp469rsxraz883387cxlahc0zsl0bdbylv5q"; + rev = "06c47edcc2c44c1ca87a2c04a411cf0c0bd39a14"; + sha256 = "0gkq4j2cwc6a4mhhyd3ivkc5qj6m9p4jg469za4v5g1v59w22pch"; }; meta.homepage = "https://github.com/lervag/vimtex/"; }; @@ -13382,11 +13382,11 @@ final: prev: catppuccin-nvim = buildVimPluginFrom2Nix { pname = "catppuccin-nvim"; - version = "2022-10-31"; + version = "2022-11-03"; src = fetchFromGitHub { owner = "catppuccin"; repo = "nvim"; - rev = "c4f0f1a88304378cb76ac0a0c00a99f6d58f972f"; + rev = "72540852ca00d7842ea1123635aecb9353192f0b"; sha256 = "0mb3qhg5aaxvkc8h95sbwg5nm89w719l9apymc5rpmis4r0mr5zg"; }; meta.homepage = "https://github.com/catppuccin/nvim/"; @@ -13406,12 +13406,12 @@ final: prev: chad = buildVimPluginFrom2Nix { pname = "chad"; - version = "2022-11-01"; + version = "2022-11-04"; src = fetchFromGitHub { owner = "ms-jpq"; repo = "chadtree"; - rev = "d7b2c15268ffbb4dedebbda34b702c89b2cd782a"; - sha256 = "1r53lz0vmfii82mchh0hlzs0zg7d7sjxiihv2bwlapwzwmdp2n4k"; + rev = "5ec88a8374cd7e2564ffeaa27f82dd75229312d2"; + sha256 = "1swic358xzzmw0pxp7x2r35yf70ivbg83fljk8p3qi7s9pr0ngr8"; }; meta.homepage = "https://github.com/ms-jpq/chadtree/"; }; From 250ea4e9c459f6cdda062ec5932a1caac25e1955 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 4 Nov 2022 07:36:03 +0000 Subject: [PATCH 50/82] grafana-agent: 0.28.0 -> 0.28.1 --- pkgs/servers/monitoring/grafana-agent/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/monitoring/grafana-agent/default.nix b/pkgs/servers/monitoring/grafana-agent/default.nix index a966fbeaf9be..a44fbb7f4231 100644 --- a/pkgs/servers/monitoring/grafana-agent/default.nix +++ b/pkgs/servers/monitoring/grafana-agent/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "grafana-agent"; - version = "0.28.0"; + version = "0.28.1"; src = fetchFromGitHub { rev = "v${version}"; owner = "grafana"; repo = "agent"; - sha256 = "sha256-UuDRnpb9JpghGDFsrlU7+iMboqiWVyT7qFSSPlLSFGs="; + sha256 = "sha256-KeajXEeaTrLObgLrIyI2MJK+ap8zIdZ/jIQuVaF4ojg="; }; vendorSha256 = "sha256-UEQYZbP3dzi7wZwX+InJrgHrFB1wfSUNmUMkit+Y1Lo="; From 2b74718fdc7f0213320cc9010522b1ffbcde6238 Mon Sep 17 00:00:00 2001 From: Marc Jakobi Date: Thu, 3 Nov 2022 23:50:48 +0100 Subject: [PATCH 51/82] lemmy-help: init at 0.9.0 --- pkgs/tools/misc/lemmy-help/default.nix | 26 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/tools/misc/lemmy-help/default.nix diff --git a/pkgs/tools/misc/lemmy-help/default.nix b/pkgs/tools/misc/lemmy-help/default.nix new file mode 100644 index 000000000000..1bc07257a2fd --- /dev/null +++ b/pkgs/tools/misc/lemmy-help/default.nix @@ -0,0 +1,26 @@ +{ lib, fetchFromGitHub, rustPlatform }: + +rustPlatform.buildRustPackage rec { + pname = "lemmy-help"; + version = "0.9.0"; + + src = fetchFromGitHub { + owner = "numToStr"; + repo = "lemmy-help"; + rev = "v${version}"; + sha256 = "sha256-VY8sGxS8wwrezTe4ht9xdr4iE2n9fNSNhfCeGDJL5Lo="; + }; + + buildFeatures = [ "cli" ]; + + cargoSha256 = "sha256-yj14kg41EqOco0gx79n8xhf8cyotZ1Mxj2AbNV9TImU="; + + meta = with lib; { + description = "A CLI for generating vim help docs from emmylua comments"; + longDescription = '' + `lemmy-help` is an emmylua parser as well as a CLI which takes that parsed tree and converts it into vim help docs. + ''; + homepage = "https://github.com/numToStr/lemmy-help"; + license = with licenses; [ mit ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2241ecf0f600..481ff8f87bcc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8825,6 +8825,8 @@ with pkgs; lemmeknow = callPackage ../tools/misc/lemmeknow { }; + lemmy-help = callPackage ../tools/misc/lemmy-help { }; + lethe = callPackage ../tools/security/lethe { inherit (darwin.apple_sdk.frameworks) Security; }; From 9243a44c9c46bf0a620d9fc0eb1f1d311ded7aac Mon Sep 17 00:00:00 2001 From: Bruno Bzeznik Date: Mon, 12 Sep 2022 10:59:58 +0200 Subject: [PATCH 52/82] seqkit: init at 2.3.1 --- .../science/biology/seqkit/default.nix | 25 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 pkgs/applications/science/biology/seqkit/default.nix diff --git a/pkgs/applications/science/biology/seqkit/default.nix b/pkgs/applications/science/biology/seqkit/default.nix new file mode 100644 index 000000000000..27ba07481f0e --- /dev/null +++ b/pkgs/applications/science/biology/seqkit/default.nix @@ -0,0 +1,25 @@ +{ lib +, fetchFromGitHub +, buildGoModule +}: + +buildGoModule rec { + pname = "seqkit"; + version = "2.3.1"; + + src = fetchFromGitHub { + owner = "shenwei356"; + repo = "seqkit"; + rev = "v${version}"; + sha256 = "sha256-2DWb6PIYT9VfJeqbZ9+E1jk/xJ2+h0GARKF6XWdMhkI="; + }; + + vendorSha256 = "sha256-RQNthtPYuOSCenA0hs5EhybimrftjEJlQNkfnKGXTiM="; + + meta = with lib; { + description = "cross-platform and ultrafast toolkit for FASTA/Q file manipulation"; + homepage = "https://github.com/shenwei356/seqkit"; + license = licenses.mit; + maintainers = with maintainers; [ bzizou ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c97f1d41dbda..f30651270e7b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35261,6 +35261,8 @@ with pkgs; seqtk = callPackage ../applications/science/biology/seqtk { }; + seqkit = callPackage ../applications/science/biology/seqkit { }; + snpeff = callPackage ../applications/science/biology/snpeff { }; somafm-cli = callPackage ../tools/misc/somafm-cli { }; From 985b49b9425583b770ff793691d55df27026d223 Mon Sep 17 00:00:00 2001 From: kilianar Date: Fri, 4 Nov 2022 11:06:49 +0100 Subject: [PATCH 53/82] broot: 1.16.1 -> 1.16.2 https://github.com/Canop/broot/releases/tag/v1.16.2 --- pkgs/tools/misc/broot/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/broot/default.nix b/pkgs/tools/misc/broot/default.nix index 3f68dfb2587f..add13870148c 100644 --- a/pkgs/tools/misc/broot/default.nix +++ b/pkgs/tools/misc/broot/default.nix @@ -15,14 +15,14 @@ rustPlatform.buildRustPackage rec { pname = "broot"; - version = "1.16.1"; + version = "1.16.2"; src = fetchCrate { inherit pname version; - sha256 = "sha256-OiTZAQYVIMJmQXGQkqcMsUykCImbEOCnYcKmwXwXlpQ="; + sha256 = "sha256-5R5pGCn4CJU2kGPiu6PpUBxr0/02hOwN1ikns2pvGA0="; }; - cargoHash = "sha256-sPJ8NrnwAHuCPLPef8tCbU4nM5J04CzGwf58a9J5Gz4="; + cargoHash = "sha256-0d7EMWc/PU9kDgfTVc1SWYYym9UEULwR1X3qIW+zvjM="; nativeBuildInputs = [ installShellFiles From 8af05d20835fbc861eb9b12cc0be8ed619dd94ff Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 4 Nov 2022 10:37:54 +0000 Subject: [PATCH 54/82] oh-my-zsh: 2022-10-30 -> 2022-11-03 --- pkgs/shells/zsh/oh-my-zsh/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/shells/zsh/oh-my-zsh/default.nix b/pkgs/shells/zsh/oh-my-zsh/default.nix index f9418902ea89..4ac74902bd49 100644 --- a/pkgs/shells/zsh/oh-my-zsh/default.nix +++ b/pkgs/shells/zsh/oh-my-zsh/default.nix @@ -5,15 +5,15 @@ , git, nix, nixfmt, jq, coreutils, gnused, curl, cacert, bash }: stdenv.mkDerivation rec { - version = "2022-10-30"; + version = "2022-11-03"; pname = "oh-my-zsh"; - rev = "50a526f209a182add8a47e362e1c9a3bfd7c5af4"; + rev = "b3b336b0f95644ceda7758871191cdf040b897b2"; src = fetchFromGitHub { inherit rev; owner = "ohmyzsh"; repo = "ohmyzsh"; - sha256 = "1PPLUxFGUTHCxEgJXw8TLAqXOLfzz1oQNwmjLRfhQH4="; + sha256 = "azQ2ceqRnvugNI/1ORZXb+5zrv0PXvwYd2Zc85VXSo4="; }; strictDeps = true; From 5b88d14aac84ac6cdcfa4cf8309045a3c0d7c1dc Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Fri, 4 Nov 2022 12:42:54 +0100 Subject: [PATCH 55/82] gcc-arm-embedded: remove aarch64-darwin from platforms reverts c3557f2e6495722db017b76871c0870c8b95752d reverts 4c5fbc98d2989c5ddf63056db3ee382f42d87e9c one can use gcc-arm-embedded on aarch64-darwin via pkgsx86_64Darwin (introduced in #161657) --- pkgs/development/compilers/gcc-arm-embedded/10/default.nix | 4 +--- pkgs/development/compilers/gcc-arm-embedded/11/default.nix | 4 +--- pkgs/development/compilers/gcc-arm-embedded/6/default.nix | 4 +--- pkgs/development/compilers/gcc-arm-embedded/7/default.nix | 4 +--- pkgs/development/compilers/gcc-arm-embedded/8/default.nix | 4 +--- pkgs/development/compilers/gcc-arm-embedded/9/default.nix | 4 +--- 6 files changed, 6 insertions(+), 18 deletions(-) diff --git a/pkgs/development/compilers/gcc-arm-embedded/10/default.nix b/pkgs/development/compilers/gcc-arm-embedded/10/default.nix index 53c9ac806e78..67d775eb7cd8 100644 --- a/pkgs/development/compilers/gcc-arm-embedded/10/default.nix +++ b/pkgs/development/compilers/gcc-arm-embedded/10/default.nix @@ -11,7 +11,6 @@ stdenv.mkDerivation rec { release = "10.3-2021.10"; suffix = { - aarch64-darwin = "mac"; # use intel binaries via rosetta aarch64-linux = "aarch64-linux"; x86_64-darwin = "mac"; x86_64-linux = "x86_64-linux"; @@ -20,7 +19,6 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${release}/gcc-arm-none-eabi-${release}-${suffix}.tar.bz2"; sha256 = { - aarch64-darwin = "0fr8pki2g4bfk1rk90dzwql37d0b71ngzs9zyx0g2jainan3sqgv"; aarch64-linux = "020j8gkzc0i0b74vz98gvngnwjm5222j1gk5nswfk6587krba1gn"; x86_64-darwin = "0fr8pki2g4bfk1rk90dzwql37d0b71ngzs9zyx0g2jainan3sqgv"; x86_64-linux = "18y92vpl22hf74yqdvmpw8adrkl92s4crzzs6avm05md37qb9nwp"; @@ -51,6 +49,6 @@ stdenv.mkDerivation rec { homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm"; license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ]; maintainers = with maintainers; [ prusnak ]; - platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; + platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ]; }; } diff --git a/pkgs/development/compilers/gcc-arm-embedded/11/default.nix b/pkgs/development/compilers/gcc-arm-embedded/11/default.nix index 1e7e1c307c7c..62f5df9dd870 100644 --- a/pkgs/development/compilers/gcc-arm-embedded/11/default.nix +++ b/pkgs/development/compilers/gcc-arm-embedded/11/default.nix @@ -10,7 +10,6 @@ stdenv.mkDerivation rec { version = "11.3.rel1"; platform = { - aarch64-darwin = "darwin-x86_64"; # use intel binaries via rosetta aarch64-linux = "aarch64"; x86_64-darwin = "darwin-x86_64"; x86_64-linux = "x86_64"; @@ -19,7 +18,6 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://developer.arm.com/-/media/Files/downloads/gnu/${version}/binrel/arm-gnu-toolchain-${version}-${platform}-arm-none-eabi.tar.xz"; sha256 = { - aarch64-darwin = "1kr9kd9p2xk84fa99zf3gz5lkww2i9spqkjigjwakfkzbva56qw2"; aarch64-linux = "0pmm5r0k5mxd5drbn2s8a7qkm8c4fi8j5y31c70yrp0qs08kqwbc"; x86_64-darwin = "1kr9kd9p2xk84fa99zf3gz5lkww2i9spqkjigjwakfkzbva56qw2"; x86_64-linux = "08b1w1zmj4z80k59zmlc1bf34lg8d7z65fwvp5ir2pb1d1zxh86l"; @@ -49,6 +47,6 @@ stdenv.mkDerivation rec { homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm"; license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ]; maintainers = with maintainers; [ prusnak ]; - platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; + platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ]; }; } diff --git a/pkgs/development/compilers/gcc-arm-embedded/6/default.nix b/pkgs/development/compilers/gcc-arm-embedded/6/default.nix index 6d7eed72932f..a0d414d974f0 100644 --- a/pkgs/development/compilers/gcc-arm-embedded/6/default.nix +++ b/pkgs/development/compilers/gcc-arm-embedded/6/default.nix @@ -12,7 +12,6 @@ stdenv.mkDerivation rec { subdir = "6-2017q2"; suffix = { - aarch64-darwin = "mac"; # use intel binaries via rosetta x86_64-darwin = "mac"; x86_64-linux = "linux"; }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); @@ -20,7 +19,6 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${release}-${suffix}.tar.bz2"; sha256 = { - aarch64-darwin = "0019ylpq4inq7p5gydpmc9m8ni72fz2csrjlqmgx1698998q0c3x"; x86_64-darwin = "0019ylpq4inq7p5gydpmc9m8ni72fz2csrjlqmgx1698998q0c3x"; x86_64-linux = "1hvwi02mx34al525sngnl0cm7dkmzxfkb1brq9kvbv28wcplp3p6"; }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); @@ -50,6 +48,6 @@ stdenv.mkDerivation rec { homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm"; license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ]; maintainers = with maintainers; [ prusnak ]; - platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ]; + platforms = [ "x86_64-linux" "x86_64-darwin" ]; }; } diff --git a/pkgs/development/compilers/gcc-arm-embedded/7/default.nix b/pkgs/development/compilers/gcc-arm-embedded/7/default.nix index 36dc4fb12e45..4df2a90f52ea 100644 --- a/pkgs/development/compilers/gcc-arm-embedded/7/default.nix +++ b/pkgs/development/compilers/gcc-arm-embedded/7/default.nix @@ -12,7 +12,6 @@ stdenv.mkDerivation rec { subdir = "7-2018q2"; suffix = { - aarch64-darwin = "mac"; # use intel binaries via rosetta x86_64-darwin = "mac"; x86_64-linux = "linux"; }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); @@ -20,7 +19,6 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${release}-${suffix}.tar.bz2"; sha256 = { - aarch64-darwin = "0nc7m0mpa39qyhfyydxkkyqm7spfc27xf6ygi2vd2aym4r9azi61"; x86_64-darwin = "0nc7m0mpa39qyhfyydxkkyqm7spfc27xf6ygi2vd2aym4r9azi61"; x86_64-linux = "0sgysp3hfpgrkcbfiwkp0a7ymqs02khfbrjabm52b5z61sgi05xv"; }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); @@ -50,6 +48,6 @@ stdenv.mkDerivation rec { homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm"; license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ]; maintainers = with maintainers; [ prusnak ]; - platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ]; + platforms = [ "x86_64-linux" "x86_64-darwin" ]; }; } diff --git a/pkgs/development/compilers/gcc-arm-embedded/8/default.nix b/pkgs/development/compilers/gcc-arm-embedded/8/default.nix index 25d8b611f3dd..152ecdb867d9 100644 --- a/pkgs/development/compilers/gcc-arm-embedded/8/default.nix +++ b/pkgs/development/compilers/gcc-arm-embedded/8/default.nix @@ -12,7 +12,6 @@ stdenv.mkDerivation rec { subdir = "8-2019q3/RC1.1"; suffix = { - aarch64-darwin = "mac"; # use intel binaries via rosetta x86_64-darwin = "mac"; x86_64-linux = "linux"; }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); @@ -20,7 +19,6 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${release}-${suffix}.tar.bz2"; sha256 = { - aarch64-darwin = "fc235ce853bf3bceba46eff4b95764c5935ca07fc4998762ef5e5b7d05f37085"; x86_64-darwin = "fc235ce853bf3bceba46eff4b95764c5935ca07fc4998762ef5e5b7d05f37085"; x86_64-linux = "b50b02b0a16e5aad8620e9d7c31110ef285c1dde28980b1a9448b764d77d8f92"; }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); @@ -50,6 +48,6 @@ stdenv.mkDerivation rec { homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm"; license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ]; maintainers = with maintainers; [ prusnak ]; - platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ]; + platforms = [ "x86_64-linux" "x86_64-darwin" ]; }; } diff --git a/pkgs/development/compilers/gcc-arm-embedded/9/default.nix b/pkgs/development/compilers/gcc-arm-embedded/9/default.nix index 2254b600772d..c625134508e3 100644 --- a/pkgs/development/compilers/gcc-arm-embedded/9/default.nix +++ b/pkgs/development/compilers/gcc-arm-embedded/9/default.nix @@ -12,7 +12,6 @@ stdenv.mkDerivation rec { subdir = "9-2020q2"; suffix = { - aarch64-darwin = "mac"; # use intel binaries via rosetta aarch64-linux = "aarch64-linux"; x86_64-darwin = "mac"; x86_64-linux = "x86_64-linux"; @@ -21,7 +20,6 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${release}-${suffix}.tar.bz2"; sha256 = { - aarch64-darwin = "1ils9z16wrvglh72m428y5irmd36biq79yj86756whib8izbifdv"; aarch64-linux = "1b5q2y710hy7lddj8vj3zl54gfl74j30kx3hk3i81zrcbv16ah8z"; x86_64-darwin = "1ils9z16wrvglh72m428y5irmd36biq79yj86756whib8izbifdv"; x86_64-linux = "07zi2yr5gvhpbij5pnj49zswb9g2gw7zqp4xwwniqmq477h2xp2s"; @@ -52,6 +50,6 @@ stdenv.mkDerivation rec { homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm"; license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ]; maintainers = with maintainers; [ prusnak ]; - platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; + platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ]; }; } From ebb82d58f631c16063eca5cc08d42e3b547ddca9 Mon Sep 17 00:00:00 2001 From: Atemu Date: Fri, 4 Nov 2022 11:46:32 +0100 Subject: [PATCH 56/82] linux_xanmod: force X86_AMD_PSTATE=y https://github.com/NixOS/nixpkgs/pull/197295 enables it as a module by default for recent kernel versions. We want it built-in on every xanmod version as they are all patched to have the functionality. Using mkImageMediaOverride to override the default kernel config but still allow the user to mkForce it themselves. Fixes https://github.com/NixOS/nixpkgs/issues/199498 Co-authored-by: Bernardo Meurer --- pkgs/os-specific/linux/kernel/xanmod-kernels.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/kernel/xanmod-kernels.nix b/pkgs/os-specific/linux/kernel/xanmod-kernels.nix index 2ac516175f02..44746439ec2e 100644 --- a/pkgs/os-specific/linux/kernel/xanmod-kernels.nix +++ b/pkgs/os-specific/linux/kernel/xanmod-kernels.nix @@ -27,7 +27,7 @@ let structuredExtraConfig = with lib.kernel; { # AMD P-state driver - X86_AMD_PSTATE = yes; + X86_AMD_PSTATE = lib.mkOverride 60 yes; # Google's BBRv2 TCP congestion Control TCP_CONG_BBR2 = yes; From a3a77b48e1bef39e00a6f3172fce512ce30e3331 Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Fri, 4 Nov 2022 12:00:00 +0000 Subject: [PATCH 57/82] duply: fix ftp usage for ftp, duply depends on ltfp on PATH, which is not possible if the wrapper resets PATH. --- pkgs/tools/backup/duply/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/backup/duply/default.nix b/pkgs/tools/backup/duply/default.nix index 1db9ef848fa2..66c31ddd0e16 100644 --- a/pkgs/tools/backup/duply/default.nix +++ b/pkgs/tools/backup/duply/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { mkdir -p "$out/bin" mkdir -p "$out/share/man/man1" install -vD duply "$out/bin" - wrapProgram "$out/bin/duply" --set PATH \ + wrapProgram "$out/bin/duply" --prefix PATH : \ ${lib.makeBinPath [ coreutils python3 duplicity gawk gnupg bash gnugrep txt2man which ]} "$out/bin/duply" txt2man > "$out/share/man/man1/duply.1" ''; From 2f56027040e65e1fde430ce1059c5ea7e6bd6ceb Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 3 Nov 2022 09:57:46 +0000 Subject: [PATCH 58/82] cilium-cli: 0.12.5 -> 0.12.6 --- pkgs/applications/networking/cluster/cilium/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/cilium/default.nix b/pkgs/applications/networking/cluster/cilium/default.nix index 11b72f260343..827570db179e 100644 --- a/pkgs/applications/networking/cluster/cilium/default.nix +++ b/pkgs/applications/networking/cluster/cilium/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "cilium-cli"; - version = "0.12.5"; + version = "0.12.6"; src = fetchFromGitHub { owner = "cilium"; repo = pname; rev = "v${version}"; - sha256 = "sha256-VChonOHnif9Rz0pLg+nGt5jFT4wLIQq/C64zBlP/w0w="; + sha256 = "sha256-w9U8+TYU9BQ2w/jSbDo6lEAlIuMOoCjO9fWhywyVbEk="; }; vendorSha256 = null; From 166c9c8269735d5bf3e49629f804bd7b995987f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Mon, 17 Oct 2022 12:46:39 +0200 Subject: [PATCH 59/82] nixos/tests/bazarr: fix eval error The test still doesn't pass, it has some runtime issues as well. Fixes: 580370666239 ("nixos/tests: fix type mismatch in wait_for_open_port") --- nixos/tests/bazarr.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/tests/bazarr.nix b/nixos/tests/bazarr.nix index efcd9de01080..2e49c958dd00 100644 --- a/nixos/tests/bazarr.nix +++ b/nixos/tests/bazarr.nix @@ -16,11 +16,12 @@ in enable = true; listenPort = port; }; + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) ["unrar"]; }; testScript = '' machine.wait_for_unit("bazarr.service") - machine.wait_for_open_port(port) + machine.wait_for_open_port(${toString port}) machine.succeed("curl --fail http://localhost:${toString port}/") ''; }) From 8973da1d91009ecf62d18a00a26e5cab70987647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Fri, 4 Nov 2022 13:31:52 +0100 Subject: [PATCH 60/82] nixos/tests/bazarr: set timezone to fix runtime failure Ref. https://github.com/morpheus65535/bazarr/issues/1983. --- nixos/tests/bazarr.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/tests/bazarr.nix b/nixos/tests/bazarr.nix index 2e49c958dd00..13b27bb530c0 100644 --- a/nixos/tests/bazarr.nix +++ b/nixos/tests/bazarr.nix @@ -17,6 +17,9 @@ in listenPort = port; }; nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) ["unrar"]; + # Workaround for https://github.com/morpheus65535/bazarr/issues/1983 + # ("Crash when running without timezone info"). + time.timeZone = "UTC"; }; testScript = '' From 1d9b90504041a0d8ade1e5197b11463c147eb237 Mon Sep 17 00:00:00 2001 From: Andrei Pampu Date: Wed, 19 Oct 2022 22:28:52 +0300 Subject: [PATCH 61/82] bazarr: 1.1.1 -> 1.1.2 --- pkgs/servers/bazarr/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/bazarr/default.nix b/pkgs/servers/bazarr/default.nix index ae7e4b868882..2c58a0fdb323 100644 --- a/pkgs/servers/bazarr/default.nix +++ b/pkgs/servers/bazarr/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "bazarr"; - version = "1.1.1"; + version = "1.1.2"; sourceRoot = "."; src = fetchurl { url = "https://github.com/morpheus65535/bazarr/releases/download/v${version}/bazarr.zip"; - sha256 = "sha256-ClVHThhcf4QkYhgJevTKroBe0z0YZX83qKFB0thH6eM="; + sha256 = "sha256-cTSRfnMYAyoOoTy0wx8sxqyS92zP6GZu8aH5hRRTxU4="; }; nativeBuildInputs = [ unzip makeWrapper ]; From 56e160ee612b3f6ab9fade147742440ecaef84e5 Mon Sep 17 00:00:00 2001 From: figsoda Date: Fri, 4 Nov 2022 09:51:04 -0400 Subject: [PATCH 62/82] nvim-treesitter: add comment on aliases --- .../editors/vim/plugins/nvim-treesitter/overrides.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix b/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix index cdaba769ff52..2b8ba7616ae6 100644 --- a/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix @@ -9,6 +9,11 @@ let generatedDerivations = lib.filterAttrs (_: lib.isDerivation) generatedGrammars; + # add aliases so grammars from `tree-sitter` are overwritten in `withPlugins` + # for example, for ocaml_interface, the following aliases will be added + # ocaml-interface + # tree-sitter-ocaml-interface + # tree-sitter-ocaml_interface builtGrammars = generatedGrammars // lib.listToAttrs (lib.concatLists (lib.mapAttrsToList (k: v: From bf6e7411292ea52e26bc0d88a0a4c5846b68ddc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 4 Nov 2022 17:15:08 +0100 Subject: [PATCH 63/82] vimPlugins.nvim-treesitter: update grammars --- .../vim/plugins/nvim-treesitter/generated.nix | 72 +++++++++---------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix b/pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix index e818eff764a8..75c4f1ab50e4 100644 --- a/pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix +++ b/pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix @@ -25,12 +25,12 @@ }; bash = buildGrammar { language = "bash"; - version = "f1a86d3"; + version = "77cf8a7"; source = fetchFromGitHub { owner = "tree-sitter"; repo = "tree-sitter-bash"; - rev = "f1a86d3cc5aeeb67e0e52442e893af7f813025b4"; - hash = "sha256-zzHA+kGw67WFyPVFRWRyKmhAjxp5jkv0K2yhGxNfFM4="; + rev = "77cf8a7cab8904baf1a721762e012644ac1d4c7b"; + hash = "sha256-UPMJ7iL8Y0NkAHtPDrkTjG1qFwr8rXuGqvsG+LTWqEY="; }; }; beancount = buildGrammar { @@ -503,12 +503,12 @@ }; help = buildGrammar { language = "help"; - version = "8df3266"; + version = "49cdef5"; source = fetchFromGitHub { owner = "neovim"; repo = "tree-sitter-vimdoc"; - rev = "8df3266b423d24c9ac3f3b4b9928e65eb1e5e741"; - hash = "sha256-t9SHuymK5pYlryWGpORGPYLgPZ3xBx0XH69s5RtRnEI="; + rev = "49cdef52ded4a886bf34bc474876b09f9270d48f"; + hash = "sha256-szNY2yw5i9pgF+MpaEAkP8BgSYEe6nrFW+17sbSZ6Yc="; }; }; hjson = buildGrammar { @@ -633,22 +633,22 @@ }; julia = buildGrammar { language = "julia"; - version = "0572ceb"; + version = "8fb38ab"; source = fetchFromGitHub { owner = "tree-sitter"; repo = "tree-sitter-julia"; - rev = "0572cebf7b8e8ef5990b4d1e7f44f0b36f62922c"; - hash = "sha256-hN3wZJa7oXEUgdJfN0o2EoTYBsE1UZjGYfFYlGjjvO8="; + rev = "8fb38abff74652c4faddbf04d2d5bbbc6b4bae25"; + hash = "sha256-G619Zlb2uL2PskYKNqoG6XXBxRipeGFU4eOLw7u3BRo="; }; }; kotlin = buildGrammar { language = "kotlin"; - version = "a4f71eb"; + version = "b953dbd"; source = fetchFromGitHub { owner = "fwcd"; repo = "tree-sitter-kotlin"; - rev = "a4f71eb9b8c9b19ded3e0e9470be4b1b77c2b569"; - hash = "sha256-aRMqhmZKbKoggtBOgtFIq0xTP+PgeD3Qz6DPJsAFPRQ="; + rev = "b953dbdd05257fcb2b64bc4d9c1578fac12e3c28"; + hash = "sha256-xTbRn7bDN6FR9UOzw43RVHIahI/DFjwLGQj3cYoPurY="; }; }; lalrpop = buildGrammar { @@ -693,12 +693,12 @@ }; lua = buildGrammar { language = "lua"; - version = "887dfd4"; + version = "fb30e8c"; source = fetchFromGitHub { owner = "MunifTanjim"; repo = "tree-sitter-lua"; - rev = "887dfd4e83c469300c279314ff1619b1d0b85b91"; - hash = "sha256-5i+UN6Es+K7KDD1qz3ZrVn8IfGdTswcISUyV2sGtY9M="; + rev = "fb30e8cb605e2ebd6c643e6981325a63fbbde320"; + hash = "sha256-gT2WHH3rkFzb6iER0ryVU7bqVbh36RbTI9HSWMh3DsI="; }; }; m68k = buildGrammar { @@ -983,12 +983,12 @@ }; racket = buildGrammar { language = "racket"; - version = "b9b2e74"; + version = "69ca563"; source = fetchFromGitHub { owner = "6cdh"; repo = "tree-sitter-racket"; - rev = "b9b2e7454d7098e44595dd8c1b471b9d1518b910"; - hash = "sha256-DxwbIhyCx+E0kDztPQFBa9x65ssKzsMh7vY+TpP3dTM="; + rev = "69ca563af3bcf9d67220532e0814786f2dc34db1"; + hash = "sha256-GLBi/NM7dFsPtmZWbFm/vM0gOwqbihOqXnxMR5k8hWE="; }; }; rasi = buildGrammar { @@ -1043,12 +1043,12 @@ }; ruby = buildGrammar { language = "ruby"; - version = "252ca18"; + version = "c919603"; source = fetchFromGitHub { owner = "tree-sitter"; repo = "tree-sitter-ruby"; - rev = "252ca18be76b0918fb6b34c302292b6931876c25"; - hash = "sha256-8UWHLVrSxQM6iT+tN+2PwTs43n+Z69c0DVnDE3yfqKo="; + rev = "c91960320d0f337bdd48308a8ad5500bd2616979"; + hash = "sha256-zUNs7s7SLGLU4h08FHLUA3YhbhRotMQVqk+zG9bmtjE="; }; }; rust = buildGrammar { @@ -1123,12 +1123,12 @@ }; sql = buildGrammar { language = "sql"; - version = "2743c7b"; + version = "70c5026"; source = fetchFromGitHub { owner = "derekstride"; repo = "tree-sitter-sql"; - rev = "2743c7b5e710e6854d4e8c14c302548b436e2a1f"; - hash = "sha256-lhQxFXphS97tITDosG/pGe85osV4CweW44ulmCd+CxQ="; + rev = "70c50264ae022193adb364ffa7a767d765ed9857"; + hash = "sha256-0HlkjL+Wy82SmVLSPXL7o3Y3l/zSDaPeBygLSvdCRZs="; }; }; supercollider = buildGrammar { @@ -1163,14 +1163,14 @@ }; swift = buildGrammar { language = "swift"; - version = "c88b5d7"; + version = "d7808f0"; source = fetchFromGitHub { owner = "alex-pinkus"; repo = "tree-sitter-swift"; nativeBuildInputs = [ nodejs tree-sitter ]; postFetch = "pushd $out && tree-sitter generate && popd"; - rev = "c88b5d73f193f5b0762b1a5f0299a275e6a728fb"; - hash = "sha256-OfFMGxL72SPZW4AtHoThhYtjmKWabStLKAB9TxmjMDw="; + rev = "d7808f030a44dc8768948042baa7566949785e2f"; + hash = "sha256-7Gjpf2isOpeOV3ZMTMibK+F4C4v8ywOPin2Wv86s+AM="; }; }; sxhkdrc = buildGrammar { @@ -1259,12 +1259,12 @@ }; twig = buildGrammar { language = "twig"; - version = "6a01f20"; + version = "035f549"; source = fetchFromGitHub { owner = "gbprod"; repo = "tree-sitter-twig"; - rev = "6a01f20e73038300d205d370212c361949be3035"; - hash = "sha256-M+57mGl4Sgn0yUGAyxHxE6ShR+E/ki4m8/x/f/KHetA="; + rev = "035f549ec8c043e734f04341d7ccdc669bb2ba91"; + hash = "sha256-XSE0E6a9o+WpvmMIXHu0N89VqzaIk9eFHofKAPHtT20="; }; }; typescript = buildGrammar { @@ -1313,12 +1313,12 @@ }; vim = buildGrammar { language = "vim"; - version = "9736af8"; + version = "4ae7bd6"; source = fetchFromGitHub { owner = "vigoux"; repo = "tree-sitter-viml"; - rev = "9736af8ef0a7f20b4c45f6474342c8f5b473e2cc"; - hash = "sha256-cptSrA+EOfntdW9V8qt3pg3PUK7uSwex7OS4XVnwItI="; + rev = "4ae7bd67706d7e10afed827ce2ded884ab41650f"; + hash = "sha256-5gNqs6ykt2m48ghFv9y5OxsHDPTWRicdT9eR+DDiXiA="; }; }; vue = buildGrammar { @@ -1363,12 +1363,12 @@ }; zig = buildGrammar { language = "zig"; - version = "b1803f2"; + version = "d90d38d"; source = fetchFromGitHub { owner = "maxxnino"; repo = "tree-sitter-zig"; - rev = "b1803f2a665d228f968a831eac4fcc07a377c7bc"; - hash = "sha256-WLfecfqwCNh/IPPfmZ55XgsY6cLv62ad0Xhh9pUW3nw="; + rev = "d90d38d28ce8cc27bfea8b4e0c75211e9e2398ca"; + hash = "sha256-vdfXC9PUyv4YynfrKi7M708zFbNIV6AERBd63/EAp1A="; }; }; } From 1ad8079f8bf368973659e4204f6a32b3b0fc8eee Mon Sep 17 00:00:00 2001 From: Daniel McCarney Date: Thu, 3 Nov 2022 20:34:11 -0400 Subject: [PATCH 64/82] ldmud: fix undefined reference to 'crypt' Adding `libxcrypt` as a dependency is required to avoid a link time error from an undefined reference to `crypt` in non-TLS-enabled builds now that glibc crypt support is optional[0]. Additionally, many of the `nativeBuildInputs` should be `buildInputs` since they are used at runtime and not build time. This is also fixed in this commit. [0]: ff30c899d8bd92d1a1c9f4d4e81455b04cb0868e --- pkgs/games/ldmud/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/games/ldmud/default.nix b/pkgs/games/ldmud/default.nix index fa7b3c4e0b50..e676ce1a5cd7 100644 --- a/pkgs/games/ldmud/default.nix +++ b/pkgs/games/ldmud/default.nix @@ -7,6 +7,7 @@ , libiconv , pcre , libgcrypt +, libxcrypt , json_c , libxml2 , ipv6Support ? false @@ -39,12 +40,13 @@ stdenv.mkDerivation rec { sourceRoot = "${src.name}/src"; nativeBuildInputs = - [ autoreconfHook pkg-config bison libgcrypt pcre json_c libxml2 ] + [ autoreconfHook pkg-config bison ]; + buildInputs = [ libgcrypt libxcrypt pcre json_c libxml2 ] ++ lib.optional mccpSupport zlib ++ lib.optional mysqlSupport libmysqlclient ++ lib.optional postgresSupport postgresql ++ lib.optional sqliteSupport sqlite ++ lib.optional tlsSupport openssl - ++ lib.optional pythonSupport python310; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + ++ lib.optional pythonSupport python310 + ++ lib.optionals stdenv.isDarwin [ libiconv ]; # To support systems without autoconf LD puts its configure.ac in a non-default # location and uses a helper script. We skip that script and symlink the .ac From d325f6f70238f3e7b472f44918f62db947966e39 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Tue, 6 Sep 2022 15:27:59 +0200 Subject: [PATCH 65/82] tree-sitter: partially rewrite update script in python The update script is getting out of hand, so we should rewrite it in something that resembles sanity, i.e. Python This is the first step, rewriting the part that checks and fetches a release. Next up is integrating latestGithubRepos into that script. --- .../tools/parsing/tree-sitter/default.nix | 6 +- .../tools/parsing/tree-sitter/update.nix | 110 +++++++++++++----- 2 files changed, 81 insertions(+), 35 deletions(-) diff --git a/pkgs/development/tools/parsing/tree-sitter/default.nix b/pkgs/development/tools/parsing/tree-sitter/default.nix index 11af21a6e48b..fcc81236f4f4 100644 --- a/pkgs/development/tools/parsing/tree-sitter/default.nix +++ b/pkgs/development/tools/parsing/tree-sitter/default.nix @@ -28,7 +28,7 @@ let # to update: # 1) change all these hashes # 2) nix-build -A tree-sitter.updater.update-all-grammars - # 3) OPTIONAL: Set GITHUB_TOKEN env variable to avoid api rate limit + # 3) Set GITHUB_TOKEN env variable to avoid api rate limit (Use a Personal Access Token from https://github.com/settings/tokens It does not need any permissions) # 4) run the ./result script that is output by that (it updates ./grammars) version = "0.20.7"; sha256 = "sha256-5ILiN5EfJ7WpeYBiXynfcLucdp8zmxVOj4gLkaFQYts="; @@ -42,8 +42,8 @@ let fetchSubmodules = true; }; - update-all-grammars = import ./update.nix { - inherit writeShellScript nix-prefetch-git curl jq xe src formats lib; + update-all-grammars = callPackage ./update.nix { + inherit src; }; fetchGrammar = (v: fetchgit { inherit (v) url rev sha256 fetchSubmodules; }); diff --git a/pkgs/development/tools/parsing/tree-sitter/update.nix b/pkgs/development/tools/parsing/tree-sitter/update.nix index 49863f189dad..9b4a952e8a76 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update.nix +++ b/pkgs/development/tools/parsing/tree-sitter/update.nix @@ -1,7 +1,10 @@ { writeShellScript +, writeText +, writers , nix-prefetch-git , formats , lib +, coreutils , curl , jq , xe @@ -404,28 +407,80 @@ let # TODO urlEscape = x: x; - # generic bash script to find the latest github release for a repo - latestGithubRelease = { orga, repo }: writeShellScript "latest-github-release" '' - set -euo pipefail + # update one tree-sitter grammar repo and print their nix-prefetch-git output + updateGrammar = writers.writePython3 "latest-github-release" { + flakeIgnore = ["E501"]; + } '' + from urllib.parse import quote + import json + import subprocess as sub + import os + import sys - args=( '--silent' ) - if [ -n "''${GITHUB_TOKEN:-}" ]; then - args+=( "-H" "Authorization: token ''${GITHUB_TOKEN}" ) - fi - args+=( "https://api.github.com/repos/${urlEscape orga}/${urlEscape repo}/releases/latest" ) + debug = True if os.environ.get("DEBUG", False) else False - res=$(${curl}/bin/curl "''${args[@]}") + jsonArg = sys.argv[1] - if [[ "$(printf "%s" "$res" | ${jq}/bin/jq '.message?')" =~ "rate limit" ]]; then - echo "rate limited" >&2 - fi - release="$(printf "%s" "$res" | ${jq}/bin/jq -r '.tag_name' | tr -d \")" - # github sometimes returns an empty list even tough there are releases - if [ "$release" = "null" ]; then - echo "uh-oh, latest for ${orga + "/" + repo} is not there, using HEAD" >&2 - release="HEAD" - fi - echo "$release" + + def curl_args(orga, repo, token): + """Query the github API via curl""" + yield "curl" + if not debug: + yield "--silent" + if token: + yield "-H" + yield f"Authorization: token {token}" + yield f"https://api.github.com/repos/{quote(orga)}/{quote(repo)}/releases/latest" + + + def curl_result(orga, repo, output): + """Parse the curl result of the github API""" + res = json.loads(output) + message = res.get("message", "") + if "rate limit" in message: + sys.exit("Rate limited by the Github API") + if "Not Found" in message: + # repository not there or no releases; if the repo is missing, + # we’ll notice when we try to clone it + return {} + return res + + + def nix_prefetch_args(url, version_rev): + """Prefetch a git repository""" + yield "nix-prefetch-git" + if not debug: + yield "--quiet" + yield "--no-deepClone" + yield "--url" + yield url + yield "--rev" + yield version_rev + + + match json.loads(jsonArg): + case {"orga": orga, "repo": repo}: + token = os.environ.get("GITHUB_TOKEN", None) + curl_cmd = list(curl_args(orga, repo, token)) + if debug: + print(curl_cmd, file=sys.stderr) + out = sub.check_output(curl_cmd) + release = curl_result(orga, repo, out).get("tag_name", None) + + # github sometimes returns an empty list even tough there are releases + if not release: + print(f"uh-oh, latest for {orga}/{repo} is not there, using HEAD", file=sys.stderr) + release = "HEAD" + + print(f"Fetching latest release ({release}) of {orga}/{repo} …", file=sys.stderr) + sub.check_call( + list(nix_prefetch_args( + url=f"https://github.com/{quote(orga)}/{quote(repo)}", + version_rev=release + )) + ) + case _: + sys.exit("input json must have `orga` and `repo` keys") ''; # find the latest repos of a github organization @@ -452,18 +507,6 @@ let || echo "failed $res" ''; - # update one tree-sitter grammar repo and print their nix-prefetch-git output - updateGrammar = { orga, repo }: writeShellScript "update-grammar.sh" '' - set -euo pipefail - latest="$(${latestGithubRelease { inherit orga repo; }})" - echo "Fetching latest release ($latest) of ${repo} …" >&2 - ${nix-prefetch-git}/bin/nix-prefetch-git \ - --quiet \ - --no-deepClone \ - --url "https://github.com/${urlEscape orga}/${urlEscape repo}" \ - --rev "$latest" - ''; - foreachSh = attrs: f: lib.concatMapStringsSep "\n" f (lib.mapAttrsToList (k: v: { name = k; } // v) attrs); @@ -478,7 +521,10 @@ let echo "writing files to $outputDir" 1>&2 mkdir -p "$outputDir" ${foreachSh allGrammars - ({name, orga, repo}: ''${updateGrammar { inherit orga repo; }} > $outputDir/${name}.json'')} + ({name, orga, repo}: '' + ${updateGrammar} '${lib.generators.toJSON {} {inherit orga repo;}}' \ + > $outputDir/${name}.json + '')} ( echo "{ lib }:" echo "{" ${foreachSh allGrammars From 7948439959252882f1b1e185a71e4c61404024da Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Tue, 6 Sep 2022 20:14:19 +0200 Subject: [PATCH 66/82] tree-sitter/update: prepare moving more stuff to python MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I don’t want to split up the python code, so for now I’m just passing a “mode” to the script to run a different subset of the functionality. --- .../tools/parsing/tree-sitter/update.nix | 58 +++++++++++-------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/pkgs/development/tools/parsing/tree-sitter/update.nix b/pkgs/development/tools/parsing/tree-sitter/update.nix index 9b4a952e8a76..1257e099d441 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update.nix +++ b/pkgs/development/tools/parsing/tree-sitter/update.nix @@ -407,8 +407,8 @@ let # TODO urlEscape = x: x; - # update one tree-sitter grammar repo and print their nix-prefetch-git output - updateGrammar = writers.writePython3 "latest-github-release" { + # implementation of the fetching of repo information from github + fetchImpl = writers.writePython3 "fetchImpl" { flakeIgnore = ["E501"]; } '' from urllib.parse import quote @@ -419,7 +419,8 @@ let debug = True if os.environ.get("DEBUG", False) else False - jsonArg = sys.argv[1] + mode = sys.argv[1] + jsonArg = json.loads(sys.argv[2]) def curl_args(orga, repo, token): @@ -458,29 +459,38 @@ let yield version_rev - match json.loads(jsonArg): - case {"orga": orga, "repo": repo}: - token = os.environ.get("GITHUB_TOKEN", None) - curl_cmd = list(curl_args(orga, repo, token)) - if debug: - print(curl_cmd, file=sys.stderr) - out = sub.check_output(curl_cmd) - release = curl_result(orga, repo, out).get("tag_name", None) + def fetchRepo(): + """fetch the given repo and print its nix-prefetch output to stdout""" + match jsonArg: + case {"orga": orga, "repo": repo}: + token = os.environ.get("GITHUB_TOKEN", None) + curl_cmd = list(curl_args(orga, repo, token)) + if debug: + print(curl_cmd, file=sys.stderr) + out = sub.check_output(curl_cmd) + release = curl_result(orga, repo, out).get("tag_name", None) - # github sometimes returns an empty list even tough there are releases - if not release: - print(f"uh-oh, latest for {orga}/{repo} is not there, using HEAD", file=sys.stderr) - release = "HEAD" + # github sometimes returns an empty list even tough there are releases + if not release: + print(f"uh-oh, latest for {orga}/{repo} is not there, using HEAD", file=sys.stderr) + release = "HEAD" - print(f"Fetching latest release ({release}) of {orga}/{repo} …", file=sys.stderr) - sub.check_call( - list(nix_prefetch_args( - url=f"https://github.com/{quote(orga)}/{quote(repo)}", - version_rev=release - )) - ) + print(f"Fetching latest release ({release}) of {orga}/{repo} …", file=sys.stderr) + sub.check_call( + list(nix_prefetch_args( + url=f"https://github.com/{quote(orga)}/{quote(repo)}", + version_rev=release + )) + ) + case _: + sys.exit("input json must have `orga` and `repo` keys") + + + match mode: + case "fetch-repo": + fetchRepo() case _: - sys.exit("input json must have `orga` and `repo` keys") + sys.exit(f"mode {mode} unknown") ''; # find the latest repos of a github organization @@ -522,7 +532,7 @@ let mkdir -p "$outputDir" ${foreachSh allGrammars ({name, orga, repo}: '' - ${updateGrammar} '${lib.generators.toJSON {} {inherit orga repo;}}' \ + ${fetchImpl} fetch-repo '${lib.generators.toJSON {} {inherit orga repo;}}' \ > $outputDir/${name}.json '')} ( echo "{ lib }:" From 673676319bfd3850ed6e4697f62d7969421ef47b Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Tue, 6 Sep 2022 21:10:20 +0200 Subject: [PATCH 67/82] tree-sitter/update: factor out github url --- pkgs/development/tools/parsing/tree-sitter/update.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/parsing/tree-sitter/update.nix b/pkgs/development/tools/parsing/tree-sitter/update.nix index 1257e099d441..d4b66f83beff 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update.nix +++ b/pkgs/development/tools/parsing/tree-sitter/update.nix @@ -423,7 +423,7 @@ let jsonArg = json.loads(sys.argv[2]) - def curl_args(orga, repo, token): + def curl_github_args(token, url): """Query the github API via curl""" yield "curl" if not debug: @@ -431,7 +431,7 @@ let if token: yield "-H" yield f"Authorization: token {token}" - yield f"https://api.github.com/repos/{quote(orga)}/{quote(repo)}/releases/latest" + yield url def curl_result(orga, repo, output): @@ -464,7 +464,10 @@ let match jsonArg: case {"orga": orga, "repo": repo}: token = os.environ.get("GITHUB_TOKEN", None) - curl_cmd = list(curl_args(orga, repo, token)) + curl_cmd = list(curl_github_args( + token, + url=f"https://api.github.com/repos/{quote(orga)}/{quote(repo)}/releases/latest" + )) if debug: print(curl_cmd, file=sys.stderr) out = sub.check_output(curl_cmd) From 0d067c8603cde7118fbe11b806b718d00c78d493 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Tue, 6 Sep 2022 21:11:50 +0200 Subject: [PATCH 68/82] tree-sitter/update: move pyhon impl into its own file This helps with syntax highlighting & editor support --- .../tools/parsing/tree-sitter/update.nix | 86 +------------------ .../tools/parsing/tree-sitter/update_impl.py | 83 ++++++++++++++++++ 2 files changed, 84 insertions(+), 85 deletions(-) create mode 100644 pkgs/development/tools/parsing/tree-sitter/update_impl.py diff --git a/pkgs/development/tools/parsing/tree-sitter/update.nix b/pkgs/development/tools/parsing/tree-sitter/update.nix index d4b66f83beff..8181280df7ed 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update.nix +++ b/pkgs/development/tools/parsing/tree-sitter/update.nix @@ -410,91 +410,7 @@ let # implementation of the fetching of repo information from github fetchImpl = writers.writePython3 "fetchImpl" { flakeIgnore = ["E501"]; - } '' - from urllib.parse import quote - import json - import subprocess as sub - import os - import sys - - debug = True if os.environ.get("DEBUG", False) else False - - mode = sys.argv[1] - jsonArg = json.loads(sys.argv[2]) - - - def curl_github_args(token, url): - """Query the github API via curl""" - yield "curl" - if not debug: - yield "--silent" - if token: - yield "-H" - yield f"Authorization: token {token}" - yield url - - - def curl_result(orga, repo, output): - """Parse the curl result of the github API""" - res = json.loads(output) - message = res.get("message", "") - if "rate limit" in message: - sys.exit("Rate limited by the Github API") - if "Not Found" in message: - # repository not there or no releases; if the repo is missing, - # we’ll notice when we try to clone it - return {} - return res - - - def nix_prefetch_args(url, version_rev): - """Prefetch a git repository""" - yield "nix-prefetch-git" - if not debug: - yield "--quiet" - yield "--no-deepClone" - yield "--url" - yield url - yield "--rev" - yield version_rev - - - def fetchRepo(): - """fetch the given repo and print its nix-prefetch output to stdout""" - match jsonArg: - case {"orga": orga, "repo": repo}: - token = os.environ.get("GITHUB_TOKEN", None) - curl_cmd = list(curl_github_args( - token, - url=f"https://api.github.com/repos/{quote(orga)}/{quote(repo)}/releases/latest" - )) - if debug: - print(curl_cmd, file=sys.stderr) - out = sub.check_output(curl_cmd) - release = curl_result(orga, repo, out).get("tag_name", None) - - # github sometimes returns an empty list even tough there are releases - if not release: - print(f"uh-oh, latest for {orga}/{repo} is not there, using HEAD", file=sys.stderr) - release = "HEAD" - - print(f"Fetching latest release ({release}) of {orga}/{repo} …", file=sys.stderr) - sub.check_call( - list(nix_prefetch_args( - url=f"https://github.com/{quote(orga)}/{quote(repo)}", - version_rev=release - )) - ) - case _: - sys.exit("input json must have `orga` and `repo` keys") - - - match mode: - case "fetch-repo": - fetchRepo() - case _: - sys.exit(f"mode {mode} unknown") - ''; + } ./update_impl.py; # find the latest repos of a github organization latestGithubRepos = { orga }: writeShellScript "latest-github-repos" '' diff --git a/pkgs/development/tools/parsing/tree-sitter/update_impl.py b/pkgs/development/tools/parsing/tree-sitter/update_impl.py new file mode 100644 index 000000000000..63ace17c3583 --- /dev/null +++ b/pkgs/development/tools/parsing/tree-sitter/update_impl.py @@ -0,0 +1,83 @@ +from urllib.parse import quote +import json +import subprocess as sub +import os +import sys + +debug = True if os.environ.get("DEBUG", False) else False + +mode = sys.argv[1] +jsonArg = json.loads(sys.argv[2]) + + +def curl_github_args(token, url): + """Query the github API via curl""" + yield "curl" + if not debug: + yield "--silent" + if token: + yield "-H" + yield f"Authorization: token {token}" + yield url + + +def curl_result(orga, repo, output): + """Parse the curl result of the github API""" + res = json.loads(output) + message = res.get("message", "") + if "rate limit" in message: + sys.exit("Rate limited by the Github API") + if "Not Found" in message: + # repository not there or no releases; if the repo is missing, + # we’ll notice when we try to clone it + return {} + return res + + +def nix_prefetch_args(url, version_rev): + """Prefetch a git repository""" + yield "nix-prefetch-git" + if not debug: + yield "--quiet" + yield "--no-deepClone" + yield "--url" + yield url + yield "--rev" + yield version_rev + + +def fetchRepo(): + """fetch the given repo and print its nix-prefetch output to stdout""" + match jsonArg: + case {"orga": orga, "repo": repo}: + token = os.environ.get("GITHUB_TOKEN", None) + curl_cmd = list(curl_github_args( + token, + url=f"https://api.github.com/repos/{quote(orga)}/{quote(repo)}/releases/latest" + )) + if debug: + print(curl_cmd, file=sys.stderr) + out = sub.check_output(curl_cmd) + release = curl_result(orga, repo, out).get("tag_name", None) + + # github sometimes returns an empty list even tough there are releases + if not release: + print(f"uh-oh, latest for {orga}/{repo} is not there, using HEAD", file=sys.stderr) + release = "HEAD" + + print(f"Fetching latest release ({release}) of {orga}/{repo} …", file=sys.stderr) + sub.check_call( + list(nix_prefetch_args( + url=f"https://github.com/{quote(orga)}/{quote(repo)}", + version_rev=release + )) + ) + case _: + sys.exit("input json must have `orga` and `repo` keys") + + +match mode: + case "fetch-repo": + fetchRepo() + case _: + sys.exit(f"mode {mode} unknown") From 805b5e978d6aff39429e9ebcbc0a6fc2df1a893a Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Tue, 6 Sep 2022 21:43:07 +0200 Subject: [PATCH 69/82] tree-sitter/update: get executables from nix instead of environment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was a small bug, the update script should of course not depend on any executables in the environment. Since we don’t use a nix string anymore, interpolation is out of the question, so we pass it as arglib environment json string. --- .../development/tools/parsing/tree-sitter/update.nix | 12 +++++++++--- .../tools/parsing/tree-sitter/update_impl.py | 5 +++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/parsing/tree-sitter/update.nix b/pkgs/development/tools/parsing/tree-sitter/update.nix index 8181280df7ed..9655dd0f0ef7 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update.nix +++ b/pkgs/development/tools/parsing/tree-sitter/update.nix @@ -408,9 +408,15 @@ let urlEscape = x: x; # implementation of the fetching of repo information from github - fetchImpl = writers.writePython3 "fetchImpl" { - flakeIgnore = ["E501"]; - } ./update_impl.py; + fetchImpl = writeShellScript "fetchImpl-wrapped" '' + env ARGLIB_JSON=${lib.escapeShellArg (lib.generators.toJSON {} { + curl = "${curl}/bin/curl"; + nix-prefetch-git = "${nix-prefetch-git}/bin/nix-prefetch-git"; + })} \ + ${writers.writePython3 "fetchImpl" { + flakeIgnore = ["E501"]; + } ./update_impl.py} "$@" + ''; # find the latest repos of a github organization latestGithubRepos = { orga }: writeShellScript "latest-github-repos" '' diff --git a/pkgs/development/tools/parsing/tree-sitter/update_impl.py b/pkgs/development/tools/parsing/tree-sitter/update_impl.py index 63ace17c3583..37378feea6be 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update_impl.py +++ b/pkgs/development/tools/parsing/tree-sitter/update_impl.py @@ -5,6 +5,7 @@ import os import sys debug = True if os.environ.get("DEBUG", False) else False +bins = json.loads(os.environ['ARGLIB_JSON']) mode = sys.argv[1] jsonArg = json.loads(sys.argv[2]) @@ -12,7 +13,7 @@ jsonArg = json.loads(sys.argv[2]) def curl_github_args(token, url): """Query the github API via curl""" - yield "curl" + yield bins["curl"] if not debug: yield "--silent" if token: @@ -36,7 +37,7 @@ def curl_result(orga, repo, output): def nix_prefetch_args(url, version_rev): """Prefetch a git repository""" - yield "nix-prefetch-git" + yield bins["nix-prefetch-git"] if not debug: yield "--quiet" yield "--no-deepClone" From 26cb66b681f5df87c431868de4459103bb7446c4 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Wed, 7 Sep 2022 01:44:35 +0200 Subject: [PATCH 70/82] tree-sitter/update: Fetch the existing repos from python as well I also used the chance to add some type annotations and make sure they get accepted by mypy. --- .../tools/parsing/tree-sitter/mypy.ini | 11 ++ .../tools/parsing/tree-sitter/update.nix | 29 +---- .../tools/parsing/tree-sitter/update_impl.py | 117 ++++++++++++------ 3 files changed, 94 insertions(+), 63 deletions(-) create mode 100644 pkgs/development/tools/parsing/tree-sitter/mypy.ini diff --git a/pkgs/development/tools/parsing/tree-sitter/mypy.ini b/pkgs/development/tools/parsing/tree-sitter/mypy.ini new file mode 100644 index 000000000000..3a34ffac26ed --- /dev/null +++ b/pkgs/development/tools/parsing/tree-sitter/mypy.ini @@ -0,0 +1,11 @@ +[mypy] +disallow_untyped_defs = true +disallow_subclassing_any = true + +no_implicit_optional = true + +warn_redundant_casts = true +warn_unused_ignores = true +warn_no_return = true +warn_return_any = true +warn_unreachable = true diff --git a/pkgs/development/tools/parsing/tree-sitter/update.nix b/pkgs/development/tools/parsing/tree-sitter/update.nix index 9655dd0f0ef7..fb21f16d0657 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update.nix +++ b/pkgs/development/tools/parsing/tree-sitter/update.nix @@ -404,9 +404,6 @@ let fi ''; - # TODO - urlEscape = x: x; - # implementation of the fetching of repo information from github fetchImpl = writeShellScript "fetchImpl-wrapped" '' env ARGLIB_JSON=${lib.escapeShellArg (lib.generators.toJSON {} { @@ -418,30 +415,6 @@ let } ./update_impl.py} "$@" ''; - # find the latest repos of a github organization - latestGithubRepos = { orga }: writeShellScript "latest-github-repos" '' - set -euo pipefail - - args=( '--silent' ) - if [ -n "''${GITHUB_TOKEN:-}" ]; then - args+=( "-H" "Authorization: token ''${GITHUB_TOKEN}" ) - fi - args+=( 'https://api.github.com/orgs/${urlEscape orga}/repos?per_page=100' ) - - res=$(${curl}/bin/curl "''${args[@]}") - - if [[ "$(printf "%s" "$res" | ${jq}/bin/jq '.message?')" =~ "rate limit" ]]; then - echo "rate limited" >&2 - exit 1 - elif [[ "$(printf "%s" "$res" | ${jq}/bin/jq '.message?')" =~ "Bad credentials" ]]; then - echo "bad credentials" >&2 - exit 1 - fi - - printf "%s" "$res" | ${jq}/bin/jq 'map(.name)' \ - || echo "failed $res" - ''; - foreachSh = attrs: f: lib.concatMapStringsSep "\n" f (lib.mapAttrsToList (k: v: { name = k; } // v) attrs); @@ -449,7 +422,7 @@ let update-all-grammars = writeShellScript "update-all-grammars.sh" '' set -euo pipefail echo "fetching list of grammars" 1>&2 - treeSitterRepos=$(${latestGithubRepos { orga = "tree-sitter"; }}) + treeSitterRepos=$(${fetchImpl} fetch-orga-latest-repos '{"orga": "tree-sitter"}') echo "checking the tree-sitter repo list against the grammars we know" 1>&2 printf '%s' "$treeSitterRepos" | ${checkTreeSitterRepos} outputDir="${toString ./.}/grammars" diff --git a/pkgs/development/tools/parsing/tree-sitter/update_impl.py b/pkgs/development/tools/parsing/tree-sitter/update_impl.py index 37378feea6be..026f2b93b7f2 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update_impl.py +++ b/pkgs/development/tools/parsing/tree-sitter/update_impl.py @@ -3,17 +3,20 @@ import json import subprocess as sub import os import sys +from typing import Generator, Any, Literal -debug = True if os.environ.get("DEBUG", False) else False -bins = json.loads(os.environ['ARGLIB_JSON']) +debug: bool = True if os.environ.get("DEBUG", False) else False +Bin = str +bins: dict[str, Bin] = json.loads(os.environ['ARGLIB_JSON']) -mode = sys.argv[1] -jsonArg = json.loads(sys.argv[2]) +mode: str = sys.argv[1] +jsonArg: dict = json.loads(sys.argv[2]) + +Args = Generator[str, None, None] -def curl_github_args(token, url): +def curl_github_args(token: str | None, url: str) -> Args: """Query the github API via curl""" - yield bins["curl"] if not debug: yield "--silent" if token: @@ -22,22 +25,22 @@ def curl_github_args(token, url): yield url -def curl_result(orga, repo, output): +def curl_result(output: bytes) -> Any | Literal["not found"]: """Parse the curl result of the github API""" - res = json.loads(output) - message = res.get("message", "") - if "rate limit" in message: - sys.exit("Rate limited by the Github API") - if "Not Found" in message: - # repository not there or no releases; if the repo is missing, - # we’ll notice when we try to clone it - return {} + res: Any = json.loads(output) + match res: + case dict(res): + message: str = res.get("message", "") + if "rate limit" in message: + sys.exit("Rate limited by the Github API") + if "Not Found" in message: + return "not found" + # if the result is another type, we can pass it on return res -def nix_prefetch_args(url, version_rev): +def nix_prefetch_git_args(url: str, version_rev: str) -> Args: """Prefetch a git repository""" - yield bins["nix-prefetch-git"] if not debug: yield "--quiet" yield "--no-deepClone" @@ -47,38 +50,82 @@ def nix_prefetch_args(url, version_rev): yield version_rev -def fetchRepo(): +def run_bin(cmd: str, args: Args) -> bytes: + bin: Bin = bins[cmd] + all = [bin] + list(args) + if debug: + print(all, file=sys.stderr) + return sub.check_output(all) + + +def fetchRepo() -> None: """fetch the given repo and print its nix-prefetch output to stdout""" match jsonArg: case {"orga": orga, "repo": repo}: - token = os.environ.get("GITHUB_TOKEN", None) - curl_cmd = list(curl_github_args( - token, - url=f"https://api.github.com/repos/{quote(orga)}/{quote(repo)}/releases/latest" - )) - if debug: - print(curl_cmd, file=sys.stderr) - out = sub.check_output(curl_cmd) - release = curl_result(orga, repo, out).get("tag_name", None) - - # github sometimes returns an empty list even tough there are releases - if not release: - print(f"uh-oh, latest for {orga}/{repo} is not there, using HEAD", file=sys.stderr) - release = "HEAD" + token: str | None = os.environ.get("GITHUB_TOKEN", None) + out = run_bin( + "curl", + curl_github_args( + token, + url=f"https://api.github.com/repos/{quote(orga)}/{quote(repo)}/releases/latest" + ) + ) + release: str + match curl_result(out): + case "not found": + # github sometimes returns an empty list even tough there are releases + print(f"uh-oh, latest for {orga}/{repo} is not there, using HEAD", file=sys.stderr) + release = "HEAD" + case {"tag_name": tag_name}: + release = tag_name + case _: + sys.exit("git result did not have a `tag_name` field") print(f"Fetching latest release ({release}) of {orga}/{repo} …", file=sys.stderr) - sub.check_call( - list(nix_prefetch_args( + res = run_bin( + "nix-prefetch-git", + nix_prefetch_git_args( url=f"https://github.com/{quote(orga)}/{quote(repo)}", version_rev=release - )) + ) ) + sys.stdout.buffer.write(res) case _: sys.exit("input json must have `orga` and `repo` keys") +def fetchOrgaLatestRepos() -> None: + """fetch the latest (100) repos from the given github organization""" + match jsonArg: + case {"orga": orga}: + token: str | None = os.environ.get("GITHUB_TOKEN", None) + out = run_bin( + "curl", + curl_github_args( + token, + url=f"https://api.github.com/orgs/{quote(orga)}/repos?per_page=100" + ) + ) + match curl_result(out): + case "not found": + sys.exit(f"github organization {orga} not found") + case list(repos): + res: list[str] = [] + for repo in repos: + name = repo.get("name") + if name: + res.append(name) + json.dump(res, sys.stdout) + case _: + sys.exit("github result was not a list of repos") + case _: + sys.exit("input json must have `orga` key") + + match mode: case "fetch-repo": fetchRepo() + case "fetch-orga-latest-repos": + fetchOrgaLatestRepos() case _: sys.exit(f"mode {mode} unknown") From a64a9d5552a62627ccb562c6f5ffa9c6312726e1 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Wed, 7 Sep 2022 02:18:47 +0200 Subject: [PATCH 71/82] tree-sitter/update: Write files atomically MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise you can’t interrupt the process without creating broken/half-written files. --- .../tools/parsing/tree-sitter/update.nix | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/parsing/tree-sitter/update.nix b/pkgs/development/tools/parsing/tree-sitter/update.nix index fb21f16d0657..97e68b981414 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update.nix +++ b/pkgs/development/tools/parsing/tree-sitter/update.nix @@ -430,8 +430,9 @@ let mkdir -p "$outputDir" ${foreachSh allGrammars ({name, orga, repo}: '' - ${fetchImpl} fetch-repo '${lib.generators.toJSON {} {inherit orga repo;}}' \ - > $outputDir/${name}.json + ${atomically-write} \ + $outputDir/${name}.json \ + ${fetchImpl} fetch-repo '${lib.generators.toJSON {} {inherit orga repo;}}' '')} ( echo "{ lib }:" echo "{" @@ -443,5 +444,30 @@ let > "$outputDir/default.nix" ''; + # Atomically write a file (just `>` redirection in bash + # empties a file even if the command crashes). + # + # Maybe there is an existing tool for that? + # But it’s easy enough to implement. + # + # Example: + # atomically-write + # ./to + # echo "foo" + # + # will atomically write the string "foo" into ./to + atomically-write = writeShellScript "atomically-write" '' + set -e + to=$1 + shift + # assumes that the tempfile is on the same file system, (or in memory) + # for the `mv` at the end to be more-or-less atomic. + tmp=$(${coreutils}/bin/mktemp -d) + trap 'rm -r "$tmp"' EXIT + "$@" \ + > "$tmp/out" + mv "$tmp/out" "$to" + ''; + in update-all-grammars From 2de554d51215f318b992028ba569ea546bb57306 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Wed, 7 Sep 2022 02:55:18 +0200 Subject: [PATCH 72/82] tree-sitter/update: Fetch repositories in parallel This was the main annoyance with the existing script, it would fetch one repository after the other instead of multiple in parallel. The `xe` tool is a simple `xargs`-like that can do that. We put the json information for all repositories into a file with one object per line, then pass that to xe. --- .../tools/parsing/tree-sitter/update.nix | 48 ++++++++++++------- .../tools/parsing/tree-sitter/update_impl.py | 4 +- 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/pkgs/development/tools/parsing/tree-sitter/update.nix b/pkgs/development/tools/parsing/tree-sitter/update.nix index 97e68b981414..ccb81a3f94b6 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update.nix +++ b/pkgs/development/tools/parsing/tree-sitter/update.nix @@ -419,29 +419,43 @@ let lib.concatMapStringsSep "\n" f (lib.mapAttrsToList (k: v: { name = k; } // v) attrs); + jsonNewlines = lib.concatMapStringsSep "\n" (lib.generators.toJSON {}); + + # Run the given script for each of the attr list. + # The attrs are passed to the script as a json value. + forEachParallel = name: script: listOfAttrs: writeShellScript "for-each-parallel.sh" '' + < ${writeText "${name}.json" (jsonNewlines listOfAttrs)} \ + ${xe}/bin/xe -F -j5 ${script} {} + ''; + + outputDir = "${toString ./.}/grammars"; update-all-grammars = writeShellScript "update-all-grammars.sh" '' set -euo pipefail echo "fetching list of grammars" 1>&2 treeSitterRepos=$(${fetchImpl} fetch-orga-latest-repos '{"orga": "tree-sitter"}') echo "checking the tree-sitter repo list against the grammars we know" 1>&2 printf '%s' "$treeSitterRepos" | ${checkTreeSitterRepos} - outputDir="${toString ./.}/grammars" - echo "writing files to $outputDir" 1>&2 - mkdir -p "$outputDir" - ${foreachSh allGrammars - ({name, orga, repo}: '' - ${atomically-write} \ - $outputDir/${name}.json \ - ${fetchImpl} fetch-repo '${lib.generators.toJSON {} {inherit orga repo;}}' - '')} - ( echo "{ lib }:" - echo "{" - ${foreachSh allGrammars - ({name, ...}: '' - # indentation hack - printf " %s = lib.importJSON ./%s.json;\n" "${name}" "${name}"'')} - echo "}" ) \ - > "$outputDir/default.nix" + echo "writing files to ${outputDir}" 1>&2 + mkdir -p "${outputDir}" + ${forEachParallel + "repos-to-fetch" + (writeShellScript "fetch-repo" '' + ${atomically-write} \ + "${outputDir}/$(jq --raw-output --null-input '$ARGS.positional[0].name' --jsonargs "$1").json" \ + ${fetchImpl} fetch-repo "$1" + '') + (lib.mapAttrsToList (name: attrs: attrs // { inherit name; }) allGrammars) + } + ${atomically-write} \ + "${outputDir}/default.nix" \ + ${writeShellScript "print-all-grammars" '' + echo "{ lib }:" + echo "{" + ${foreachSh allGrammars + ({name, ...}: '' + printf " %s = lib.importJSON ./%s.json;\n" "${name}" "${name}"'')} + echo "}" + ''} ''; # Atomically write a file (just `>` redirection in bash diff --git a/pkgs/development/tools/parsing/tree-sitter/update_impl.py b/pkgs/development/tools/parsing/tree-sitter/update_impl.py index 026f2b93b7f2..23b1e0686050 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update_impl.py +++ b/pkgs/development/tools/parsing/tree-sitter/update_impl.py @@ -19,6 +19,8 @@ def curl_github_args(token: str | None, url: str) -> Args: """Query the github API via curl""" if not debug: yield "--silent" + # follow redirects + yield "--location" if token: yield "-H" yield f"Authorization: token {token}" @@ -79,7 +81,7 @@ def fetchRepo() -> None: case {"tag_name": tag_name}: release = tag_name case _: - sys.exit("git result did not have a `tag_name` field") + sys.exit(f"git result for {orga}/{repo} did not have a `tag_name` field") print(f"Fetching latest release ({release}) of {orga}/{repo} …", file=sys.stderr) res = run_bin( From ef9d708262223db9b43a0ffeff43e2b129cccc29 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Wed, 7 Sep 2022 03:18:18 +0200 Subject: [PATCH 73/82] tree-sitter: Update grammars --- .../grammars/tree-sitter-embedded-template.json | 8 ++++---- .../parsing/tree-sitter/grammars/tree-sitter-heex.json | 8 ++++---- .../parsing/tree-sitter/grammars/tree-sitter-julia.json | 8 ++++---- .../parsing/tree-sitter/grammars/tree-sitter-lua.json | 8 ++++---- .../parsing/tree-sitter/grammars/tree-sitter-rust.json | 8 ++++---- .../parsing/tree-sitter/grammars/tree-sitter-vim.json | 8 ++++---- .../parsing/tree-sitter/grammars/tree-sitter-zig.json | 8 ++++---- pkgs/development/tools/parsing/tree-sitter/update_impl.py | 4 ++-- 8 files changed, 30 insertions(+), 30 deletions(-) diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-embedded-template.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-embedded-template.json index 4c55b73a1183..4d857f665e56 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-embedded-template.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-embedded-template.json @@ -1,9 +1,9 @@ { "url": "https://github.com/tree-sitter/tree-sitter-embedded-template", - "rev": "1a538da253d73f896b9f6c0c7d79cda58791ac5c", - "date": "2022-06-20T17:01:16+02:00", - "path": "/nix/store/6mrkhc8bkfnmfaq94a30am9ygh971y97-tree-sitter-embedded-template", - "sha256": "0j73jk9byrhwddb4qsh67gf5fwj9fgdz6byphh3jj8f0ajzdxrmx", + "rev": "91fc5ae1140d5c9d922312431f7d251a48d7b8ce", + "date": "2022-11-03T14:16:56-07:00", + "path": "/nix/store/6z47mgb533bf76l1x22bh64rck5phq8z-tree-sitter-embedded-template", + "sha256": "161bw6hhx4pgzdav5hah4is5w0rfhyid4q9gak0yp05ylk0040sq", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-heex.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-heex.json index 023ef76c1785..791c2469e7d9 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-heex.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-heex.json @@ -1,9 +1,9 @@ { "url": "https://github.com/connorlay/tree-sitter-heex", - "rev": "52b804b1cb2d57e58d90090326d3ef9bd19cf16c", - "date": "2022-10-18T07:22:45-07:00", - "path": "/nix/store/7f1xgx8l68lz8jwvni65j4kcxpl68b36-tree-sitter-heex", - "sha256": "0qiwzkb2ksp2cb87zsda5zwwsbpbqzgvnmysalbm3x0c81gnzv3y", + "rev": "881f1c805f51485a26ecd7865d15c9ef8d606a78", + "date": "2022-09-24T18:53:08-07:00", + "path": "/nix/store/vb6x1b9lc90ys55cwshdz5dxmwvzyjvv-tree-sitter-heex", + "sha256": "00330rgg67fq0d9gk1yswj78d9mn1jvvjmmy1k7cxpvm5993p3sw", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-julia.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-julia.json index 5024fcb151dc..5b968a05ec6a 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-julia.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-julia.json @@ -1,9 +1,9 @@ { "url": "https://github.com/tree-sitter/tree-sitter-julia", - "rev": "0572cebf7b8e8ef5990b4d1e7f44f0b36f62922c", - "date": "2022-09-01T18:19:12-07:00", - "path": "/nix/store/qh31867lp801xzb93n6jdmibp25zzli1-tree-sitter-julia", - "sha256": "1vxwwdl98n7ic739hl9mq43di10j6r53fpyjh4a738dvjrjg1pc4", + "rev": "8fb38abff74652c4faddbf04d2d5bbbc6b4bae25", + "date": "2022-11-01T17:30:42-05:00", + "path": "/nix/store/58qk62ilnkwqbqc5y0ah1ky5z4n4d4xr-tree-sitter-julia", + "sha256": "06h5nyxw72z3w5a62y59332w2xg90sm3c2j6na7vvf7nark7vb8v", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-lua.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-lua.json index 0a09e92c43cb..60df466547de 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-lua.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-lua.json @@ -1,9 +1,9 @@ { "url": "https://github.com/MunifTanjim/tree-sitter-lua", - "rev": "887dfd4e83c469300c279314ff1619b1d0b85b91", - "date": "2022-09-16T01:06:50+06:00", - "path": "/nix/store/nypzx0f8fdlamiycl1vqrj4ifx0bfgij-tree-sitter-lua", - "sha256": "1lv3mp0xm5ac9440gcskcxy0hzsnddvcysix1k5axy1cl4vr8bz6", + "rev": "fb30e8cb605e2ebd6c643e6981325a63fbbde320", + "date": "2022-10-31T13:56:07+06:00", + "path": "/nix/store/ifpy40hx70sg9syjr3d35ngrfkmmqi18-tree-sitter-lua", + "sha256": "1hhffz45ilni4g9idsbpp1aymdjkjnyd4491xbdmr47bglf9cgc1", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-rust.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-rust.json index 73572f033d83..ca9a4c927ca6 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-rust.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-rust.json @@ -1,9 +1,9 @@ { "url": "https://github.com/tree-sitter/tree-sitter-rust", - "rev": "47b061c1e1ba3a7e9c2f450363a50e87de3f7c61", - "date": "2022-08-18T13:07:47+02:00", - "path": "/nix/store/db0s8jdi3r07y0wsv7a6kkvzrfgnjqqz-tree-sitter-rust", - "sha256": "106406hm5aqwj6p2h70p542dgphian46rw98gj5yf82p1h0k38dz", + "rev": "0431a2c60828731f27491ee9fdefe25e250ce9c9", + "date": "2022-11-03T12:28:18-07:00", + "path": "/nix/store/w0c9d84wvp2d8zx15h7dc3v33n1njmfz-tree-sitter-rust", + "sha256": "149jhy01mqvavwa8jlxb8bnn7sxpfq2x1w35si6zn60b7kqjlx8f", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-vim.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-vim.json index c9320b1ec00e..b019f2b79b13 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-vim.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-vim.json @@ -1,9 +1,9 @@ { "url": "https://github.com/vigoux/tree-sitter-viml", - "rev": "9736af8ef0a7f20b4c45f6474342c8f5b473e2cc", - "date": "2022-10-20T14:10:31+02:00", - "path": "/nix/store/ss7h5sjfkfj5ims3q273ric2yljpz3gz-tree-sitter-viml", - "sha256": "1li2y1cmvf74xjqhfjzfmr8cy3d6fymz4mbgfpnzjfc41yn556vj", + "rev": "4ae7bd67706d7e10afed827ce2ded884ab41650f", + "date": "2022-11-02T08:03:51+01:00", + "path": "/nix/store/k2fsslkwfsxscmcghiz6qqah9v275hy9-tree-sitter-viml", + "sha256": "082yw8qgi4fp9wfjfinnyh60f6rvp7fbyi88yaw6kdx4mjrnl0z6", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-zig.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-zig.json index 6126b3e4892e..057b6527f184 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-zig.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-zig.json @@ -1,9 +1,9 @@ { "url": "https://github.com/maxxnino/tree-sitter-zig", - "rev": "b1803f2a665d228f968a831eac4fcc07a377c7bc", - "date": "2022-10-14T15:52:08+07:00", - "path": "/nix/store/2sb78vfflr69yj6f2iw3872dvij1vxgf-tree-sitter-zig", - "sha256": "0z6y2sazcqbqs6fndszgqblih2syg6g9kpzk41zxh25hz9qxxdsq", + "rev": "d90d38d28ce8cc27bfea8b4e0c75211e9e2398ca", + "date": "2022-11-02T09:17:19+07:00", + "path": "/nix/store/h3wg6zkkzyq1vicp7bi4xkcvjb9himh0-tree-sitter-zig", + "sha256": "0l5703qxyyhp8h2a0ms8ncak6kzgrhp2msvpr8cgxjnlsc5xgmxx", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/update_impl.py b/pkgs/development/tools/parsing/tree-sitter/update_impl.py index 23b1e0686050..8c9351c433cd 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update_impl.py +++ b/pkgs/development/tools/parsing/tree-sitter/update_impl.py @@ -118,8 +118,8 @@ def fetchOrgaLatestRepos() -> None: if name: res.append(name) json.dump(res, sys.stdout) - case _: - sys.exit("github result was not a list of repos") + case other: + sys.exit(f"github result was not a list of repos, but {other}") case _: sys.exit("input json must have `orga` key") From 965c698e2cc1eb33ab6ae671d7d3f5abec7910ba Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Sat, 10 Sep 2022 16:56:38 +0200 Subject: [PATCH 74/82] tree-sitter/update: ARGLIB_JSON -> BINARIES, factor out wrapper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit arglib is a term I coined for passing arguments as structured environment variable, but in this case it’s probably easier to understand if we just call it `BINARIES`. Factors out the code that passes the environment to another script. --- .../tools/parsing/tree-sitter/update.nix | 17 +++++++++++------ .../tools/parsing/tree-sitter/update_impl.py | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/parsing/tree-sitter/update.nix b/pkgs/development/tools/parsing/tree-sitter/update.nix index ccb81a3f94b6..83a1cecc6aab 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update.nix +++ b/pkgs/development/tools/parsing/tree-sitter/update.nix @@ -405,14 +405,19 @@ let ''; # implementation of the fetching of repo information from github - fetchImpl = writeShellScript "fetchImpl-wrapped" '' - env ARGLIB_JSON=${lib.escapeShellArg (lib.generators.toJSON {} { + fetchImpl = passBinaries "fetchImpl-wrapped" { curl = "${curl}/bin/curl"; nix-prefetch-git = "${nix-prefetch-git}/bin/nix-prefetch-git"; - })} \ - ${writers.writePython3 "fetchImpl" { - flakeIgnore = ["E501"]; - } ./update_impl.py} "$@" + } + (writers.writePython3 "fetchImpl" { + flakeIgnore = ["E501"]; + } ./update_impl.py); + + # Pass the given binaries to the command, in the BINARIES environment variable. + # The binaries are just an attrset from name to executable. + passBinaries = name: binAttrs: script: writeShellScript name '' + env BINARIES=${lib.escapeShellArg (lib.generators.toJSON {} binAttrs)} \ + ${script} "$@" ''; foreachSh = attrs: f: diff --git a/pkgs/development/tools/parsing/tree-sitter/update_impl.py b/pkgs/development/tools/parsing/tree-sitter/update_impl.py index 8c9351c433cd..809651636fdd 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update_impl.py +++ b/pkgs/development/tools/parsing/tree-sitter/update_impl.py @@ -7,7 +7,7 @@ from typing import Generator, Any, Literal debug: bool = True if os.environ.get("DEBUG", False) else False Bin = str -bins: dict[str, Bin] = json.loads(os.environ['ARGLIB_JSON']) +bins: dict[str, Bin] = json.loads(os.environ["BINARIES"]) mode: str = sys.argv[1] jsonArg: dict = json.loads(sys.argv[2]) From aa480ba1111f61e3774e2bd3b686c3e890955b04 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Sat, 10 Sep 2022 18:02:10 +0200 Subject: [PATCH 75/82] tree-sitter/update: Move json file output to python Removes the second-to-last use of jq from the shell script. --- .../tools/parsing/tree-sitter/update.nix | 12 +++-- .../tools/parsing/tree-sitter/update_impl.py | 51 +++++++++++++------ 2 files changed, 44 insertions(+), 19 deletions(-) diff --git a/pkgs/development/tools/parsing/tree-sitter/update.nix b/pkgs/development/tools/parsing/tree-sitter/update.nix index 83a1cecc6aab..b9d4a0131633 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update.nix +++ b/pkgs/development/tools/parsing/tree-sitter/update.nix @@ -408,6 +408,7 @@ let fetchImpl = passBinaries "fetchImpl-wrapped" { curl = "${curl}/bin/curl"; nix-prefetch-git = "${nix-prefetch-git}/bin/nix-prefetch-git"; + inherit atomically-write; } (writers.writePython3 "fetchImpl" { flakeIgnore = ["E501"]; @@ -434,6 +435,7 @@ let ''; outputDir = "${toString ./.}/grammars"; + update-all-grammars = writeShellScript "update-all-grammars.sh" '' set -euo pipefail echo "fetching list of grammars" 1>&2 @@ -445,11 +447,15 @@ let ${forEachParallel "repos-to-fetch" (writeShellScript "fetch-repo" '' - ${atomically-write} \ - "${outputDir}/$(jq --raw-output --null-input '$ARGS.positional[0].name' --jsonargs "$1").json" \ ${fetchImpl} fetch-repo "$1" '') - (lib.mapAttrsToList (name: attrs: attrs // { inherit name; }) allGrammars) + (lib.mapAttrsToList + (nixRepoAttrName: attrs: attrs // { + inherit + nixRepoAttrName + outputDir; + }) + allGrammars) } ${atomically-write} \ "${outputDir}/default.nix" \ diff --git a/pkgs/development/tools/parsing/tree-sitter/update_impl.py b/pkgs/development/tools/parsing/tree-sitter/update_impl.py index 809651636fdd..1e2edd0944b4 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update_impl.py +++ b/pkgs/development/tools/parsing/tree-sitter/update_impl.py @@ -3,7 +3,7 @@ import json import subprocess as sub import os import sys -from typing import Generator, Any, Literal +from typing import Iterator, Any, Literal debug: bool = True if os.environ.get("DEBUG", False) else False Bin = str @@ -12,11 +12,12 @@ bins: dict[str, Bin] = json.loads(os.environ["BINARIES"]) mode: str = sys.argv[1] jsonArg: dict = json.loads(sys.argv[2]) -Args = Generator[str, None, None] +Args = Iterator[str] def curl_github_args(token: str | None, url: str) -> Args: """Query the github API via curl""" + yield bins["curl"] if not debug: yield "--silent" # follow redirects @@ -43,6 +44,7 @@ def curl_result(output: bytes) -> Any | Literal["not found"]: def nix_prefetch_git_args(url: str, version_rev: str) -> Args: """Prefetch a git repository""" + yield bins["nix-prefetch-git"] if not debug: yield "--quiet" yield "--no-deepClone" @@ -52,21 +54,33 @@ def nix_prefetch_git_args(url: str, version_rev: str) -> Args: yield version_rev -def run_bin(cmd: str, args: Args) -> bytes: - bin: Bin = bins[cmd] - all = [bin] + list(args) +def run_cmd(args: Args) -> bytes: + all = list(args) if debug: print(all, file=sys.stderr) return sub.check_output(all) +Dir = str + + +def atomically_write_args(to: Dir, cmd: Args) -> Args: + yield bins["atomically-write"] + yield to + yield from cmd + + def fetchRepo() -> None: - """fetch the given repo and print its nix-prefetch output to stdout""" + """fetch the given repo and write its nix-prefetch output to the corresponding grammar json file""" match jsonArg: - case {"orga": orga, "repo": repo}: + case { + "orga": orga, + "repo": repo, + "outputDir": outputDir, + "nixRepoAttrName": nixRepoAttrName, + }: token: str | None = os.environ.get("GITHUB_TOKEN", None) - out = run_bin( - "curl", + out = run_cmd( curl_github_args( token, url=f"https://api.github.com/repos/{quote(orga)}/{quote(repo)}/releases/latest" @@ -84,11 +98,17 @@ def fetchRepo() -> None: sys.exit(f"git result for {orga}/{repo} did not have a `tag_name` field") print(f"Fetching latest release ({release}) of {orga}/{repo} …", file=sys.stderr) - res = run_bin( - "nix-prefetch-git", - nix_prefetch_git_args( - url=f"https://github.com/{quote(orga)}/{quote(repo)}", - version_rev=release + res = run_cmd( + atomically_write_args( + os.path.join( + outputDir, + f"{nixRepoAttrName}.json" + ), + nix_prefetch_git_args( + url=f"https://github.com/{quote(orga)}/{quote(repo)}", + version_rev=release + + ) ) ) sys.stdout.buffer.write(res) @@ -101,8 +121,7 @@ def fetchOrgaLatestRepos() -> None: match jsonArg: case {"orga": orga}: token: str | None = os.environ.get("GITHUB_TOKEN", None) - out = run_bin( - "curl", + out = run_cmd( curl_github_args( token, url=f"https://api.github.com/orgs/{quote(orga)}/repos?per_page=100" From 923975a604e5de29106dfe349dc5b6576b6045b6 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Mon, 12 Sep 2022 13:02:10 +0200 Subject: [PATCH 76/82] tree-sitter/update: BINARIES -> ARGS.binaries I want to pass more information in the next step, so binaries are just one of multiple elements of the json value. Generate a json file via `format` so that we get nicer formatting (`lib.generators.toJSON` uses `builtins.toJSON` which does not add any whitespace). --- .../tools/parsing/tree-sitter/update.nix | 18 ++++++++++-------- .../tools/parsing/tree-sitter/update_impl.py | 3 ++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/pkgs/development/tools/parsing/tree-sitter/update.nix b/pkgs/development/tools/parsing/tree-sitter/update.nix index b9d4a0131633..a51208a5bfde 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update.nix +++ b/pkgs/development/tools/parsing/tree-sitter/update.nix @@ -405,19 +405,21 @@ let ''; # implementation of the fetching of repo information from github - fetchImpl = passBinaries "fetchImpl-wrapped" { - curl = "${curl}/bin/curl"; - nix-prefetch-git = "${nix-prefetch-git}/bin/nix-prefetch-git"; - inherit atomically-write; + fetchImpl = passArgs "fetchImpl-with-args" { + binaries = { + curl = "${curl}/bin/curl"; + nix-prefetch-git = "${nix-prefetch-git}/bin/nix-prefetch-git"; + inherit atomically-write; + }; } (writers.writePython3 "fetchImpl" { flakeIgnore = ["E501"]; } ./update_impl.py); - # Pass the given binaries to the command, in the BINARIES environment variable. - # The binaries are just an attrset from name to executable. - passBinaries = name: binAttrs: script: writeShellScript name '' - env BINARIES=${lib.escapeShellArg (lib.generators.toJSON {} binAttrs)} \ + # Pass the given arguments to the command, in the ARGS environment variable. + # The arguments are just a json object that should be available in the script. + passArgs = name: argAttrs: script: writeShellScript name '' + env ARGS="$(< ${jsonFile "${name}-args" argAttrs})" \ ${script} "$@" ''; diff --git a/pkgs/development/tools/parsing/tree-sitter/update_impl.py b/pkgs/development/tools/parsing/tree-sitter/update_impl.py index 1e2edd0944b4..1bff7aac1abf 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update_impl.py +++ b/pkgs/development/tools/parsing/tree-sitter/update_impl.py @@ -7,7 +7,8 @@ from typing import Iterator, Any, Literal debug: bool = True if os.environ.get("DEBUG", False) else False Bin = str -bins: dict[str, Bin] = json.loads(os.environ["BINARIES"]) +args: dict[str, Any] = json.loads(os.environ["ARGS"]) +bins: dict[str, Bin] = args["binaries"] mode: str = sys.argv[1] jsonArg: dict = json.loads(sys.argv[2]) From a953387d22f56bc62c67b14cbdfca846f1eef69f Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Mon, 12 Sep 2022 16:25:42 +0200 Subject: [PATCH 77/82] tree-sitter/update: move checkTreeSitterRepos into python impl Direct translation of the jq set logic. --- .../tools/parsing/tree-sitter/default.nix | 4 +--- .../tools/parsing/tree-sitter/update.nix | 23 ++++-------------- .../tools/parsing/tree-sitter/update_impl.py | 24 ++++++++++++++++--- 3 files changed, 27 insertions(+), 24 deletions(-) diff --git a/pkgs/development/tools/parsing/tree-sitter/default.nix b/pkgs/development/tools/parsing/tree-sitter/default.nix index fcc81236f4f4..dcc8be0640f4 100644 --- a/pkgs/development/tools/parsing/tree-sitter/default.nix +++ b/pkgs/development/tools/parsing/tree-sitter/default.nix @@ -42,9 +42,7 @@ let fetchSubmodules = true; }; - update-all-grammars = callPackage ./update.nix { - inherit src; - }; + update-all-grammars = callPackage ./update.nix {}; fetchGrammar = (v: fetchgit { inherit (v) url rev sha256 fetchSubmodules; }); diff --git a/pkgs/development/tools/parsing/tree-sitter/update.nix b/pkgs/development/tools/parsing/tree-sitter/update.nix index a51208a5bfde..17b13bad8b0a 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update.nix +++ b/pkgs/development/tools/parsing/tree-sitter/update.nix @@ -6,9 +6,7 @@ , lib , coreutils , curl -, jq , xe -, src }: # Grammar list: @@ -389,21 +387,6 @@ let jsonFile = name: val: (formats.json { }).generate name val; - # check the tree-sitter orga repos - checkTreeSitterRepos = writeShellScript "get-grammars.sh" '' - set -euo pipefail - res=$(${jq}/bin/jq \ - --slurpfile known "${knownTreeSitterOrgGrammarReposJson}" \ - --slurpfile ignore "${ignoredTreeSitterOrgReposJson}" \ - '. - ($known[0] + $ignore[0])' \ - ) - if [ ! "$res" == "[]" ]; then - echo "These repositories are neither known nor ignored:" 1>&2 - echo "$res" 1>&2 - exit 1 - fi - ''; - # implementation of the fetching of repo information from github fetchImpl = passArgs "fetchImpl-with-args" { binaries = { @@ -411,6 +394,10 @@ let nix-prefetch-git = "${nix-prefetch-git}/bin/nix-prefetch-git"; inherit atomically-write; }; + inherit + knownTreeSitterOrgGrammarRepos + ignoredTreeSitterOrgRepos + ; } (writers.writePython3 "fetchImpl" { flakeIgnore = ["E501"]; @@ -443,7 +430,7 @@ let echo "fetching list of grammars" 1>&2 treeSitterRepos=$(${fetchImpl} fetch-orga-latest-repos '{"orga": "tree-sitter"}') echo "checking the tree-sitter repo list against the grammars we know" 1>&2 - printf '%s' "$treeSitterRepos" | ${checkTreeSitterRepos} + printf '%s' "$treeSitterRepos" | ${fetchImpl} check-tree-sitter-repos '{}' echo "writing files to ${outputDir}" 1>&2 mkdir -p "${outputDir}" ${forEachParallel diff --git a/pkgs/development/tools/parsing/tree-sitter/update_impl.py b/pkgs/development/tools/parsing/tree-sitter/update_impl.py index 1bff7aac1abf..a65b7bef664a 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update_impl.py +++ b/pkgs/development/tools/parsing/tree-sitter/update_impl.py @@ -16,6 +16,10 @@ jsonArg: dict = json.loads(sys.argv[2]) Args = Iterator[str] +def log(msg: str) -> None: + print(msg, file=sys.stderr) + + def curl_github_args(token: str | None, url: str) -> Args: """Query the github API via curl""" yield bins["curl"] @@ -58,7 +62,7 @@ def nix_prefetch_git_args(url: str, version_rev: str) -> Args: def run_cmd(args: Args) -> bytes: all = list(args) if debug: - print(all, file=sys.stderr) + log(str(all)) return sub.check_output(all) @@ -91,14 +95,14 @@ def fetchRepo() -> None: match curl_result(out): case "not found": # github sometimes returns an empty list even tough there are releases - print(f"uh-oh, latest for {orga}/{repo} is not there, using HEAD", file=sys.stderr) + log(f"uh-oh, latest for {orga}/{repo} is not there, using HEAD") release = "HEAD" case {"tag_name": tag_name}: release = tag_name case _: sys.exit(f"git result for {orga}/{repo} did not have a `tag_name` field") - print(f"Fetching latest release ({release}) of {orga}/{repo} …", file=sys.stderr) + log(f"Fetching latest release ({release}) of {orga}/{repo} …") res = run_cmd( atomically_write_args( os.path.join( @@ -144,10 +148,24 @@ def fetchOrgaLatestRepos() -> None: sys.exit("input json must have `orga` key") +def checkTreeSitterRepos() -> None: + """Make sure we know about all tree sitter repos on the tree sitter orga.""" + github_tree_sitter_repos: set[str] = set(json.load(sys.stdin)) + known: set[str] = set(args["knownTreeSitterOrgGrammarRepos"]) + ignored: set[str] = set(args["ignoredTreeSitterOrgRepos"]) + + unknown = github_tree_sitter_repos - (known | ignored) + + if unknown: + sys.exit(f"These repositories are neither known nor ignored:\n{unknown}") + + match mode: case "fetch-repo": fetchRepo() case "fetch-orga-latest-repos": fetchOrgaLatestRepos() + case "check-tree-sitter-repos": + checkTreeSitterRepos() case _: sys.exit(f"mode {mode} unknown") From 484bce31b7cf3541e01835545453c7545d20d043 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Mon, 12 Sep 2022 17:43:26 +0200 Subject: [PATCH 78/82] tree-sitter/update: move printing of the import nix file to python MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a bit crappy, but the complexity should go away once it’s done in all python. Might have been wiser to rewrite the other stuff first. --- .../tools/parsing/tree-sitter/update.nix | 22 +++++----- .../tools/parsing/tree-sitter/update_impl.py | 42 ++++++++++++++++++- 2 files changed, 53 insertions(+), 11 deletions(-) diff --git a/pkgs/development/tools/parsing/tree-sitter/update.nix b/pkgs/development/tools/parsing/tree-sitter/update.nix index 17b13bad8b0a..055f42dc720a 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update.nix +++ b/pkgs/development/tools/parsing/tree-sitter/update.nix @@ -393,6 +393,7 @@ let curl = "${curl}/bin/curl"; nix-prefetch-git = "${nix-prefetch-git}/bin/nix-prefetch-git"; inherit atomically-write; + printf = "${coreutils}/bin/printf"; }; inherit knownTreeSitterOrgGrammarRepos @@ -446,16 +447,17 @@ let }) allGrammars) } - ${atomically-write} \ - "${outputDir}/default.nix" \ - ${writeShellScript "print-all-grammars" '' - echo "{ lib }:" - echo "{" - ${foreachSh allGrammars - ({name, ...}: '' - printf " %s = lib.importJSON ./%s.json;\n" "${name}" "${name}"'')} - echo "}" - ''} + ${fetchImpl} print-all-grammars-nix-file "$(< ${ + jsonFile "all-grammars.json" { + allGrammars = + (lib.mapAttrsToList + (nixRepoAttrName: attrs: attrs // { + inherit nixRepoAttrName; + }) + allGrammars); + inherit outputDir; + } + })" ''; # Atomically write a file (just `>` redirection in bash diff --git a/pkgs/development/tools/parsing/tree-sitter/update_impl.py b/pkgs/development/tools/parsing/tree-sitter/update_impl.py index a65b7bef664a..e9113c1ebd31 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update_impl.py +++ b/pkgs/development/tools/parsing/tree-sitter/update_impl.py @@ -3,7 +3,7 @@ import json import subprocess as sub import os import sys -from typing import Iterator, Any, Literal +from typing import Iterator, Any, Literal, TypedDict debug: bool = True if os.environ.get("DEBUG", False) else False Bin = str @@ -160,6 +160,44 @@ def checkTreeSitterRepos() -> None: sys.exit(f"These repositories are neither known nor ignored:\n{unknown}") +Grammar = TypedDict( + "Grammar", + { + "nixRepoAttrName": str, + "orga": str, + "repo": str + } +) + + +def printAllGrammarsNixFile() -> None: + """Print a .nix file that imports all grammars.""" + allGrammars: list[dict[str, Grammar]] = jsonArg["allGrammars"] + outputDir: Dir = jsonArg["outputDir"] + + def file() -> Iterator[str]: + yield "{ lib }:" + yield "{" + for grammar in allGrammars: + n = grammar["nixRepoAttrName"] + yield f" {n} = lib.importJSON ./{n}.json;" + yield "}" + yield "" + + out = run_cmd( + # TODO: implement atomic file write in python + atomically_write_args( + os.path.join( + outputDir, + "default.nix" + ), + iter([bins["printf"], "%s", "\n".join(list(file()))]) + ) + ) + if out: + log(str(out)) + + match mode: case "fetch-repo": fetchRepo() @@ -167,5 +205,7 @@ match mode: fetchOrgaLatestRepos() case "check-tree-sitter-repos": checkTreeSitterRepos() + case "print-all-grammars-nix-file": + printAllGrammarsNixFile() case _: sys.exit(f"mode {mode} unknown") From 3b0b6d1b612e85b7aebcb089e8c59b8614c21a05 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Mon, 12 Sep 2022 22:07:20 +0200 Subject: [PATCH 79/82] tree-sitter/update: move atomically-write to python It should do the same thing, but take with a grain of salt maybe. --- .../tools/parsing/tree-sitter/update.nix | 25 -------- .../tools/parsing/tree-sitter/update_impl.py | 62 ++++++++++--------- 2 files changed, 34 insertions(+), 53 deletions(-) diff --git a/pkgs/development/tools/parsing/tree-sitter/update.nix b/pkgs/development/tools/parsing/tree-sitter/update.nix index 055f42dc720a..78b07c59d44e 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update.nix +++ b/pkgs/development/tools/parsing/tree-sitter/update.nix @@ -392,7 +392,6 @@ let binaries = { curl = "${curl}/bin/curl"; nix-prefetch-git = "${nix-prefetch-git}/bin/nix-prefetch-git"; - inherit atomically-write; printf = "${coreutils}/bin/printf"; }; inherit @@ -460,30 +459,6 @@ let })" ''; - # Atomically write a file (just `>` redirection in bash - # empties a file even if the command crashes). - # - # Maybe there is an existing tool for that? - # But it’s easy enough to implement. - # - # Example: - # atomically-write - # ./to - # echo "foo" - # - # will atomically write the string "foo" into ./to - atomically-write = writeShellScript "atomically-write" '' - set -e - to=$1 - shift - # assumes that the tempfile is on the same file system, (or in memory) - # for the `mv` at the end to be more-or-less atomic. - tmp=$(${coreutils}/bin/mktemp -d) - trap 'rm -r "$tmp"' EXIT - "$@" \ - > "$tmp/out" - mv "$tmp/out" "$to" - ''; in update-all-grammars diff --git a/pkgs/development/tools/parsing/tree-sitter/update_impl.py b/pkgs/development/tools/parsing/tree-sitter/update_impl.py index e9113c1ebd31..92db75ef6502 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update_impl.py +++ b/pkgs/development/tools/parsing/tree-sitter/update_impl.py @@ -4,6 +4,7 @@ import subprocess as sub import os import sys from typing import Iterator, Any, Literal, TypedDict +from tempfile import NamedTemporaryFile debug: bool = True if os.environ.get("DEBUG", False) else False Bin = str @@ -20,6 +21,23 @@ def log(msg: str) -> None: print(msg, file=sys.stderr) +def atomically_write(file_path: str, content: bytes) -> None: + """atomically write the content into `file_path`""" + with NamedTemporaryFile( + # write to the parent dir, so that it’s guaranteed to be on the same filesystem + dir=os.path.dirname(file_path), + delete=False + ) as tmp: + try: + tmp.write(content) + os.rename( + src=tmp.name, + dst=file_path + ) + except Exception: + os.unlink(tmp.name) + + def curl_github_args(token: str | None, url: str) -> Args: """Query the github API via curl""" yield bins["curl"] @@ -69,12 +87,6 @@ def run_cmd(args: Args) -> bytes: Dir = str -def atomically_write_args(to: Dir, cmd: Args) -> Args: - yield bins["atomically-write"] - yield to - yield from cmd - - def fetchRepo() -> None: """fetch the given repo and write its nix-prefetch output to the corresponding grammar json file""" match jsonArg: @@ -104,19 +116,18 @@ def fetchRepo() -> None: log(f"Fetching latest release ({release}) of {orga}/{repo} …") res = run_cmd( - atomically_write_args( - os.path.join( - outputDir, - f"{nixRepoAttrName}.json" - ), - nix_prefetch_git_args( - url=f"https://github.com/{quote(orga)}/{quote(repo)}", - version_rev=release - - ) + nix_prefetch_git_args( + url=f"https://github.com/{quote(orga)}/{quote(repo)}", + version_rev=release ) ) - sys.stdout.buffer.write(res) + atomically_write( + file_path=os.path.join( + outputDir, + f"{nixRepoAttrName}.json" + ), + content=res + ) case _: sys.exit("input json must have `orga` and `repo` keys") @@ -184,18 +195,13 @@ def printAllGrammarsNixFile() -> None: yield "}" yield "" - out = run_cmd( - # TODO: implement atomic file write in python - atomically_write_args( - os.path.join( - outputDir, - "default.nix" - ), - iter([bins["printf"], "%s", "\n".join(list(file()))]) - ) + atomically_write( + file_path=os.path.join( + outputDir, + "default.nix" + ), + content="\n".join(file()).encode() ) - if out: - log(str(out)) match mode: From 8f2f2e34d0440b92a789ccc421c948ec65be1a85 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Mon, 12 Sep 2022 22:13:44 +0200 Subject: [PATCH 80/82] tree-sitter/update: rename fetchImpl to updateImpl --- .../tools/parsing/tree-sitter/update.nix | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/parsing/tree-sitter/update.nix b/pkgs/development/tools/parsing/tree-sitter/update.nix index 78b07c59d44e..72f27e90e2b6 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update.nix +++ b/pkgs/development/tools/parsing/tree-sitter/update.nix @@ -387,8 +387,8 @@ let jsonFile = name: val: (formats.json { }).generate name val; - # implementation of the fetching of repo information from github - fetchImpl = passArgs "fetchImpl-with-args" { + # implementation of the updater + updateImpl = passArgs "updateImpl-with-args" { binaries = { curl = "${curl}/bin/curl"; nix-prefetch-git = "${nix-prefetch-git}/bin/nix-prefetch-git"; @@ -399,7 +399,7 @@ let ignoredTreeSitterOrgRepos ; } - (writers.writePython3 "fetchImpl" { + (writers.writePython3 "updateImpl" { flakeIgnore = ["E501"]; } ./update_impl.py); @@ -423,20 +423,22 @@ let ${xe}/bin/xe -F -j5 ${script} {} ''; + # The output directory in the current source tree. + # This will depend on your local environment, but that is intentional. outputDir = "${toString ./.}/grammars"; update-all-grammars = writeShellScript "update-all-grammars.sh" '' set -euo pipefail echo "fetching list of grammars" 1>&2 - treeSitterRepos=$(${fetchImpl} fetch-orga-latest-repos '{"orga": "tree-sitter"}') + treeSitterRepos=$(${updateImpl} fetch-orga-latest-repos '{"orga": "tree-sitter"}') echo "checking the tree-sitter repo list against the grammars we know" 1>&2 - printf '%s' "$treeSitterRepos" | ${fetchImpl} check-tree-sitter-repos '{}' + printf '%s' "$treeSitterRepos" | ${updateImpl} check-tree-sitter-repos '{}' echo "writing files to ${outputDir}" 1>&2 mkdir -p "${outputDir}" ${forEachParallel "repos-to-fetch" (writeShellScript "fetch-repo" '' - ${fetchImpl} fetch-repo "$1" + ${updateImpl} fetch-repo "$1" '') (lib.mapAttrsToList (nixRepoAttrName: attrs: attrs // { @@ -446,7 +448,7 @@ let }) allGrammars) } - ${fetchImpl} print-all-grammars-nix-file "$(< ${ + ${updateImpl} print-all-grammars-nix-file "$(< ${ jsonFile "all-grammars.json" { allGrammars = (lib.mapAttrsToList From 0242c271aa61d1ef917e581c2d4ea9e3aaeeed75 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Sat, 24 Sep 2022 13:18:13 +0200 Subject: [PATCH 81/82] tree-sitter/update: fetch orgas and directly check in python --- .../tools/parsing/tree-sitter/update.nix | 5 +- .../tools/parsing/tree-sitter/update_impl.py | 60 +++++++++---------- 2 files changed, 31 insertions(+), 34 deletions(-) diff --git a/pkgs/development/tools/parsing/tree-sitter/update.nix b/pkgs/development/tools/parsing/tree-sitter/update.nix index 72f27e90e2b6..ad62530ee31d 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update.nix +++ b/pkgs/development/tools/parsing/tree-sitter/update.nix @@ -429,10 +429,7 @@ let update-all-grammars = writeShellScript "update-all-grammars.sh" '' set -euo pipefail - echo "fetching list of grammars" 1>&2 - treeSitterRepos=$(${updateImpl} fetch-orga-latest-repos '{"orga": "tree-sitter"}') - echo "checking the tree-sitter repo list against the grammars we know" 1>&2 - printf '%s' "$treeSitterRepos" | ${updateImpl} check-tree-sitter-repos '{}' + ${updateImpl} fetch-and-check-tree-sitter-repos '{}' echo "writing files to ${outputDir}" 1>&2 mkdir -p "${outputDir}" ${forEachParallel diff --git a/pkgs/development/tools/parsing/tree-sitter/update_impl.py b/pkgs/development/tools/parsing/tree-sitter/update_impl.py index 92db75ef6502..db470617ed9c 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update_impl.py +++ b/pkgs/development/tools/parsing/tree-sitter/update_impl.py @@ -132,40 +132,35 @@ def fetchRepo() -> None: sys.exit("input json must have `orga` and `repo` keys") -def fetchOrgaLatestRepos() -> None: +def fetchOrgaLatestRepos(orga: str) -> set[str]: """fetch the latest (100) repos from the given github organization""" - match jsonArg: - case {"orga": orga}: - token: str | None = os.environ.get("GITHUB_TOKEN", None) - out = run_cmd( - curl_github_args( - token, - url=f"https://api.github.com/orgs/{quote(orga)}/repos?per_page=100" - ) - ) - match curl_result(out): - case "not found": - sys.exit(f"github organization {orga} not found") - case list(repos): - res: list[str] = [] - for repo in repos: - name = repo.get("name") - if name: - res.append(name) - json.dump(res, sys.stdout) - case other: - sys.exit(f"github result was not a list of repos, but {other}") + token: str | None = os.environ.get("GITHUB_TOKEN", None) + out = run_cmd( + curl_github_args( + token, + url=f"https://api.github.com/orgs/{quote(orga)}/repos?per_page=100" + ) + ) + match curl_result(out): + case "not found": + sys.exit(f"github organization {orga} not found") + case list(repos): + res: list[str] = [] + for repo in repos: + name = repo.get("name") + if name: + res.append(name) + return set(res) case _: - sys.exit("input json must have `orga` key") + sys.exit("github result was not a list of repos, but {other}") -def checkTreeSitterRepos() -> None: +def checkTreeSitterRepos(latest_github_repos: set[str]) -> None: """Make sure we know about all tree sitter repos on the tree sitter orga.""" - github_tree_sitter_repos: set[str] = set(json.load(sys.stdin)) known: set[str] = set(args["knownTreeSitterOrgGrammarRepos"]) ignored: set[str] = set(args["ignoredTreeSitterOrgRepos"]) - unknown = github_tree_sitter_repos - (known | ignored) + unknown = latest_github_repos - (known | ignored) if unknown: sys.exit(f"These repositories are neither known nor ignored:\n{unknown}") @@ -204,13 +199,18 @@ def printAllGrammarsNixFile() -> None: ) +def fetchAndCheckTreeSitterRepos() -> None: + log("fetching list of grammars") + latest_repos = fetchOrgaLatestRepos(orga="tree-sitter") + log("checking the tree-sitter repo list against the grammars we know") + checkTreeSitterRepos(latest_repos) + + match mode: case "fetch-repo": fetchRepo() - case "fetch-orga-latest-repos": - fetchOrgaLatestRepos() - case "check-tree-sitter-repos": - checkTreeSitterRepos() + case "fetch-and-check-tree-sitter-repos": + fetchAndCheckTreeSitterRepos() case "print-all-grammars-nix-file": printAllGrammarsNixFile() case _: From 18881195c20314aebcf54d6e5c85ae2df74da5be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Mon, 28 Dec 2020 21:15:56 +0100 Subject: [PATCH 82/82] eclipses.plugins.embed-cdt: 3.1.1 -> 6.3.1 * Rename from gnuarmeclipse. * Version bump. * Update meta. * Alias the old name, for backwards compat. --- pkgs/applications/editors/eclipse/plugins.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/editors/eclipse/plugins.nix b/pkgs/applications/editors/eclipse/plugins.nix index 1d1406160c79..8c9189466c83 100644 --- a/pkgs/applications/editors/eclipse/plugins.nix +++ b/pkgs/applications/editors/eclipse/plugins.nix @@ -433,25 +433,26 @@ rec { }; }; - gnuarmeclipse = buildEclipseUpdateSite rec { - name = "gnuarmeclipse-${version}"; - version = "3.1.1-201606210758"; + embed-cdt = buildEclipseUpdateSite rec { + name = "embed-cdt-${version}"; + version = "6.3.1"; src = fetchzip { - stripRoot = false; - url = "https://github.com/gnuarmeclipse/plug-ins/releases/download/v${version}/ilg.gnuarmeclipse.repository-${version}.zip"; - sha256 = "1g77jlhfa3csaxxps1z5lasrd9l2p5ajnddnq9ra5syw8ggkdc2h"; + stripRoot = true; + url = "https://github.com/eclipse-embed-cdt/eclipse-plugins/archive/v${version}.zip"; + sha256 = "sha256-0wHRIls48NGDQzD+wuX79Thgiax+VVYVPJw2Z6NEzsg="; }; meta = with lib; { - homepage = "http://gnuarmeclipse.livius.net/"; - description = "GNU ARM Eclipse Plug-ins"; + homepage = "https://github.com/eclipse-embed-cdt/eclipse-plugins"; + description = "Embedded C/C++ Development Tools (formerly GNU MCU/ARM Eclipse)"; sourceProvenance = with sourceTypes; [ binaryBytecode ]; - license = licenses.epl10; + license = licenses.epl20; platforms = platforms.all; maintainers = [ maintainers.bjornfor ]; }; }; + gnuarmeclipse = embed-cdt; # backward compat alias, added 2022-11-04 jsonedit = buildEclipsePlugin rec { name = "jsonedit-${version}";