From 39a1adedec043464338a8831b5175b81dbd229d8 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 3 Mar 2022 04:47:34 +0000 Subject: [PATCH 001/148] python310Packages.bitbox02: 5.3.0 -> 6.0.0 --- pkgs/development/python-modules/bitbox02/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/bitbox02/default.nix b/pkgs/development/python-modules/bitbox02/default.nix index d57d4a6585bd..358a4d163f3e 100644 --- a/pkgs/development/python-modules/bitbox02/default.nix +++ b/pkgs/development/python-modules/bitbox02/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "bitbox02"; - version = "5.3.0"; + version = "6.0.0"; src = fetchPypi { inherit pname version; - sha256 = "fe0e8aeb9b32fd7d76bb3e9838895973a74dfd532a8fb8ac174a1a60214aee26"; + sha256 = "sha256-wTateh3dJycFNozLaQbAzXF0avr2ofBdjlqqcOBLr/0="; }; propagatedBuildInputs = [ base58 ecdsa hidapi noiseprotocol protobuf semver typing-extensions ]; From 924b27e479a3058d23fa1ed12cb389260e3981bc Mon Sep 17 00:00:00 2001 From: "Markus S. Wamser" Date: Tue, 31 May 2022 10:07:21 +0200 Subject: [PATCH 002/148] CONTRIBUTING.md: use 22.05 as target branch for backports --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ef620f5bc5c5..fb5e5b545955 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -104,10 +104,10 @@ This also works for PR's that have already been merged, and might take a couple You can also create the backport manually: 1. Take note of the commits in which the change was introduced into `master` branch. -2. Check out the target _release branch_, e.g. `release-21.11`. Do not use a _channel branch_ like `nixos-21.11` or `nixpkgs-21.11-darwin`. +2. Check out the target _release branch_, e.g. `release-22.05`. Do not use a _channel branch_ like `nixos-22.05` or `nixpkgs-22.05-darwin`. 3. Create a branch for your change, e.g. `git checkout -b backport`. 4. When the reason to backport is not obvious from the original commit message, use `git cherry-pick -xe ` and add a reason. Otherwise use `git cherry-pick -x `. That's fine for minor version updates that only include security and bug fixes, commits that fixes an otherwise broken package or similar. Please also ensure the commits exists on the master branch; in the case of squashed or rebased merges, the commit hash will change and the new commits can be found in the merge message at the bottom of the master pull request. -5. Push to GitHub and open a backport pull request. Make sure to select the release branch (e.g. `release-21.11`) as the target branch of the pull request, and link to the pull request in which the original change was comitted to `master`. The pull request title should be the commit title with the release version as prefix, e.g. `[21.11]`. +5. Push to GitHub and open a backport pull request. Make sure to select the release branch (e.g. `release-22.05`) as the target branch of the pull request, and link to the pull request in which the original change was comitted to `master`. The pull request title should be the commit title with the release version as prefix, e.g. `[22.05]`. 6. When the backport pull request is merged and you have the necessary privileges you can also replace the label `9.needs: port to stable` with `8.has: port to stable` on the original pull request. This way maintainers can keep track of missing backports easier. ## Criteria for Backporting changes From 48dd2889c7f408a7602e9bfb56afe3c0932533a7 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Tue, 31 May 2022 22:24:42 +0200 Subject: [PATCH 003/148] kibana6: remove --- pkgs/development/tools/misc/kibana/6.x.nix | 63 ---------------------- pkgs/top-level/all-packages.nix | 7 +-- 2 files changed, 1 insertion(+), 69 deletions(-) delete mode 100644 pkgs/development/tools/misc/kibana/6.x.nix diff --git a/pkgs/development/tools/misc/kibana/6.x.nix b/pkgs/development/tools/misc/kibana/6.x.nix deleted file mode 100644 index cd81975ee445..000000000000 --- a/pkgs/development/tools/misc/kibana/6.x.nix +++ /dev/null @@ -1,63 +0,0 @@ -{ elk6Version -, enableUnfree ? true -, lib, stdenv -, makeWrapper -, fetchurl -, nodejs-10_x -, coreutils -, which -}: - -with lib; -let - nodejs = nodejs-10_x; - inherit (builtins) elemAt; - info = splitString "-" stdenv.hostPlatform.system; - arch = elemAt info 0; - plat = elemAt info 1; - shas = - if enableUnfree - then { - x86_64-linux = "1a501lavxhckb3l93sbrbqyshicwkk6p89frry4x8p037xcfpy0x"; - x86_64-darwin = "0zm45af30shhcg3mdhcma6rms1hyrx62rm5jzwnz9kxv4d30skbw"; - } - else { - x86_64-linux = "0wfdipf21apyily7mvlqgyc7m5jpr96zgrryzwa854z3xb2vw8zg"; - x86_64-darwin = "1nklfx4yz6hsxlljvnvwjy7pncv9mzngl84710xad5jlyras3sdj"; - }; - -in stdenv.mkDerivation rec { - pname = "kibana${optionalString (!enableUnfree) "-oss"}"; - version = elk6Version; - - src = fetchurl { - url = "https://artifacts.elastic.co/downloads/kibana/${pname}-${version}-${plat}-${arch}.tar.gz"; - sha256 = shas.${stdenv.hostPlatform.system} or (throw "Unknown architecture"); - }; - - patches = [ - # Kibana specifies it specifically needs nodejs 10.15.2 but nodejs in nixpkgs is at 10.15.3. - # The test succeeds with this newer version so lets just - # disable the version check. - ./disable-nodejs-version-check.patch - ]; - - nativeBuildInputs = [ makeWrapper ]; - - installPhase = '' - mkdir -p $out/libexec/kibana $out/bin - mv * $out/libexec/kibana/ - rm -r $out/libexec/kibana/node - makeWrapper $out/libexec/kibana/bin/kibana $out/bin/kibana \ - --prefix PATH : "${lib.makeBinPath [ nodejs coreutils which ]}" - sed -i 's@NODE=.*@NODE=${nodejs}/bin/node@' $out/libexec/kibana/bin/kibana - ''; - - meta = { - description = "Visualize logs and time-stamped data"; - homepage = "http://www.elasticsearch.org/overview/kibana"; - license = if enableUnfree then licenses.elastic else licenses.asl20; - maintainers = with maintainers; [ offline basvandijk ]; - platforms = with platforms; unix; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 81b2c330de40..fd8ead6ef03c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7467,13 +7467,8 @@ with pkgs; kfctl = callPackage ../applications/networking/cluster/kfctl { }; - kibana6 = callPackage ../development/tools/misc/kibana/6.x.nix { }; - kibana6-oss = callPackage ../development/tools/misc/kibana/6.x.nix { - enableUnfree = false; - }; kibana7 = callPackage ../development/tools/misc/kibana/7.x.nix { }; - kibana = kibana6; - kibana-oss = kibana6-oss; + kibana = kibana7; kibi = callPackage ../applications/editors/kibi { }; From 0bb082468894c28356f60aa647536bc2d353af89 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Tue, 31 May 2022 22:24:31 +0200 Subject: [PATCH 004/148] nodejs-10_x: remove has been EOL for over one year --- pkgs/development/web/nodejs/v10.nix | 14 -------------- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 8 -------- 3 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 pkgs/development/web/nodejs/v10.nix diff --git a/pkgs/development/web/nodejs/v10.nix b/pkgs/development/web/nodejs/v10.nix deleted file mode 100644 index 5c107b20f4a4..000000000000 --- a/pkgs/development/web/nodejs/v10.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ callPackage, openssl, icu, python2, lib, stdenv, enableNpm ? true }: - -let - buildNodejs = callPackage ./nodejs.nix { - inherit openssl icu; - python = python2; - }; -in - buildNodejs { - inherit enableNpm; - version = "10.24.1"; - sha256 = "032801kg24j04xmf09m0vxzlcz86sv21s24lv9l4cfv08k1c4byp"; - patches = lib.optional stdenv.isDarwin ./bypass-xcodebuild.diff; - } diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 6278957813c8..a18af56e4572 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -913,6 +913,7 @@ mapAliases ({ nmap-unfree = nmap; # Added 2021-04-06 nmap-graphical = throw "nmap graphical support has been removed due to its python2 dependency"; # Added 2022-04-26 nmap_graphical = throw "nmap graphical support has been removed due to its python2 dependency"; # Modified 2022-04-26 + nodejs-10_x = throw "nodejs-10_X has been removed. Use a newer version instead."; # Added 2022-05-31 nologin = throw "'nologin' has been renamed to/replaced by 'shadow'"; # Converted to throw 2022-02-22 nomad_1_1 = throw "nomad_1_1 has been removed because it's outdated. Use a a newer version instead"; # Added 2022-05-22 nordic-polar = throw "nordic-polar was removed on 2021-05-27, now integrated in nordic"; # Added 2021-05-27 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fd8ead6ef03c..5f38e83e7077 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7848,14 +7848,6 @@ with pkgs; nodejs-slim = nodejs-slim-16_x; - - nodejs-10_x = callPackage ../development/web/nodejs/v10.nix { - icu = icu67; - }; - nodejs-slim-10_x = callPackage ../development/web/nodejs/v10.nix { - enableNpm = false; - icu = icu67; - }; nodejs-12_x = callPackage ../development/web/nodejs/v12.nix { }; nodejs-slim-12_x = callPackage ../development/web/nodejs/v12.nix { enableNpm = false; From 390922654444067b796b70b04bda15d8ca5912d1 Mon Sep 17 00:00:00 2001 From: AmineChikhaoui Date: Tue, 31 May 2022 18:43:58 -0400 Subject: [PATCH 005/148] ec2-amis: add release 22.05 --- .../virtualisation/amazon-ec2-amis.nix | 50 ++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/nixos/modules/virtualisation/amazon-ec2-amis.nix b/nixos/modules/virtualisation/amazon-ec2-amis.nix index 91b5237e3371..0324c5332cff 100644 --- a/nixos/modules/virtualisation/amazon-ec2-amis.nix +++ b/nixos/modules/virtualisation/amazon-ec2-amis.nix @@ -440,5 +440,53 @@ let self = { "21.11".ap-east-1.aarch64-linux.hvm-ebs = "ami-0aa3b50a4f2822a00"; "21.11".sa-east-1.aarch64-linux.hvm-ebs = "ami-00f68eff453d3fe69"; - latest = self."21.11"; + # 22.05.342.a634c8f6c1f + + "22.05".eu-west-1.x86_64-linux.hvm-ebs = "ami-00badba5cfa0a0c0d"; + "22.05".af-south-1.x86_64-linux.hvm-ebs = "ami-0d3a6166c1ea4d7b4"; + "22.05".ap-east-1.x86_64-linux.hvm-ebs = "ami-06445325c360470d8"; + "22.05".ap-northeast-1.x86_64-linux.hvm-ebs = "ami-009c422293bcf3721"; + "22.05".ap-northeast-2.x86_64-linux.hvm-ebs = "ami-0bfc0397525a67ed8"; + "22.05".ap-northeast-3.x86_64-linux.hvm-ebs = "ami-0a1fb4d4e08a6065e"; + "22.05".ap-south-1.x86_64-linux.hvm-ebs = "ami-07ad258dcc69239d2"; + "22.05".ap-southeast-1.x86_64-linux.hvm-ebs = "ami-0f59f7f33cba8b1a4"; + "22.05".ap-southeast-2.x86_64-linux.hvm-ebs = "ami-0d1e49fe30aec165d"; + "22.05".ap-southeast-3.x86_64-linux.hvm-ebs = "ami-0f5cb24a1e3fc62dd"; + "22.05".ca-central-1.x86_64-linux.hvm-ebs = "ami-0551a595ba7916462"; + "22.05".eu-central-1.x86_64-linux.hvm-ebs = "ami-0702eee2e75d541d1"; + "22.05".eu-north-1.x86_64-linux.hvm-ebs = "ami-0fc6838942cb7d9cb"; + "22.05".eu-south-1.x86_64-linux.hvm-ebs = "ami-0df9463b8965cdb80"; + "22.05".eu-west-2.x86_64-linux.hvm-ebs = "ami-08f3c1eb533a42ac1"; + "22.05".eu-west-3.x86_64-linux.hvm-ebs = "ami-04b50c79dc4009c97"; + "22.05".me-south-1.x86_64-linux.hvm-ebs = "ami-05c52087afab7024d"; + "22.05".sa-east-1.x86_64-linux.hvm-ebs = "ami-0732aa0f0c28f281b"; + "22.05".us-east-1.x86_64-linux.hvm-ebs = "ami-0223db08811f6fb2d"; + "22.05".us-east-2.x86_64-linux.hvm-ebs = "ami-0a743534fa3e51b41"; + "22.05".us-west-1.x86_64-linux.hvm-ebs = "ami-0d72ab697beab5ea5"; + "22.05".us-west-2.x86_64-linux.hvm-ebs = "ami-034946f0c47088751"; + + "22.05".eu-west-1.aarch64-linux.hvm-ebs = "ami-08114069426233360"; + "22.05".af-south-1.aarch64-linux.hvm-ebs = "ami-0a9b83913abd61694"; + "22.05".ap-east-1.aarch64-linux.hvm-ebs = "ami-03966ad4547f532b7"; + "22.05".ap-northeast-1.aarch64-linux.hvm-ebs = "ami-0eb7e152c8d5aae7d"; + "22.05".ap-northeast-2.aarch64-linux.hvm-ebs = "ami-08369e00c5528762b"; + "22.05".ap-northeast-3.aarch64-linux.hvm-ebs = "ami-0fa14b8d48cdd57c3"; + "22.05".ap-south-1.aarch64-linux.hvm-ebs = "ami-0f2ca3b542ff0913b"; + "22.05".ap-southeast-1.aarch64-linux.hvm-ebs = "ami-087def0511ef2687d"; + "22.05".ap-southeast-2.aarch64-linux.hvm-ebs = "ami-0aa90985199011f04"; + "22.05".ap-southeast-3.aarch64-linux.hvm-ebs = "ami-0c86c52790deefa23"; + "22.05".ca-central-1.aarch64-linux.hvm-ebs = "ami-06e932cc9c20403e4"; + "22.05".eu-central-1.aarch64-linux.hvm-ebs = "ami-07680df1026a9b54c"; + "22.05".eu-north-1.aarch64-linux.hvm-ebs = "ami-0cbe9f2725e4de706"; + "22.05".eu-south-1.aarch64-linux.hvm-ebs = "ami-01a83c3892925765f"; + "22.05".eu-west-2.aarch64-linux.hvm-ebs = "ami-049024d086d039b54"; + "22.05".eu-west-3.aarch64-linux.hvm-ebs = "ami-0c0ebe20ebfc635a1"; + "22.05".me-south-1.aarch64-linux.hvm-ebs = "ami-0d662fcaac553e945"; + "22.05".sa-east-1.aarch64-linux.hvm-ebs = "ami-0888c8f703e00fdb8"; + "22.05".us-east-1.aarch64-linux.hvm-ebs = "ami-03536a13324333073"; + "22.05".us-east-2.aarch64-linux.hvm-ebs = "ami-067611519fa817aaa"; + "22.05".us-west-1.aarch64-linux.hvm-ebs = "ami-0f96be48071c13ab2"; + "22.05".us-west-2.aarch64-linux.hvm-ebs = "ami-084bc5d777585adfb"; + + latest = self."22.05"; }; in self From e1f72ee81b48a1da518a5c3093905ac62fee8872 Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Mon, 4 Oct 2021 20:57:15 +0200 Subject: [PATCH 006/148] feedbackd: support cross-compilation Disables introspection for now. --- pkgs/applications/misc/feedbackd/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/feedbackd/default.nix b/pkgs/applications/misc/feedbackd/default.nix index 0892f2e2d02c..3692273fdf3b 100644 --- a/pkgs/applications/misc/feedbackd/default.nix +++ b/pkgs/applications/misc/feedbackd/default.nix @@ -32,7 +32,8 @@ stdenv.mkDerivation rec { # only a Debian package release that is tagged in the upstream repo version = "0.0.0+git20220520"; - outputs = [ "out" "dev" "devdoc" ]; + outputs = [ "out" "dev" ] + ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ]; src = fetchFromGitLab { domain = "source.puri.sm"; @@ -61,7 +62,11 @@ stdenv.mkDerivation rec { libgudev ]; - mesonFlags = [ "-Dgtk_doc=true" "-Dman=true" ]; + mesonFlags = [ + "-Dgtk_doc=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}" + "-Dman=true" + "-Dintrospection=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "enabled" else "disabled"}" + ]; checkInputs = [ dbus From 56048394040202e92c5720a03eace36f1dc8d10b Mon Sep 17 00:00:00 2001 From: Filipe Regadas Date: Fri, 3 Jun 2022 16:54:33 +0100 Subject: [PATCH 007/148] metals: 0.11.5 -> 0.11.6 --- pkgs/development/tools/metals/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/metals/default.nix b/pkgs/development/tools/metals/default.nix index 4281a1d9e391..45ea829299a0 100644 --- a/pkgs/development/tools/metals/default.nix +++ b/pkgs/development/tools/metals/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { pname = "metals"; - version = "0.11.5"; + version = "0.11.6"; deps = stdenv.mkDerivation { name = "${pname}-deps-${version}"; @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { ''; outputHashMode = "recursive"; outputHashAlgo = "sha256"; - outputHash = "sha256-kw+8688E1b7XjEb7AqOExSVu88NqPprKaCuINWqL2wk="; + outputHash = "sha256-/tFc7xAuUtx2JgEMLhGaq2FXpt7KQNMi82ODr/gTfhM="; }; nativeBuildInputs = [ makeWrapper setJavaClassPath ]; From 322a6cc95b97cbaeefcdf14800ab936c79ff1dc1 Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Fri, 3 Jun 2022 18:50:22 +0200 Subject: [PATCH 008/148] feedbackd: add comment explaining why introspection is disabled for cross --- pkgs/applications/misc/feedbackd/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/misc/feedbackd/default.nix b/pkgs/applications/misc/feedbackd/default.nix index 3692273fdf3b..2a4db6b10e47 100644 --- a/pkgs/applications/misc/feedbackd/default.nix +++ b/pkgs/applications/misc/feedbackd/default.nix @@ -65,6 +65,8 @@ stdenv.mkDerivation rec { mesonFlags = [ "-Dgtk_doc=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}" "-Dman=true" + # TODO(mindavi): introspection broken due to https://github.com/NixOS/nixpkgs/issues/72868 + # can be removed if cross-compiling gobject-introspection works. "-Dintrospection=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "enabled" else "disabled"}" ]; From dcc2f92e8b1f0d0e8d65884fd09a3b9d3b188718 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Fri, 3 Jun 2022 22:50:35 +0200 Subject: [PATCH 009/148] xfsprogs: 5.16.0 -> 5.18.0 --- pkgs/tools/filesystems/xfsprogs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/filesystems/xfsprogs/default.nix b/pkgs/tools/filesystems/xfsprogs/default.nix index c44157a2f026..d24e418a0865 100644 --- a/pkgs/tools/filesystems/xfsprogs/default.nix +++ b/pkgs/tools/filesystems/xfsprogs/default.nix @@ -4,11 +4,11 @@ stdenv.mkDerivation rec { pname = "xfsprogs"; - version = "5.16.0"; + version = "5.18.0"; src = fetchurl { url = "mirror://kernel/linux/utils/fs/xfs/xfsprogs/${pname}-${version}.tar.xz"; - hash = "sha256-eLjImZmb1pBEHLU9fAKrZxKUlAMZxpT/fILiPo5Gu58="; + hash = "sha256-Ho2IAb3sjNTK02DOO70Sw1qX8ryPfIyVgNGQOw6Mw1s="; }; outputs = [ "bin" "dev" "out" "doc" ]; From 30b87b001b282a99afa9342e4486e56624fddb9f Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Sat, 4 Jun 2022 10:50:25 +0200 Subject: [PATCH 010/148] python310Packages.docopt-ng: 0.7.2 -> 0.8.1 --- pkgs/development/python-modules/docopt-ng/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/docopt-ng/default.nix b/pkgs/development/python-modules/docopt-ng/default.nix index 7a18bfbc7cfa..60d14fa8e98f 100644 --- a/pkgs/development/python-modules/docopt-ng/default.nix +++ b/pkgs/development/python-modules/docopt-ng/default.nix @@ -5,11 +5,11 @@ buildPythonPackage rec { pname = "docopt-ng"; - version = "0.7.2"; + version = "0.8.1"; src = fetchPypi { inherit pname version; - sha256 = "sha256-hs7qAy8M+lnmB3brDPOKxzZTWBAihyMg9H3IdGeNckQ="; + sha256 = "sha256-6mphooj8hk7uayLW/iiqIC1Z/Ib60F8W/145zE6n9uM="; }; pythonImportsCheck = [ "docopt" ]; From cd8f876c6188097b20cba9aaf219792d198f1c75 Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Sat, 4 Jun 2022 10:51:31 +0200 Subject: [PATCH 011/148] python310Packages.staticjinja: 4.1.2 -> 4.1.3 --- pkgs/development/python-modules/staticjinja/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/staticjinja/default.nix b/pkgs/development/python-modules/staticjinja/default.nix index 0c1a698aa63c..e8621d8e954d 100644 --- a/pkgs/development/python-modules/staticjinja/default.nix +++ b/pkgs/development/python-modules/staticjinja/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "staticjinja"; - version = "4.1.2"; + version = "4.1.3"; format = "pyproject"; disabled = pythonOlder "3.6"; @@ -27,7 +27,7 @@ buildPythonPackage rec { owner = "staticjinja"; repo = pname; rev = version; - sha256 = "0qqyadhqsn66b7qrpfj08qc899pjwfa2byqqzh73xq1n22i4cy30"; + sha256 = "sha256-w6ge5MQXNRHCM43jKnagTlbquJJys7mprgBOS2uuwHQ="; }; nativeBuildInputs = [ From e827840ae56079e55d198f42049da6912506f5b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?PedroHLC=20=E2=98=AD?= Date: Sat, 4 Jun 2022 12:10:07 -0300 Subject: [PATCH 012/148] elasticsearch-plugins: 7.16.1 -> 7.17.4 --- pkgs/servers/search/elasticsearch/plugins.nix | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkgs/servers/search/elasticsearch/plugins.nix b/pkgs/servers/search/elasticsearch/plugins.nix index 03bb24d9a390..cb595de6a13e 100644 --- a/pkgs/servers/search/elasticsearch/plugins.nix +++ b/pkgs/servers/search/elasticsearch/plugins.nix @@ -38,7 +38,7 @@ in src = fetchurl { url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip"; sha256 = - if version == "7.16.1" then "1sz858m9963xqr5kzjlwnq7k0a146rn60v6xijyfbp8y3brg618p" + if version == "7.17.4" then "a4e881d86694ae70ab6b18f72ea700415971200145d33d438e57c0374d9fc16f" else if version == "6.8.21" then "06b1pavyggzfp4wwdql0q9nm3r7i9px9cagp4yh4nhxhnk4w5fiq" else throw "unsupported version ${version} for plugin ${pluginName}"; }; @@ -55,7 +55,7 @@ in src = fetchurl { url = "https://github.com/vhyza/elasticsearch-${pluginName}/releases/download/v${version}/elasticsearch-${pluginName}-${version}-plugin.zip"; sha256 = - if version == "7.16.1" then "0yjy9yhw77lmalivxnmv2rq8fk93ddxszkk73lgmpffladx2ikir" + if version == "7.17.3" then "1835f374230cb17193859cee22ac90e3d7a67fb41a55fd4578e840d708287a08" else if version == "6.8.21" then "0m80cn7vkcvk95v4pdmi6vk5ww7p01k0hj2iqb9g870vs6x2qjzv" else throw "unsupported version ${version} for plugin ${pluginName}"; }; @@ -72,7 +72,7 @@ in src = fetchurl { url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip"; sha256 = - if version == "7.16.1" then "1w5ndgffqzj5ijglmykifrk1jsgh7qwn8m7sbpiv0r7n3aayhz1x" + if version == "7.17.4" then "1c8175b2dac54277c1f41981fb4a784829e74e6e74268381fe0c27bc6652704b" else if version == "6.8.21" then "07w8s4a5gvr9lzjzf629y8rx3kvs6zd1vl07ksw1paghp42yb354" else throw "unsupported version ${version} for plugin ${pluginName}"; }; @@ -89,7 +89,7 @@ in src = fetchurl { url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip"; sha256 = - if version == "7.16.1" then "16mv7b9nl96bcygabvjqidxp2sjk340va19mrmliblpq3mxa2sii" + if version == "7.17.4" then "702e446997bde5cb38af120a1cb4271d976fdd23444be49e53b6be3801d845a9" else if version == "6.8.21" then "1kdpbrasxwr3dn21zjrklp1s389rwa51fairygdwl8px9liwwfa5" else throw "unsupported version ${version} for plugin ${pluginName}"; }; @@ -106,7 +106,7 @@ in src = fetchurl { url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip"; sha256 = - if version == "7.16.1" then "0bf8f8cybsp6s2ai3j04yay9kbhsafpgxivxjvzn2iy9qgc84ls4" + if version == "7.17.4" then "7d1574a585a9db0988ee248159d51f62cce5578a8c082096ef3e26efdb24aee7" else if version == "6.8.21" then "0v31yyhjcdlqnjw1f9kihh7z3c6d31whc57hqqd1dn579n4s9rlz" else throw "unsupported version ${version} for plugin ${pluginName}"; }; @@ -123,7 +123,7 @@ in src = fetchurl { url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${esVersion}.zip"; sha256 = - if version == "7.16.1" then "0sfa0ql3hh8jmha230dyhr51bvsvwmazyycf36ngpmxsysm8ccml" + if version == "7.17.4" then "cad923a662db705d40ca29698aa118e9e4cc50ae564c426a76d5acb777a4f57c" else if version == "6.8.21" then "0sfh1az30q4f34zxig2fz8wn9gk53fmmxyg5pbi1svn9761p5awq" else throw "unsupported version ${version} for plugin ${pluginName}"; }; @@ -140,7 +140,7 @@ in src = fetchurl { url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${esVersion}.zip"; sha256 = - if version == "7.16.1" then "1b95hjr4qhiavm7r7k19bwk5c64r00f1g5s0ydnb6gzym9hdb5s1" + if version == "7.17.4" then "a50be4cea5c68ad7615f87d672ba160d027fdfde2be0578bb2dabd6384cc8108" else if version == "6.8.21" then "00lwj00rfdk6850gk1n86chiz2w6afpqn7jn588jdbwv41qh5mrv" else throw "unsupported version ${version} for plugin ${pluginName}"; }; @@ -157,14 +157,14 @@ in pluginName = "search-guard"; version = # https://docs.search-guard.com/latest/search-guard-versions - if esVersion == "7.16.1" then "${esVersion}-52.5.0" + if esVersion == "7.17.3" then "${esVersion}-53.1.0" else if esVersion == "6.8.21" then "${esVersion}-25.6" else throw "unsupported version ${esVersion} for plugin ${pluginName}"; src = - if esVersion == "7.16.1" then + if esVersion == "7.17.3" then fetchurl { url = "https://maven.search-guard.com/search-guard-suite-release/com/floragunn/search-guard-suite-plugin/${version}/search-guard-suite-plugin-${version}.zip"; - sha256 = "1m3nj35qyrkkh3mhmn66nippavima8h8qpaxddalhjsvf70lhnjb"; + sha256 = "b49b24f7b74043cb5bab93f18316ea71656a7668e61bf063ccaa7b0ee2302a31"; } else if esVersion == "6.8.21" then fetchurl { From 9feb7fe28aeffd762cdfbc78c98c6f7838905cf5 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Wed, 19 Jan 2022 12:21:45 +0800 Subject: [PATCH 013/148] libosinfo: disable devdoc output when cross compiling --- pkgs/development/libraries/libosinfo/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libosinfo/default.nix b/pkgs/development/libraries/libosinfo/default.nix index a1dd23357dec..894aee90ff4b 100644 --- a/pkgs/development/libraries/libosinfo/default.nix +++ b/pkgs/development/libraries/libosinfo/default.nix @@ -30,7 +30,8 @@ stdenv.mkDerivation rec { sha256 = "sha256-olLgD8WA3rIdoNqMCqA7jDHoRAuESMi5gUP6tHfTIwU="; }; - outputs = [ "out" "dev" "devdoc" ]; + outputs = [ "out" "dev" ] + ++ lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) "devdoc"; nativeBuildInputs = [ pkg-config From d7c6d3d063d0671e2ce7fd1c5bc4d93771ec6883 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 5 Jun 2022 18:51:08 +0100 Subject: [PATCH 014/148] coturn: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: ...-libprom-0.1.1/include/prom_collector_registry.h:37: multiple definition of `PROM_COLLECTOR_REGISTRY_DEFAULT'; ...-libprom-0.1.1/include/prom_collector_registry.h:37: first defined here --- pkgs/servers/coturn/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/servers/coturn/default.nix b/pkgs/servers/coturn/default.nix index d076f763bf96..695c881e9f66 100644 --- a/pkgs/servers/coturn/default.nix +++ b/pkgs/servers/coturn/default.nix @@ -35,6 +35,13 @@ stdenv.mkDerivation rec { ./pure-configure.patch ]; + # Workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: ...-libprom-0.1.1/include/prom_collector_registry.h:37: multiple definition of + # `PROM_COLLECTOR_REGISTRY_DEFAULT'; ...-libprom-0.1.1/include/prom_collector_registry.h:37: first defined here + # Should be fixed in libprom-1.2.0 and later: https://github.com/digitalocean/prometheus-client-c/pull/25 + NIX_CFLAGS_COMPILE = "-fcommon"; + passthru.tests.coturn = nixosTests.coturn; meta = with lib; { From 53921eabca7696311ef7ecbe0454100d487301ce Mon Sep 17 00:00:00 2001 From: Spencer Pogorzelski <34356756+Scoder12@users.noreply.github.com> Date: Sun, 5 Jun 2022 12:24:01 -0700 Subject: [PATCH 015/148] maintainers: Add scoder12 --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index a28165c3e298..53b666d83e4b 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -11452,6 +11452,12 @@ githubId = 59476; name = "Peter Schuller"; }; + scoder12 = { + name = "Spencer Pogorzelski"; + email = "34356756+Scoder12@users.noreply.github.com"; + github = "scoder12"; + githubId = 34356756; + }; scolobb = { email = "sivanov@colimite.fr"; github = "scolobb"; From 20749fc886cf6ade0726d0ab51a6c08428e51c73 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 6 Jun 2022 04:52:17 +0000 Subject: [PATCH 016/148] hidapi: 0.11.2 -> 0.12.0 --- pkgs/development/libraries/hidapi/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/hidapi/default.nix b/pkgs/development/libraries/hidapi/default.nix index ffe534ede4af..b29b64c2a757 100644 --- a/pkgs/development/libraries/hidapi/default.nix +++ b/pkgs/development/libraries/hidapi/default.nix @@ -11,13 +11,13 @@ stdenv.mkDerivation rec { pname = "hidapi"; - version = "0.11.2"; + version = "0.12.0"; src = fetchFromGitHub { owner = "libusb"; repo = "hidapi"; rev = "${pname}-${version}"; - sha256 = "sha256-zSAhnvnDI3+q8VwZ8fIx/YmvwTpL87PBJ2C1mTmD7Ko="; + sha256 = "sha256-SMhlcB7LcViC6UFVYACjunxsGkvSOKC3mbLBH4XQSzM="; }; nativeBuildInputs = [ cmake pkg-config ]; From 41c46d00e9abbeb05fc68393c2d4092049f07472 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 6 Jun 2022 12:28:25 +0200 Subject: [PATCH 017/148] sptk: init at 4.0 --- pkgs/development/libraries/sptk/default.nix | 31 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/libraries/sptk/default.nix diff --git a/pkgs/development/libraries/sptk/default.nix b/pkgs/development/libraries/sptk/default.nix new file mode 100644 index 000000000000..6b62b831cb98 --- /dev/null +++ b/pkgs/development/libraries/sptk/default.nix @@ -0,0 +1,31 @@ +{ lib +, stdenv +, cmake +, fetchFromGitHub +}: + +stdenv.mkDerivation rec { + pname = "sptk"; + version = "4.0"; + + src = fetchFromGitHub { + owner = "sp-nitech"; + repo = "SPTK"; + rev = "v${version}"; + hash = "sha256-Be3Pbg+vt/P3FplZN7yBL+HVq/BmzaBcwKOBsbH7r9g="; + }; + + nativeBuildInputs = [ + cmake + ]; + + doCheck = true; + + meta = with lib; { + changelog = "https://github.com/sp-nitech/SPTK/releases/tag/v${version}"; + description = "Suite of speech signal processing tools"; + homepage = "https://github.com/sp-nitech/SPTK"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index afcab99ca6a5..d902548b21ee 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29580,6 +29580,8 @@ with pkgs; sptlrx = callPackage ../applications/audio/sptlrx { }; + sptk = callPackage ../development/libraries/sptk { }; + squishyball = callPackage ../applications/audio/squishyball { ncurses = ncurses5; }; From cb104999e59b3c9b2eb31835cfcb209c39cb53cc Mon Sep 17 00:00:00 2001 From: Pavel Borzenkov Date: Wed, 1 Jun 2022 14:43:35 +0200 Subject: [PATCH 018/148] perlPackages.TestLWPUserAgent: 0.034 -> 0.036 Also do not mark it as broken on Darwin as it builds and works just fine. --- pkgs/top-level/perl-packages.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 707dd648496e..366d12c315c5 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -22066,10 +22066,10 @@ let TestLWPUserAgent = buildPerlPackage { pname = "Test-LWP-UserAgent"; - version = "0.034"; + version = "0.036"; src = fetchurl { - url = "mirror://cpan/authors/id/E/ET/ETHER/Test-LWP-UserAgent-0.034.tar.gz"; - sha256 = "1ybhl9zpxkz77d25h96kbgh16zy9f27n95p6j9jg52kvdg0r2lbp"; + url = "mirror://cpan/authors/id/E/ET/ETHER/Test-LWP-UserAgent-0.036.tar.gz"; + sha256 = "sha256-BTJ1MNNGuAphpulD+9dJmGvcqJIRpOswHAjC0XkxThE="; }; propagatedBuildInputs = [ LWP SafeIsa namespaceclean ]; buildInputs = [ PathTiny Plack TestDeep TestFatal TestNeeds TestRequiresInternet TestWarnings ]; @@ -22077,7 +22077,6 @@ let description = "A LWP::UserAgent suitable for simulating and testing network calls"; license = with lib.licenses; [ artistic1 gpl1Plus ]; homepage = "https://github.com/karenetheridge/Test-LWP-UserAgent"; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/perl534Packages.TestLWPUserAgent.x86_64-darwin }; }; From 2c01c6b3a967caaac12307da234de700c316dbb1 Mon Sep 17 00:00:00 2001 From: Aaron Jheng Date: Sat, 4 Jun 2022 13:39:05 +0000 Subject: [PATCH 019/148] tgswitch: use buildGoModule --- .../networking/cluster/tgswitch/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/tgswitch/default.nix b/pkgs/applications/networking/cluster/tgswitch/default.nix index 5f669a6b9d8a..44c16bd4668d 100644 --- a/pkgs/applications/networking/cluster/tgswitch/default.nix +++ b/pkgs/applications/networking/cluster/tgswitch/default.nix @@ -1,5 +1,5 @@ -{ buildGoPackage, lib, fetchFromGitHub }: -buildGoPackage rec { +{ buildGoModule, lib, fetchFromGitHub }: +buildGoModule rec { pname = "tgswitch"; version = "0.5.389"; @@ -10,7 +10,14 @@ buildGoPackage rec { sha256 = "sha256-6hErfI7LEJFgOoJR8IF9jTSBwqbQYeGiwdeJShqxVQ0="; }; - goPackagePath = "github.com/warrensbox/tgswitch"; + vendorSha256 = null; + + ldflags = [ "-s" "-w" ]; + + # There are many modifications need to be done to make tests run. For example: + # 1. Network access + # 2. Operation on `/var/empty` not permitted on macOS + doCheck= false; meta = with lib; { description = "A command line tool to switch between different versions of terragrunt"; @@ -19,3 +26,4 @@ buildGoPackage rec { maintainers = with maintainers; [ psibi ]; }; } + From 0106c4b15908ef927c81c43e00c448eaed71a731 Mon Sep 17 00:00:00 2001 From: DarkOnion0 Date: Mon, 6 Jun 2022 17:57:11 +0200 Subject: [PATCH 020/148] appflowy: 0.0.3 -> 0.0.4 --- pkgs/applications/office/appflowy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/office/appflowy/default.nix b/pkgs/applications/office/appflowy/default.nix index abc8e33fd370..821447fdfa26 100644 --- a/pkgs/applications/office/appflowy/default.nix +++ b/pkgs/applications/office/appflowy/default.nix @@ -12,11 +12,11 @@ stdenv.mkDerivation rec { pname = "appflowy"; - version = "0.0.3"; + version = "0.0.4"; src = fetchzip { url = "https://github.com/AppFlowy-IO/appflowy/releases/download/${version}/AppFlowy-linux-x86.tar.gz"; - sha256 = "sha256-m9vfgytSKnWLf6hwKjIGcU/7OCmIBiF4hJ/yIRBdSpQ="; + sha256 = "sha256-ke3cuRi+ZlBSWawg66cGrV928dOBp0EniNakitmgUso="; }; nativeBuildInputs = [ From e98b73f332ede8df04aa224c607a17e40af7fa01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20St=C3=BChrk?= Date: Mon, 6 Jun 2022 19:37:00 +0200 Subject: [PATCH 021/148] vscode-extensions.vspacecode.vspacecode: 0.10.1 -> 0.10.9 --- pkgs/applications/editors/vscode/extensions/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/vscode/extensions/default.nix b/pkgs/applications/editors/vscode/extensions/default.nix index ad934c705440..aae268df3f54 100644 --- a/pkgs/applications/editors/vscode/extensions/default.nix +++ b/pkgs/applications/editors/vscode/extensions/default.nix @@ -2364,8 +2364,8 @@ let mktplcRef = { name = "vspacecode"; publisher = "VSpaceCode"; - version = "0.10.1"; - sha256 = "sha256-H7SCC/ZhDswMQjLX+qpQa6A1N83MobJRPC4pyIbZ1kA="; + version = "0.10.9"; + sha256 = "sha256-16oC2BghY7mB/W0niTDtKGMAC9pt6m0utSOJ0lgbpAU="; }; meta = { license = lib.licenses.mit; From c8f5b17a98b357e24fe0eb5a117820899b363750 Mon Sep 17 00:00:00 2001 From: Artturin Date: Mon, 6 Jun 2022 17:20:14 +0300 Subject: [PATCH 022/148] nixos/nix-daemon: set LimitNOFILE to 1048576 fixes 'too many open files' --- nixos/modules/services/misc/nix-daemon.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index a4d2d10af70f..f6f74d12e106 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -734,7 +734,7 @@ in CPUSchedulingPolicy = cfg.daemonCPUSchedPolicy; IOSchedulingClass = cfg.daemonIOSchedClass; IOSchedulingPriority = cfg.daemonIOSchedPriority; - LimitNOFILE = 4096; + LimitNOFILE = 1048576; }; restartTriggers = [ nixConf ]; From 33ffdb365ba22010b1b40cdafcea39091ec85858 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 6 Jun 2022 22:10:08 +0200 Subject: [PATCH 023/148] libzim: 7.2.0 -> 7.2.2 --- pkgs/development/libraries/libzim/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libzim/default.nix b/pkgs/development/libraries/libzim/default.nix index 5191da60ce26..3f290d4ffa3c 100644 --- a/pkgs/development/libraries/libzim/default.nix +++ b/pkgs/development/libraries/libzim/default.nix @@ -11,13 +11,13 @@ stdenv.mkDerivation rec { pname = "libzim"; - version = "7.2.0"; + version = "7.2.2"; src = fetchFromGitHub { owner = "openzim"; repo = pname; rev = version; - sha256 = "sha256-H4YUAbH4X6oJIZyhI23LemngtOtKNrHHl3KSU1ilAmo="; + sha256 = "sha256-AEhhjinnnMA4NbYL7NVHYeRZX/zfNiidbY/VeFjZuQs="; }; nativeBuildInputs = [ From 411f38ef26f6936a5ecabe1b0edbcfb42045947b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 7 Jun 2022 01:04:15 +0000 Subject: [PATCH 024/148] btrfs-progs: 5.18 -> 5.18.1 --- pkgs/tools/filesystems/btrfs-progs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/filesystems/btrfs-progs/default.nix b/pkgs/tools/filesystems/btrfs-progs/default.nix index 1a482de62d91..66f5b695287a 100644 --- a/pkgs/tools/filesystems/btrfs-progs/default.nix +++ b/pkgs/tools/filesystems/btrfs-progs/default.nix @@ -8,11 +8,11 @@ stdenv.mkDerivation rec { pname = "btrfs-progs"; - version = "5.18"; + version = "5.18.1"; src = fetchurl { url = "mirror://kernel/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v${version}.tar.xz"; - sha256 = "sha256-HeYQdiKwvi9tdyYfl6K91AKR27aCqsfc4IYy0XH3oTQ="; + sha256 = "sha256-bpinXM/1LpNU2qGtKExhTEkPhEJzovpSTLrJ64QcclU="; }; nativeBuildInputs = [ From 69878331fefe69ddc16a2dc756f8ad56ea65f0ed Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 7 Jun 2022 07:28:16 +0000 Subject: [PATCH 025/148] python310Packages.google-cloud-appengine-logging: 1.1.1 -> 1.1.2 --- .../python-modules/google-cloud-appengine-logging/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/google-cloud-appengine-logging/default.nix b/pkgs/development/python-modules/google-cloud-appengine-logging/default.nix index c6f17c8d8b00..ec355d51fd07 100644 --- a/pkgs/development/python-modules/google-cloud-appengine-logging/default.nix +++ b/pkgs/development/python-modules/google-cloud-appengine-logging/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "google-cloud-appengine-logging"; - version = "1.1.1"; + version = "1.1.2"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-NhRQ7X17/Y79DvJT4haArrb23zzwV+XoJT9YUfjLvKc="; + hash = "sha256-undhXBAPB+3akWVu3ht0ZZBwErhmOq18TnXvloeZQjc="; }; propagatedBuildInputs = [ From 0e222cc4ec42d8257bae6745fe79903829f41145 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jun 2022 11:27:48 +0200 Subject: [PATCH 026/148] checkov: 2.0.1195 -> 2.0.1201 --- .../tools/analysis/checkov/default.nix | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pkgs/development/tools/analysis/checkov/default.nix b/pkgs/development/tools/analysis/checkov/default.nix index b5977e61acdc..886cca2de9c7 100644 --- a/pkgs/development/tools/analysis/checkov/default.nix +++ b/pkgs/development/tools/analysis/checkov/default.nix @@ -32,17 +32,18 @@ with py.pkgs; buildPythonApplication rec { pname = "checkov"; - version = "2.0.1195"; + version = "2.0.1201"; format = "setuptools"; src = fetchFromGitHub { owner = "bridgecrewio"; repo = pname; rev = version; - hash = "sha256-YzM/YzTeFqNe7ThNH138g13aSzEXK8rzTWit1g27GVw="; + hash = "sha256-ZQCUYnoCaVZkXr5rZ/vkEOlADMQmj6OfZ12KBerXdmQ="; }; nativeBuildInputs = with py.pkgs; [ + pythonRelaxDepsHook setuptools-scm ]; @@ -94,12 +95,10 @@ buildPythonApplication rec { responses ]; - postPatch = '' - substituteInPlace setup.py \ - --replace "bc-python-hcl2==" "bc-python-hcl2>=" \ - --replace "prettytable>=3.0.0" "prettytable" \ - --replace "pycep-parser==0.3.6" "pycep-parser" - ''; + pythonRelaxDeps = [ + "bc-python-hcl2" + "pycep-parser" + ]; preCheck = '' export HOME=$(mktemp -d); From cf594d1f6e2dc1beea416d007b70c38a5e54ba7f Mon Sep 17 00:00:00 2001 From: teutat3s <10206665+teutat3s@users.noreply.github.com> Date: Mon, 6 Jun 2022 20:54:26 +0200 Subject: [PATCH 027/148] cloud-init: fix missing pyserial dependency and check for all required imports as per requirements.txt While debugging missing metadata in the cloud-init boot local phase in a NixOS VM on SmartOS, the following error was observed: SystemError: Unable to open /dev/ttyS1 Adding the missing pyserial dependency fixes the above error and cloud-init metadata detection now works in NixOS VMs on SmartOS --- pkgs/tools/virtualization/cloud-init/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/tools/virtualization/cloud-init/default.nix b/pkgs/tools/virtualization/cloud-init/default.nix index 9da4290dadde..a2e156f2a10b 100644 --- a/pkgs/tools/virtualization/cloud-init/default.nix +++ b/pkgs/tools/virtualization/cloud-init/default.nix @@ -51,6 +51,7 @@ python3.pkgs.buildPythonApplication rec { jsonschema netifaces oauthlib + pyserial pyyaml requests ]; From 1a3924b8585d08135245df975e182249f8fea925 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jun 2022 15:46:38 +0200 Subject: [PATCH 028/148] python310Packages.pysigma: 0.5.2 -> 0.6.2 --- pkgs/development/python-modules/pysigma/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pysigma/default.nix b/pkgs/development/python-modules/pysigma/default.nix index 210e90405817..17e6a27ea57d 100644 --- a/pkgs/development/python-modules/pysigma/default.nix +++ b/pkgs/development/python-modules/pysigma/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "pysigma"; - version = "0.5.2"; + version = "0.6.2"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "SigmaHQ"; repo = "pySigma"; rev = "v${version}"; - hash = "sha256-U5jBFnWC73W9tFco5faiqGmk8K+Ig18f9HhXJ4vhhGs="; + hash = "sha256-/SZe4pzlhlkzW84WOjPOibfdznf5uLHL5RsNnT/EL9M="; }; nativeBuildInputs = [ From 0e11ec9a23d6132d86c45deb88b2a32813c48b43 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jun 2022 15:47:23 +0200 Subject: [PATCH 029/148] python310Packages.pysigma-pipeline-windows: relax pysigma constraint --- .../python-modules/pysigma-pipeline-windows/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/python-modules/pysigma-pipeline-windows/default.nix b/pkgs/development/python-modules/pysigma-pipeline-windows/default.nix index ef8595fa873c..a9eda723eb2c 100644 --- a/pkgs/development/python-modules/pysigma-pipeline-windows/default.nix +++ b/pkgs/development/python-modules/pysigma-pipeline-windows/default.nix @@ -29,6 +29,11 @@ buildPythonPackage rec { pysigma ]; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'pysigma = "^0.5.0"' 'pysigma = "^0.6.0"' + ''; + checkInputs = [ pytestCheckHook ]; From 1fb02d2eec4e980553bd4766ff7074ed260962f8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jun 2022 15:49:05 +0200 Subject: [PATCH 030/148] python310Packages.pysigma-backend-insightidr: 0.1.5 -> 0.1.6 --- .../python-modules/pysigma-backend-insightidr/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pysigma-backend-insightidr/default.nix b/pkgs/development/python-modules/pysigma-backend-insightidr/default.nix index 46346f466b20..b9d82584a503 100644 --- a/pkgs/development/python-modules/pysigma-backend-insightidr/default.nix +++ b/pkgs/development/python-modules/pysigma-backend-insightidr/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "pysigma-backend-insightidr"; - version = "0.1.5"; + version = "0.1.6"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "SigmaHQ"; repo = "pySigma-backend-insightidr"; rev = "refs/tags/v${version}"; - hash = "sha256-RjBRFNMIpjW/x5vShXUgi25oOmvRlD2zP6mNQJ7sG8M="; + hash = "sha256-Sg+AYoEbCmcqxw5dl8wmQcI+lFrAfFgDnQjiQh6r9Yc="; }; nativeBuildInputs = [ From 90946525f3380bdc03bb8a1f98fc3b5fcb12bc9a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jun 2022 15:56:28 +0200 Subject: [PATCH 031/148] python310Packages.pysigma-backend-splunk: 0.3.2 -> 0.3.3 --- .../python-modules/pysigma-backend-splunk/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pysigma-backend-splunk/default.nix b/pkgs/development/python-modules/pysigma-backend-splunk/default.nix index a8c0b3d6ea67..b270fa79c88d 100644 --- a/pkgs/development/python-modules/pysigma-backend-splunk/default.nix +++ b/pkgs/development/python-modules/pysigma-backend-splunk/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "pysigma-backend-splunk"; - version = "0.3.2"; + version = "0.3.3"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -19,7 +19,7 @@ buildPythonPackage rec { owner = "SigmaHQ"; repo = "pySigma-backend-splunk"; rev = "v${version}"; - hash = "sha256-wcAqXFou20V2ZPOXCsF1Nky008q2xkfuI0RbTsatC6k="; + hash = "sha256-VRHrlcty3EpGnQkVJvsNWOJSW6rNE97Lqt36HmMR53A="; }; nativeBuildInputs = [ From 387cb3f84d7cf075fd9686ffc4a8ef1f6c054ed4 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jun 2022 15:58:03 +0200 Subject: [PATCH 032/148] python310Packages.pysigma-pipeline-crowdstrike: 0.1.5 -> 0.1.6 --- .../python-modules/pysigma-pipeline-crowdstrike/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pysigma-pipeline-crowdstrike/default.nix b/pkgs/development/python-modules/pysigma-pipeline-crowdstrike/default.nix index 5ed92014fc2e..14129f148b19 100644 --- a/pkgs/development/python-modules/pysigma-pipeline-crowdstrike/default.nix +++ b/pkgs/development/python-modules/pysigma-pipeline-crowdstrike/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "pysigma-pipeline-crowdstrike"; - version = "0.1.5"; + version = "0.1.6"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "SigmaHQ"; repo = "pySigma-pipeline-crowdstrike"; rev = "v${version}"; - hash = "sha256-TmvEWrkNu8gJ8rPFoRWd+uYob2rmmdasqxH1CYmz4Rk="; + hash = "sha256-5xX7NwM+Us0ToJa2miAw9KsCt2T+TqBnqHtwphZNxJI="; }; nativeBuildInputs = [ From 887e366f5380e57809f48d2b143a85dbbefc55b9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jun 2022 16:02:03 +0200 Subject: [PATCH 033/148] python310Packages.pysigma-pipeline-sysmon: 0.1.5 -> 0.1.6 --- .../python-modules/pysigma-pipeline-sysmon/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pysigma-pipeline-sysmon/default.nix b/pkgs/development/python-modules/pysigma-pipeline-sysmon/default.nix index 26f058c3e197..d308d72d805f 100644 --- a/pkgs/development/python-modules/pysigma-pipeline-sysmon/default.nix +++ b/pkgs/development/python-modules/pysigma-pipeline-sysmon/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "pysigma-pipeline-sysmon"; - version = "0.1.5"; + version = "0.1.6"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "SigmaHQ"; repo = "pySigma-pipeline-sysmon"; rev = "v${version}"; - hash = "sha256-Bh0Qh+pY22lm/0vtJC4tFIl1KRF3zFQ8vcH0JEfYGAc="; + hash = "sha256-hKXnM3iqt6PnV+cMV3gEleBChd263sy2DovpIKg22fs="; }; nativeBuildInputs = [ From 311f2101d900befde5ff41b4fb71bfc99cf618ba Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jun 2022 16:14:14 +0200 Subject: [PATCH 034/148] sigma-cli: relax pysigma constraint --- pkgs/tools/security/sigma-cli/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/security/sigma-cli/default.nix b/pkgs/tools/security/sigma-cli/default.nix index 6f2ac26ebdc2..5a3ed90a4182 100644 --- a/pkgs/tools/security/sigma-cli/default.nix +++ b/pkgs/tools/security/sigma-cli/default.nix @@ -36,7 +36,8 @@ python3.pkgs.buildPythonApplication rec { postPatch = '' substituteInPlace pyproject.toml \ - --replace 'prettytable = "^3.1.1"' 'prettytable = "*"' + --replace 'prettytable = "^3.1.1"' 'prettytable = "*"' \ + --replace 'pysigma = "^0.5.0"' 'pysigma = "*"' ''; pythonImportsCheck = [ From 56d2f848b141e3c458e8da826e57be974afe420b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81tila=20Saraiva?= Date: Tue, 7 Jun 2022 11:38:00 -0300 Subject: [PATCH 035/148] obsidian: 0.14.6 -> 0.14.15 --- pkgs/applications/misc/obsidian/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/obsidian/default.nix b/pkgs/applications/misc/obsidian/default.nix index 8daf50f82e70..8e7acbe8223d 100644 --- a/pkgs/applications/misc/obsidian/default.nix +++ b/pkgs/applications/misc/obsidian/default.nix @@ -12,7 +12,7 @@ let inherit (stdenv.hostPlatform) system; pname = "obsidian"; - version = "0.14.6"; + version = "0.14.15"; appname = "Obsidian"; meta = with lib; { description = "A powerful knowledge base that works on top of a local folder of plain text Markdown files"; @@ -25,7 +25,7 @@ let filename = if stdenv.isDarwin then "Obsidian-${version}-universal.dmg" else "obsidian-${version}.tar.gz"; src = fetchurl { url = "https://github.com/obsidianmd/obsidian-releases/releases/download/v${version}/${filename}"; - sha256 = if stdenv.isDarwin then "1zzccwlim3gi6f5czzyddqjzy1xsk6ayx1hljhw6bmnid72km3q2" else "sha256-KieAE13SIYHDoXTqzk1QY+TPjwF9LRzlfm1yFg9hsTc="; + sha256 = if stdenv.isDarwin then "10c5255nbgqiigcwq6kmhzcgafq91k25wnxj3jxabzc0hs7pn4m5" else "sha256-bSLt4EnlCtxZeKIahr618qMuK9ogUhxn+NKO2GPkjOQ="; }; icon = fetchurl { From 3e7621390c2f59a54fef2222f4bfab46cb534936 Mon Sep 17 00:00:00 2001 From: Mr Hedgehog Date: Tue, 7 Jun 2022 11:28:49 -0400 Subject: [PATCH 036/148] maintainers: mrhedgehog -> thehedgeh0g --- maintainers/maintainer-list.nix | 22 +++++++++---------- .../misc/sway-launcher-desktop/default.nix | 2 +- pkgs/development/tools/goresym/default.nix | 2 +- pkgs/shells/fish/plugins/hydro.nix | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index b4c4029925f7..38c74580f514 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -8799,17 +8799,6 @@ githubId = 3073833; name = "Massimo Redaelli"; }; - mrhedgehog = { - name = "Mr Hedgehog"; - email = "hedgehog@mrhedgehog.xyz"; - matrix = "@mrhedgehog:jupiterbroadcasting.com"; - github = "ModdedGamers"; - githubId = 35778371; - keys = [{ - longkeyid = "rsa4096/0x7D5107866B1C6752"; - fingerprint = "38A0 29B0 4A7E 4C13 A4BB 86C8 7D51 0786 6B1C 6752"; - }]; - }; mrkkrp = { email = "markkarpov92@gmail.com"; github = "mrkkrp"; @@ -12779,6 +12768,17 @@ githubId = 8547242; name = "Stefan Rohrbacher"; }; + thehedgeh0g = { + name = "The Hedgehog"; + email = "hedgehog@mrhedgehog.xyz"; + matrix = "@mrhedgehog:jupiterbroadcasting.com"; + github = "ModdedGamers"; + githubId = 35778371; + keys = [{ + longkeyid = "rsa4096/0x7D5107866B1C6752"; + fingerprint = "38A0 29B0 4A7E 4C13 A4BB 86C8 7D51 0786 6B1C 6752"; + }]; + }; thelegy = { email = "mail+nixos@0jb.de"; github = "thelegy"; diff --git a/pkgs/applications/misc/sway-launcher-desktop/default.nix b/pkgs/applications/misc/sway-launcher-desktop/default.nix index 7955e5c8ce1d..b67122965234 100644 --- a/pkgs/applications/misc/sway-launcher-desktop/default.nix +++ b/pkgs/applications/misc/sway-launcher-desktop/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { changelog = "https://github.com/Biont/sway-launcher-desktop/releases/tag/v${version}"; license = licenses.gpl3; platforms = platforms.linux; - maintainers = [ maintainers.mrhedgehog ]; + maintainers = [ maintainers.thehedgeh0g ]; mainProgram = "${pname}"; }; } diff --git a/pkgs/development/tools/goresym/default.nix b/pkgs/development/tools/goresym/default.nix index b41811689675..199d3f468f05 100644 --- a/pkgs/development/tools/goresym/default.nix +++ b/pkgs/development/tools/goresym/default.nix @@ -21,6 +21,6 @@ buildGoModule rec { description = "Go symbol recovery tool"; homepage = "https://github.com/mandiant/GoReSym"; license = licenses.mit; - maintainers = with maintainers; [ mrhedgehog ]; + maintainers = with maintainers; [ thehedgeh0g ]; }; } diff --git a/pkgs/shells/fish/plugins/hydro.nix b/pkgs/shells/fish/plugins/hydro.nix index eddb88a225d2..cd8705d54716 100644 --- a/pkgs/shells/fish/plugins/hydro.nix +++ b/pkgs/shells/fish/plugins/hydro.nix @@ -15,6 +15,6 @@ buildFishPlugin rec { description = "Ultra-pure, lag-free prompt with async Git status"; homepage = "https://github.com/jorgebucaran/hydro"; license = licenses.mit; - maintainers = with maintainers; [ mrhedgehog ]; + maintainers = with maintainers; [ thehedgeh0g ]; }; } From ae9f904eb26abb6b0ff871437bf8015a80f32e9f Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 7 Jun 2022 17:33:02 +0200 Subject: [PATCH 037/148] =?UTF-8?q?gajim:=201.4.2=20=E2=86=92=201.4.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../networking/instant-messengers/gajim/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/gajim/default.nix b/pkgs/applications/networking/instant-messengers/gajim/default.nix index 3f26cfc4f6d3..7c18ebf763c8 100644 --- a/pkgs/applications/networking/instant-messengers/gajim/default.nix +++ b/pkgs/applications/networking/instant-messengers/gajim/default.nix @@ -22,11 +22,11 @@ python3.pkgs.buildPythonApplication rec { pname = "gajim"; - version = "1.4.2"; + version = "1.4.3"; src = fetchurl { url = "https://gajim.org/downloads/${lib.versions.majorMinor version}/gajim-${version}.tar.gz"; - sha256 = "sha256:151lbz9092z8r2yva5039g867chcid3n804jk7hjawrd9vnw81az"; + sha256 = "sha256:0n6v96pwgds8655877fjgsphq4rd4gb9mz7cbqp4nkd4m7kvr3xv"; }; buildInputs = [ From cc40e864ecd62ed6485c11f4d69f378ae595d766 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Tue, 7 Jun 2022 19:44:09 +0200 Subject: [PATCH 038/148] libnftnl: 1.2.1 -> 1.2.2 --- pkgs/development/libraries/libnftnl/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libnftnl/default.nix b/pkgs/development/libraries/libnftnl/default.nix index 66134eaffe09..e136fc1a5585 100644 --- a/pkgs/development/libraries/libnftnl/default.nix +++ b/pkgs/development/libraries/libnftnl/default.nix @@ -1,12 +1,12 @@ { lib, stdenv, fetchurl, pkg-config, libmnl }: stdenv.mkDerivation rec { - version = "1.2.1"; + version = "1.2.2"; pname = "libnftnl"; src = fetchurl { url = "https://netfilter.org/projects/${pname}/files/${pname}-${version}.tar.bz2"; - sha256 = "0z4khm2mnys9mcl8ckwf19cw20jgrv8650nfncy3xcgs2k2aa23m"; + hash = "sha256-nvwAT50VkY1o+emOGU1V4DAWjzO7Z8PnpUW3QMntbQo="; }; nativeBuildInputs = [ pkg-config ]; From 7226082e1a0ccf5bc458e967519504eccc4c2151 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Tue, 31 May 2022 14:35:57 +0200 Subject: [PATCH 039/148] nftables: 1.0.2 -> 1.0.4 --- pkgs/os-specific/linux/nftables/default.nix | 22 +++++---------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/pkgs/os-specific/linux/nftables/default.nix b/pkgs/os-specific/linux/nftables/default.nix index 051ca1963051..8339eabb495a 100644 --- a/pkgs/os-specific/linux/nftables/default.nix +++ b/pkgs/os-specific/linux/nftables/default.nix @@ -1,25 +1,25 @@ -{ lib, stdenv, fetchurl, pkg-config, bison, file, flex +{ lib, stdenv, fetchurl, pkg-config, bison, flex , asciidoc, libxslt, findXMLCatalogs, docbook_xml_dtd_45, docbook_xsl , libmnl, libnftnl, libpcap , gmp, jansson, libedit -, autoreconfHook, fetchpatch +, autoreconfHook , withDebugSymbols ? false , withPython ? false , python3 , withXtables ? true , iptables }: stdenv.mkDerivation rec { - version = "1.0.2"; + version = "1.0.4"; pname = "nftables"; src = fetchurl { url = "https://netfilter.org/projects/nftables/files/${pname}-${version}.tar.bz2"; - sha256 = "00jcjn1pl7qyqpg8pd4yhlkys7wbj4vkzgg73n27nmplzips6a0b"; + hash = "sha256-kn+x/qH2haMowQz3ketlXX4e1J0xDupcsxAd/Y1sujU="; }; nativeBuildInputs = [ autoreconfHook - pkg-config bison file flex + pkg-config bison flex asciidoc docbook_xml_dtd_45 docbook_xsl findXMLCatalogs libxslt ]; @@ -29,18 +29,6 @@ stdenv.mkDerivation rec { ] ++ lib.optional withXtables iptables ++ lib.optional withPython python3; - preConfigure = '' - substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file - ''; - - patches = [ - # fix build after 1.0.2 release, drop when updating to a newer release - (fetchpatch { - url = "https://git.netfilter.org/nftables/patch/?id=18a08fb7f0443f8bde83393bd6f69e23a04246b3"; - sha256 = "03dzhd7fhg0d20ly4rffk4ra7wlxp731892dhp8zw67jwhys9ywz"; - }) - ]; - configureFlags = [ "--with-json" "--with-cli=editline" From c7658a87ac3e867dc1ea0e11ffc0cf10bb750553 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jun 2022 20:57:16 +0200 Subject: [PATCH 040/148] python310Packages.dulwich: 0.20.42 -> 0.20.43 --- pkgs/development/python-modules/dulwich/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/dulwich/default.nix b/pkgs/development/python-modules/dulwich/default.nix index 570598e1a993..ccd816753a9a 100644 --- a/pkgs/development/python-modules/dulwich/default.nix +++ b/pkgs/development/python-modules/dulwich/default.nix @@ -17,7 +17,7 @@ }: buildPythonPackage rec { - version = "0.20.42"; + version = "0.20.43"; pname = "dulwich"; format = "setuptools"; @@ -25,7 +25,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - hash = "sha256-cro7YK5qVU0TMrO0CjRf6+FuxGnPYBS7RDtxmQLjPvA="; + hash = "sha256-/MIWTgE7OQqe46EJ1+97ldjeKDsueJuwfpSqMRXjKeo="; }; LC_ALL = "en_US.UTF-8"; From 7c82506085269926301086ff96cb4184e0e52da4 Mon Sep 17 00:00:00 2001 From: pennae Date: Tue, 7 Jun 2022 22:20:54 +0200 Subject: [PATCH 041/148] python3Packages.pyfxa: fix fxa-client fxa-client imports pkg_resources, so it requires setuptools to run. --- pkgs/development/python-modules/pyfxa/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pyfxa/default.nix b/pkgs/development/python-modules/pyfxa/default.nix index eb5403c2b968..b7b1e61e8877 100644 --- a/pkgs/development/python-modules/pyfxa/default.nix +++ b/pkgs/development/python-modules/pyfxa/default.nix @@ -1,6 +1,6 @@ { lib, buildPythonPackage, fetchPypi , requests, cryptography, pybrowserid, hawkauthlib, six -, grequests, mock, responses, pytest, pyjwt }: +, grequests, mock, responses, pytest, pyjwt, setuptools }: buildPythonPackage rec { pname = "PyFxA"; @@ -18,6 +18,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ pyjwt requests cryptography pybrowserid hawkauthlib six + setuptools # imports pkg_resources ]; checkInputs = [ From 278423ab654dd742386ca4e911c9b76774ff19ae Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jun 2022 23:20:18 +0200 Subject: [PATCH 042/148] python310Packages.plugwise: 0.19.0 -> 0.19.0 --- pkgs/development/python-modules/plugwise/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/plugwise/default.nix b/pkgs/development/python-modules/plugwise/default.nix index cf5b79fb7114..b8900b0f5506 100644 --- a/pkgs/development/python-modules/plugwise/default.nix +++ b/pkgs/development/python-modules/plugwise/default.nix @@ -1,10 +1,11 @@ -{ lib + { lib , aiohttp , async-timeout , buildPythonPackage , crcmod , defusedxml , fetchFromGitHub +, freezegun , jsonpickle , munch , mypy @@ -20,7 +21,7 @@ buildPythonPackage rec { pname = "plugwise"; - version = "0.18.5"; + version = "0.19.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -29,7 +30,7 @@ buildPythonPackage rec { owner = pname; repo = "python-plugwise"; rev = "refs/tags/v${version}"; - sha256 = "sha256-J6RwPkObcoXIQ93nD8FNNjwllHoID4nFzqilArBS1C8="; + sha256 = "sha256-ST7eC7IXW47b1AlX25ubUPTi6Hkcjd+7L0tzht3fz9s="; }; propagatedBuildInputs = [ @@ -45,6 +46,7 @@ buildPythonPackage rec { ]; checkInputs = [ + freezegun jsonpickle mypy pytest-aiohttp From 1e0e76bfb6370d951f8398690b57c5d860f0970a Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Wed, 8 Jun 2022 07:21:52 +1000 Subject: [PATCH 043/148] talosctl: 1.0.5 -> 1.0.6 https://github.com/siderolabs/talos/releases/tag/v1.0.6 --- .../networking/cluster/talosctl/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/networking/cluster/talosctl/default.nix b/pkgs/applications/networking/cluster/talosctl/default.nix index 8476fc810ba4..da240b337bfc 100644 --- a/pkgs/applications/networking/cluster/talosctl/default.nix +++ b/pkgs/applications/networking/cluster/talosctl/default.nix @@ -1,11 +1,11 @@ { lib, buildGoModule, fetchFromGitHub, installShellFiles }: let # look for GO_LDFLAGS getting set in the Makefile - version = "1.0.5"; - sha256 = "sha256-xgzIbhgV1AAUa0tooYtzUMqK4Co3PvWQ0YbZuf0JgFE="; - vendorSha256 = "sha256-Gp30qCGV+EaJ1lvfleZHRWVL6rdSj0mvpumWsqr9IT0="; - pkgsVersion = "v1.0.0-17-g7567bf4"; - extrasVersion = "v1.0.0-3-g6327c36"; + version = "1.0.6"; + sha256 = "sha256-4cUaQWqVndp06eFgqInOMMGITbTdZO5BOqXW2XEpuWU="; + vendorSha256 = "sha256-7q35d+jbIDe7fAy6nL5FWdSovBb/f64HYLHGL+zE6bI="; + pkgsVersion = "v1.0.0-25-gcf9709e"; + extrasVersion = "v1.0.0-4-g05b0920"; in buildGoModule rec { pname = "talosctl"; From 5cc98c37ad2f2258f7ad4d0cce00617ef853ca2e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jun 2022 23:22:10 +0200 Subject: [PATCH 044/148] python310Packages.pyroute2-core: 0.6.10 -> 0.6.11 --- pkgs/development/python-modules/pyroute2-core/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyroute2-core/default.nix b/pkgs/development/python-modules/pyroute2-core/default.nix index 3676ce9a469c..096085a27103 100644 --- a/pkgs/development/python-modules/pyroute2-core/default.nix +++ b/pkgs/development/python-modules/pyroute2-core/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "pyroute2-core"; - version = "0.6.10"; + version = "0.6.11"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -15,7 +15,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "pyroute2.core"; inherit version; - hash = "sha256-hwI7sSaR0938VeCShzZ39b2CAU5SJLqui8Ri3CGXPwk="; + hash = "sha256-9Odxls1lje7pUCu0UkhfQIgbL2dOZQkiV1J/kgfgxGw="; }; # pyroute2 sub-modules have no tests From 49da7da0b427be4d5b4d4f420a11eea2f429beda Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jun 2022 23:22:15 +0200 Subject: [PATCH 045/148] python310Packages.pyroute2-ethtool: 0.6.10 -> 0.6.11 --- pkgs/development/python-modules/pyroute2-ethtool/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyroute2-ethtool/default.nix b/pkgs/development/python-modules/pyroute2-ethtool/default.nix index 515bdfb2d6d8..ba0f2a054e11 100644 --- a/pkgs/development/python-modules/pyroute2-ethtool/default.nix +++ b/pkgs/development/python-modules/pyroute2-ethtool/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "pyroute2-ethtool"; - version = "0.6.10"; + version = "0.6.11"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -15,7 +15,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "pyroute2.ethtool"; inherit version; - hash = "sha256-5i1zbKs40RXCQB1cn3jrDOX+Fgl0nknTFLsvI69udxw="; + hash = "sha256-3xFsK50WtnRS8ImEWU4Hke9Ndp1Asm4wPEBfQT1rYXU="; }; propagatedBuildInputs = [ From a529fd4c2fac012dc9f1166663f7d11ef02ba0b1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jun 2022 23:22:20 +0200 Subject: [PATCH 046/148] python310Packages.pyroute2-ipdb: 0.6.10 -> 0.6.11 --- pkgs/development/python-modules/pyroute2-ipdb/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyroute2-ipdb/default.nix b/pkgs/development/python-modules/pyroute2-ipdb/default.nix index 5a3b4d186556..944b1ab4cfc1 100644 --- a/pkgs/development/python-modules/pyroute2-ipdb/default.nix +++ b/pkgs/development/python-modules/pyroute2-ipdb/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "pyroute2-ipdb"; - version = "0.6.10"; + version = "0.6.11"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -15,7 +15,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "pyroute2.ipdb"; inherit version; - hash = "sha256-emPIh94LqN/QCCLC6Mr+IiVyXtjdsmhduBdPko1V83A="; + hash = "sha256-UTP5LuZbBukfDpQPJ+N5ZFtKGFJppZfpsISnsm9eabs="; }; propagatedBuildInputs = [ From 93eb7f89b8b96e063fd1ef8c9647bed6ddd8698e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jun 2022 23:22:26 +0200 Subject: [PATCH 047/148] python310Packages.pyroute2-ndb: 0.6.10 -> 0.6.11 --- pkgs/development/python-modules/pyroute2-ndb/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyroute2-ndb/default.nix b/pkgs/development/python-modules/pyroute2-ndb/default.nix index b0e123bc4c4b..9bf7414c79ff 100644 --- a/pkgs/development/python-modules/pyroute2-ndb/default.nix +++ b/pkgs/development/python-modules/pyroute2-ndb/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "pyroute2-ndb"; - version = "0.6.10"; + version = "0.6.11"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -15,7 +15,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "pyroute2.ndb"; inherit version; - hash = "sha256-kjgeA7PV6JLvCvaZxe4y984wTo8ExU7Yf1Wr+7jNwu4="; + hash = "sha256-jz956VgO9Z9ZPlMQobB34wd04Og/XV7IP+J58htdk+Y="; }; propagatedBuildInputs = [ From aacc1079c7d7f3546cc4e02f0f84fd45024dd0ee Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jun 2022 23:22:32 +0200 Subject: [PATCH 048/148] python310Packages.pyroute2-nftables: 0.6.10 -> 0.6.11 --- pkgs/development/python-modules/pyroute2-nftables/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyroute2-nftables/default.nix b/pkgs/development/python-modules/pyroute2-nftables/default.nix index 04f9b29bd56f..a251c34a8b28 100644 --- a/pkgs/development/python-modules/pyroute2-nftables/default.nix +++ b/pkgs/development/python-modules/pyroute2-nftables/default.nix @@ -6,12 +6,12 @@ buildPythonPackage rec { pname = "pyroute2-nftables"; - version = "0.6.10"; + version = "0.6.11"; src = fetchPypi { pname = "pyroute2.nftables"; inherit version; - sha256 = "sha256-dUuCTGs7RaEehsAgK7yNw11tE3VGtT5LxDilMVWpCNU="; + sha256 = "sha256-2SHAH4HBcXknCa2rdHk1s+ju+IN5ndcLPD8dgSGagqU="; }; propagatedBuildInputs = [ From 14368fc622ab66b91493874837a5677efe5ae88f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jun 2022 23:22:37 +0200 Subject: [PATCH 049/148] python310Packages.pyroute2-nslink: 0.6.10 -> 0.6.11 --- pkgs/development/python-modules/pyroute2-nslink/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyroute2-nslink/default.nix b/pkgs/development/python-modules/pyroute2-nslink/default.nix index 368e9cc9fb55..af4d6a7a01d1 100644 --- a/pkgs/development/python-modules/pyroute2-nslink/default.nix +++ b/pkgs/development/python-modules/pyroute2-nslink/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "pyroute2-nslink"; - version = "0.6.10"; + version = "0.6.11"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -15,7 +15,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "pyroute2.nslink"; inherit version; - hash = "sha256-PynJRg2pXZIeB4Ucz/tvghdEt1iWAr8azjET9hsnUPE="; + hash = "sha256-R94n1UEceOMmXXbCCkgq6N2JLnp2eqAW4qweIpNI2CI="; }; propagatedBuildInputs = [ From 61332648485146fa10263d959d000f915dbb9d8c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jun 2022 23:22:43 +0200 Subject: [PATCH 050/148] python310Packages.pyroute2-protocols: 0.6.10 -> 0.6.11 --- .../development/python-modules/pyroute2-protocols/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyroute2-protocols/default.nix b/pkgs/development/python-modules/pyroute2-protocols/default.nix index 401786f7cd60..9cf62994c3a1 100644 --- a/pkgs/development/python-modules/pyroute2-protocols/default.nix +++ b/pkgs/development/python-modules/pyroute2-protocols/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "pyroute2-protocols"; - version = "0.6.10"; + version = "0.6.11"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -15,7 +15,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "pyroute2.protocols"; inherit version; - hash = "sha256-xMTKAJC++X1zO7rm+cUr0IuEDxkllyje00Omv9tLZ6E="; + hash = "sha256-AnmW9ILlcZh2mwO5fbhY4ZazWSAy2wHJgLp5Anlmxk4="; }; propagatedBuildInputs = [ From 4d10c2ce7f8893cd14abcc001b73ae6b91a0508a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jun 2022 23:22:49 +0200 Subject: [PATCH 051/148] python310Packages.pyroute2: 0.6.10 -> 0.6.11 --- pkgs/development/python-modules/pyroute2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyroute2/default.nix b/pkgs/development/python-modules/pyroute2/default.nix index 54540197f72b..a95356d58199 100644 --- a/pkgs/development/python-modules/pyroute2/default.nix +++ b/pkgs/development/python-modules/pyroute2/default.nix @@ -15,14 +15,14 @@ buildPythonPackage rec { pname = "pyroute2"; - version = "0.6.10"; + version = "0.6.11"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-Vj7W3/yQPYIUFEdvNv3AS9OqddqtISRbcmWUJxc5JiI="; + hash = "sha256-E2NGvmbVUuRUHQZ52/+say4SN9/TnuGpUGL4UCRJF70="; }; propagatedBuildInputs = [ From 1eae6a3c3a01963f6cc8500fd37ad7f2a40785ad Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jun 2022 23:22:54 +0200 Subject: [PATCH 052/148] python310Packages.pyroute2-ipset: 0.6.10 -> 0.6.11 --- pkgs/development/python-modules/pyroute2-ipset/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyroute2-ipset/default.nix b/pkgs/development/python-modules/pyroute2-ipset/default.nix index 783405f0eafc..967b232cd234 100644 --- a/pkgs/development/python-modules/pyroute2-ipset/default.nix +++ b/pkgs/development/python-modules/pyroute2-ipset/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "pyroute2-ipset"; - version = "0.6.10"; + version = "0.6.11"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -15,7 +15,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "pyroute2.ipset"; inherit version; - hash = "sha256-1Fk3imqMz9qx1zBcQ/Uyp2eVrTygGIklVF5/QBbuSoI="; + hash = "sha256-uIfclrm1tujUickd5R4uyDHvPExyC2M9mpm5NLF1rts="; }; propagatedBuildInputs = [ From 659e7a4807121278a5a9b0d2fc63d60ff0916710 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jun 2022 23:25:52 +0200 Subject: [PATCH 053/148] python310Packages.webexteamssdk: 1.6 -> 1.6.1 --- pkgs/development/python-modules/webexteamssdk/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/webexteamssdk/default.nix b/pkgs/development/python-modules/webexteamssdk/default.nix index e70cdfd96c86..1fe2811477df 100644 --- a/pkgs/development/python-modules/webexteamssdk/default.nix +++ b/pkgs/development/python-modules/webexteamssdk/default.nix @@ -9,13 +9,13 @@ buildPythonPackage rec { pname = "webexteamssdk"; - version = "1.6"; + version = "1.6.1"; src = fetchFromGitHub { owner = "CiscoDevNet"; repo = pname; rev = "v${version}"; - sha256 = "0bw28ag1iqyqlxz83m4qb3r94kipv5mpf3bsvc8zv5vh4dv52bp2"; + sha256 = "sha256-xlkmXl4tVm48drXmkUijv9GNXzJcDnfSKbOMciPIRRo="; }; propagatedBuildInputs = [ From 87807925c47ed18e3e595d75ea6a91eef6443ba8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jun 2022 23:29:23 +0200 Subject: [PATCH 054/148] python310Packages.webexteamssdk: disable on obsolete Python releases --- .../python-modules/webexteamssdk/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/webexteamssdk/default.nix b/pkgs/development/python-modules/webexteamssdk/default.nix index 1fe2811477df..1e81e90af9a6 100644 --- a/pkgs/development/python-modules/webexteamssdk/default.nix +++ b/pkgs/development/python-modules/webexteamssdk/default.nix @@ -3,6 +3,7 @@ , fetchFromGitHub , future , pyjwt +, pythonOlder , requests , requests-toolbelt }: @@ -10,12 +11,15 @@ buildPythonPackage rec { pname = "webexteamssdk"; version = "1.6.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "CiscoDevNet"; repo = pname; rev = "v${version}"; - sha256 = "sha256-xlkmXl4tVm48drXmkUijv9GNXzJcDnfSKbOMciPIRRo="; + hash = "sha256-xlkmXl4tVm48drXmkUijv9GNXzJcDnfSKbOMciPIRRo="; }; propagatedBuildInputs = [ @@ -27,7 +31,10 @@ buildPythonPackage rec { # Tests require a Webex Teams test domain doCheck = false; - pythonImportsCheck = [ "webexteamssdk" ]; + + pythonImportsCheck = [ + "webexteamssdk" + ]; meta = with lib; { description = "Python module for Webex Teams APIs"; From 7fc4e3b858bb2ab17353f419f9a1587fa3993726 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jun 2022 23:47:40 +0200 Subject: [PATCH 055/148] python310Packages.pyfxa: switch to pytestCheckHook - add pythonImportsCheck - update pname --- .../python-modules/pyfxa/default.nix | 62 +++++++++++++------ 1 file changed, 44 insertions(+), 18 deletions(-) diff --git a/pkgs/development/python-modules/pyfxa/default.nix b/pkgs/development/python-modules/pyfxa/default.nix index b7b1e61e8877..46a25e2c6bba 100644 --- a/pkgs/development/python-modules/pyfxa/default.nix +++ b/pkgs/development/python-modules/pyfxa/default.nix @@ -1,38 +1,64 @@ -{ lib, buildPythonPackage, fetchPypi -, requests, cryptography, pybrowserid, hawkauthlib, six -, grequests, mock, responses, pytest, pyjwt, setuptools }: +{ lib +, buildPythonPackage +, cryptography +, fetchPypi +, grequests +, hawkauthlib +, mock +, pybrowserid +, pyjwt +, pytestCheckHook +, pythonOlder +, requests +, responses +, setuptools +, six +}: buildPythonPackage rec { - pname = "PyFxA"; + pname = "pyfxa"; version = "0.7.7"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { - inherit pname version; - sha256 = "6c85cd08cf05f7138dee1cf2a8a1d68fd428b7b5ad488917c70a2a763d651cdb"; + pname = "PyFxA"; + inherit version; + hash = "sha256-bIXNCM8F9xON7hzyqKHWj9Qot7WtSIkXxwoqdj1lHNs="; }; - postPatch = '' - # Requires network access - rm fxa/tests/test_core.py - ''; - propagatedBuildInputs = [ - pyjwt requests cryptography pybrowserid hawkauthlib six + cryptography + hawkauthlib + pybrowserid + pyjwt + requests setuptools # imports pkg_resources + six ]; checkInputs = [ - grequests mock responses pytest + grequests + mock + responses + pytestCheckHook ]; - # test_oath is mostly network calls - checkPhase = '' - pytest --ignore=fxa/tests/test_oauth.py - ''; + pythonImportsCheck = [ + "fxa" + ]; + + disabledTestPaths = [ + # Requires network access + "fxa/tests/test_core.py" + "fxa/tests/test_oauth.py" + ]; meta = with lib; { - description = "Firefox Accounts client library for Python"; + description = "Firefox Accounts client library"; homepage = "https://github.com/mozilla/PyFxA"; license = licenses.mpl20; + maintainers = with maintainers; [ ]; }; } From 712272f895ddb626727ed4049603f4725a935f7a Mon Sep 17 00:00:00 2001 From: patternspandemic Date: Tue, 7 Jun 2022 17:16:45 -0700 Subject: [PATCH 056/148] kodestudio: Remove. The nix package was way out of date and unmaintained. --- .../editors/kodestudio/default.nix | 135 ------------------ pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 - 3 files changed, 1 insertion(+), 137 deletions(-) delete mode 100644 pkgs/applications/editors/kodestudio/default.nix diff --git a/pkgs/applications/editors/kodestudio/default.nix b/pkgs/applications/editors/kodestudio/default.nix deleted file mode 100644 index 2620a87ce425..000000000000 --- a/pkgs/applications/editors/kodestudio/default.nix +++ /dev/null @@ -1,135 +0,0 @@ -{ stdenv, lib, fetchurl, makeDesktopItem, makeWrapper -, # Patchelf dependencies: - alsa-lib, atomEnv, boehmgc, flac, libogg, libvorbis, libXScrnSaver, libGLU, libGL -, openssl, xorg, zlib -}: - -let - - version = "17.1"; - - sha256 = if stdenv.hostPlatform.system == "x86_64-linux" then "1kddisnvlk48jip6k59mw3wlkrl7rkck2lxpaghn0gfx02cvms5f" - else if stdenv.hostPlatform.system == "i686-cygwin" then "1izp42afrlh4yd322ax9w85ki388gnkqfqbw8dwnn4k3j7r5487z" - else throw "Unsupported system: ${stdenv.hostPlatform.system}"; - - urlBase = "https://github.com/Kode/KodeStudio/releases/download/v${version}/KodeStudio-"; - - urlStr = if stdenv.hostPlatform.system == "x86_64-linux" then urlBase + "linux64.tar.gz" - else if stdenv.hostPlatform.system == "i686-cygwin" then urlBase + "win32.zip" - else throw "Unsupported system: ${stdenv.hostPlatform.system}"; - -in - - stdenv.mkDerivation { - pname = "kodestudio"; - inherit version; - - src = fetchurl { - url = urlStr; - inherit sha256; - }; - - nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ libXScrnSaver ]; - - desktopItem = makeDesktopItem { - name = "kodestudio"; - exec = "kodestudio"; - icon = "kodestudio"; - comment = "Kode Studio is an IDE for Kha based on Visual Studio Code"; - desktopName = "Kode Studio"; - genericName = "Text Editor"; - categories = [ "GNOME" "GTK" "Utility" "TextEditor" "Development" ]; - }; - - sourceRoot = "."; - - installPhase = '' - mkdir -p $out - cp -r ./* $out - ''; - - postFixup = lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") '' - # Patch Binaries - patchelf \ - --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "$out:${atomEnv.libPath}" \ - $out/kodestudio - patchelf \ - --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath ".:${stdenv.cc.libc}/lib:${xorg.libXinerama}/lib:${xorg.libX11}/lib:${alsa-lib}/lib:${libGL}/lib:${libGLU}/lib:${lib.getLib openssl}/lib" \ - $out/resources/app/extensions/krom/Krom/linux/Krom - patchelf \ - --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath ".:${stdenv.cc.libc}/lib" \ - $out/resources/app/extensions/kha/Kha/Kore/Tools/krafix/krafix-linux64 - patchelf \ - --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath ".:${stdenv.cc.libc}/lib" \ - $out/resources/app/extensions/kha/Kha/Kore/Tools/kraffiti/kraffiti-linux64 - patchelf \ - --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" \ - $out/resources/app/extensions/kha/Kha/Tools/kravur/kravur-linux64 - patchelf \ - --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath ".:${stdenv.cc.libc}/lib:${zlib}/lib" \ - $out/resources/app/extensions/kha/Kha/Tools/haxe/haxe-linux64 - patchelf \ - --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath ".:${stdenv.cc.libc}/lib:${libvorbis}/lib:${libogg}/lib:${flac.out}/lib" \ - $out/resources/app/extensions/kha/Kha/Tools/oggenc/oggenc-linux64 - - # Patch Shared Objects - patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/libnode.so - patchelf --set-rpath ".:${stdenv.cc.libc}/lib" $out/libffmpeg.so - patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/resources/app/extensions/krom/Krom/linux/libv8_libplatform.so - patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/resources/app/extensions/krom/Krom/linux/libicuuc.so - patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/resources/app/extensions/krom/Krom/linux/libv8_libbase.so - patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/resources/app/extensions/krom/Krom/linux/libv8.so - patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/resources/app/extensions/krom/Krom/linux/libicui18n.so - patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${boehmgc}/lib" $out/resources/app/extensions/kha/Kha/Backends/Kore/khacpp/project/libs/nekoapi/bin/RPi/libneko.so - patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${boehmgc}/lib" $out/resources/app/extensions/kha/Kha/Backends/Kore/khacpp/project/libs/nekoapi/bin/Linux64/libneko.so - patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${boehmgc}/lib" $out/resources/app/extensions/kha/Kha/Backends/Kore/khacpp/project/libs/nekoapi/bin/Linux/libneko.so - patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/resources/app/node_modules/pty.js/build/Release/pty.node - patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/resources/app/node_modules/gc-signals/build/Release/gcsignals.node - patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/resources/app/node_modules/gc-signals/build/Release/obj.target/gcsignals.node - patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/resources/app/node_modules/oniguruma/build/Release/onig_scanner.node - patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/resources/app/node_modules/oniguruma/build/Release/obj.target/onig_scanner.node - patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib:${xorg.libX11}/lib" $out/resources/app/node_modules/native-keymap/build/Release/keymapping.node - patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib:${xorg.libX11}/lib" $out/resources/app/node_modules/native-keymap/build/Release/obj.target/keymapping.node - - # Rewrite VSCODE_PATH inside bin/kodestudio to $out - substituteInPlace $out/bin/kodestudio --replace "/usr/share/kodestudio" $out - - # Patch library calls that expects nix store files to be mode 644: - # A stat is made on srcFile (in the nix store), and its mode used - # for destFile, but it expects the mode to be read write, whereas - # all regular files in the nix store are made read only. - # (33188 is 100644 octal, the required mode) - substituteInPlace $out/resources/app/extensions/kha/Kha/Tools/khamake/node_modules/fs-extra/lib/copy-sync/copy-file-sync.js --replace "stat.mode" "33188" - substituteInPlace $out/resources/app/extensions/kha/Kha/Kore/Tools/koremake/node_modules/fs-extra/lib/copy-sync/copy-file-sync.js --replace "stat.mode" "33188" - - # Wrap preload libXss - wrapProgram $out/bin/kodestudio \ - --prefix LD_PRELOAD : ${lib.makeLibraryPath [ libXScrnSaver ]}/libXss.so.1 - ''; - - meta = with lib; { - description = '' - An IDE for Kha based on Visual Studio Code - ''; - longDescription = '' - Kode Studio is an IDE for Kha based on Visual Studio Code. - - Kha and Kore are multimedia frameworks for Haxe and C++ respectively - (with JavaScript coming soon). Using Kha or Kore you can access all - hardware at the lowest possible level in a completely portable way. - ''; - homepage = "http://kode.tech/"; - downloadPage = "https://github.com/Kode/KodeStudio/releases"; - license = licenses.mit; - maintainers = [ maintainers.patternspandemic ]; - platforms = [ "x86_64-linux" "i686-cygwin" ]; - }; - } diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 6894ed5335cb..1fc44abf1ab8 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -662,6 +662,7 @@ mapAliases ({ kinetic-cpp-client = throw "kinetic-cpp-client has been removed from nixpkgs, as it's abandoned"; # Added 2020-04-28 kino = throw "kino has been removed because it was broken and abandoned"; # Added 2021-04-25 knockknock = throw "knockknock has been removed from nixpkgs because the upstream project is abandoned"; # Added 2022-01-01 + kodestudio = throw "kodestudio has been removed from nixpkgs, as the nix package has been long unmaintained and out of date."; # Added 2022-06-07 kodiGBM = kodi-gbm; kodiPlain = kodi; kodiPlainWayland = kodi-wayland; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6dccba0a65e4..22df9a37bda7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27586,8 +27586,6 @@ with pkgs; kn = callPackage ../applications/networking/cluster/kn { }; - kodestudio = callPackage ../applications/editors/kodestudio { }; - kondo = callPackage ../applications/misc/kondo { }; konversation = libsForQt5.callPackage ../applications/networking/irc/konversation { }; From f4328e7b4aa785b2c53935227625acfcbfdbdea7 Mon Sep 17 00:00:00 2001 From: Malo Bourgon Date: Tue, 7 Jun 2022 15:45:01 -0700 Subject: [PATCH 057/148] nixpkgs-review: 2.6.4 -> 2.7.0 --- .../nixpkgs-review/default.nix | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/package-management/nixpkgs-review/default.nix b/pkgs/tools/package-management/nixpkgs-review/default.nix index d21c9b3c568f..e65d28a6af9b 100644 --- a/pkgs/tools/package-management/nixpkgs-review/default.nix +++ b/pkgs/tools/package-management/nixpkgs-review/default.nix @@ -1,24 +1,36 @@ { lib , python3 , fetchFromGitHub -, nix + +, bubblewrap +, cacert , git +, nix + +, withSandboxSupport ? false }: python3.pkgs.buildPythonApplication rec { pname = "nixpkgs-review"; - version = "2.6.4"; + version = "2.7.0"; src = fetchFromGitHub { owner = "Mic92"; repo = "nixpkgs-review"; rev = version; - sha256 = "sha256-6vKMaCTilPXd8K3AuLqtYInVyyFhdun0o9cX1WRMmWo="; + sha256 = "sha256-hGOcLrVPb+bSNA72ZfKE9Mjm2dr/qnuaCkjveHXPcws="; }; - makeWrapperArgs = [ - "--prefix" "PATH" ":" "${lib.makeBinPath [ nix git ]}" - ]; + makeWrapperArgs = + let + binPath = [ nix git ] ++ lib.optional withSandboxSupport bubblewrap; + in + [ + "--prefix PATH : ${lib.makeBinPath binPath}" + "--set NIX_SSL_CERT_FILE ${cacert}/etc/ssl/certs/ca-bundle.crt" + # we don't have any runtime deps but nix-review shells might inject unwanted dependencies + "--unset PYTHONPATH" + ]; doCheck = false; From e94f0231b72af69410b6715a2973bf108e3aa655 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 8 Jun 2022 01:37:01 +0000 Subject: [PATCH 058/148] python310Packages.mkdocs-material: 8.3.2 -> 8.3.3 --- pkgs/development/python-modules/mkdocs-material/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/mkdocs-material/default.nix b/pkgs/development/python-modules/mkdocs-material/default.nix index a55ca5cb2924..1cdf9d883a7d 100644 --- a/pkgs/development/python-modules/mkdocs-material/default.nix +++ b/pkgs/development/python-modules/mkdocs-material/default.nix @@ -13,7 +13,7 @@ buildPythonApplication rec { pname = "mkdocs-material"; - version = "8.3.2"; + version = "8.3.3"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -22,7 +22,7 @@ buildPythonApplication rec { owner = "squidfunk"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-VcyBsIU2PJ2xh365kNAlO3wno3xushlaj43dIh1GkP8="; + hash = "sha256-4rJ1fKYIQli4j6x1/xipQeCXMfbILyroxrwbpcPGYiU="; }; propagatedBuildInputs = [ From 8866bb653dfc49ea47bfff628c18c2467fbb34d0 Mon Sep 17 00:00:00 2001 From: Spencer Pogorzelski <34356756+Scoder12@users.noreply.github.com> Date: Tue, 7 Jun 2022 18:59:10 -0700 Subject: [PATCH 059/148] pwninit: init at 3.2.0 --- .../tools/misc/pwninit/default.nix | 35 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/tools/misc/pwninit/default.nix diff --git a/pkgs/development/tools/misc/pwninit/default.nix b/pkgs/development/tools/misc/pwninit/default.nix new file mode 100644 index 000000000000..7d3808f554c0 --- /dev/null +++ b/pkgs/development/tools/misc/pwninit/default.nix @@ -0,0 +1,35 @@ +{ lib +, stdenv +, fetchFromGitHub +, rustPlatform +, openssl +, pkg-config +, xz +, Security +}: + +rustPlatform.buildRustPackage rec { + pname = "pwninit"; + version = "3.2.0"; + + src = fetchFromGitHub { + owner = "io12"; + repo = "pwninit"; + rev = version; + sha256 = "sha256-XKDYJH2SG3TkwL+FN6rXDap8la07icR0GPFiYcnOHeI="; + }; + + buildInputs = [ openssl xz ] ++ lib.optionals stdenv.isDarwin [ Security ]; + nativeBuildInputs = [ pkg-config ]; + doCheck = false; # there are no tests to run + + cargoSha256 = "sha256-2HCHiU309hbdwohUKVT3TEfGvOfxQWtEGj7FIS8OS7s="; + + meta = { + description = "Automate starting binary exploit challenges"; + homepage = "https://github.com/io12/pwninit"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.scoder12 ]; + platforms = lib.platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a2c3b14d2811..1eed2c71d1bf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9600,6 +9600,10 @@ with pkgs; pwndbg = callPackage ../development/tools/misc/pwndbg { }; + pwninit = callPackage ../development/tools/misc/pwninit { + inherit (darwin.apple_sdk.frameworks) Security; + }; + pycflow2dot = with python3.pkgs; toPythonApplication pycflow2dot; pydf = callPackage ../applications/misc/pydf { }; From fad47110258f30a43492c288f33bc52412ee7fd0 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Wed, 8 Jun 2022 12:14:45 +1000 Subject: [PATCH 060/148] easyjson: remove unnecessary `deps.nix` --- pkgs/development/tools/easyjson/deps.nix | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 pkgs/development/tools/easyjson/deps.nix diff --git a/pkgs/development/tools/easyjson/deps.nix b/pkgs/development/tools/easyjson/deps.nix deleted file mode 100644 index d5d7e1f15bc9..000000000000 --- a/pkgs/development/tools/easyjson/deps.nix +++ /dev/null @@ -1,11 +0,0 @@ -[ - { - goPackagePath = "github.com/josharian/intern"; - fetch = { - type = "git"; - url = "https://github.com/josharian/intern"; - rev = "8e6ff32b3e7c0b018c43953085fe2ac330fe9acd"; - sha256 = "1za48ppvwd5vg8vv25ldmwz1biwpb3p6qhf8vazhsfdg9m07951c"; - }; - } -] From 09570ee4a943b5b3e686f71fa93e4745e33316d3 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Wed, 8 Jun 2022 12:14:45 +1000 Subject: [PATCH 061/148] goa: remove unnecessary `deps.nix` --- pkgs/development/tools/goa/deps.nix | 75 ----------------------------- 1 file changed, 75 deletions(-) delete mode 100644 pkgs/development/tools/goa/deps.nix diff --git a/pkgs/development/tools/goa/deps.nix b/pkgs/development/tools/goa/deps.nix deleted file mode 100644 index bfe862a4006a..000000000000 --- a/pkgs/development/tools/goa/deps.nix +++ /dev/null @@ -1,75 +0,0 @@ -# This file was generated by https://github.com/kamilchm/go2nix v1.3.0 -[ - { - goPackagePath = "github.com/dimfeld/httppath"; - fetch = { - type = "git"; - url = "https://github.com/dimfeld/httppath"; - rev = "ee938bf735983d53694d79138ad9820efff94c92"; - sha256 = "1c1kic8g3r78g6h4xl8n2ac1waxsb9fqz40k20ypi08k24mv3ha9"; - }; - } - { - goPackagePath = "github.com/gofrs/uuid"; - fetch = { - type = "git"; - url = "https://github.com/gofrs/uuid"; - rev = "e684523faa0581e44663968f097d478c499d4276"; - sha256 = "1p2md0bmfnn7kaa866fnb8lfnmlzzb8wfhp4ym5915p8mv4whxgz"; - }; - } - { - goPackagePath = "github.com/manveru/faker"; - fetch = { - type = "git"; - url = "https://github.com/manveru/faker"; - rev = "9fbc68a78c4dbc7914e1a23f88f126bea4383b97"; - sha256 = "1cnrf4wdjhxd9fryhlp2krl9acz6dzwic89gshs49pg3aajlf4dy"; - }; - } - { - goPackagePath = "github.com/spf13/cobra"; - fetch = { - type = "git"; - url = "https://github.com/spf13/cobra"; - rev = "4dab30cb33e6633c33c787106bafbfbfdde7842d"; - sha256 = "1g7p7c2azqaxbfkx5yaznk0z1inqnajlbwv921k6vh8i1xdblxk5"; - }; - } - { - goPackagePath = "github.com/spf13/pflag"; - fetch = { - type = "git"; - url = "https://github.com/spf13/pflag"; - rev = "1ce0cc6db4029d97571db82f85092fccedb572ce"; - sha256 = "02wsc01npnpc7srqw7rzaihn2hjmrkfy2x412fxbb675j2hk9cx6"; - }; - } - { - goPackagePath = "github.com/zach-klippenstein/goregen"; - fetch = { - type = "git"; - url = "https://github.com/zach-klippenstein/goregen"; - rev = "795b5e3961ea1912fde60af417ad85e86acc0d6a"; - sha256 = "113kx47ryhyb803v8ckizlrc34cmwcwb0h28v34bahd2mir8nq3l"; - }; - } - { - goPackagePath = "golang.org/x/tools"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/tools"; - rev = "a754db16a40a9d94359b6600b825419c0ca6f986"; - sha256 = "0n0cwb2szcjbyncqhdia77spcjsbm05jcgpnh0i8rdr16ixwanyq"; - }; - } - { - goPackagePath = "gopkg.in/yaml.v2"; - fetch = { - type = "git"; - url = "https://gopkg.in/yaml.v2"; - rev = "51d6538a90f86fe93ac480b35f37b2be17fef232"; - sha256 = "01wj12jzsdqlnidpyjssmj0r4yavlqy7dwrg7adqd8dicjc4ncsa"; - }; - } -] From c1e680f8da4af10af2b1a79775e8797ee26e31e3 Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Sun, 15 May 2022 09:38:00 -0700 Subject: [PATCH 062/148] =?UTF-8?q?inkscape:=201.1.2=20=E2=86=92=201.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://inkscape.org/news/2022/05/16/inkscape-12/ https://media.inkscape.org/media/doc/release_notes/1.2/Inkscape_1.2.html Needed to add some Python dependencies: - appdirs, beautifulsoup4, cachecontrol, requests and pygobject3 (gi) for clipart importer - cssselect and numpy for inkex - pygobject3 for inkex.gui Co-authored-by: Jan Tojnar --- .../graphics/inkscape/default.nix | 28 ++++++------------- .../python-modules/inkex/default.nix | 6 ++++ 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix index 75bfe5cff93d..4a6e28c3cf07 100644 --- a/pkgs/applications/graphics/inkscape/default.nix +++ b/pkgs/applications/graphics/inkscape/default.nix @@ -5,7 +5,6 @@ , cairo , cmake , fetchurl -, fetchpatch , gettext , ghostscript , glib @@ -44,20 +43,25 @@ let python3Env = python3.withPackages (ps: with ps; [ + appdirs + beautifulsoup4 + cachecontrol numpy lxml pillow scour pyserial - ]); + requests + pygobject3 + ] ++ inkex.propagatedBuildInputs); in stdenv.mkDerivation rec { pname = "inkscape"; - version = "1.1.2"; + version = "1.2"; src = fetchurl { - url = "https://media.inkscape.org/dl/resources/file/${pname}-${version}.tar.xz"; - sha256 = "sha256-P/5UoG0LJaTNi260JFNu8e0gW+E0Q6Oc1DfIx7ibltE="; + url = "https://media.inkscape.org/dl/resources/file/inkscape-${version}.tar.xz"; + sha256 = "jZsxFCVUlFZk7f7+LWtVkQpQmXZfcXanEQfDTx3N5q0="; }; # Inkscape hits the ARGMAX when linking on macOS. It appears to be @@ -73,20 +77,6 @@ stdenv.mkDerivation rec { # e.g., those from the "Effects" menu. python3 = "${python3Env}/bin/python"; }) - - # Fix build with poppler 22.03 - # https://gitlab.com/inkscape/inkscape/-/merge_requests/4187 - (fetchpatch { - url = "https://gitlab.com/inkscape/inkscape/-/commit/a18c57ffff313fd08bc8a44f6b6bf0b01d7e9b75.patch"; - sha256 = "UZb8ZTtfA5667uo5ZlVQ5vPowiSgd4ItAJ9U1BOsRQg="; - }) - - # Fix build with poppler 22.04 - # https://gitlab.com/inkscape/inkscape/-/merge_requests/4266 - (fetchpatch { - url = "https://gitlab.com/inkscape/inkscape/-/commit/d989cdf1059c78bc3bb6414330242073768d640b.patch"; - sha256 = "2cJZdunbRgPIwhJgz1dQoQRw3ZYZ2Fp6c3hpVBV2PbE="; - }) ]; postPatch = '' diff --git a/pkgs/development/python-modules/inkex/default.nix b/pkgs/development/python-modules/inkex/default.nix index c1c5479dfd8f..3f8bc99eeb6b 100644 --- a/pkgs/development/python-modules/inkex/default.nix +++ b/pkgs/development/python-modules/inkex/default.nix @@ -1,6 +1,9 @@ { buildPythonPackage , inkscape +, cssselect , lxml +, numpy +, pygobject3 , python }: @@ -11,7 +14,10 @@ buildPythonPackage { format = "other"; propagatedBuildInputs = [ + cssselect lxml + numpy + pygobject3 ]; # We just copy the files. From 63a13dba06c8a44b0cf83dc278ea442e9c67cb45 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 8 Jun 2022 04:00:41 +0000 Subject: [PATCH 063/148] inotify-tools: 3.22.1.0 -> 3.22.6.0 --- pkgs/development/tools/misc/inotify-tools/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/misc/inotify-tools/default.nix b/pkgs/development/tools/misc/inotify-tools/default.nix index b382cc51fa1e..8c5671605d55 100644 --- a/pkgs/development/tools/misc/inotify-tools/default.nix +++ b/pkgs/development/tools/misc/inotify-tools/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "inotify-tools"; - version = "3.22.1.0"; + version = "3.22.6.0"; src = fetchFromGitHub { repo = "inotify-tools"; owner = "inotify-tools"; rev = version; - sha256 = "sha256-I0kr+wFUWnovH9MXVsGaCBtp4+RnnMWD7sPecI3xz+Y="; + sha256 = "sha256-EYWVSgwoMjAlc/V5kv+2jfxEqWVW/lEoIxVd+ctEMsk="; }; nativeBuildInputs = [ autoreconfHook ]; From 2dcb8491343e616fe89e53d0414ee5d49e19964d Mon Sep 17 00:00:00 2001 From: Kylie McClain Date: Wed, 1 Jun 2022 03:24:37 -0400 Subject: [PATCH 064/148] stw: init at unstable-2022-02-04 --- pkgs/applications/misc/stw/default.nix | 32 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/applications/misc/stw/default.nix diff --git a/pkgs/applications/misc/stw/default.nix b/pkgs/applications/misc/stw/default.nix new file mode 100644 index 000000000000..e7c11fd4b9a5 --- /dev/null +++ b/pkgs/applications/misc/stw/default.nix @@ -0,0 +1,32 @@ +{ lib +, stdenv +, fetchFromGitHub +, libX11 +, fontconfig +, libXft +, libXrender +}: + +stdenv.mkDerivation rec { + pname = "stw"; + version = "unstable-2022-02-04"; + + src = fetchFromGitHub { + owner = "sineemore"; + repo = pname; + rev = "c034e04ac912c157f9faa35cb769ba93d92486a0"; + sha256 = "sha256-YohHF1O0lm6QWJv/wkS4RVJvWaOjcYSZNls6tt4hbqo=="; + }; + + buildInputs = [ libX11 fontconfig libXft libXrender ]; + + makeFlags = [ "CC:=$(CC)" "PREFIX=$(out)" ]; + + meta = with lib; { + description = "A simple text widget for X resembling the watch(1) command"; + license = licenses.mit; + maintainers = with maintainers; [ somasis ]; + platforms = platforms.unix; + broken = stdenv.isDarwin; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 29ef48496f40..7945164f0081 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29579,6 +29579,8 @@ with pkgs; ncurses = ncurses5; }; + stw = callPackage ../applications/misc/stw { }; + styx = callPackage ../applications/misc/styx { }; sway-launcher-desktop = callPackage ../applications/misc/sway-launcher-desktop { }; From 36962c4c397e7a00a39616cad40641498ae2f769 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 8 Jun 2022 05:33:04 +0000 Subject: [PATCH 065/148] python310Packages.xknx: 0.21.3 -> 0.21.4 --- pkgs/development/python-modules/xknx/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/xknx/default.nix b/pkgs/development/python-modules/xknx/default.nix index 87a0fd54d2d9..5b5de10973f5 100644 --- a/pkgs/development/python-modules/xknx/default.nix +++ b/pkgs/development/python-modules/xknx/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "xknx"; - version = "0.21.3"; + version = "0.21.4"; format = "setuptools"; disabled = pythonOlder "3.8"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "XKNX"; repo = pname; rev = "refs/tags/${version}"; - sha256 = "sha256-AGKozbVdXfRPvaU1Et8GFu3vdNRLA8ZiV8Xc6T7BhOQ="; + sha256 = "sha256-eKbEeW+pa8lUbbzcvexURa6raN3HFzIWjwqE3L80KTY="; }; propagatedBuildInputs = [ From ee8a4e36152edef4599e7475c86bcb4171acc12a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 8 Jun 2022 06:20:40 +0000 Subject: [PATCH 066/148] python310Packages.databricks-connect: 9.1.16 -> 9.1.17 --- .../development/python-modules/databricks-connect/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/databricks-connect/default.nix b/pkgs/development/python-modules/databricks-connect/default.nix index 2a67ef167c54..b271861e2789 100644 --- a/pkgs/development/python-modules/databricks-connect/default.nix +++ b/pkgs/development/python-modules/databricks-connect/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "databricks-connect"; - version = "9.1.16"; + version = "9.1.17"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-agdky7AhRuObU9GT8IpdgB3SWdHDBRnuoaAtYAlCv/4="; + sha256 = "sha256-QBGeXZ8zvRRjmKGs0vyBWTvcug3PF/BFV2asYTqsScw="; }; sourceRoot = "."; From 70db11c3d0a43770ca352bff08fd8b5657ad6498 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 8 Jun 2022 09:19:45 +0200 Subject: [PATCH 067/148] checkov: 2.0.1201 -> 2.0.1204 --- pkgs/development/tools/analysis/checkov/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/analysis/checkov/default.nix b/pkgs/development/tools/analysis/checkov/default.nix index 886cca2de9c7..d0695e44f0fa 100644 --- a/pkgs/development/tools/analysis/checkov/default.nix +++ b/pkgs/development/tools/analysis/checkov/default.nix @@ -32,14 +32,14 @@ with py.pkgs; buildPythonApplication rec { pname = "checkov"; - version = "2.0.1201"; + version = "2.0.1204"; format = "setuptools"; src = fetchFromGitHub { owner = "bridgecrewio"; repo = pname; rev = version; - hash = "sha256-ZQCUYnoCaVZkXr5rZ/vkEOlADMQmj6OfZ12KBerXdmQ="; + hash = "sha256-qqTqEn11DM1W48ZYoiCacsSCA4xPLxPil43xiByEy5g="; }; nativeBuildInputs = with py.pkgs; [ From 364e63d1640edc7abeac8ac44bd86cc806f9f33b Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 8 Jun 2022 08:26:50 +0100 Subject: [PATCH 068/148] fbpanel: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: plugin.o:(.bss+0x0): multiple definition of `stam'; panel.o:(.bss+0x20): first defined here --- pkgs/applications/window-managers/fbpanel/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/applications/window-managers/fbpanel/default.nix b/pkgs/applications/window-managers/fbpanel/default.nix index 1a87f29f67cd..33a313eb8eec 100644 --- a/pkgs/applications/window-managers/fbpanel/default.nix +++ b/pkgs/applications/window-managers/fbpanel/default.nix @@ -19,6 +19,10 @@ stdenv.mkDerivation rec { --replace "CFLAGSX =" "CFLAGSX = -I${gdk-pixbuf-xlib.dev}/include/gdk-pixbuf-2.0" ''; + # Workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: plugin.o:(.bss+0x0): multiple definition of `stam'; panel.o:(.bss+0x20): first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; NIX_LDFLAGS="-lX11"; meta = with lib; { From 465622ad432e99c3c5f88f324d3b7043e509d847 Mon Sep 17 00:00:00 2001 From: linsui Date: Wed, 8 Jun 2022 15:36:20 +0800 Subject: [PATCH 069/148] apksigner: fix for gradle_5 --- pkgs/development/tools/apksigner/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/tools/apksigner/default.nix b/pkgs/development/tools/apksigner/default.nix index e7afa7189c22..854e913dd58e 100644 --- a/pkgs/development/tools/apksigner/default.nix +++ b/pkgs/development/tools/apksigner/default.nix @@ -23,6 +23,7 @@ stdenv.mkDerivation rec { cat >> build.gradle < Date: Wed, 8 Jun 2022 08:37:46 +0100 Subject: [PATCH 070/148] gcl: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: ./libgclp.a(user_match.o):(.bss+0x18): multiple definition of `tf'; ./libpre_gcl.a(main.o):(.bss+0x326d90): first defined here --- pkgs/development/compilers/gcl/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/gcl/default.nix b/pkgs/development/compilers/gcl/default.nix index 6d0471dacbb5..e6ccc2598035 100644 --- a/pkgs/development/compilers/gcl/default.nix +++ b/pkgs/development/compilers/gcl/default.nix @@ -40,7 +40,10 @@ stdenv.mkDerivation rec { hardeningDisable = [ "pic" "bindnow" ]; - NIX_CFLAGS_COMPILE = "-fgnu89-inline"; + # -fcommon: workaround build failure on -fno-common toolchains: + # ld: ./libgclp.a(user_match.o):(.bss+0x18): multiple definition of + # `tf'; ./libpre_gcl.a(main.o):(.bss+0x326d90): first defined here + NIX_CFLAGS_COMPILE = "-fgnu89-inline -fcommon"; meta = with lib; { description = "GNU Common Lisp compiler working via GCC"; From 321e60b24bc477e80b5b7266953cfefe256e1396 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 8 Jun 2022 07:39:19 +0000 Subject: [PATCH 071/148] python310Packages.dash: 2.4.1 -> 2.5.0 --- pkgs/development/python-modules/dash/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/dash/default.nix b/pkgs/development/python-modules/dash/default.nix index 6aaabe3c744a..db24500f25b2 100644 --- a/pkgs/development/python-modules/dash/default.nix +++ b/pkgs/development/python-modules/dash/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { pname = "dash"; - version = "2.4.1"; + version = "2.5.0"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -25,7 +25,7 @@ buildPythonPackage rec { owner = "plotly"; repo = pname; rev = "refs/tags/v${version}"; - sha256 = "sha256-7B1LEcEgUGJ/gDCDD4oURqli8I5YTJo9jl7l4E1aLVQ="; + sha256 = "sha256-Qh5oOkTxEbxXXDX+g9TDa5DiYBlMpnx0yKsn/XMfMF0="; }; propagatedBuildInputs = [ From 18aaa33f07a5193c18448d6f382a3c6662842ffc Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sun, 29 May 2022 15:45:15 +0200 Subject: [PATCH 072/148] =?UTF-8?q?ocamlPackages.elpi:=201.14.1=20?= =?UTF-8?q?=E2=86=92=201.15.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../development/ocaml-modules/elpi/default.nix | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/pkgs/development/ocaml-modules/elpi/default.nix b/pkgs/development/ocaml-modules/elpi/default.nix index 40d1c3d9b31c..098f9f3ca512 100644 --- a/pkgs/development/ocaml-modules/elpi/default.nix +++ b/pkgs/development/ocaml-modules/elpi/default.nix @@ -1,13 +1,16 @@ { lib , buildDunePackage, camlp5 +, ocaml +, menhir, menhirLib , re, perl, ncurses , ppxlib, ppx_deriving , ppxlib_0_15, ppx_deriving_0_15 , coqPackages -, version ? "1.14.1" +, version ? if lib.versionAtLeast ocaml.version "4.07" then "1.15.0" else "1.14.1" }: with lib; let fetched = coqPackages.metaFetch ({ + release."1.15.0".sha256 = "sha256:1ngdc41sgyzyz3i3lkzjhnj66gza5h912virkh077dyv17ysb6ar"; release."1.14.1".sha256 = "sha256-BZPVL8ymjrE9kVGyf6bpc+GA2spS5JBpkUtZi04nPis="; release."1.13.7".sha256 = "10fnwz30bsvj7ii1vg4l1li5pd7n0qqmwj18snkdr5j9gk0apc1r"; release."1.13.5".sha256 = "02a6r23mximrdvs6kgv6rp0r2dgk7zynbs99nn7lphw2c4189kka"; @@ -23,11 +26,16 @@ buildDunePackage rec { pname = "elpi"; inherit (fetched) version src; - minimumOCamlVersion = "4.04"; + minimalOCamlVersion = "4.04"; - buildInputs = [ perl ncurses ]; + buildInputs = [ perl ncurses ] + ++ optional (versionAtLeast version "1.15" || version == "dev") menhir; - propagatedBuildInputs = [ camlp5 re ] + propagatedBuildInputs = [ re ] + ++ (if versionAtLeast version "1.15" || version == "dev" + then [ menhirLib ] + else [ camlp5 ] + ) ++ (if lib.versionAtLeast version "1.13" || version == "dev" then [ ppxlib ppx_deriving ] else [ ppxlib_0_15 ppx_deriving_0_15 ] @@ -43,6 +51,4 @@ buildDunePackage rec { postPatch = '' substituteInPlace elpi_REPL.ml --replace "tput cols" "${ncurses}/bin/tput cols" ''; - - useDune2 = true; } From f7373e4932d73da83f6c59b8d28bf53faf97ca2f Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 7 Jun 2022 14:51:16 +0200 Subject: [PATCH 073/148] =?UTF-8?q?ocamlPackages.elpi:=201.15.0=20?= =?UTF-8?q?=E2=86=92=201.15.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Pierre Roux --- pkgs/development/ocaml-modules/elpi/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/elpi/default.nix b/pkgs/development/ocaml-modules/elpi/default.nix index 098f9f3ca512..3b133407c30a 100644 --- a/pkgs/development/ocaml-modules/elpi/default.nix +++ b/pkgs/development/ocaml-modules/elpi/default.nix @@ -2,14 +2,16 @@ , buildDunePackage, camlp5 , ocaml , menhir, menhirLib +, stdlib-shims , re, perl, ncurses , ppxlib, ppx_deriving , ppxlib_0_15, ppx_deriving_0_15 , coqPackages -, version ? if lib.versionAtLeast ocaml.version "4.07" then "1.15.0" else "1.14.1" +, version ? if lib.versionAtLeast ocaml.version "4.07" then "1.15.2" else "1.14.1" }: with lib; let fetched = coqPackages.metaFetch ({ + release."1.15.2".sha256 = "sha256-XgopNP83POFbMNyl2D+gY1rmqGg03o++Ngv3zJfCn2s="; release."1.15.0".sha256 = "sha256:1ngdc41sgyzyz3i3lkzjhnj66gza5h912virkh077dyv17ysb6ar"; release."1.14.1".sha256 = "sha256-BZPVL8ymjrE9kVGyf6bpc+GA2spS5JBpkUtZi04nPis="; release."1.13.7".sha256 = "10fnwz30bsvj7ii1vg4l1li5pd7n0qqmwj18snkdr5j9gk0apc1r"; @@ -31,7 +33,7 @@ buildDunePackage rec { buildInputs = [ perl ncurses ] ++ optional (versionAtLeast version "1.15" || version == "dev") menhir; - propagatedBuildInputs = [ re ] + propagatedBuildInputs = [ re stdlib-shims ] ++ (if versionAtLeast version "1.15" || version == "dev" then [ menhirLib ] else [ camlp5 ] From 66a532257d8ede0a0bb425bb412a96692415e920 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 3 Jun 2022 15:13:52 +0200 Subject: [PATCH 074/148] =?UTF-8?q?coqPackages.coq-elpi:=201.13.0=20?= =?UTF-8?q?=E2=86=92=201.14.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/coq-modules/coq-elpi/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/development/coq-modules/coq-elpi/default.nix b/pkgs/development/coq-modules/coq-elpi/default.nix index 03fe8c32d5c3..4b471b55b482 100644 --- a/pkgs/development/coq-modules/coq-elpi/default.nix +++ b/pkgs/development/coq-modules/coq-elpi/default.nix @@ -6,20 +6,21 @@ with builtins; with lib; let { case = "8.12"; out = { version = "1.12.0"; };} { case = "8.13"; out = { version = "1.13.7"; };} { case = "8.14"; out = { version = "1.13.7"; };} - { case = "8.15"; out = { version = "1.14.1"; };} - ] { version = "1.14.1"; } ); + { case = "8.15"; out = { version = "1.15.0"; };} + ] {} ); in mkCoqDerivation { pname = "elpi"; repo = "coq-elpi"; owner = "LPCIC"; inherit version; defaultVersion = lib.switch coq.coq-version [ - { case = "8.15"; out = "1.13.0"; } + { case = "8.15"; out = "1.14.0"; } { case = "8.14"; out = "1.11.2"; } { case = "8.13"; out = "1.11.1"; } { case = "8.12"; out = "1.8.3_8.12"; } { case = "8.11"; out = "1.6.3_8.11"; } ] null; + release."1.14.0".sha256 = "sha256:1v2p5dlpviwzky2i14cj7gcgf8cr0j54bdm9fl5iz1ckx60j6nvp"; release."1.13.0".sha256 = "1j7s7dlnjbw222gnbrsjgmjck1yrx7h6hwm8zikcyxi0zys17w7n"; release."1.12.1".sha256 = "sha256-4mO6/co7NcIQSGIQJyoO8lNWXr6dqz+bIYPO/G0cPkY="; release."1.11.2".sha256 = "0qk5cfh15y2zrja7267629dybd3irvxk1raz7z8qfir25a81ckd4"; From cf924c74c7f83ffadad77f3258d6986f84af3771 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 8 Jun 2022 09:57:47 +0200 Subject: [PATCH 075/148] python310Packages.quantum-gateway: 0.0.6 -> 0.0.8 --- .../python-modules/quantum-gateway/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/quantum-gateway/default.nix b/pkgs/development/python-modules/quantum-gateway/default.nix index 19b9ae22264a..272899a6bbbd 100644 --- a/pkgs/development/python-modules/quantum-gateway/default.nix +++ b/pkgs/development/python-modules/quantum-gateway/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "quantum-gateway"; - version = "0.0.6"; + version = "0.0.8"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "cisasteelersfan"; repo = "quantum_gateway"; rev = version; - sha256 = "f2LYOr9xJSfbA/1aHfll5lg7r05o855Zkkk9HuRamP8="; + hash = "sha256-jwLfth+UaisPR0p+UHfm6qMXT2eSYWnsYEp0BqyeI9U="; }; propagatedBuildInputs = [ @@ -39,6 +39,11 @@ buildPythonPackage rec { "quantum_gateway" ]; + disabledTests = [ + # Tests require network features + "TestGateway3100" + ]; + meta = with lib; { description = "Python library for interacting with Verizon Fios Quantum gateway devices"; homepage = "https://github.com/cisasteelersfan/quantum_gateway"; From b383999d5034dc6041e61b81a762c3d762dd6d7b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 8 Jun 2022 09:58:53 +0200 Subject: [PATCH 076/148] python310Packages.yolink-api: 0.0.7 -> 0.0.8 --- pkgs/development/python-modules/yolink-api/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/yolink-api/default.nix b/pkgs/development/python-modules/yolink-api/default.nix index 5dcfb9030550..17cd0d345faf 100644 --- a/pkgs/development/python-modules/yolink-api/default.nix +++ b/pkgs/development/python-modules/yolink-api/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "yolink-api"; - version = "0.0.7"; + version = "0.0.8"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "YoSmart-Inc"; repo = pname; rev = "v${version}"; - hash = "sha256-zdCHKckt28abeJ6PQjX50e/4wOl/xx0TKFEQaUIqrYo="; + hash = "sha256-jKyugylgV9B8+PxUPsz4YtQjCfhB8NA2BYMxJOqkIP8="; }; propagatedBuildInputs = [ From 2f9d125d5820ead05c19aa2eeb1a695451958b64 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 8 Jun 2022 09:03:34 +0100 Subject: [PATCH 077/148] gpredict: pull upstream fix for -fno-common toolchains Without the change build fails on upstream gcc-10 as: ld: save-pass.o:src/qth-data.h:36: multiple definition of `qth_data_type'; gtk-azel-plot.o:src/qth-data.h:36: first defined here --- .../science/astronomy/gpredict/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/science/astronomy/gpredict/default.nix b/pkgs/applications/science/astronomy/gpredict/default.nix index 3f82ff7b52a8..1fd2d4ac2adc 100644 --- a/pkgs/applications/science/astronomy/gpredict/default.nix +++ b/pkgs/applications/science/astronomy/gpredict/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, pkg-config, intltool +{ lib, stdenv, fetchurl, fetchpatch, pkg-config, intltool , gtk3, glib, curl, goocanvas2, gpsd , hamlib, wrapGAppsHook }: @@ -14,6 +14,16 @@ in stdenv.mkDerivation { sha256 = "0hwf97kng1zy8rxyglw04x89p0bg07zq30hgghm20yxiw2xc8ng7"; }; + patches = [ + # Pull upstream fix for -fno-common toolchains: + # https://github.com/csete/gpredict/issues/195 + (fetchpatch { + name = "fno-common.patch"; + url = "https://github.com/csete/gpredict/commit/c565bb3d48777bfe17114b5d01cd81150521f056.patch"; + sha256 = "1jhy9hpqlachq32bkij60q3dxkgi1kkr80rm29jjxqpmambf406a"; + }) + ]; + nativeBuildInputs = [ pkg-config intltool wrapGAppsHook ]; buildInputs = [ curl glib gtk3 goocanvas2 gpsd hamlib ]; From 9dfb84032067505dba8f5771e8cf6090c19c3083 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 8 Jun 2022 10:11:37 +0200 Subject: [PATCH 078/148] python310Packages.dash: add extra dependencies --- .../python-modules/dash/default.nix | 38 ++++++++++++++----- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/dash/default.nix b/pkgs/development/python-modules/dash/default.nix index db24500f25b2..d29a6321623b 100644 --- a/pkgs/development/python-modules/dash/default.nix +++ b/pkgs/development/python-modules/dash/default.nix @@ -1,17 +1,21 @@ { lib -, buildPythonPackage -, fetchFromGitHub -, plotly -, flask -, flask-compress +, celery , dash-core-components , dash-html-components , dash-table -, pytest-mock +, diskcache +, fetchFromGitHub +, flask +, flask-compress , mock -, pyyaml +, multiprocess +, plotly +, psutil +, pytest-mock , pytestCheckHook , pythonOlder +, pyyaml +, redis }: buildPythonPackage rec { @@ -25,7 +29,7 @@ buildPythonPackage rec { owner = "plotly"; repo = pname; rev = "refs/tags/v${version}"; - sha256 = "sha256-Qh5oOkTxEbxXXDX+g9TDa5DiYBlMpnx0yKsn/XMfMF0="; + hash = "sha256-Qh5oOkTxEbxXXDX+g9TDa5DiYBlMpnx0yKsn/XMfMF0="; }; propagatedBuildInputs = [ @@ -37,6 +41,18 @@ buildPythonPackage rec { dash-table ]; + passthru.optional-dependencies = { + celery = [ + celery + redis + ]; + diskcache = [ + diskcache + multiprocess + psutil + ]; + }; + checkInputs = [ pytestCheckHook pytest-mock @@ -50,12 +66,14 @@ buildPythonPackage rec { "tests/integration" ]; - pythonImportsCheck = [ "dash" ]; + pythonImportsCheck = [ + "dash" + ]; meta = with lib; { description = "Python framework for building analytical web applications"; homepage = "https://dash.plot.ly/"; license = licenses.mit; - maintainers = [ maintainers.antoinerg ]; + maintainers = with maintainers; [ antoinerg ]; }; } From e6b4eb3b78c949d7e3e05badbe90cc792d9d5c52 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 1 Jun 2022 06:50:34 +0200 Subject: [PATCH 079/148] =?UTF-8?q?qarte:=204.15.1=20=E2=86=92=204.17.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/applications/video/qarte/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/video/qarte/default.nix b/pkgs/applications/video/qarte/default.nix index 5fc62912c24a..dd2a7dadc2f7 100644 --- a/pkgs/applications/video/qarte/default.nix +++ b/pkgs/applications/video/qarte/default.nix @@ -1,15 +1,15 @@ { mkDerivation, lib, fetchbzr, python3, rtmpdump }: let - pythonEnv = python3.withPackages (ps: with ps; [ pyqt5_with_qtmultimedia ]); + pythonEnv = python3.withPackages (ps: with ps; [ m3u8 pyqt5_with_qtmultimedia ]); in mkDerivation { pname = "qarte"; - version = "4.15.1"; + version = "4.17.1"; src = fetchbzr { url = "http://bazaar.launchpad.net/~vincent-vandevyvre/qarte/qarte-4"; - rev = "67"; - sha256 = "sha256:0ajvrvpyqyyxnq9nv69p3sr6c1kplphvrpph75k76yl0av94j2s3"; + rev = "74"; + sha256 = "sha256:18ky9qwfvbifd0xrbmnfm3cm2vyy5jgf9rrca2hby46sjf2745h4"; }; buildInputs = [ pythonEnv ]; From 788a347a174df3c1a0bc3710e45b5d053ef6a817 Mon Sep 17 00:00:00 2001 From: Pascal Wittmann Date: Thu, 2 Jun 2022 23:10:37 +0200 Subject: [PATCH 080/148] stuntrally: 2.6.1 -> 2.6.2 This update also fixes the build problems reported in #175646. --- pkgs/games/stuntrally/default.nix | 10 +++------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/pkgs/games/stuntrally/default.nix b/pkgs/games/stuntrally/default.nix index 64e2dcc379b1..537a3f83a036 100644 --- a/pkgs/games/stuntrally/default.nix +++ b/pkgs/games/stuntrally/default.nix @@ -18,25 +18,21 @@ stdenv.mkDerivation rec { pname = "stunt-rally"; - version = "2.6.1"; + version = "2.6.2"; src = fetchFromGitHub { owner = "stuntrally"; repo = "stuntrally"; rev = version; - hash = "sha256-1+Cc9I6TTa3b++/7Z2V+vAXcmFb2+wX7TnXEH6CRDWU="; + hash = "sha256-9I6hXsosqx+yYiEOEnPXQJHZkGtSU+JqThorwjemlc0="; }; tracks = fetchFromGitHub { owner = "stuntrally"; repo = "tracks"; rev = version; - hash = "sha256-FbZc87j/9cp4LxNaEO2wNTvwk1Aq/IWcKD3rTGkzqj0="; + hash = "sha256-eZJAvkKe3PrXDzxTa5WFBHfltB3jhQh8puzOFDO9lso="; }; - # include/OGRE/OgreException.h:265:126: error: invalid conversion from - # 'int' to 'Ogre::Exception::ExceptionCodes' [-fpermissive] - NIX_CFLAGS_COMPILE = "-fpermissive"; - preConfigure = '' ln -s ${tracks} data/tracks ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 19165528cefc..60fecba06a11 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -32305,7 +32305,7 @@ with pkgs; stt = callPackage ../tools/audio/stt { }; stuntrally = callPackage ../games/stuntrally - { stdenv = gcc10StdenvCompat; ogre = ogre1_9; mygui = mygui.override { withOgre = true; }; }; + { ogre = ogre1_9; mygui = mygui.override { withOgre = true; }; }; superTux = callPackage ../games/supertux { }; From 08ff8db9b984aeda984e232b18d6cfbbc69d2dd3 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 8 Jun 2022 08:14:35 +0000 Subject: [PATCH 081/148] python310Packages.spacy: 3.3.0 -> 3.3.1 --- pkgs/development/python-modules/spacy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/spacy/default.nix b/pkgs/development/python-modules/spacy/default.nix index 40bd609520f6..ee8b773c8b85 100644 --- a/pkgs/development/python-modules/spacy/default.nix +++ b/pkgs/development/python-modules/spacy/default.nix @@ -31,14 +31,14 @@ buildPythonPackage rec { pname = "spacy"; - version = "3.3.0"; + version = "3.3.1"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-xJ1Q++NxWtxXQUGTZ7OaRo0lVmSEIvELb8Tt846uLLM="; + hash = "sha256-f4fb2xBNhRrmul/Tp2ouFOIuBIE1kD6YuvCFcaOqgcA="; }; propagatedBuildInputs = [ From e0d8c56200fd7ec9a325dd80a8f4ef5a8de9209b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 8 Jun 2022 10:15:06 +0200 Subject: [PATCH 082/148] python310Packages.dash: add input --- pkgs/development/python-modules/dash/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/dash/default.nix b/pkgs/development/python-modules/dash/default.nix index d29a6321623b..eb2e64191091 100644 --- a/pkgs/development/python-modules/dash/default.nix +++ b/pkgs/development/python-modules/dash/default.nix @@ -1,4 +1,5 @@ { lib +, buildPythonPackage , celery , dash-core-components , dash-html-components From b246d54635583a058e31c8d28a552d7723669560 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Wed, 8 Jun 2022 12:05:43 +1000 Subject: [PATCH 083/148] buildGoModule: remove `runVend` follow up from 8a8c88de70bd7f967cb20ad07583ea9ef12a4a94 --- pkgs/development/go-modules/generic/default.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix index 4dff2d82848d..7cab5d38c7b3 100644 --- a/pkgs/development/go-modules/generic/default.nix +++ b/pkgs/development/go-modules/generic/default.nix @@ -41,9 +41,6 @@ , meta ? {} -# disabled -, runVend ? false - # Not needed with buildGoModule , goPackagePath ? "" @@ -55,8 +52,6 @@ with builtins; -assert runVend != false -> throw "`runVend` has been replaced by `proxyVendor`"; - assert goPackagePath != "" -> throw "`goPackagePath` is not needed with `buildGoModule`"; let From cb6b96591e3c9857ae4f0acebd1261daa6fd57cd Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Wed, 8 Jun 2022 12:05:54 +1000 Subject: [PATCH 084/148] vend: remove this is no longer used by `buildGoModule` --- pkgs/development/tools/vend/default.nix | 37 ------------------- pkgs/development/tools/vend/remove_tidy.patch | 13 ------- pkgs/top-level/all-packages.nix | 2 - 3 files changed, 52 deletions(-) delete mode 100644 pkgs/development/tools/vend/default.nix delete mode 100644 pkgs/development/tools/vend/remove_tidy.patch diff --git a/pkgs/development/tools/vend/default.nix b/pkgs/development/tools/vend/default.nix deleted file mode 100644 index 0b037a9068c1..000000000000 --- a/pkgs/development/tools/vend/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ lib, buildGoModule, fetchFromGitHub }: - -buildGoModule rec { - pname = "vend"; - - /* - This package is used to generate vendor folders for - packages that use the `runVend` option with `buildGoModule`. - - Do not update this package without checking that the vendorSha256 - hashes of packages using the `runVend` option are unchanged - or updating their vendorSha256 hashes if necessary. - */ - version = "1.0.2"; - # Disable the bot - # nixpkgs-update: no auto update - - # Disable `mod tidy`, patch was refused upstream - # https://github.com/nomad-software/vend/pull/9 - patches = [ ./remove_tidy.patch ]; - - src = fetchFromGitHub { - owner = "nomad-software"; - repo = "vend"; - rev = "v${version}"; - sha256 = "0h9rwwb56nzs46xsvl92af71i8b3wz3pf9ngi8v0i2bpk7p3p89d"; - }; - - vendorSha256 = null; - - meta = with lib; { - homepage = "https://github.com/nomad-software/vend"; - description = "A utility which vendors go code including c dependencies"; - maintainers = with maintainers; [ c00w mic92 zowoq ]; - license = licenses.mit; - }; -} diff --git a/pkgs/development/tools/vend/remove_tidy.patch b/pkgs/development/tools/vend/remove_tidy.patch deleted file mode 100644 index d5db74a1bd70..000000000000 --- a/pkgs/development/tools/vend/remove_tidy.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cli/cmd.go b/cli/cmd.go -index c766559..3a133fd 100644 ---- a/cli/cmd.go -+++ b/cli/cmd.go -@@ -12,7 +12,7 @@ import ( - // UpdateModule makes sure the module is updated ready to vendor the - // dependencies. - func UpdateModule() { -- var commands = []string{"tidy", "download", "vendor"} -+ var commands = []string{"download", "vendor"} - - for _, command := range commands { - cmd := exec.Command("go", "mod", command) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fbe82143c24e..a3f93bdfe181 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11288,8 +11288,6 @@ with pkgs; vcstool = callPackage ../development/tools/vcstool { }; - vend = callPackage ../development/tools/vend { }; - verco = callPackage ../applications/version-management/verco { }; verilator = callPackage ../applications/science/electronics/verilator {}; From 7f76c1989ced4303e8f6e248808e381d528beccd Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 8 Jun 2022 12:05:07 +0200 Subject: [PATCH 085/148] nuclei: 2.7.1 -> 2.7.2 --- pkgs/tools/security/nuclei/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/nuclei/default.nix b/pkgs/tools/security/nuclei/default.nix index 076b907d880e..8487d8a26050 100644 --- a/pkgs/tools/security/nuclei/default.nix +++ b/pkgs/tools/security/nuclei/default.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "nuclei"; - version = "2.7.1"; + version = "2.7.2"; src = fetchFromGitHub { owner = "projectdiscovery"; repo = pname; rev = "v${version}"; - sha256 = "sha256-ra8BxM+zpe5UKlJ28wc8yE5ta4ro4o2OHfmu9fBqFTA="; + sha256 = "sha256-knpsoDVDGxG85YiD7pc+XDV7BgCSpNRFRuN+qM3Gv/U="; }; - vendorSha256 = "sha256-4E9nHBaojkOwnSPxRn2JGFcQTF4WowTOtzE5zRjkqhk="; + vendorSha256 = "sha256-e17QpSXttso1crvBj0vrfuJliIDcXoXJzWt87ulSZXQ="; modRoot = "./v2"; subPackages = [ From 80755988848e1ab4b08fb026e1652ff50ab54b65 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Tue, 7 Jun 2022 15:17:26 +1000 Subject: [PATCH 086/148] terraform: add passthru.tests --- pkgs/applications/networking/cluster/terraform/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/cluster/terraform/default.nix b/pkgs/applications/networking/cluster/terraform/default.nix index 2df294449f8b..0532dd84868b 100644 --- a/pkgs/applications/networking/cluster/terraform/default.nix +++ b/pkgs/applications/networking/cluster/terraform/default.nix @@ -196,7 +196,10 @@ rec { sha256 = "sha256-LkRCumyNHVBSsXRp1ovNMGCeidK/jVCjh9H1HSE1Lm8="; vendorSha256 = "sha256-CVgAmPM0nt0Wx+N0qs+IO5KwCWnbfif70EHjBi0bIsQ="; patches = [ ./provider-path-0_15.patch ]; - passthru = { inherit plugins; }; + passthru = { + inherit plugins; + tests = { inherit terraform_plugins_test; }; + }; }; # Tests that the plugins are being used. Terraform looks at the specific From 316f6d73684e083331659f0329d189392098dc31 Mon Sep 17 00:00:00 2001 From: zendo Date: Wed, 8 Jun 2022 19:33:04 +0800 Subject: [PATCH 087/148] ydict: 2.2.0 -> 2.2.1 --- pkgs/applications/misc/ydict/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/ydict/default.nix b/pkgs/applications/misc/ydict/default.nix index 49370870f692..9440c2368100 100644 --- a/pkgs/applications/misc/ydict/default.nix +++ b/pkgs/applications/misc/ydict/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "ydict"; - version = "2.2.0"; + version = "2.2.1"; src = fetchFromGitHub { owner = "TimothyYe"; repo = "ydict"; rev = "v${version}"; - sha256 = "sha256-zhjsXZsRk0UNijjqjGjZh4TiPxAM5p+ic3JMx2wrPeY="; + sha256 = "sha256-qrGOrqI+PXsDNCmgcCPDNn6qUYu2emhYSkYsz4sj27M="; }; - vendorSha256 = "sha256-O6czDfKD18rGVMIZv6II09oQu1w0ijQRuZRGt2gj9Cs="; + vendorSha256 = "sha256-c5nQVQd4n978kFAAKcx5mX2Jz16ZOhS8iL/oxS1o5xs="; ldflags = [ "-s" "-w" "-X=main.Version=${version}" ]; From ff953a72adfb4c3ca6548e358984a92986ad449d Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 8 Jun 2022 11:54:48 +0000 Subject: [PATCH 088/148] python310Packages.canonicaljson: 1.6.1 -> 1.6.2 --- pkgs/development/python-modules/canonicaljson/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/canonicaljson/default.nix b/pkgs/development/python-modules/canonicaljson/default.nix index d613bb9e8970..e5ecff7837f9 100644 --- a/pkgs/development/python-modules/canonicaljson/default.nix +++ b/pkgs/development/python-modules/canonicaljson/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "canonicaljson"; - version = "1.6.1"; + version = "1.6.2"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-qTZk9phVbb1Lq5w/xPs1g0zyU12h6gC2t3WNj+K7uCQ="; + hash = "sha256-rwC+jOnFiYV98Xa7lFlPDUOw4CfwJ6jXz4l4/bgZAko="; }; propagatedBuildInputs = [ From a2e09a870383da5109f1d8b09c12031abc1a041c Mon Sep 17 00:00:00 2001 From: Mr Hedgehog Date: Wed, 8 Jun 2022 08:27:08 -0400 Subject: [PATCH 089/148] zellij: 0.29.1 -> 0.30.0 --- pkgs/tools/misc/zellij/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/misc/zellij/default.nix b/pkgs/tools/misc/zellij/default.nix index 421c7d21d305..a97402e7ba90 100644 --- a/pkgs/tools/misc/zellij/default.nix +++ b/pkgs/tools/misc/zellij/default.nix @@ -15,16 +15,16 @@ rustPlatform.buildRustPackage rec { pname = "zellij"; - version = "0.29.1"; + version = "0.30.0"; src = fetchFromGitHub { owner = "zellij-org"; repo = "zellij"; rev = "v${version}"; - sha256 = "sha256-KuelmMQdCazwTlolH5xvvNXZfzHQDUV6rrlk037GFb8="; + sha256 = "sha256-T2mkkE7z6AhHnn/77HcrvbY+32EOwE8jjh+veVOE1CY="; }; - cargoSha256 = "sha256-He8rMY8n15ZSF/GcbuYTx2JfZgqQnsZLfqP+lUYxnzw="; + cargoSha256 = "sha256-XTaQbMK7R43CE03niUaBzlYN4xRo7pUFdNYvUeA+MwA="; nativeBuildInputs = [ mandown @@ -61,6 +61,6 @@ rustPlatform.buildRustPackage rec { homepage = "https://zellij.dev/"; changelog = "https://github.com/zellij-org/zellij/blob/v${version}/Changelog.md"; license = with licenses; [ mit ]; - maintainers = with maintainers; [ therealansh _0x4A6F abbe ]; + maintainers = with maintainers; [ therealansh _0x4A6F abbe thehedgeh0g ]; }; } From b54c34e4584a6605dc96d89af438a137108ef40d Mon Sep 17 00:00:00 2001 From: Mr Hedgehog Date: Wed, 8 Jun 2022 08:29:17 -0400 Subject: [PATCH 090/148] mprocs: 0.2.2 -> 0.4.0 --- pkgs/tools/misc/mprocs/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/misc/mprocs/default.nix b/pkgs/tools/misc/mprocs/default.nix index 2a14f252f4ad..a91b2a4d6acb 100644 --- a/pkgs/tools/misc/mprocs/default.nix +++ b/pkgs/tools/misc/mprocs/default.nix @@ -2,21 +2,21 @@ rustPlatform.buildRustPackage rec { pname = "mprocs"; - version = "0.2.2"; + version = "0.4.0"; src = fetchFromGitHub { owner = "pvolok"; repo = pname; rev = "v${version}"; - sha256 = "sha256-9wac2jlh8MLggcYuEHVUPYPjhfzGN+4o1XT8B9pj4f8="; + sha256 = "sha256-IzaXcEm4eUpLWsn59ZSiIJ0mCegLhBiA3ONKI1Djemk="; }; - cargoSha256 = "sha256-vGhoM5VMJO+ppLk8DetNZ8UteU6ifdtRe1HNJ0dSB+0="; + cargoSha256 = "sha256-nTFCFmmS3IIm+D2PjvDxUKQGTn2h0ajXtxLuosa9rRY="; meta = with lib; { description = "A TUI tool to run multiple commands in parallel and show the output of each command separately"; homepage = "https://github.com/pvolok/mprocs"; license = licenses.mit; - maintainers = [ maintainers.GaetanLepage ]; + maintainers = with maintainers; [ GaetanLepage thehedgeh0g ]; }; } From 34b85dfb8503442a85e68a9d8ccaa7246ca3e9ef Mon Sep 17 00:00:00 2001 From: linj Date: Wed, 8 Jun 2022 19:36:52 +0800 Subject: [PATCH 091/148] nixos/ibus: fix services.dbus.package --- nixos/modules/i18n/input-method/ibus.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/i18n/input-method/ibus.nix b/nixos/modules/i18n/input-method/ibus.nix index c5b0cbc21502..d9d9864ab9e0 100644 --- a/nixos/modules/i18n/input-method/ibus.nix +++ b/nixos/modules/i18n/input-method/ibus.nix @@ -67,7 +67,7 @@ in programs.dconf.packages = [ ibusPackage ]; services.dbus.packages = [ - ibusAutostart + ibusPackage ]; environment.variables = { From 4b273cb243a93f026a478241c988f6e4a5c6ec6a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 12 Mar 2022 16:38:50 +0000 Subject: [PATCH 092/148] ispell: 3.4.04 -> 3.4.05 --- pkgs/tools/text/ispell/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/text/ispell/default.nix b/pkgs/tools/text/ispell/default.nix index 9a3f37cc64a5..6a004253a4f0 100644 --- a/pkgs/tools/text/ispell/default.nix +++ b/pkgs/tools/text/ispell/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "ispell"; - version = "3.4.04"; + version = "3.4.05"; src = fetchurl { url = "https://www.cs.hmc.edu/~geoff/tars/${pname}-${version}.tar.gz"; - sha256 = "sha256-h7zW8FIdhaCjp4NCFZVtdOvEkxRMx8eR+HvmhyzP4T4="; + sha256 = "sha256-zwxt7eP9JfraQ3XYasr+WDy5bY/lRt50apLrtt+JVgI="; }; buildInputs = [ bison ncurses ]; From 04dcb539343c0c9ab57575d241d8a7f196d7cbc8 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 8 Jun 2022 08:03:49 +0000 Subject: [PATCH 093/148] picard: 2.8 -> 2.8.1 --- pkgs/applications/audio/picard/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/picard/default.nix b/pkgs/applications/audio/picard/default.nix index aff62e96576a..481f151ed561 100644 --- a/pkgs/applications/audio/picard/default.nix +++ b/pkgs/applications/audio/picard/default.nix @@ -18,13 +18,13 @@ let in pythonPackages.buildPythonApplication rec { pname = "picard"; - version = "2.8"; + version = "2.8.1"; src = fetchFromGitHub { owner = "metabrainz"; repo = pname; rev = "refs/tags/release-${version}"; - sha256 = "sha256-DG5b3mw6AL4HSF3diGXOqIeH/eXGqLOsbcnPbD6kznE="; + sha256 = "sha256-KEKOouTNmmZiPyKo8xCQv6Zkreidtz2DaEbHjuwJJvY="; }; nativeBuildInputs = [ gettext qt5.wrapQtAppsHook qt5.qtbase ] From c0b05f106f816fd1dfe9a3ad71beb06f2d9bd1b5 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 8 Jun 2022 13:46:26 +0000 Subject: [PATCH 094/148] nixos/localtime: add missing mkRenamedOptionModule Fixes: ffae8569b01 ("nixos/localtimed: hopefully fix geoclue") --- nixos/modules/services/system/localtime.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/system/localtime.nix b/nixos/modules/services/system/localtime.nix index 6383e454e76b..689453375f5a 100644 --- a/nixos/modules/services/system/localtime.nix +++ b/nixos/modules/services/system/localtime.nix @@ -5,6 +5,8 @@ with lib; let cfg = config.services.localtimed; in { + imports = [ (lib.mkRenamedOptionModule [ "services" "localtime" ] [ "services" "localtimed" ]) ]; + options = { services.localtimed = { enable = mkOption { From 13712fce0efb0987a22e9780343c23a930621c2e Mon Sep 17 00:00:00 2001 From: necrophcodr Date: Mon, 6 Jun 2022 17:17:26 +0200 Subject: [PATCH 095/148] gmqcc: init at unstable-2021-07-09 --- maintainers/maintainer-list.nix | 6 +++ pkgs/development/compilers/gmqcc/default.nix | 43 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 51 insertions(+) create mode 100644 pkgs/development/compilers/gmqcc/default.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 34300227f125..69380e4c42d6 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -9091,6 +9091,12 @@ githubId = 3747396; name = "Nathan Isom"; }; + necrophcodr = { + email = "nc@scalehost.eu"; + github = "necrophcodr"; + githubId = 575887; + name = "Steffen Rytter Postas"; + }; neilmayhew = { email = "nix@neil.mayhew.name"; github = "neilmayhew"; diff --git a/pkgs/development/compilers/gmqcc/default.nix b/pkgs/development/compilers/gmqcc/default.nix new file mode 100644 index 000000000000..f3b25e2dbd4a --- /dev/null +++ b/pkgs/development/compilers/gmqcc/default.nix @@ -0,0 +1,43 @@ +{ lib +, pkgs +, stdenv +, fetchFromGitHub +}: + +stdenv.mkDerivation rec { + pname = "gmqcc"; + version = "unstable-2021-07-09"; + + src = fetchFromGitHub { + owner = "graphitemaster"; + repo = "gmqcc"; + rev = "297eab9e5e2c9cc4f41201b68821593a5cf9a725"; + sha256 = "1hl2qn7402ia03kjkblj4q4wfypxkil99sivsyk2vrnwwpdp4nzx"; + }; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + install -m755 gmqcc $out/bin + + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://graphitemaster.github.io/gmqcc/"; + description = "A modern QuakeC compiler"; + longDescription = '' + For an enduring period of time the options for a decent compiler for + the Quake C programming language were confined to a specific compiler + known as QCC. Attempts were made to extend and improve upon the design + of QCC, but many foreseen the consequences of building on a broken + foundation. The solution was obvious, a new compiler; one born from + the NIH realm of sarcastic wit. + We welcome you. You won't find a better Quake C compiler. + ''; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ necrophcodr ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c428c25fdaf6..ee7693517faf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13020,6 +13020,8 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Security; }; + gmqcc = callPackage ../development/compilers/gmqcc {}; + gtk-server = callPackage ../development/interpreters/gtk-server {}; # Haskell and GHC From b31db15de008f0a8f5f62c5e477c69165d8458a1 Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Wed, 8 Jun 2022 15:57:41 +0200 Subject: [PATCH 096/148] firejail: patches for CVE-2022-31214 https://seclists.org/oss-sec/2022/q2/188 --- pkgs/os-specific/linux/firejail/default.nix | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/pkgs/os-specific/linux/firejail/default.nix b/pkgs/os-specific/linux/firejail/default.nix index bbb3a1daab69..a8188caf18be 100644 --- a/pkgs/os-specific/linux/firejail/default.nix +++ b/pkgs/os-specific/linux/firejail/default.nix @@ -53,6 +53,29 @@ stdenv.mkDerivation rec { # Upstream fix: https://github.com/netblue30/firejail/pull/5132 # Hopefully fixed upstream in version > 0.9.68 ./fix-opengl-support.patch + + # Fix CVE-2022-31214 by patching in 4 commits from upstream + # https://seclists.org/oss-sec/2022/q2/188 + (fetchpatch { + name = "CVE-2022-31214-patch1"; # "fixing CVE-2022-31214" + url = "https://github.com/netblue30/firejail/commit/27cde3d7d1e4e16d4190932347c7151dc2a84c50.patch"; + sha256 = "sha256-XXmnYCn4TPUvU43HifZDk4tEZQvOho9/7ehU6889nN4="; + }) + (fetchpatch { + name = "CVE-2022-31214-patch2"; # "shutdown testing" + url = "https://github.com/netblue30/firejail/commit/04ff0edf74395ddcbbcec955279c74ed9a6c0f86.patch"; + sha256 = "sha256-PV73hRlvYEQihuljSCQMNO34KJ0hDVFexhirpHcTK1I="; + }) + (fetchpatch { + name = "CVE-2022-31214-patch3"; # "CVE-2022-31214: fixing the fix" + url = "https://github.com/netblue30/firejail/commit/dab835e7a0eb287822016f5ae4e87f46e1d363e7.patch"; + sha256 = "sha256-6plBIliW/nLKR7TdGeB88eQ65JHEasnaRsP3HPXAFyA="; + }) + (fetchpatch { + name = "CVE-2022-31214-patch4"; # "CVE-2022-31214: fixing the fix, one more time " + url = "https://github.com/netblue30/firejail/commit/1884ea22a90d225950d81c804f1771b42ae55f54.patch"; + sha256 = "sha256-inkpcdC5rl5w+CTAwwQVBOELlHTXb8UGlpU+8kMY95s="; + }) ]; prePatch = '' From 964abb96d19d5def08f7249300c8ba8c47ed7fc5 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 8 Jun 2022 14:57:58 +0000 Subject: [PATCH 097/148] python310Packages.fastapi-mail: 1.0.8 -> 1.0.9 --- pkgs/development/python-modules/fastapi-mail/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/fastapi-mail/default.nix b/pkgs/development/python-modules/fastapi-mail/default.nix index fabc32412669..9ce21b794927 100644 --- a/pkgs/development/python-modules/fastapi-mail/default.nix +++ b/pkgs/development/python-modules/fastapi-mail/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { pname = "fastapi-mail"; - version = "1.0.8"; + version = "1.0.9"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -27,8 +27,8 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "sabuhish"; repo = pname; - rev = version; - hash = "sha256-PkA7qkdDUd7mrtvb6IbCzFRq6X0M3iKY+FKuNConJ5A="; + rev = "refs/tags/${version}"; + hash = "sha256-2Nb+FzmhsKvauT/yOCLHCEld8r+6niu9kV6EmjhC6S0="; }; nativeBuildInputs = [ From aa40fe91ba0c702054add4c7fd6ba387bc812383 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 8 Jun 2022 15:08:14 +0000 Subject: [PATCH 098/148] python310Packages.fido2: 0.9.3 -> 1.0.0 --- pkgs/development/python-modules/fido2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/fido2/default.nix b/pkgs/development/python-modules/fido2/default.nix index e550fe89ec78..129d18639234 100644 --- a/pkgs/development/python-modules/fido2/default.nix +++ b/pkgs/development/python-modules/fido2/default.nix @@ -9,11 +9,11 @@ buildPythonPackage rec { pname = "fido2"; - version = "0.9.3"; + version = "1.0.0"; src = fetchPypi { inherit pname version; - sha256 = "b45e89a6109cfcb7f1bb513776aa2d6408e95c4822f83a253918b944083466ec"; + sha256 = "sha256-JQmklYtmbXR/1XVN+pNX2i2BtS7cDs/3W2jOqTkVTAI="; }; propagatedBuildInputs = [ six cryptography ]; From 1c8f27c9339db47a88b8efbf9e542ae5f179933b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 8 Jun 2022 15:43:01 +0000 Subject: [PATCH 099/148] python310Packages.pre-commit-hooks: 4.2.0 -> 4.3.0 --- pkgs/development/python-modules/pre-commit-hooks/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pre-commit-hooks/default.nix b/pkgs/development/python-modules/pre-commit-hooks/default.nix index db598b368c5b..acf827903774 100644 --- a/pkgs/development/python-modules/pre-commit-hooks/default.nix +++ b/pkgs/development/python-modules/pre-commit-hooks/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "pre-commit-hooks"; - version = "4.2.0"; + version = "4.3.0"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "pre-commit"; repo = pname; rev = "refs/tags/v${version}"; - sha256 = "sha256-jSu4LutEgpeAbCgSHgk6VXQKLZo00T3TrQVZxsNU1co="; + sha256 = "sha256-qdsSM+7ScSfxhmLAqwi1iraGHrhb5NBee/j+TKr2WUA="; }; propagatedBuildInputs = [ From ecf2791d8b2a53d72545fc3650b1386f7284c064 Mon Sep 17 00:00:00 2001 From: Pierre Roux Date: Wed, 8 Jun 2022 14:38:58 +0200 Subject: [PATCH 100/148] coq_8_16: init at 8.16+rc1 --- pkgs/applications/science/logic/coq/default.nix | 1 + pkgs/development/coq-modules/bignums/default.nix | 1 + pkgs/top-level/all-packages.nix | 1 + pkgs/top-level/coq-packages.nix | 2 ++ 4 files changed, 5 insertions(+) diff --git a/pkgs/applications/science/logic/coq/default.nix b/pkgs/applications/science/logic/coq/default.nix index c85bcd21a0cc..f91b336cbf6f 100644 --- a/pkgs/applications/science/logic/coq/default.nix +++ b/pkgs/applications/science/logic/coq/default.nix @@ -49,6 +49,7 @@ let "8.15.0".sha256 = "sha256:1ma76wfrpfsl72yh10w1ys2a0vi0mdc2jc79kdc8nrmxkhpw1nxx"; "8.15.1".sha256 = "sha256:1dsa04jzkx5pw69pmxn0l55q4w88lg6fvz7clbga0bazzsfnsgd6"; "8.15.2".sha256 = "sha256:0gn8dz69scxnxaq6ycb3x34bjfk9wlp1y2xn8w69kg9fm4b6gkc7"; + "8.16+rc1".sha256 = "sha256-dU+E0Mz7MVntbQIeG9I59ANBaHaXXSrjCRdoqZ5TO60="; }; releaseRev = v: "V${v}"; fetched = import ../../../../build-support/coq/meta-fetch/default.nix diff --git a/pkgs/development/coq-modules/bignums/default.nix b/pkgs/development/coq-modules/bignums/default.nix index a53b8199fe96..798ea04368f8 100644 --- a/pkgs/development/coq-modules/bignums/default.nix +++ b/pkgs/development/coq-modules/bignums/default.nix @@ -8,6 +8,7 @@ with lib; mkCoqDerivation { defaultVersion = if versions.isGe "8.6" coq.coq-version then "${coq.coq-version}.0" else null; + release."8.16.0".sha256 = "sha256-DH3iWwatPlhhCVYVlgL2WLkvneSVzSXUiKo2e0+1zR4="; release."8.15.0".sha256 = "093klwlhclgyrba1iv18dyz1qp5f0lwiaa7y0qwvgmai8rll5fns"; release."8.14.0".sha256 = "0jsgdvj0ddhkls32krprp34r64y1rb5mwxl34fgaxk2k4664yq06"; release."8.13.0".sha256 = "1n66i7hd9222b2ks606mak7m4f0dgy02xgygjskmmav6h7g2sx7y"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 73693bab099b..72a7e29afb85 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33249,6 +33249,7 @@ with pkgs; coqPackages_8_13 coq_8_13 coqPackages_8_14 coq_8_14 coqPackages_8_15 coq_8_15 + coqPackages_8_16 coq_8_16 coqPackages coq ; diff --git a/pkgs/top-level/coq-packages.nix b/pkgs/top-level/coq-packages.nix index 6cfd34aa279b..91894bfaa9e7 100644 --- a/pkgs/top-level/coq-packages.nix +++ b/pkgs/top-level/coq-packages.nix @@ -151,6 +151,7 @@ in rec { coq_8_13 = mkCoq "8.13"; coq_8_14 = mkCoq "8.14"; coq_8_15 = mkCoq "8.15"; + coq_8_16 = mkCoq "8.16"; coqPackages_8_5 = mkCoqPackages coq_8_5; coqPackages_8_6 = mkCoqPackages coq_8_6; @@ -163,6 +164,7 @@ in rec { coqPackages_8_13 = mkCoqPackages coq_8_13; coqPackages_8_14 = mkCoqPackages coq_8_14; coqPackages_8_15 = mkCoqPackages coq_8_15; + coqPackages_8_16 = mkCoqPackages coq_8_16; coqPackages = recurseIntoAttrs coqPackages_8_15; coq = coqPackages.coq; From 74562a214ef5052e475baf29db5f92f0ae891093 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 8 Jun 2022 17:12:16 +0000 Subject: [PATCH 101/148] lib.systems.amd64-netbsd: remove This has been deprecated for a long time, and it's doubtful it had any users to start with. And having an undisablable warning when enumarating platforms is not good. --- lib/systems/examples.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index e41290864ed1..b26407117c85 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -306,8 +306,6 @@ rec { # BSDs - amd64-netbsd = lib.warn "The amd64-netbsd system example is deprecated. Use x86_64-netbsd instead." x86_64-netbsd; - x86_64-netbsd = { config = "x86_64-unknown-netbsd"; libc = "nblibc"; From 5dfe7f928e43d6e493f3bec504fa94b6c38ee0c4 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 8 Jun 2022 13:23:00 +0000 Subject: [PATCH 102/148] release-cross.nix: fix cross bootstrap tools eval In 5643714dea5, I changed pkgs/stdenv/linux/make-bootstrap-tools.nix to take a package set instead of system and localSystem arguments, but I forgot to update make-bootstrap-tools-cross.nix. Fixes: 5643714dea5 ("stdenvBootstrapTools: inherit {cross,local}System") --- pkgs/stdenv/linux/make-bootstrap-tools-cross.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix index 02eb112451bd..2665330206e1 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix @@ -1,11 +1,16 @@ {system ? builtins.currentSystem}: let + inherit (releaseLib) lib; + releaseLib = import ../../top-level/release-lib.nix { + # We're not using any functions from release-lib.nix that look at + # supportedSystems. + supportedSystems = []; + }; + make = crossSystem: import ./make-bootstrap-tools.nix { - localSystem = { inherit system; }; - inherit crossSystem; + pkgs = releaseLib.pkgsForCross crossSystem system; }; - lib = import ../../../lib; in lib.mapAttrs (n: make) (with lib.systems.examples; { armv5tel = sheevaplug; pogoplug4 = pogoplug4; From e9853a32926c20acaf9194cc8325e2c6916895b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 28 May 2022 15:13:52 +0200 Subject: [PATCH 103/148] dendrite: 0.8.5 -> 0.8.7 --- pkgs/servers/dendrite/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/dendrite/default.nix b/pkgs/servers/dendrite/default.nix index 71843ee8c763..9a8a1a369843 100644 --- a/pkgs/servers/dendrite/default.nix +++ b/pkgs/servers/dendrite/default.nix @@ -3,16 +3,16 @@ buildGoModule rec { pname = "matrix-dendrite"; - version = "0.8.5"; + version = "0.8.7"; src = fetchFromGitHub { owner = "matrix-org"; repo = "dendrite"; rev = "v${version}"; - sha256 = "sha256-MPWvBUI6Mqt3f5UY6lpTBwPpihW+QSNq1M3FnIff+mM="; + sha256 = "sha256-grMMD85hiJ6Ka8KU0fIAcpflFyZrPEZSZxFsGls5NEI="; }; - vendorSha256 = "sha256-OXy2xuwTLPNvBnVB6wj/YRW/XMiekjTubRRPVX9bxdQ="; + vendorSha256 = "sha256-yTlg1K0Pf1AmF227ca73gLDx12ea5yMamnOUksKGN4U="; checkInputs = [ postgresqlTestHook From 375997ae2de5164c9d77590d48f909cae6a010e1 Mon Sep 17 00:00:00 2001 From: CrystalGamma Date: Wed, 8 Jun 2022 20:11:01 +0200 Subject: [PATCH 104/148] libqalculate: add build C/C++ compiler to depsBuildBuild Between 4.1.1 and 4.2.0, the autconf-archive scripts ax_prog_{cc,cxx}_for_build.m4 were updated to a newer version. This broke the build (even native) on at least aarch64 and powerpc64le (but curiously not x86). Adding this dependency allows the package to build again on these platforms. --- pkgs/development/libraries/libqalculate/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libqalculate/default.nix b/pkgs/development/libraries/libqalculate/default.nix index d83a4e0a707a..da3bc925c820 100644 --- a/pkgs/development/libraries/libqalculate/default.nix +++ b/pkgs/development/libraries/libqalculate/default.nix @@ -1,5 +1,10 @@ -{ lib, stdenv, fetchFromGitHub, mpfr, libxml2, intltool, pkg-config, doxygen, - autoreconfHook, readline, libiconv, icu, curl, gnuplot, gettext }: +{ lib, stdenv, fetchFromGitHub +, mpfr, gnuplot +, readline +, libxml2, curl +, intltool, libiconv, icu, gettext +, pkg-config, doxygen, autoreconfHook, buildPackages +}: stdenv.mkDerivation rec { pname = "libqalculate"; @@ -16,6 +21,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ intltool pkg-config autoreconfHook doxygen ]; buildInputs = [ curl gettext libiconv readline ]; + depsBuildBuild = [ buildPackages.stdenv.cc ]; propagatedBuildInputs = [ libxml2 mpfr icu ]; enableParallelBuilding = true; From 59746e221b7203c8f4835f8720048580d1f2cfa4 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 8 Jun 2022 18:26:35 +0000 Subject: [PATCH 105/148] python310Packages.pyshark: 0.4.5 -> 0.4.6 --- pkgs/development/python-modules/pyshark/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pyshark/default.nix b/pkgs/development/python-modules/pyshark/default.nix index ded9bcbbc4ed..a0ba11a4a370 100644 --- a/pkgs/development/python-modules/pyshark/default.nix +++ b/pkgs/development/python-modules/pyshark/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "pyshark"; - version = "0.4.5"; + version = "0.4.6"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -21,8 +21,8 @@ buildPythonPackage rec { repo = pname; # 0.4.5 was the last release which was tagged # https://github.com/KimiNewt/pyshark/issues/541 - rev = "8f8f13aba6ae716aa0a48175255063fe542fdc3b"; - hash = "sha256-v9CC9hgTABAiJ0qiFZ/9/zMmHzJXKq3neGtTq/ucnT4="; + rev = "refs/tags/v${version}"; + hash = "sha256-yEpUFihETKta3+Xb8eSyTZ1uSi7ao4OqWzsCgDLLhe8="; }; sourceRoot = "${src.name}/src"; From 808aad6ceec1647edc14d1a8f901b9cf7a6fda17 Mon Sep 17 00:00:00 2001 From: Ayman El Didi Date: Wed, 8 Jun 2022 12:26:37 -0600 Subject: [PATCH 106/148] discord: 0.0.17 -> 0.0.18 --- .../networking/instant-messengers/discord/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/discord/default.nix b/pkgs/applications/networking/instant-messengers/discord/default.nix index 287c23401e06..ab471ef47fb7 100644 --- a/pkgs/applications/networking/instant-messengers/discord/default.nix +++ b/pkgs/applications/networking/instant-messengers/discord/default.nix @@ -2,7 +2,7 @@ let inherit (pkgs) callPackage fetchurl; versions = if stdenv.isLinux then { - stable = "0.0.17"; + stable = "0.0.18"; ptb = "0.0.29"; canary = "0.0.135"; } else { @@ -21,7 +21,7 @@ let stable = fetchurl { url = "https://dl.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz"; - sha256 = "058k0cmbm4y572jqw83bayb2zzl2fw2aaz0zj1gvg6sxblp76qil"; + sha256 = "1hl01rf3l6kblx5v7rwnwms30iz8zw6dwlkjsx2f1iipljgkh5q4"; }; ptb = fetchurl { url = From 56651dbdda39919718f4d2fbe3f6b2e3bdd89207 Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Wed, 8 Jun 2022 20:59:36 +0200 Subject: [PATCH 107/148] feedbackd: comment that optional devdoc depends on gir Co-authored-by: Sandro --- pkgs/applications/misc/feedbackd/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/misc/feedbackd/default.nix b/pkgs/applications/misc/feedbackd/default.nix index 2a4db6b10e47..ad1660173159 100644 --- a/pkgs/applications/misc/feedbackd/default.nix +++ b/pkgs/applications/misc/feedbackd/default.nix @@ -33,6 +33,7 @@ stdenv.mkDerivation rec { version = "0.0.0+git20220520"; outputs = [ "out" "dev" ] + # remove if cross-compiling gobject-introspection works ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ]; src = fetchFromGitLab { From a35930dbc96d6b291afcc76dec9e7dab92cecb00 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 8 Jun 2022 21:52:33 +0200 Subject: [PATCH 108/148] python310Packages.pre-commit-hooks: update disabled --- pkgs/development/python-modules/pre-commit-hooks/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pre-commit-hooks/default.nix b/pkgs/development/python-modules/pre-commit-hooks/default.nix index acf827903774..282dd59a05c0 100644 --- a/pkgs/development/python-modules/pre-commit-hooks/default.nix +++ b/pkgs/development/python-modules/pre-commit-hooks/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { version = "4.3.0"; format = "setuptools"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "pre-commit"; From acbfbd0d8628e88435b81f72bd7ceb1e6b94da74 Mon Sep 17 00:00:00 2001 From: Sandro Date: Mon, 6 Jun 2022 18:22:22 +0200 Subject: [PATCH 109/148] nixos/kdeconnect: remove alias from default package --- nixos/modules/programs/kdeconnect.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/programs/kdeconnect.nix b/nixos/modules/programs/kdeconnect.nix index df698e84dd70..10d6e18a3d14 100644 --- a/nixos/modules/programs/kdeconnect.nix +++ b/nixos/modules/programs/kdeconnect.nix @@ -12,8 +12,8 @@ with lib; implementation if you use Gnome. ''; package = mkOption { - default = pkgs.kdeconnect; - defaultText = literalExpression "pkgs.kdeconnect"; + default = pkgs.plasma5Packages.kdeconnect-kde; + defaultText = literalExpression "pkgs.plasma5Packages.kdeconnect-kde"; type = types.package; example = literalExpression "pkgs.gnomeExtensions.gsconnect"; description = '' From 3a5d3c73c78cb63df07fce947a2fe5e6058069a3 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 2 Jun 2022 09:33:44 +0200 Subject: [PATCH 110/148] =?UTF-8?q?ocamlPackages.wasm:=201.1.1=20=E2=86=92?= =?UTF-8?q?=202.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/wasm/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/development/ocaml-modules/wasm/default.nix b/pkgs/development/ocaml-modules/wasm/default.nix index 5d53d6db4186..3af1bd00a19b 100644 --- a/pkgs/development/ocaml-modules/wasm/default.nix +++ b/pkgs/development/ocaml-modules/wasm/default.nix @@ -1,19 +1,18 @@ { stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild }: -if lib.versionOlder ocaml.version "4.03" -|| lib.versionOlder "4.13" ocaml.version +if lib.versionOlder ocaml.version "4.08" then throw "wasm is not available for OCaml ${ocaml.version}" else stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-wasm"; - version = "1.1.1"; + version = "2.0.0"; src = fetchFromGitHub { owner = "WebAssembly"; repo = "spec"; rev = "opam-${version}"; - sha256 = "1kp72yv4k176i94np0m09g10cviqp2pnpm7jmiq6ik7fmmbknk7c"; + sha256 = "sha256:09s0v79x0ymzcp2114zkm3phxavdfnkkq67qz1ndnknbkziwqf3v"; }; nativeBuildInputs = [ ocaml findlib ocamlbuild ]; From a0db9aae9f8c7141e7eb082dae4263f0e1ef3cae Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Thu, 9 Jun 2022 07:17:48 +1000 Subject: [PATCH 111/148] gh: 2.11.3 -> 2.12.0 https://github.com/cli/cli/releases/tag/v2.12.0 --- .../version-management/git-and-tools/gh/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/version-management/git-and-tools/gh/default.nix b/pkgs/applications/version-management/git-and-tools/gh/default.nix index 329076346881..295e0e4ac819 100644 --- a/pkgs/applications/version-management/git-and-tools/gh/default.nix +++ b/pkgs/applications/version-management/git-and-tools/gh/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "gh"; - version = "2.11.3"; + version = "2.12.0"; src = fetchFromGitHub { owner = "cli"; repo = "cli"; rev = "v${version}"; - sha256 = "sha256-b00bP0usTpYr5EShyckmZ+a1Mw48payU/KllSck47fI="; + sha256 = "sha256-gJwSnaOJc7W5zA/7D8tmXi3g+or5cNIlJ2J6gS51D6I="; }; - vendorSha256 = "sha256-soNQXtpQ217scP606UA05+r9WIrUAMOCDBsfLKrVD+Q="; + vendorSha256 = "sha256-du4IQNQPwM245yr0dSe1C7TU6gaFgvZhxaXi3xsKuWY="; nativeBuildInputs = [ installShellFiles ]; From 54e6551ba4e3553a0300a505db245ac19199ce17 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Wed, 8 Jun 2022 11:26:26 +1000 Subject: [PATCH 112/148] nixVersions.nix_2_9: 2.9.0 -> 2.9.1 --- pkgs/tools/package-management/nix/default.nix | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index b91ee5c9ee60..1d2928f3ad6e 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -86,16 +86,8 @@ in lib.makeExtensible (self: { }; nix_2_9 = common { - version = "2.9.0"; - sha256 = "sha256-W6aTsTpCTb+vXQEXDjnKqetOuJmEfSuK2CXvAMqwo74="; - patches = [ - # can be removed when updated to 2.9.1 - (fetchpatch { - name = "fix-segfault-in-git-fetcher"; - url = "https://github.com/NixOS/nix/commit/bc4759345538c89e1f045aaabcc0cafe4ecca12a.patch"; - sha256 = "sha256-UrfH4M7a02yfE9X3tA1Pwhw4RacBW+rShYkl7ybG64I="; - }) - ]; + version = "2.9.1"; + sha256 = "sha256-qNL3lQPBsnStkru3j1ajN/H+knXI+X3dku8/dBfSw3g="; }; stable = self.nix_2_9; From 0e51dce7781574bbe5c99f649ae8bf157c268d76 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 7 Jun 2022 15:32:59 +0200 Subject: [PATCH 113/148] nix-fallback-paths.nix: Update to 2.9.1 --- nixos/modules/installer/tools/nix-fallback-paths.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nixos/modules/installer/tools/nix-fallback-paths.nix b/nixos/modules/installer/tools/nix-fallback-paths.nix index 8fc8cc4baad5..bd09724ebfa2 100644 --- a/nixos/modules/installer/tools/nix-fallback-paths.nix +++ b/nixos/modules/installer/tools/nix-fallback-paths.nix @@ -1,7 +1,7 @@ { - x86_64-linux = "/nix/store/6mjgljq8sm9bsz6k22as5ar3jw78644m-nix-2.8.1"; - i686-linux = "/nix/store/c4yjv4l8wncdla6ycicvsjrdf40xjkpp-nix-2.8.1"; - aarch64-linux = "/nix/store/qkgvks80mdibq7m86hqasgr5lpixbnmh-nix-2.8.1"; - x86_64-darwin = "/nix/store/riz4mzb1xhp36088ffnp40lz52bpxz01-nix-2.8.1"; - aarch64-darwin = "/nix/store/dirm8hsnmvvzjs21hrx8i84w8k453jzp-nix-2.8.1"; + x86_64-linux = "/nix/store/6g4fla3vkcxihph282a0v3cd10709y7c-nix-2.9.1"; + i686-linux = "/nix/store/j143221z44469zx21f5m9a47x7y1jpr5-nix-2.9.1"; + aarch64-linux = "/nix/store/c4z3vy1sgm49la8bvmdrrpssgk4iw2nk-nix-2.9.1"; + x86_64-darwin = "/nix/store/cqdwb7khf6zg94bz7lnvfjqx6z775qaw-nix-2.9.1"; + aarch64-darwin = "/nix/store/1brkxcs287n1px2i4fq39l7h51hjv0f8-nix-2.9.1"; } From a0021846c278a8dbf54d5855dcaa7e4d75e6c5f7 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Wed, 11 May 2022 22:07:34 +0200 Subject: [PATCH 114/148] sourcehut: fix gqlgen with -trimpath --- .../sourcehut/fix-gqlgen-trimpath.nix | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix diff --git a/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix b/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix new file mode 100644 index 000000000000..1f94913292e0 --- /dev/null +++ b/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix @@ -0,0 +1,32 @@ +{ unzip }: +{ + overrideModAttrs = (_: { + # No need to workaround -trimpath: it's not used in go-modules, + # but do download `go generate`'s dependencies nonetheless. + preBuild = '' + set -x + go generate ./loaders + go generate ./graph + set +x + ''; + }); + + # Workaround: + # go: git.sr.ht/~emersion/go-emailthreads@v0.0.0-20220412093310-4fd792e343ba: module lookup disabled by GOPROXY=off + # tidy failed: go mod tidy failed: exit status 1 + # graph/generate.go:10: running "go": exit status 1 + proxyVendor = true; + + # Workaround -trimpath in the package derivation: + # https://github.com/99designs/gqlgen/issues/1537 + # This is to give `go generate ./graph` access to gqlgen's *.gotpl files + # If it fails, the gqlgenVersion may have to be updated. + preBuild = let gqlgenVersion = "0.17.2"; in '' + set -x + ${unzip}/bin/unzip ''${GOPROXY#"file://"}/github.com/99designs/gqlgen/@v/v${gqlgenVersion}.zip + go generate ./loaders + go generate ./graph + rm -rf github.com + set +x + ''; +} From a5d72ec6de6ee071ab9770f0816d617cdb308086 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 5 May 2022 23:57:33 +0200 Subject: [PATCH 115/148] sourcehut.srht: 0.68.14 -> 0.68.24 --- .../version-management/sourcehut/core.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/core.nix b/pkgs/applications/version-management/sourcehut/core.nix index 805da8c32821..610d5e2647cf 100644 --- a/pkgs/applications/version-management/sourcehut/core.nix +++ b/pkgs/applications/version-management/sourcehut/core.nix @@ -1,5 +1,5 @@ { lib -, fetchgit +, fetchFromSourcehut , fetchNodeModules , buildPythonPackage , pgpy @@ -29,12 +29,13 @@ buildPythonPackage rec { pname = "srht"; - version = "0.68.14"; + version = "0.68.24"; - src = fetchgit { - url = "https://git.sr.ht/~sircmpwn/core.sr.ht"; + src = fetchFromSourcehut { + owner = "~sircmpwn"; + repo = "core.sr.ht"; rev = version; - sha256 = "sha256-BY3W2rwrg0mhH3CltgUqg6Xv8Ve5VZNY/lI1cfbAjYM="; + sha256 = "sha256-ipukga6vfBgDIXOQCejCkU/iTmBt5egIjB+NlJyL2yo="; fetchSubmodules = true; }; From dad23bcdd07268194154b52c481610c7e8342ada Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 5 May 2022 23:58:22 +0200 Subject: [PATCH 116/148] sourcehut.scmsrht: 0.22.19 -> 0.22.22 --- pkgs/applications/version-management/sourcehut/scm.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/scm.nix b/pkgs/applications/version-management/sourcehut/scm.nix index 10da3018843a..49eea05a7a7a 100644 --- a/pkgs/applications/version-management/sourcehut/scm.nix +++ b/pkgs/applications/version-management/sourcehut/scm.nix @@ -9,13 +9,13 @@ buildPythonPackage rec { pname = "scmsrht"; - version = "0.22.19"; # Untagged version + version = "0.22.22"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "scm.sr.ht"; rev = version; - sha256 = "sha256-/QryPjWJ2S0Ov9DTdrwbM81HYucHiYcLh0oKacflywI="; + sha256 = "sha256-iSzzyI8HZOpOb4dyt520MV/wds14fNag2+UOF09KS7w="; }; nativeBuildInputs = srht.nativeBuildInputs; From 43f856ab2c411ddd2aca58b84a157f807672c8ab Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Fri, 6 May 2022 00:01:39 +0200 Subject: [PATCH 117/148] sourcehut.buildsrht: 0.75.2 -> 0.79.1 --- .../services/misc/sourcehut/default.nix | 13 +++++++--- .../version-management/sourcehut/builds.nix | 25 ++++++++++++++----- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/nixos/modules/services/misc/sourcehut/default.nix b/nixos/modules/services/misc/sourcehut/default.nix index 5a6d011a729a..746ddbf8f440 100644 --- a/nixos/modules/services/misc/sourcehut/default.nix +++ b/nixos/modules/services/misc/sourcehut/default.nix @@ -905,6 +905,11 @@ in inherit configIniOfService; srvsrht = "buildsrht"; port = 5002; + extraServices.buildsrht-api = { + serviceConfig.Restart = "always"; + serviceConfig.RestartSec = "2s"; + serviceConfig.ExecStart = "${pkgs.sourcehut.buildsrht}/bin/buildsrht-api -b ${cfg.listenAddress}:${toString (cfg.builds.port + 100)}"; + }; # TODO: a celery worker on the master and worker are apparently needed extraServices.buildsrht-worker = let qemuPackage = pkgs.qemu_kvm; @@ -928,13 +933,13 @@ in fi ''; serviceConfig = { - ExecStart = "${pkgs.sourcehut.buildsrht}/bin/builds.sr.ht-worker"; + ExecStart = "${pkgs.sourcehut.buildsrht}/bin/buildsrht-worker"; BindPaths = [ cfg.settings."builds.sr.ht::worker".buildlogs ]; LogsDirectory = [ "sourcehut/${serviceName}" ]; RuntimeDirectory = [ "sourcehut/${serviceName}/subdir" ]; StateDirectory = [ "sourcehut/${serviceName}" ]; TimeoutStartSec = "1800s"; - # builds.sr.ht-worker looks up ../config.ini + # buildsrht-worker looks up ../config.ini WorkingDirectory = "-"+"/run/sourcehut/${serviceName}/subdir"; }; }; @@ -952,12 +957,12 @@ in ) cfg.builds.images ); image_dir_pre = pkgs.symlinkJoin { - name = "builds.sr.ht-worker-images-pre"; + name = "buildsrht-worker-images-pre"; paths = image_dirs; # FIXME: not working, apparently because ubuntu/latest is a broken link # ++ [ "${pkgs.sourcehut.buildsrht}/lib/images" ]; }; - image_dir = pkgs.runCommand "builds.sr.ht-worker-images" { } '' + image_dir = pkgs.runCommand "buildsrht-worker-images" { } '' mkdir -p $out/images cp -Lr ${image_dir_pre}/* $out/images ''; diff --git a/pkgs/applications/version-management/sourcehut/builds.nix b/pkgs/applications/version-management/sourcehut/builds.nix index 350afd07fe19..e2cc01eb9c70 100644 --- a/pkgs/applications/version-management/sourcehut/builds.nix +++ b/pkgs/applications/version-management/sourcehut/builds.nix @@ -1,7 +1,7 @@ { lib , fetchFromSourcehut -, buildPythonPackage , buildGoModule +, buildPythonPackage , srht , redis , celery @@ -9,21 +9,29 @@ , markdown , ansi2html , python +, unzip }: let - version = "0.75.2"; + version = "0.79.1"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "builds.sr.ht"; rev = version; - sha256 = "sha256-SwyxMzmp9baRQ0vceuEn/OpfIv7z7jwq/l67hdOHXjM="; + sha256 = "sha256-8fZ6KdD+9+n0uO3jm0AUyG08oCUNFq1K55ZOwLbkpHk="; }; - buildWorker = src: buildGoModule { + buildsrht-api = buildGoModule ({ inherit src version; - pname = "builds-sr-ht-worker"; + pname = "buildsrht-api"; + modRoot = "api"; + vendorSha256 = "sha256-roTwqtg4Y846PNtLdRN/LV3Jd0LVElqjFy3DJcrwoaI="; + } // import ./fix-gqlgen-trimpath.nix {inherit unzip;}); + buildsrht-worker = buildGoModule { + inherit src version; + sourceRoot = "source/worker"; + pname = "buildsrht-worker"; vendorSha256 = "sha256-Pf1M9a43eK4jr6QMi6kRHA8DodXQU0pqq9ua5VC3ER0="; }; in @@ -35,6 +43,10 @@ buildPythonPackage rec { # Revert change breaking Unix socket support for Redis patches/redis-socket/build/0001-Revert-Add-build-submission-and-queue-monitoring.patch ]; + postPatch = '' + substituteInPlace Makefile \ + --replace "all: api worker" "" + ''; nativeBuildInputs = srht.nativeBuildInputs; @@ -58,7 +70,8 @@ buildPythonPackage rec { cp -r images $out/lib cp contrib/submit_image_build $out/bin/builds.sr.ht - cp ${buildWorker "${src}/worker"}/bin/worker $out/bin/builds.sr.ht-worker + ln -s ${buildsrht-api}/bin/api $out/bin/buildsrht-api + ln -s ${buildsrht-worker}/bin/worker $out/bin/buildsrht-worker ''; pythonImportsCheck = [ "buildsrht" ]; From b57ed0fa1de7c6a138e310c009f969dcda347f7c Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Fri, 6 May 2022 00:03:52 +0200 Subject: [PATCH 118/148] sourcehut.gitsrht: 0.77.3 -> 0.78.18 --- .../services/misc/sourcehut/default.nix | 5 ++ .../version-management/sourcehut/git.nix | 54 +++++++++++-------- ...-Revert-Add-webhook-queue-monitoring.patch | 29 +++------- 3 files changed, 44 insertions(+), 44 deletions(-) diff --git a/nixos/modules/services/misc/sourcehut/default.nix b/nixos/modules/services/misc/sourcehut/default.nix index 746ddbf8f440..310b45f0f4db 100644 --- a/nixos/modules/services/misc/sourcehut/default.nix +++ b/nixos/modules/services/misc/sourcehut/default.nix @@ -1086,6 +1086,11 @@ in }; }) ]; + extraServices.gitsrht-api = { + serviceConfig.Restart = "always"; + serviceConfig.RestartSec = "2s"; + serviceConfig.ExecStart = "${pkgs.sourcehut.gitsrht}/bin/gitsrht-api -b ${cfg.listenAddress}:${toString (cfg.git.port + 100)}"; + }; extraServices.gitsrht-fcgiwrap = mkIf cfg.nginx.enable { serviceConfig = { # Socket is passed by gitsrht-fcgiwrap.socket diff --git a/pkgs/applications/version-management/sourcehut/git.nix b/pkgs/applications/version-management/sourcehut/git.nix index 318bee4cf517..e56022604fa7 100644 --- a/pkgs/applications/version-management/sourcehut/git.nix +++ b/pkgs/applications/version-management/sourcehut/git.nix @@ -1,47 +1,57 @@ { lib , fetchFromSourcehut -, buildPythonPackage , buildGoModule +, buildPythonPackage , python , srht , pygit2 , scmsrht +, unzip }: let - version = "0.77.3"; + version = "0.78.18"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "git.sr.ht"; rev = version; - sha256 = "sha256-eJvXCcmdiUzTK0EqNJkLEZsAfr6toD/378HObnMbOWM="; + sha256 = "sha256-pGWphdFKaOIBIKWMxfNAFqXZQx/qHcrwb5Ylj9uag7s="; }; - buildShell = src: buildGoModule { + gitApi = buildGoModule ({ inherit src version; - pname = "gitsrht-shell"; - vendorSha256 = "sha256-aqUFICp0C2reqb2p6JCPAUIRsxzSv0t9BHoNWrTYfqk="; - }; + pname = "gitsrht-api"; + modRoot = "api"; + vendorSha256 = "sha256-0YI20liP0X1McfiSUy29zJk2UqqAPBIfIfPLoJOE1uI="; + } // import ./fix-gqlgen-trimpath.nix {inherit unzip;}); - buildDispatcher = src: buildGoModule { + gitDispatch = buildGoModule { inherit src version; - pname = "gitsrht-dispatcher"; + pname = "gitsrht-dispatch"; + modRoot = "gitsrht-dispatch"; vendorSha256 = "sha256-qWXPHo86s6iuRBhRMtmD5jxnAWKdrWHtA/iSUkdw89M="; }; - buildKeys = src: buildGoModule { + gitKeys = buildGoModule { inherit src version; pname = "gitsrht-keys"; + modRoot = "gitsrht-keys"; vendorSha256 = "sha256-9pojS69HCKVHUceyOpGtv9ewcxFD4WsOVsEzkmWJkF4="; }; - buildUpdateHook = src: buildGoModule { + gitShell = buildGoModule { inherit src version; - pname = "gitsrht-update-hook"; - vendorSha256 = "sha256-sBlG7EFqdDm7CkAHVX50Mf4N3sl1rPNmWExG/bfbfGA="; + pname = "gitsrht-shell"; + modRoot = "gitsrht-shell"; + vendorSha256 = "sha256-WqfvSPuVsOHA//86u33atMfeA11+DJhjLmWy8Ivq0NI="; }; - updateHook = buildUpdateHook "${src}/gitsrht-update-hook"; + gitUpdateHook = buildGoModule { + inherit src version; + pname = "gitsrht-update-hook"; + modRoot = "gitsrht-update-hook"; + vendorSha256 = "sha256-Bc3yPabS2S+qiroHFKrtkII/CfzBDYQ6xWxKHAME+Tc="; + }; in buildPythonPackage rec { @@ -52,6 +62,10 @@ buildPythonPackage rec { # Revert change breaking Unix socket support for Redis patches/redis-socket/git/0001-Revert-Add-webhook-queue-monitoring.patch ]; + postPatch = '' + substituteInPlace Makefile \ + --replace "all: api gitsrht-dispatch gitsrht-keys gitsrht-shell gitsrht-update-hook" "" + ''; nativeBuildInputs = srht.nativeBuildInputs; @@ -68,14 +82,12 @@ buildPythonPackage rec { postInstall = '' mkdir -p $out/bin - cp ${buildShell "${src}/gitsrht-shell"}/bin/gitsrht-shell $out/bin/gitsrht-shell - cp ${buildDispatcher "${src}/gitsrht-dispatch"}/bin/gitsrht-dispatch $out/bin/gitsrht-dispatch - cp ${buildKeys "${src}/gitsrht-keys"}/bin/gitsrht-keys $out/bin/gitsrht-keys - cp ${updateHook}/bin/gitsrht-update-hook $out/bin/gitsrht-update-hook + ln -s ${gitApi}/bin/api $out/bin/gitsrht-api + ln -s ${gitDispatch}/bin/gitsrht-dispatch $out/bin/gitsrht-dispatch + ln -s ${gitKeys}/bin/gitsrht-keys $out/bin/gitsrht-keys + ln -s ${gitShell}/bin/gitsrht-shell $out/bin/gitsrht-shell + ln -s ${gitUpdateHook}/bin/gitsrht-update-hook $out/bin/gitsrht-update-hook ''; - passthru = { - inherit updateHook; - }; pythonImportsCheck = [ "gitsrht" ]; diff --git a/pkgs/applications/version-management/sourcehut/patches/redis-socket/git/0001-Revert-Add-webhook-queue-monitoring.patch b/pkgs/applications/version-management/sourcehut/patches/redis-socket/git/0001-Revert-Add-webhook-queue-monitoring.patch index 4c526dd23e11..f9235102b958 100644 --- a/pkgs/applications/version-management/sourcehut/patches/redis-socket/git/0001-Revert-Add-webhook-queue-monitoring.patch +++ b/pkgs/applications/version-management/sourcehut/patches/redis-socket/git/0001-Revert-Add-webhook-queue-monitoring.patch @@ -1,22 +1,8 @@ -From 5ccb5386304c26f25b0a9eb10ce9edb6da32f91a Mon Sep 17 00:00:00 2001 -From: Julien Moutinho -Date: Sat, 12 Feb 2022 00:11:59 +0100 -Subject: [PATCH git.sr.ht] Revert "Add webhook queue monitoring" - -This reverts commit 7ea630b776947ab82438d0ffa263b0f9d33ebff3. - -Which has broken Unix socket support for Redis. -See https://lists.sr.ht/~sircmpwn/sr.ht-dev/%3C20211208082636.65665-1-me%40ignaskiela.eu%3E#%3C20211216033723.wefibfulfjhqnhem@sourcephile.fr%3E ---- - gitsrht/app.py | 3 --- - gitsrht/webhooks.py | 5 +---- - 2 files changed, 1 insertion(+), 7 deletions(-) - diff --git a/gitsrht/app.py b/gitsrht/app.py -index e9ccb56..4928851 100644 +index eaae395..731bb03 100644 --- a/gitsrht/app.py +++ b/gitsrht/app.py -@@ -48,9 +48,6 @@ class GitApp(ScmSrhtFlask): +@@ -55,9 +55,6 @@ class GitApp(SrhtFlask): self.add_template_filter(url_quote) self.add_template_filter(commit_links) @@ -27,15 +13,15 @@ index e9ccb56..4928851 100644 def inject(): notice = session.get("notice") diff --git a/gitsrht/webhooks.py b/gitsrht/webhooks.py -index 8a203fe..6240d50 100644 +index 36486d0..0109428 100644 --- a/gitsrht/webhooks.py +++ b/gitsrht/webhooks.py -@@ -7,13 +7,10 @@ if not hasattr(db, "session"): +@@ -7,12 +7,10 @@ if not hasattr(db, "session"): db.init() from srht.webhook import Event from srht.webhook.celery import CeleryWebhook, make_worker -from srht.metrics import RedisQueueCollector - from scmsrht.webhooks import UserWebhook ++from scmsrht.webhooks import UserWebhook import sqlalchemy as sa -webhook_broker = cfg("git.sr.ht", "webhooks") @@ -43,8 +29,5 @@ index 8a203fe..6240d50 100644 -webhook_metrics_collector = RedisQueueCollector(webhook_broker, "srht_webhooks", "Webhook queue length") +worker = make_worker(broker=cfg("git.sr.ht", "webhooks")) - class RepoWebhook(CeleryWebhook): + class UserWebhook(CeleryWebhook): events = [ --- -2.34.1 - From 658d8f1240b30b629f1d6d73961953d0acc26f43 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Fri, 6 May 2022 00:04:22 +0200 Subject: [PATCH 119/148] sourcehut.hgsrht: 0.29.4 -> 0.31.2 --- .../services/misc/sourcehut/default.nix | 5 ++++ .../version-management/sourcehut/hg.nix | 29 +++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/misc/sourcehut/default.nix b/nixos/modules/services/misc/sourcehut/default.nix index 310b45f0f4db..45b8943ed8e7 100644 --- a/nixos/modules/services/misc/sourcehut/default.nix +++ b/nixos/modules/services/misc/sourcehut/default.nix @@ -1134,6 +1134,11 @@ in timerConfig.OnCalendar = ["daily"]; timerConfig.AccuracySec = "1h"; }; + extraServices.hgsrht-api = { + serviceConfig.Restart = "always"; + serviceConfig.RestartSec = "2s"; + serviceConfig.ExecStart = "${pkgs.sourcehut.hgsrht}/bin/hgsrht-api -b ${cfg.listenAddress}:${toString (cfg.hg.port + 100)}"; + }; extraConfig = mkMerge [ { users.users.${cfg.hg.user}.shell = pkgs.bash; diff --git a/pkgs/applications/version-management/sourcehut/hg.nix b/pkgs/applications/version-management/sourcehut/hg.nix index f3e778b2f31b..2aa4cc2c5059 100644 --- a/pkgs/applications/version-management/sourcehut/hg.nix +++ b/pkgs/applications/version-management/sourcehut/hg.nix @@ -1,21 +1,41 @@ { lib , fetchhg +, buildGoModule , buildPythonPackage , srht , hglib , scmsrht , unidiff , python +, unzip }: buildPythonPackage rec { pname = "hgsrht"; - version = "0.29.4"; + version = "0.31.2"; src = fetchhg { url = "https://hg.sr.ht/~sircmpwn/hg.sr.ht"; rev = version; - sha256 = "Jn9M/R5tJK/GeJDWGo3LWCK2nwsfI9zh+/yo2M+X6Sk="; + sha256 = "F0dBykSSrlis+mumULLxvKNxD75DWR9+IDTYbmhkMDI="; + }; + postPatch = '' + substituteInPlace Makefile \ + --replace "all: api hgsrht-keys" "" + ''; + + hgsrht-api = buildGoModule ({ + inherit src version; + pname = "hgsrht-api"; + modRoot = "api"; + vendorSha256 = "sha256-W7A22qSIgJgcfS7xYNrmbYKaZBXbDtPilM9I6DxmTeU="; + } // import ./fix-gqlgen-trimpath.nix {inherit unzip;}); + + hgsrht-keys = buildGoModule { + inherit src version; + pname = "hgsrht-keys"; + modRoot = "hgsrht-keys"; + vendorSha256 = "sha256-7ti8xCjSrxsslF7/1X/GY4FDl+69hPL4UwCDfjxmJLU="; }; nativeBuildInputs = srht.nativeBuildInputs; @@ -32,6 +52,11 @@ buildPythonPackage rec { export SRHT_PATH=${srht}/${python.sitePackages}/srht ''; + postInstall = '' + ln -s ${hgsrht-api}/bin/api $out/bin/hgsrht-api + ln -s ${hgsrht-keys}/bin/hgsrht-keys $out/bin/hgsrht-keys + ''; + pythonImportsCheck = [ "hgsrht" ]; meta = with lib; { From 0f1e37bc5ba35519a272a846bc32fdd34a447c6b Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Fri, 6 May 2022 00:04:44 +0200 Subject: [PATCH 120/148] sourcehut.hubsrht: 0.14.4 -> 0.14.14 --- pkgs/applications/version-management/sourcehut/hub.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/hub.nix b/pkgs/applications/version-management/sourcehut/hub.nix index 511ec359fc4b..75d9efe5bd93 100644 --- a/pkgs/applications/version-management/sourcehut/hub.nix +++ b/pkgs/applications/version-management/sourcehut/hub.nix @@ -6,13 +6,13 @@ buildPythonPackage rec { pname = "hubsrht"; - version = "0.14.4"; + version = "0.14.14"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "hub.sr.ht"; rev = version; - sha256 = "sha256-7HF+jykWGqzPWA0YtJZQZU7pnID1yexcqLkEf2HpnSs="; + sha256 = "sha256-4n6oQ+AAvdJY/5KflxAp62chjyrlSUkmt319DKZk33w="; }; nativeBuildInputs = srht.nativeBuildInputs; From 59d8439966cf6ca5f2967e56a52fb98ae85d4e60 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Fri, 6 May 2022 00:05:06 +0200 Subject: [PATCH 121/148] sourcehut.listssrht: 0.51.7 -> 0.51.9 --- .../services/misc/sourcehut/default.nix | 5 +++++ .../version-management/sourcehut/lists.nix | 21 +++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/misc/sourcehut/default.nix b/nixos/modules/services/misc/sourcehut/default.nix index 45b8943ed8e7..6a9b3c8de838 100644 --- a/nixos/modules/services/misc/sourcehut/default.nix +++ b/nixos/modules/services/misc/sourcehut/default.nix @@ -1199,6 +1199,11 @@ in inherit configIniOfService; port = 5006; webhooks = true; + extraServices.listssrht-api = { + serviceConfig.Restart = "always"; + serviceConfig.RestartSec = "2s"; + serviceConfig.ExecStart = "${pkgs.sourcehut.listssrht}/bin/listssrht-api -b ${cfg.listenAddress}:${toString (cfg.lists.port + 100)}"; + }; # Receive the mail from Postfix and enqueue them into Redis and PostgreSQL extraServices.listssrht-lmtp = { wants = [ "postfix.service" ]; diff --git a/pkgs/applications/version-management/sourcehut/lists.nix b/pkgs/applications/version-management/sourcehut/lists.nix index 3ba6375a9138..d26455311215 100644 --- a/pkgs/applications/version-management/sourcehut/lists.nix +++ b/pkgs/applications/version-management/sourcehut/lists.nix @@ -1,5 +1,6 @@ { lib , fetchFromSourcehut +, buildGoModule , buildPythonPackage , srht , asyncpg @@ -8,23 +9,35 @@ , emailthreads , redis , python +, unzip }: buildPythonPackage rec { pname = "listssrht"; - version = "0.51.7"; + version = "0.51.9"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "lists.sr.ht"; rev = version; - sha256 = "sha256-oNY5A98oVoL2JKO0fU/8YVl8u7ywmHb/RHD8A6z9yIM="; + sha256 = "sha256-6iyt0XXAHvyp4bA+VW9uA9YP9wq2Rf/WYVZxylSRf7k="; }; + listssrht-api = buildGoModule ({ + inherit src version; + pname = "listssrht-api"; + modRoot = "api"; + vendorSha256 = "sha256-xnmMkRSokbhWD+kz0XQ9AinYdm6/50FRBISURPvlzD0="; + } // import ./fix-gqlgen-trimpath.nix {inherit unzip;}); + patches = [ # Revert change breaking Unix socket support for Redis patches/redis-socket/lists/0001-Revert-Add-webhook-queue-monitoring.patch ]; + postPatch = '' + substituteInPlace Makefile \ + --replace "all: api" "" + ''; nativeBuildInputs = srht.nativeBuildInputs; @@ -42,6 +55,10 @@ buildPythonPackage rec { export SRHT_PATH=${srht}/${python.sitePackages}/srht ''; + postInstall = '' + ln -s ${listssrht-api}/bin/api $out/bin/listssrht-api + ''; + pythonImportsCheck = [ "listssrht" ]; meta = with lib; { From a3297babdcfa2ef512bf50e6997d9ff025c4dbfd Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Fri, 6 May 2022 00:05:41 +0200 Subject: [PATCH 122/148] sourcehut.mansrht: 0.15.23 -> 0.15.25 --- pkgs/applications/version-management/sourcehut/man.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/man.nix b/pkgs/applications/version-management/sourcehut/man.nix index 8d43f297a4f8..ccee76defde0 100644 --- a/pkgs/applications/version-management/sourcehut/man.nix +++ b/pkgs/applications/version-management/sourcehut/man.nix @@ -8,13 +8,13 @@ buildPythonPackage rec { pname = "mansrht"; - version = "0.15.23"; + version = "0.15.25"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "man.sr.ht"; rev = version; - sha256 = "sha256-xrBptXdwMee+YkPup/BYL/iXBhCzSUQ5htSHIw/1Ncc="; + sha256 = "sha256-Mq3IHsqSkFHVdmy3g0E+9oLnKORthgv3lqvWyrKMIuU="; }; nativeBuildInputs = srht.nativeBuildInputs; From bcb91bbeb744fc88047b38ebbd255d5a09478f76 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Fri, 6 May 2022 00:07:02 +0200 Subject: [PATCH 123/148] sourcehut.metasrht: 0.57.5 -> 0.58.8 --- .../services/misc/sourcehut/default.nix | 8 ++++---- .../version-management/sourcehut/meta.nix | 18 ++++++++++++------ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/nixos/modules/services/misc/sourcehut/default.nix b/nixos/modules/services/misc/sourcehut/default.nix index 6a9b3c8de838..9f4aec4fd475 100644 --- a/nixos/modules/services/misc/sourcehut/default.nix +++ b/nixos/modules/services/misc/sourcehut/default.nix @@ -1252,6 +1252,10 @@ in inherit configIniOfService; port = 5000; webhooks = true; + extraTimers.metasrht-daily.timerConfig = { + OnCalendar = ["daily"]; + AccuracySec = "1h"; + }; extraServices.metasrht-api = { serviceConfig.Restart = "always"; serviceConfig.RestartSec = "2s"; @@ -1268,10 +1272,6 @@ in ) cfg.settings)); serviceConfig.ExecStart = "${pkgs.sourcehut.metasrht}/bin/metasrht-api -b ${cfg.listenAddress}:${toString (cfg.meta.port + 100)}"; }; - extraTimers.metasrht-daily.timerConfig = { - OnCalendar = ["daily"]; - AccuracySec = "1h"; - }; extraConfig = mkMerge [ { assertions = [ diff --git a/pkgs/applications/version-management/sourcehut/meta.nix b/pkgs/applications/version-management/sourcehut/meta.nix index ab19cc88d25e..79293736e4ae 100644 --- a/pkgs/applications/version-management/sourcehut/meta.nix +++ b/pkgs/applications/version-management/sourcehut/meta.nix @@ -16,22 +16,24 @@ , weasyprint , prometheus-client , python +, unzip }: let - version = "0.57.5"; + version = "0.58.8"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "meta.sr.ht"; rev = version; - sha256 = "sha256-qsCwZaCiqvY445U053OCWD98jlIUi9NB2jWVP2oW3Vk="; + sha256 = "sha256-lnEt5UoQBd5qlkD+nE6KL5DP4jf1FrAjgA06/mgRxTs="; }; - buildApi = src: buildGoModule { + metasrht-api = buildGoModule ({ inherit src version; pname = "metasrht-api"; - vendorSha256 = "sha256-8Ubrr9qRlgW2wsLHrPHwulSWLz+gp4VPcTvOZpg8TYM="; - }; + modRoot = "api"; + vendorSha256 = "sha256-3s9PYUy4qS06zyTIRDvnAmhfrjVLBa/03Nu3tMcIReI="; + } // import ./fix-gqlgen-trimpath.nix {inherit unzip;}); in buildPythonPackage rec { @@ -42,6 +44,10 @@ buildPythonPackage rec { # Revert change breaking Unix socket support for Redis patches/redis-socket/meta/0001-Revert-Add-webhook-queue-monitoring.patch ]; + postPatch = '' + substituteInPlace Makefile \ + --replace "all: api" "" + ''; nativeBuildInputs = srht.nativeBuildInputs; @@ -68,7 +74,7 @@ buildPythonPackage rec { postInstall = '' mkdir -p $out/bin - cp ${buildApi "${src}/api/"}/bin/api $out/bin/metasrht-api + ln -s ${metasrht-api}/bin/api $out/bin/metasrht-api ''; pythonImportsCheck = [ "metasrht" ]; From 47680ca9e36a7d29b4be629b658fdde1a6eabac8 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Fri, 6 May 2022 00:08:13 +0200 Subject: [PATCH 124/148] sourcehut.pagessrht: 0.6.2 -> 0.7.3 --- .../version-management/sourcehut/pages.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/pages.nix b/pkgs/applications/version-management/sourcehut/pages.nix index b6a18b5bda77..faa6dbb4d49d 100644 --- a/pkgs/applications/version-management/sourcehut/pages.nix +++ b/pkgs/applications/version-management/sourcehut/pages.nix @@ -1,20 +1,21 @@ { lib , fetchFromSourcehut , buildGoModule +, unzip }: -buildGoModule rec { +buildGoModule (rec { pname = "pagessrht"; - version = "0.6.2"; + version = "0.7.3"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "pages.sr.ht"; rev = version; - sha256 = "sha256-ob0+t9V2o8lhVC6fXbi1rNm0Mnbs+GoyAmhBqVZ13PA="; + sha256 = "sha256-fHhf4VQ82/k4g8pzyuN9Pr2f8mxT8zw+2Nq0nw1Msks="; }; - vendorSha256 = "sha256-b0sHSH0jkKoIVq045N96wszuLJDegkkj0v50nuDFleU="; + vendorSha256 = "sha256-/+XVl6PZUMOZIiuO6vEu0dacefz2hDSObaP8JsItSTw="; postInstall = '' mkdir -p $out/share/sql/ @@ -27,4 +28,6 @@ buildGoModule rec { license = licenses.agpl3Only; maintainers = with maintainers; [ eadwu ]; }; -} + # There is no ./loaders but this does not cause troubles + # to go generate +} // import ./fix-gqlgen-trimpath.nix {inherit unzip;}) From 1722530759bedeb82f7470cbfb09328fd22783f3 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Fri, 6 May 2022 00:08:48 +0200 Subject: [PATCH 125/148] sourcehut.pastesrht: 0.13.6 -> 0.13.7 --- pkgs/applications/version-management/sourcehut/paste.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/paste.nix b/pkgs/applications/version-management/sourcehut/paste.nix index c411f8e8c954..fbbc5fcd6a9d 100644 --- a/pkgs/applications/version-management/sourcehut/paste.nix +++ b/pkgs/applications/version-management/sourcehut/paste.nix @@ -8,13 +8,13 @@ buildPythonPackage rec { pname = "pastesrht"; - version = "0.13.6"; + version = "0.13.7"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "paste.sr.ht"; rev = version; - sha256 = "sha256-Khcqk86iD9nxiKXN3+8mSLNoDau2qXNFOrLdkVu+rH8="; + sha256 = "sha256-EzcS6Zbh+wJinC/GKJOSWUPORODpKEA3tLpLGqoVGBU="; }; nativeBuildInputs = srht.nativeBuildInputs; From 876f3a8bf0eebc5c6cb50c5fecf420f6cb3f2836 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Fri, 6 May 2022 00:09:09 +0200 Subject: [PATCH 126/148] sourcehut.todosrht: 0.67.2 -> 0.71.0 --- .../services/misc/sourcehut/default.nix | 5 +++++ .../version-management/sourcehut/todo.nix | 22 +++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/misc/sourcehut/default.nix b/nixos/modules/services/misc/sourcehut/default.nix index 9f4aec4fd475..70f6ea7ce974 100644 --- a/nixos/modules/services/misc/sourcehut/default.nix +++ b/nixos/modules/services/misc/sourcehut/default.nix @@ -1368,6 +1368,11 @@ in inherit configIniOfService; port = 5003; webhooks = true; + extraServices.todosrht-api = { + serviceConfig.Restart = "always"; + serviceConfig.RestartSec = "2s"; + serviceConfig.ExecStart = "${pkgs.sourcehut.todosrht}/bin/todosrht-api -b ${cfg.listenAddress}:${toString (cfg.todo.port + 100)}"; + }; extraServices.todosrht-lmtp = { wants = [ "postfix.service" ]; unitConfig.JoinsNamespaceOf = optional cfg.postfix.enable "postfix.service"; diff --git a/pkgs/applications/version-management/sourcehut/todo.nix b/pkgs/applications/version-management/sourcehut/todo.nix index 1446e68fa69d..4611c63dd0b8 100644 --- a/pkgs/applications/version-management/sourcehut/todo.nix +++ b/pkgs/applications/version-management/sourcehut/todo.nix @@ -1,5 +1,6 @@ { lib , fetchFromSourcehut +, buildGoModule , buildPythonPackage , srht , redis @@ -8,23 +9,36 @@ , pytest , factory_boy , python +, unzip }: buildPythonPackage rec { pname = "todosrht"; - version = "0.67.2"; + version = "0.71.0"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "todo.sr.ht"; rev = version; - sha256 = "sha256-/QHsMlhzyah85ubZyx8j4GDUoITuWcLDJKosbZGeOZU="; + sha256 = "sha256-IIZKN006UIrdcxF+LYkUtc97QoCnWqzX8036vMctWHY="; }; patches = [ # Revert change breaking Unix socket support for Redis patches/redis-socket/todo/0001-Revert-Add-webhook-queue-monitoring.patch ]; + postPatch = '' + substituteInPlace Makefile \ + --replace "all: api" "" + ''; + + + todosrht-api = buildGoModule ({ + inherit src version; + pname = "todosrht-api"; + modRoot = "api"; + vendorSha256 = "sha256-ttGT7lUh8O+9KvbaEGWUsthefXQ2ATeli0tnlXCjZFk="; + } // import ./fix-gqlgen-trimpath.nix {inherit unzip;}); nativeBuildInputs = srht.nativeBuildInputs; @@ -40,6 +54,10 @@ buildPythonPackage rec { export SRHT_PATH=${srht}/${python.sitePackages}/srht ''; + postInstall = '' + ln -s ${todosrht-api}/bin/api $out/bin/todosrht-api + ''; + # pytest tests fail checkInputs = [ pytest From 43b5dcd60cf471f3c3d83eff49c453316a2430a8 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Fri, 6 May 2022 21:55:26 +0200 Subject: [PATCH 127/148] nixos/sourcehut: remove forgotten unused files --- .../services/misc/sourcehut/builds.nix | 236 ------------------ .../services/misc/sourcehut/dispatch.nix | 127 ---------- nixos/modules/services/misc/sourcehut/git.nix | 217 ---------------- nixos/modules/services/misc/sourcehut/hg.nix | 175 ------------- nixos/modules/services/misc/sourcehut/hub.nix | 120 --------- .../modules/services/misc/sourcehut/lists.nix | 187 -------------- nixos/modules/services/misc/sourcehut/man.nix | 124 --------- .../modules/services/misc/sourcehut/meta.nix | 213 ---------------- .../modules/services/misc/sourcehut/paste.nix | 135 ---------- .../modules/services/misc/sourcehut/todo.nix | 163 ------------ 10 files changed, 1697 deletions(-) delete mode 100644 nixos/modules/services/misc/sourcehut/builds.nix delete mode 100644 nixos/modules/services/misc/sourcehut/dispatch.nix delete mode 100644 nixos/modules/services/misc/sourcehut/git.nix delete mode 100644 nixos/modules/services/misc/sourcehut/hg.nix delete mode 100644 nixos/modules/services/misc/sourcehut/hub.nix delete mode 100644 nixos/modules/services/misc/sourcehut/lists.nix delete mode 100644 nixos/modules/services/misc/sourcehut/man.nix delete mode 100644 nixos/modules/services/misc/sourcehut/meta.nix delete mode 100644 nixos/modules/services/misc/sourcehut/paste.nix delete mode 100644 nixos/modules/services/misc/sourcehut/todo.nix diff --git a/nixos/modules/services/misc/sourcehut/builds.nix b/nixos/modules/services/misc/sourcehut/builds.nix deleted file mode 100644 index 685a132d3507..000000000000 --- a/nixos/modules/services/misc/sourcehut/builds.nix +++ /dev/null @@ -1,236 +0,0 @@ -{ config, lib, options, pkgs, ... }: - -with lib; -let - cfg = config.services.sourcehut; - opt = options.services.sourcehut; - scfg = cfg.builds; - rcfg = config.services.redis; - iniKey = "builds.sr.ht"; - - drv = pkgs.sourcehut.buildsrht; -in -{ - options.services.sourcehut.builds = { - user = mkOption { - type = types.str; - default = "buildsrht"; - description = '' - User for builds.sr.ht. - ''; - }; - - port = mkOption { - type = types.port; - default = 5002; - description = '' - Port on which the "builds" module should listen. - ''; - }; - - database = mkOption { - type = types.str; - default = "builds.sr.ht"; - description = '' - PostgreSQL database name for builds.sr.ht. - ''; - }; - - statePath = mkOption { - type = types.path; - default = "${cfg.statePath}/buildsrht"; - defaultText = literalExpression ''"''${config.${opt.statePath}}/buildsrht"''; - description = '' - State path for builds.sr.ht. - ''; - }; - - enableWorker = mkOption { - type = types.bool; - default = false; - description = '' - Run workers for builds.sr.ht. - ''; - }; - - images = mkOption { - type = types.attrsOf (types.attrsOf (types.attrsOf types.package)); - default = { }; - example = lib.literalExpression ''(let - # Pinning unstable to allow usage with flakes and limit rebuilds. - pkgs_unstable = builtins.fetchGit { - url = "https://github.com/NixOS/nixpkgs"; - rev = "ff96a0fa5635770390b184ae74debea75c3fd534"; - ref = "nixos-unstable"; - }; - image_from_nixpkgs = pkgs_unstable: (import ("''${pkgs.sourcehut.buildsrht}/lib/images/nixos/image.nix") { - pkgs = (import pkgs_unstable {}); - }); - in - { - nixos.unstable.x86_64 = image_from_nixpkgs pkgs_unstable; - } - )''; - description = '' - Images for builds.sr.ht. Each package should be distro.release.arch and point to a /nix/store/package/root.img.qcow2. - ''; - }; - - }; - - config = with scfg; let - image_dirs = lib.lists.flatten ( - lib.attrsets.mapAttrsToList - (distro: revs: - lib.attrsets.mapAttrsToList - (rev: archs: - lib.attrsets.mapAttrsToList - (arch: image: - pkgs.runCommand "buildsrht-images" { } '' - mkdir -p $out/${distro}/${rev}/${arch} - ln -s ${image}/*.qcow2 $out/${distro}/${rev}/${arch}/root.img.qcow2 - '') - archs) - revs) - scfg.images); - image_dir_pre = pkgs.symlinkJoin { - name = "builds.sr.ht-worker-images-pre"; - paths = image_dirs ++ [ - "${pkgs.sourcehut.buildsrht}/lib/images" - ]; - }; - image_dir = pkgs.runCommand "builds.sr.ht-worker-images" { } '' - mkdir -p $out/images - cp -Lr ${image_dir_pre}/* $out/images - ''; - in - lib.mkIf (cfg.enable && elem "builds" cfg.services) { - users = { - users = { - "${user}" = { - isSystemUser = true; - group = user; - extraGroups = lib.optionals cfg.builds.enableWorker [ "docker" ]; - description = "builds.sr.ht user"; - }; - }; - - groups = { - "${user}" = { }; - }; - }; - - services.postgresql = { - authentication = '' - local ${database} ${user} trust - ''; - ensureDatabases = [ database ]; - ensureUsers = [ - { - name = user; - ensurePermissions = { "DATABASE \"${database}\"" = "ALL PRIVILEGES"; }; - } - ]; - }; - - systemd = { - tmpfiles.rules = [ - "d ${statePath} 0755 ${user} ${user} -" - ] ++ (lib.optionals cfg.builds.enableWorker - [ "d ${statePath}/logs 0775 ${user} ${user} - -" ] - ); - - services = { - buildsrht = import ./service.nix { inherit config pkgs lib; } scfg drv iniKey - { - after = [ "postgresql.service" "network.target" ]; - requires = [ "postgresql.service" ]; - wantedBy = [ "multi-user.target" ]; - - description = "builds.sr.ht website service"; - - serviceConfig.ExecStart = "${cfg.python}/bin/gunicorn ${drv.pname}.app:app -b ${cfg.address}:${toString port}"; - - # Hack to bypass this hack: https://git.sr.ht/~sircmpwn/core.sr.ht/tree/master/item/srht-update-profiles#L6 - } // { preStart = " "; }; - - buildsrht-worker = { - enable = scfg.enableWorker; - after = [ "postgresql.service" "network.target" ]; - requires = [ "postgresql.service" ]; - wantedBy = [ "multi-user.target" ]; - partOf = [ "buildsrht.service" ]; - description = "builds.sr.ht worker service"; - path = [ pkgs.openssh pkgs.docker ]; - preStart = let qemuPackage = pkgs.qemu_kvm; - in '' - if [[ "$(docker images -q qemu:latest 2> /dev/null)" == "" || "$(cat ${statePath}/docker-image-qemu 2> /dev/null || true)" != "${qemuPackage.version}" ]]; then - # Create and import qemu:latest image for docker - ${ - pkgs.dockerTools.streamLayeredImage { - name = "qemu"; - tag = "latest"; - contents = [ qemuPackage ]; - } - } | docker load - # Mark down current package version - printf "%s" "${qemuPackage.version}" > ${statePath}/docker-image-qemu - fi - ''; - serviceConfig = { - Type = "simple"; - User = user; - Group = "nginx"; - Restart = "always"; - }; - serviceConfig.ExecStart = "${pkgs.sourcehut.buildsrht}/bin/builds.sr.ht-worker"; - }; - }; - }; - - services.sourcehut.settings = { - # URL builds.sr.ht is being served at (protocol://domain) - "builds.sr.ht".origin = mkDefault "http://builds.${cfg.originBase}"; - # Address and port to bind the debug server to - "builds.sr.ht".debug-host = mkDefault "0.0.0.0"; - "builds.sr.ht".debug-port = mkDefault port; - # Configures the SQLAlchemy connection string for the database. - "builds.sr.ht".connection-string = mkDefault "postgresql:///${database}?user=${user}&host=/var/run/postgresql"; - # Set to "yes" to automatically run migrations on package upgrade. - "builds.sr.ht".migrate-on-upgrade = mkDefault "yes"; - # builds.sr.ht's OAuth client ID and secret for meta.sr.ht - # Register your client at meta.example.org/oauth - "builds.sr.ht".oauth-client-id = mkDefault null; - "builds.sr.ht".oauth-client-secret = mkDefault null; - # The redis connection used for the celery worker - "builds.sr.ht".redis = mkDefault "redis://${rcfg.bind}:${toString rcfg.port}/3"; - # The shell used for ssh - "builds.sr.ht".shell = mkDefault "runner-shell"; - # Register the builds.sr.ht dispatcher - "git.sr.ht::dispatch".${builtins.unsafeDiscardStringContext "${pkgs.sourcehut.buildsrht}/bin/buildsrht-keys"} = mkDefault "${user}:${user}"; - - # Location for build logs, images, and control command - } // lib.attrsets.optionalAttrs scfg.enableWorker { - # Default worker stores logs that are accessible via this address:port - "builds.sr.ht::worker".name = mkDefault "127.0.0.1:5020"; - "builds.sr.ht::worker".buildlogs = mkDefault "${scfg.statePath}/logs"; - "builds.sr.ht::worker".images = mkDefault "${image_dir}/images"; - "builds.sr.ht::worker".controlcmd = mkDefault "${image_dir}/images/control"; - "builds.sr.ht::worker".timeout = mkDefault "3m"; - }; - - services.nginx.virtualHosts."logs.${cfg.originBase}" = - if scfg.enableWorker then { - listen = with builtins; let address = split ":" cfg.settings."builds.sr.ht::worker".name; - in [{ addr = elemAt address 0; port = lib.toInt (elemAt address 2); }]; - locations."/logs".root = "${scfg.statePath}"; - } else { }; - - services.nginx.virtualHosts."builds.${cfg.originBase}" = { - forceSSL = true; - locations."/".proxyPass = "http://${cfg.address}:${toString port}"; - locations."/query".proxyPass = "http://${cfg.address}:${toString (port + 100)}"; - locations."/static".root = "${pkgs.sourcehut.buildsrht}/${pkgs.sourcehut.python.sitePackages}/buildsrht"; - }; - }; -} diff --git a/nixos/modules/services/misc/sourcehut/dispatch.nix b/nixos/modules/services/misc/sourcehut/dispatch.nix deleted file mode 100644 index 292a51d3e1c5..000000000000 --- a/nixos/modules/services/misc/sourcehut/dispatch.nix +++ /dev/null @@ -1,127 +0,0 @@ -{ config, lib, options, pkgs, ... }: - -with lib; -let - cfg = config.services.sourcehut; - opt = options.services.sourcehut; - cfgIni = cfg.settings; - scfg = cfg.dispatch; - iniKey = "dispatch.sr.ht"; - - drv = pkgs.sourcehut.dispatchsrht; -in -{ - options.services.sourcehut.dispatch = { - user = mkOption { - type = types.str; - default = "dispatchsrht"; - description = '' - User for dispatch.sr.ht. - ''; - }; - - port = mkOption { - type = types.port; - default = 5005; - description = '' - Port on which the "dispatch" module should listen. - ''; - }; - - database = mkOption { - type = types.str; - default = "dispatch.sr.ht"; - description = '' - PostgreSQL database name for dispatch.sr.ht. - ''; - }; - - statePath = mkOption { - type = types.path; - default = "${cfg.statePath}/dispatchsrht"; - defaultText = literalExpression ''"''${config.${opt.statePath}}/dispatchsrht"''; - description = '' - State path for dispatch.sr.ht. - ''; - }; - }; - - config = with scfg; lib.mkIf (cfg.enable && elem "dispatch" cfg.services) { - - users = { - users = { - "${user}" = { - isSystemUser = true; - group = user; - description = "dispatch.sr.ht user"; - }; - }; - - groups = { - "${user}" = { }; - }; - }; - - services.postgresql = { - authentication = '' - local ${database} ${user} trust - ''; - ensureDatabases = [ database ]; - ensureUsers = [ - { - name = user; - ensurePermissions = { "DATABASE \"${database}\"" = "ALL PRIVILEGES"; }; - } - ]; - }; - - systemd = { - tmpfiles.rules = [ - "d ${statePath} 0750 ${user} ${user} -" - ]; - - services.dispatchsrht = import ./service.nix { inherit config pkgs lib; } scfg drv iniKey { - after = [ "postgresql.service" "network.target" ]; - requires = [ "postgresql.service" ]; - wantedBy = [ "multi-user.target" ]; - - description = "dispatch.sr.ht website service"; - - serviceConfig.ExecStart = "${cfg.python}/bin/gunicorn ${drv.pname}.app:app -b ${cfg.address}:${toString port}"; - }; - }; - - services.sourcehut.settings = { - # URL dispatch.sr.ht is being served at (protocol://domain) - "dispatch.sr.ht".origin = mkDefault "http://dispatch.${cfg.originBase}"; - # Address and port to bind the debug server to - "dispatch.sr.ht".debug-host = mkDefault "0.0.0.0"; - "dispatch.sr.ht".debug-port = mkDefault port; - # Configures the SQLAlchemy connection string for the database. - "dispatch.sr.ht".connection-string = mkDefault "postgresql:///${database}?user=${user}&host=/var/run/postgresql"; - # Set to "yes" to automatically run migrations on package upgrade. - "dispatch.sr.ht".migrate-on-upgrade = mkDefault "yes"; - # dispatch.sr.ht's OAuth client ID and secret for meta.sr.ht - # Register your client at meta.example.org/oauth - "dispatch.sr.ht".oauth-client-id = mkDefault null; - "dispatch.sr.ht".oauth-client-secret = mkDefault null; - - # Github Integration - "dispatch.sr.ht::github".oauth-client-id = mkDefault null; - "dispatch.sr.ht::github".oauth-client-secret = mkDefault null; - - # Gitlab Integration - "dispatch.sr.ht::gitlab".enabled = mkDefault null; - "dispatch.sr.ht::gitlab".canonical-upstream = mkDefault "gitlab.com"; - "dispatch.sr.ht::gitlab".repo-cache = mkDefault "./repo-cache"; - # "dispatch.sr.ht::gitlab"."gitlab.com" = mkDefault "GitLab:application id:secret"; - }; - - services.nginx.virtualHosts."dispatch.${cfg.originBase}" = { - forceSSL = true; - locations."/".proxyPass = "http://${cfg.address}:${toString port}"; - locations."/query".proxyPass = "http://${cfg.address}:${toString (port + 100)}"; - locations."/static".root = "${pkgs.sourcehut.dispatchsrht}/${pkgs.sourcehut.python.sitePackages}/dispatchsrht"; - }; - }; -} diff --git a/nixos/modules/services/misc/sourcehut/git.nix b/nixos/modules/services/misc/sourcehut/git.nix deleted file mode 100644 index ff110905d184..000000000000 --- a/nixos/modules/services/misc/sourcehut/git.nix +++ /dev/null @@ -1,217 +0,0 @@ -{ config, lib, options, pkgs, ... }: - -with lib; -let - cfg = config.services.sourcehut; - opt = options.services.sourcehut; - scfg = cfg.git; - iniKey = "git.sr.ht"; - - rcfg = config.services.redis; - drv = pkgs.sourcehut.gitsrht; -in -{ - options.services.sourcehut.git = { - user = mkOption { - type = types.str; - visible = false; - internal = true; - readOnly = true; - default = "git"; - description = '' - User for git.sr.ht. - ''; - }; - - port = mkOption { - type = types.port; - default = 5001; - description = '' - Port on which the "git" module should listen. - ''; - }; - - database = mkOption { - type = types.str; - default = "git.sr.ht"; - description = '' - PostgreSQL database name for git.sr.ht. - ''; - }; - - statePath = mkOption { - type = types.path; - default = "${cfg.statePath}/gitsrht"; - defaultText = literalExpression ''"''${config.${opt.statePath}}/gitsrht"''; - description = '' - State path for git.sr.ht. - ''; - }; - - package = mkOption { - type = types.package; - default = pkgs.git; - defaultText = literalExpression "pkgs.git"; - example = literalExpression "pkgs.gitFull"; - description = '' - Git package for git.sr.ht. This can help silence collisions. - ''; - }; - }; - - config = with scfg; lib.mkIf (cfg.enable && elem "git" cfg.services) { - # sshd refuses to run with `Unsafe AuthorizedKeysCommand ... bad ownership or modes for directory /nix/store` - environment.etc."ssh/gitsrht-dispatch" = { - mode = "0755"; - text = '' - #! ${pkgs.stdenv.shell} - ${cfg.python}/bin/gitsrht-dispatch "$@" - ''; - }; - - # Needs this in the $PATH when sshing into the server - environment.systemPackages = [ cfg.git.package ]; - - users = { - users = { - "${user}" = { - isSystemUser = true; - group = user; - # https://stackoverflow.com/questions/22314298/git-push-results-in-fatal-protocol-error-bad-line-length-character-this - # Probably could use gitsrht-shell if output is restricted to just parameters... - shell = pkgs.bash; - description = "git.sr.ht user"; - }; - }; - - groups = { - "${user}" = { }; - }; - }; - - services = { - cron.systemCronJobs = [ "*/20 * * * * ${cfg.python}/bin/gitsrht-periodic" ]; - fcgiwrap.enable = true; - - openssh.authorizedKeysCommand = ''/etc/ssh/gitsrht-dispatch "%u" "%h" "%t" "%k"''; - openssh.authorizedKeysCommandUser = "root"; - openssh.extraConfig = '' - PermitUserEnvironment SRHT_* - ''; - - postgresql = { - authentication = '' - local ${database} ${user} trust - ''; - ensureDatabases = [ database ]; - ensureUsers = [ - { - name = user; - ensurePermissions = { "DATABASE \"${database}\"" = "ALL PRIVILEGES"; }; - } - ]; - }; - }; - - systemd = { - tmpfiles.rules = [ - # /var/log is owned by root - "f /var/log/git-srht-shell 0644 ${user} ${user} -" - - "d ${statePath} 0750 ${user} ${user} -" - "d ${cfg.settings."${iniKey}".repos} 2755 ${user} ${user} -" - ]; - - services = { - gitsrht = import ./service.nix { inherit config pkgs lib; } scfg drv iniKey { - after = [ "redis.service" "postgresql.service" "network.target" ]; - requires = [ "redis.service" "postgresql.service" ]; - wantedBy = [ "multi-user.target" ]; - - # Needs internally to create repos at the very least - path = [ pkgs.git ]; - description = "git.sr.ht website service"; - - serviceConfig.ExecStart = "${cfg.python}/bin/gunicorn ${drv.pname}.app:app -b ${cfg.address}:${toString port}"; - }; - - gitsrht-webhooks = { - after = [ "postgresql.service" "network.target" ]; - requires = [ "postgresql.service" ]; - wantedBy = [ "multi-user.target" ]; - - description = "git.sr.ht webhooks service"; - serviceConfig = { - Type = "simple"; - User = user; - Restart = "always"; - }; - - serviceConfig.ExecStart = "${cfg.python}/bin/celery -A ${drv.pname}.webhooks worker --loglevel=info"; - }; - }; - }; - - services.sourcehut.settings = { - # URL git.sr.ht is being served at (protocol://domain) - "git.sr.ht".origin = mkDefault "http://git.${cfg.originBase}"; - # Address and port to bind the debug server to - "git.sr.ht".debug-host = mkDefault "0.0.0.0"; - "git.sr.ht".debug-port = mkDefault port; - # Configures the SQLAlchemy connection string for the database. - "git.sr.ht".connection-string = mkDefault "postgresql:///${database}?user=${user}&host=/var/run/postgresql"; - # Set to "yes" to automatically run migrations on package upgrade. - "git.sr.ht".migrate-on-upgrade = mkDefault "yes"; - # The redis connection used for the webhooks worker - "git.sr.ht".webhooks = mkDefault "redis://${rcfg.bind}:${toString rcfg.port}/1"; - - # A post-update script which is installed in every git repo. - "git.sr.ht".post-update-script = mkDefault "${pkgs.sourcehut.gitsrht}/bin/gitsrht-update-hook"; - - # git.sr.ht's OAuth client ID and secret for meta.sr.ht - # Register your client at meta.example.org/oauth - "git.sr.ht".oauth-client-id = mkDefault null; - "git.sr.ht".oauth-client-secret = mkDefault null; - # Path to git repositories on disk - "git.sr.ht".repos = mkDefault "/var/lib/git"; - - "git.sr.ht".outgoing-domain = mkDefault "http://git.${cfg.originBase}"; - - # The authorized keys hook uses this to dispatch to various handlers - # The format is a program to exec into as the key, and the user to match as the - # value. When someone tries to log in as this user, this program is executed - # and is expected to omit an AuthorizedKeys file. - # - # Discard of the string context is in order to allow derivation-derived strings. - # This is safe if the relevant package is installed which will be the case if the setting is utilized. - "git.sr.ht::dispatch".${builtins.unsafeDiscardStringContext "${pkgs.sourcehut.gitsrht}/bin/gitsrht-keys"} = mkDefault "${user}:${user}"; - }; - - services.nginx.virtualHosts."git.${cfg.originBase}" = { - forceSSL = true; - locations."/".proxyPass = "http://${cfg.address}:${toString port}"; - locations."/query".proxyPass = "http://${cfg.address}:${toString (port + 100)}"; - locations."/static".root = "${pkgs.sourcehut.gitsrht}/${pkgs.sourcehut.python.sitePackages}/gitsrht"; - extraConfig = '' - location = /authorize { - proxy_pass http://${cfg.address}:${toString port}; - proxy_pass_request_body off; - proxy_set_header Content-Length ""; - proxy_set_header X-Original-URI $request_uri; - } - location ~ ^/([^/]+)/([^/]+)/(HEAD|info/refs|objects/info/.*|git-upload-pack).*$ { - auth_request /authorize; - root /var/lib/git; - fastcgi_pass unix:/run/fcgiwrap.sock; - fastcgi_param SCRIPT_FILENAME ${pkgs.git}/bin/git-http-backend; - fastcgi_param PATH_INFO $uri; - fastcgi_param GIT_PROJECT_ROOT $document_root; - fastcgi_read_timeout 500s; - include ${config.services.nginx.package}/conf/fastcgi_params; - gzip off; - } - ''; - - }; - }; -} diff --git a/nixos/modules/services/misc/sourcehut/hg.nix b/nixos/modules/services/misc/sourcehut/hg.nix deleted file mode 100644 index 6ba1df8b6ddb..000000000000 --- a/nixos/modules/services/misc/sourcehut/hg.nix +++ /dev/null @@ -1,175 +0,0 @@ -{ config, lib, options, pkgs, ... }: - -with lib; -let - cfg = config.services.sourcehut; - opt = options.services.sourcehut; - scfg = cfg.hg; - iniKey = "hg.sr.ht"; - - rcfg = config.services.redis; - drv = pkgs.sourcehut.hgsrht; -in -{ - options.services.sourcehut.hg = { - user = mkOption { - type = types.str; - internal = true; - readOnly = true; - default = "hg"; - description = '' - User for hg.sr.ht. - ''; - }; - - port = mkOption { - type = types.port; - default = 5010; - description = '' - Port on which the "hg" module should listen. - ''; - }; - - database = mkOption { - type = types.str; - default = "hg.sr.ht"; - description = '' - PostgreSQL database name for hg.sr.ht. - ''; - }; - - statePath = mkOption { - type = types.path; - default = "${cfg.statePath}/hgsrht"; - defaultText = literalExpression ''"''${config.${opt.statePath}}/hgsrht"''; - description = '' - State path for hg.sr.ht. - ''; - }; - - cloneBundles = mkOption { - type = types.bool; - default = false; - description = '' - Generate clonebundles (which require more disk space but dramatically speed up cloning large repositories). - ''; - }; - }; - - config = with scfg; lib.mkIf (cfg.enable && elem "hg" cfg.services) { - # In case it ever comes into being - environment.etc."ssh/hgsrht-dispatch" = { - mode = "0755"; - text = '' - #! ${pkgs.stdenv.shell} - ${cfg.python}/bin/gitsrht-dispatch $@ - ''; - }; - - environment.systemPackages = [ pkgs.mercurial ]; - - users = { - users = { - "${user}" = { - isSystemUser = true; - group = user; - # Assuming hg.sr.ht needs this too - shell = pkgs.bash; - description = "hg.sr.ht user"; - }; - }; - - groups = { - "${user}" = { }; - }; - }; - - services = { - cron.systemCronJobs = [ "*/20 * * * * ${cfg.python}/bin/hgsrht-periodic" ] - ++ optional cloneBundles "0 * * * * ${cfg.python}/bin/hgsrht-clonebundles"; - - openssh.authorizedKeysCommand = ''/etc/ssh/hgsrht-dispatch "%u" "%h" "%t" "%k"''; - openssh.authorizedKeysCommandUser = "root"; - openssh.extraConfig = '' - PermitUserEnvironment SRHT_* - ''; - - postgresql = { - authentication = '' - local ${database} ${user} trust - ''; - ensureDatabases = [ database ]; - ensureUsers = [ - { - name = user; - ensurePermissions = { "DATABASE \"${database}\"" = "ALL PRIVILEGES"; }; - } - ]; - }; - }; - - systemd = { - tmpfiles.rules = [ - # /var/log is owned by root - "f /var/log/hg-srht-shell 0644 ${user} ${user} -" - - "d ${statePath} 0750 ${user} ${user} -" - "d ${cfg.settings."${iniKey}".repos} 2755 ${user} ${user} -" - ]; - - services.hgsrht = import ./service.nix { inherit config pkgs lib; } scfg drv iniKey { - after = [ "redis.service" "postgresql.service" "network.target" ]; - requires = [ "redis.service" "postgresql.service" ]; - wantedBy = [ "multi-user.target" ]; - - path = [ pkgs.mercurial ]; - description = "hg.sr.ht website service"; - - serviceConfig.ExecStart = "${cfg.python}/bin/gunicorn ${drv.pname}.app:app -b ${cfg.address}:${toString port}"; - }; - }; - - services.sourcehut.settings = { - # URL hg.sr.ht is being served at (protocol://domain) - "hg.sr.ht".origin = mkDefault "http://hg.${cfg.originBase}"; - # Address and port to bind the debug server to - "hg.sr.ht".debug-host = mkDefault "0.0.0.0"; - "hg.sr.ht".debug-port = mkDefault port; - # Configures the SQLAlchemy connection string for the database. - "hg.sr.ht".connection-string = mkDefault "postgresql:///${database}?user=${user}&host=/var/run/postgresql"; - # The redis connection used for the webhooks worker - "hg.sr.ht".webhooks = mkDefault "redis://${rcfg.bind}:${toString rcfg.port}/1"; - # A post-update script which is installed in every mercurial repo. - "hg.sr.ht".changegroup-script = mkDefault "${cfg.python}/bin/hgsrht-hook-changegroup"; - # hg.sr.ht's OAuth client ID and secret for meta.sr.ht - # Register your client at meta.example.org/oauth - "hg.sr.ht".oauth-client-id = mkDefault null; - "hg.sr.ht".oauth-client-secret = mkDefault null; - # Path to mercurial repositories on disk - "hg.sr.ht".repos = mkDefault "/var/lib/hg"; - # Path to the srht mercurial extension - # (defaults to where the hgsrht code is) - # "hg.sr.ht".srhtext = mkDefault null; - # .hg/store size (in MB) past which the nightly job generates clone bundles. - # "hg.sr.ht".clone_bundle_threshold = mkDefault 50; - # Path to hg-ssh (if not in $PATH) - # "hg.sr.ht".hg_ssh = mkDefault /path/to/hg-ssh; - - # The authorized keys hook uses this to dispatch to various handlers - # The format is a program to exec into as the key, and the user to match as the - # value. When someone tries to log in as this user, this program is executed - # and is expected to omit an AuthorizedKeys file. - # - # Uncomment the relevant lines to enable the various sr.ht dispatchers. - "hg.sr.ht::dispatch"."/run/current-system/sw/bin/hgsrht-keys" = mkDefault "${user}:${user}"; - }; - - # TODO: requires testing and addition of hg-specific requirements - services.nginx.virtualHosts."hg.${cfg.originBase}" = { - forceSSL = true; - locations."/".proxyPass = "http://${cfg.address}:${toString port}"; - locations."/query".proxyPass = "http://${cfg.address}:${toString (port + 100)}"; - locations."/static".root = "${pkgs.sourcehut.hgsrht}/${pkgs.sourcehut.python.sitePackages}/hgsrht"; - }; - }; -} diff --git a/nixos/modules/services/misc/sourcehut/hub.nix b/nixos/modules/services/misc/sourcehut/hub.nix deleted file mode 100644 index 7d137a765056..000000000000 --- a/nixos/modules/services/misc/sourcehut/hub.nix +++ /dev/null @@ -1,120 +0,0 @@ -{ config, lib, options, pkgs, ... }: - -with lib; -let - cfg = config.services.sourcehut; - opt = options.services.sourcehut; - cfgIni = cfg.settings; - scfg = cfg.hub; - iniKey = "hub.sr.ht"; - - drv = pkgs.sourcehut.hubsrht; -in -{ - options.services.sourcehut.hub = { - user = mkOption { - type = types.str; - default = "hubsrht"; - description = '' - User for hub.sr.ht. - ''; - }; - - port = mkOption { - type = types.port; - default = 5014; - description = '' - Port on which the "hub" module should listen. - ''; - }; - - database = mkOption { - type = types.str; - default = "hub.sr.ht"; - description = '' - PostgreSQL database name for hub.sr.ht. - ''; - }; - - statePath = mkOption { - type = types.path; - default = "${cfg.statePath}/hubsrht"; - defaultText = literalExpression ''"''${config.${opt.statePath}}/hubsrht"''; - description = '' - State path for hub.sr.ht. - ''; - }; - }; - - config = with scfg; lib.mkIf (cfg.enable && elem "hub" cfg.services) { - users = { - users = { - "${user}" = { - isSystemUser = true; - group = user; - description = "hub.sr.ht user"; - }; - }; - - groups = { - "${user}" = { }; - }; - }; - - services.postgresql = { - authentication = '' - local ${database} ${user} trust - ''; - ensureDatabases = [ database ]; - ensureUsers = [ - { - name = user; - ensurePermissions = { "DATABASE \"${database}\"" = "ALL PRIVILEGES"; }; - } - ]; - }; - - systemd = { - tmpfiles.rules = [ - "d ${statePath} 0750 ${user} ${user} -" - ]; - - services.hubsrht = import ./service.nix { inherit config pkgs lib; } scfg drv iniKey { - after = [ "postgresql.service" "network.target" ]; - requires = [ "postgresql.service" ]; - wantedBy = [ "multi-user.target" ]; - - description = "hub.sr.ht website service"; - - serviceConfig.ExecStart = "${cfg.python}/bin/gunicorn ${drv.pname}.app:app -b ${cfg.address}:${toString port}"; - }; - }; - - services.sourcehut.settings = { - # URL hub.sr.ht is being served at (protocol://domain) - "hub.sr.ht".origin = mkDefault "http://hub.${cfg.originBase}"; - # Address and port to bind the debug server to - "hub.sr.ht".debug-host = mkDefault "0.0.0.0"; - "hub.sr.ht".debug-port = mkDefault port; - # Configures the SQLAlchemy connection string for the database. - "hub.sr.ht".connection-string = mkDefault "postgresql:///${database}?user=${user}&host=/var/run/postgresql"; - # Set to "yes" to automatically run migrations on package upgrade. - "hub.sr.ht".migrate-on-upgrade = mkDefault "yes"; - # hub.sr.ht's OAuth client ID and secret for meta.sr.ht - # Register your client at meta.example.org/oauth - "hub.sr.ht".oauth-client-id = mkDefault null; - "hub.sr.ht".oauth-client-secret = mkDefault null; - }; - - services.nginx.virtualHosts."${cfg.originBase}" = { - forceSSL = true; - locations."/".proxyPass = "http://${cfg.address}:${toString port}"; - locations."/query".proxyPass = "http://${cfg.address}:${toString (port + 100)}"; - locations."/static".root = "${pkgs.sourcehut.hubsrht}/${pkgs.sourcehut.python.sitePackages}/hubsrht"; - }; - services.nginx.virtualHosts."hub.${cfg.originBase}" = { - globalRedirect = "${cfg.originBase}"; - forceSSL = true; - }; - }; -} diff --git a/nixos/modules/services/misc/sourcehut/lists.nix b/nixos/modules/services/misc/sourcehut/lists.nix deleted file mode 100644 index 76f155caa05b..000000000000 --- a/nixos/modules/services/misc/sourcehut/lists.nix +++ /dev/null @@ -1,187 +0,0 @@ -# Email setup is fairly involved, useful references: -# https://drewdevault.com/2018/08/05/Local-mail-server.html - -{ config, lib, options, pkgs, ... }: - -with lib; -let - cfg = config.services.sourcehut; - opt = options.services.sourcehut; - cfgIni = cfg.settings; - scfg = cfg.lists; - iniKey = "lists.sr.ht"; - - rcfg = config.services.redis; - drv = pkgs.sourcehut.listssrht; -in -{ - options.services.sourcehut.lists = { - user = mkOption { - type = types.str; - default = "listssrht"; - description = '' - User for lists.sr.ht. - ''; - }; - - port = mkOption { - type = types.port; - default = 5006; - description = '' - Port on which the "lists" module should listen. - ''; - }; - - database = mkOption { - type = types.str; - default = "lists.sr.ht"; - description = '' - PostgreSQL database name for lists.sr.ht. - ''; - }; - - statePath = mkOption { - type = types.path; - default = "${cfg.statePath}/listssrht"; - defaultText = literalExpression ''"''${config.${opt.statePath}}/listssrht"''; - description = '' - State path for lists.sr.ht. - ''; - }; - }; - - config = with scfg; lib.mkIf (cfg.enable && elem "lists" cfg.services) { - users = { - users = { - "${user}" = { - isSystemUser = true; - group = user; - extraGroups = [ "postfix" ]; - description = "lists.sr.ht user"; - }; - }; - groups = { - "${user}" = { }; - }; - }; - - services.postgresql = { - authentication = '' - local ${database} ${user} trust - ''; - ensureDatabases = [ database ]; - ensureUsers = [ - { - name = user; - ensurePermissions = { "DATABASE \"${database}\"" = "ALL PRIVILEGES"; }; - } - ]; - }; - - systemd = { - tmpfiles.rules = [ - "d ${statePath} 0750 ${user} ${user} -" - ]; - - services = { - listssrht = import ./service.nix { inherit config pkgs lib; } scfg drv iniKey { - after = [ "postgresql.service" "network.target" ]; - requires = [ "postgresql.service" ]; - wantedBy = [ "multi-user.target" ]; - - description = "lists.sr.ht website service"; - - serviceConfig.ExecStart = "${cfg.python}/bin/gunicorn ${drv.pname}.app:app -b ${cfg.address}:${toString port}"; - }; - - listssrht-process = { - after = [ "postgresql.service" "network.target" ]; - requires = [ "postgresql.service" ]; - wantedBy = [ "multi-user.target" ]; - - description = "lists.sr.ht process service"; - serviceConfig = { - Type = "simple"; - User = user; - Restart = "always"; - ExecStart = "${cfg.python}/bin/celery -A ${drv.pname}.process worker --loglevel=info"; - }; - }; - - listssrht-lmtp = { - after = [ "postgresql.service" "network.target" ]; - requires = [ "postgresql.service" ]; - wantedBy = [ "multi-user.target" ]; - - description = "lists.sr.ht process service"; - serviceConfig = { - Type = "simple"; - User = user; - Restart = "always"; - ExecStart = "${cfg.python}/bin/listssrht-lmtp"; - }; - }; - - - listssrht-webhooks = { - after = [ "postgresql.service" "network.target" ]; - requires = [ "postgresql.service" ]; - wantedBy = [ "multi-user.target" ]; - - description = "lists.sr.ht webhooks service"; - serviceConfig = { - Type = "simple"; - User = user; - Restart = "always"; - ExecStart = "${cfg.python}/bin/celery -A ${drv.pname}.webhooks worker --loglevel=info"; - }; - }; - }; - }; - - services.sourcehut.settings = { - # URL lists.sr.ht is being served at (protocol://domain) - "lists.sr.ht".origin = mkDefault "http://lists.${cfg.originBase}"; - # Address and port to bind the debug server to - "lists.sr.ht".debug-host = mkDefault "0.0.0.0"; - "lists.sr.ht".debug-port = mkDefault port; - # Configures the SQLAlchemy connection string for the database. - "lists.sr.ht".connection-string = mkDefault "postgresql:///${database}?user=${user}&host=/var/run/postgresql"; - # Set to "yes" to automatically run migrations on package upgrade. - "lists.sr.ht".migrate-on-upgrade = mkDefault "yes"; - # lists.sr.ht's OAuth client ID and secret for meta.sr.ht - # Register your client at meta.example.org/oauth - "lists.sr.ht".oauth-client-id = mkDefault null; - "lists.sr.ht".oauth-client-secret = mkDefault null; - # Outgoing email for notifications generated by users - "lists.sr.ht".notify-from = mkDefault "CHANGEME@example.org"; - # The redis connection used for the webhooks worker - "lists.sr.ht".webhooks = mkDefault "redis://${rcfg.bind}:${toString rcfg.port}/2"; - # The redis connection used for the celery worker - "lists.sr.ht".redis = mkDefault "redis://${rcfg.bind}:${toString rcfg.port}/4"; - # Network-key - "lists.sr.ht".network-key = mkDefault null; - # Allow creation - "lists.sr.ht".allow-new-lists = mkDefault "no"; - # Posting Domain - "lists.sr.ht".posting-domain = mkDefault "lists.${cfg.originBase}"; - - # Path for the lmtp daemon's unix socket. Direct incoming mail to this socket. - # Alternatively, specify IP:PORT and an SMTP server will be run instead. - "lists.sr.ht::worker".sock = mkDefault "/tmp/lists.sr.ht-lmtp.sock"; - # The lmtp daemon will make the unix socket group-read/write for users in this - # group. - "lists.sr.ht::worker".sock-group = mkDefault "postfix"; - "lists.sr.ht::worker".reject-url = mkDefault "https://man.sr.ht/lists.sr.ht/etiquette.md"; - "lists.sr.ht::worker".reject-mimetypes = mkDefault "text/html"; - - }; - - services.nginx.virtualHosts."lists.${cfg.originBase}" = { - forceSSL = true; - locations."/".proxyPass = "http://${cfg.address}:${toString port}"; - locations."/query".proxyPass = "http://${cfg.address}:${toString (port + 100)}"; - locations."/static".root = "${pkgs.sourcehut.listssrht}/${pkgs.sourcehut.python.sitePackages}/listssrht"; - }; - }; -} diff --git a/nixos/modules/services/misc/sourcehut/man.nix b/nixos/modules/services/misc/sourcehut/man.nix deleted file mode 100644 index 8ca271c32ee3..000000000000 --- a/nixos/modules/services/misc/sourcehut/man.nix +++ /dev/null @@ -1,124 +0,0 @@ -{ config, lib, options, pkgs, ... }: - -with lib; -let - cfg = config.services.sourcehut; - opt = options.services.sourcehut; - cfgIni = cfg.settings; - scfg = cfg.man; - iniKey = "man.sr.ht"; - - drv = pkgs.sourcehut.mansrht; -in -{ - options.services.sourcehut.man = { - user = mkOption { - type = types.str; - default = "mansrht"; - description = '' - User for man.sr.ht. - ''; - }; - - port = mkOption { - type = types.port; - default = 5004; - description = '' - Port on which the "man" module should listen. - ''; - }; - - database = mkOption { - type = types.str; - default = "man.sr.ht"; - description = '' - PostgreSQL database name for man.sr.ht. - ''; - }; - - statePath = mkOption { - type = types.path; - default = "${cfg.statePath}/mansrht"; - defaultText = literalExpression ''"''${config.${opt.statePath}}/mansrht"''; - description = '' - State path for man.sr.ht. - ''; - }; - }; - - config = with scfg; lib.mkIf (cfg.enable && elem "man" cfg.services) { - assertions = - [ - { - assertion = hasAttrByPath [ "git.sr.ht" "oauth-client-id" ] cfgIni; - message = "man.sr.ht needs access to git.sr.ht."; - } - ]; - - users = { - users = { - "${user}" = { - isSystemUser = true; - group = user; - description = "man.sr.ht user"; - }; - }; - - groups = { - "${user}" = { }; - }; - }; - - services.postgresql = { - authentication = '' - local ${database} ${user} trust - ''; - ensureDatabases = [ database ]; - ensureUsers = [ - { - name = user; - ensurePermissions = { "DATABASE \"${database}\"" = "ALL PRIVILEGES"; }; - } - ]; - }; - - systemd = { - tmpfiles.rules = [ - "d ${statePath} 0750 ${user} ${user} -" - ]; - - services.mansrht = import ./service.nix { inherit config pkgs lib; } scfg drv iniKey { - after = [ "postgresql.service" "network.target" ]; - requires = [ "postgresql.service" ]; - wantedBy = [ "multi-user.target" ]; - - description = "man.sr.ht website service"; - - serviceConfig.ExecStart = "${cfg.python}/bin/gunicorn ${drv.pname}.app:app -b ${cfg.address}:${toString port}"; - }; - }; - - services.sourcehut.settings = { - # URL man.sr.ht is being served at (protocol://domain) - "man.sr.ht".origin = mkDefault "http://man.${cfg.originBase}"; - # Address and port to bind the debug server to - "man.sr.ht".debug-host = mkDefault "0.0.0.0"; - "man.sr.ht".debug-port = mkDefault port; - # Configures the SQLAlchemy connection string for the database. - "man.sr.ht".connection-string = mkDefault "postgresql:///${database}?user=${user}&host=/var/run/postgresql"; - # Set to "yes" to automatically run migrations on package upgrade. - "man.sr.ht".migrate-on-upgrade = mkDefault "yes"; - # man.sr.ht's OAuth client ID and secret for meta.sr.ht - # Register your client at meta.example.org/oauth - "man.sr.ht".oauth-client-id = mkDefault null; - "man.sr.ht".oauth-client-secret = mkDefault null; - }; - - services.nginx.virtualHosts."man.${cfg.originBase}" = { - forceSSL = true; - locations."/".proxyPass = "http://${cfg.address}:${toString port}"; - locations."/query".proxyPass = "http://${cfg.address}:${toString (port + 100)}"; - locations."/static".root = "${pkgs.sourcehut.mansrht}/${pkgs.sourcehut.python.sitePackages}/mansrht"; - }; - }; -} diff --git a/nixos/modules/services/misc/sourcehut/meta.nix b/nixos/modules/services/misc/sourcehut/meta.nix deleted file mode 100644 index 33e4f2332b53..000000000000 --- a/nixos/modules/services/misc/sourcehut/meta.nix +++ /dev/null @@ -1,213 +0,0 @@ -{ config, lib, options, pkgs, ... }: - -with lib; -let - cfg = config.services.sourcehut; - opt = options.services.sourcehut; - cfgIni = cfg.settings; - scfg = cfg.meta; - iniKey = "meta.sr.ht"; - - rcfg = config.services.redis; - drv = pkgs.sourcehut.metasrht; -in -{ - options.services.sourcehut.meta = { - user = mkOption { - type = types.str; - default = "metasrht"; - description = '' - User for meta.sr.ht. - ''; - }; - - port = mkOption { - type = types.port; - default = 5000; - description = '' - Port on which the "meta" module should listen. - ''; - }; - - database = mkOption { - type = types.str; - default = "meta.sr.ht"; - description = '' - PostgreSQL database name for meta.sr.ht. - ''; - }; - - statePath = mkOption { - type = types.path; - default = "${cfg.statePath}/metasrht"; - defaultText = literalExpression ''"''${config.${opt.statePath}}/metasrht"''; - description = '' - State path for meta.sr.ht. - ''; - }; - }; - - config = with scfg; lib.mkIf (cfg.enable && elem "meta" cfg.services) { - assertions = - [ - { - assertion = with cfgIni."meta.sr.ht::billing"; enabled == "yes" -> (stripe-public-key != null && stripe-secret-key != null); - message = "If meta.sr.ht::billing is enabled, the keys should be defined."; - } - ]; - - users = { - users = { - ${user} = { - isSystemUser = true; - group = user; - description = "meta.sr.ht user"; - }; - }; - - groups = { - "${user}" = { }; - }; - }; - - services.cron.systemCronJobs = [ "0 0 * * * ${cfg.python}/bin/metasrht-daily" ]; - services.postgresql = { - authentication = '' - local ${database} ${user} trust - ''; - ensureDatabases = [ database ]; - ensureUsers = [ - { - name = user; - ensurePermissions = { "DATABASE \"${database}\"" = "ALL PRIVILEGES"; }; - } - ]; - }; - - systemd = { - tmpfiles.rules = [ - "d ${statePath} 0750 ${user} ${user} -" - ]; - - services = { - metasrht = import ./service.nix { inherit config pkgs lib; } scfg drv iniKey { - after = [ "postgresql.service" "network.target" ]; - requires = [ "postgresql.service" ]; - wantedBy = [ "multi-user.target" ]; - - description = "meta.sr.ht website service"; - - preStart = '' - # Configure client(s) as "preauthorized" - ${concatMapStringsSep "\n\n" - (attr: '' - if ! test -e "${statePath}/${attr}.oauth" || [ "$(cat ${statePath}/${attr}.oauth)" != "${cfgIni."${attr}".oauth-client-id}" ]; then - # Configure ${attr}'s OAuth client as "preauthorized" - psql ${database} \ - -c "UPDATE oauthclient SET preauthorized = true WHERE client_id = '${cfgIni."${attr}".oauth-client-id}'" - - printf "%s" "${cfgIni."${attr}".oauth-client-id}" > "${statePath}/${attr}.oauth" - fi - '') - (builtins.attrNames (filterAttrs - (k: v: !(hasInfix "::" k) && builtins.hasAttr "oauth-client-id" v && v.oauth-client-id != null) - cfg.settings))} - ''; - - serviceConfig.ExecStart = "${cfg.python}/bin/gunicorn ${drv.pname}.app:app -b ${cfg.address}:${toString port}"; - }; - - metasrht-api = import ./service.nix { inherit config pkgs lib; } scfg drv iniKey { - after = [ "postgresql.service" "network.target" ]; - requires = [ "postgresql.service" ]; - wantedBy = [ "multi-user.target" ]; - - description = "meta.sr.ht api service"; - - preStart = '' - # Configure client(s) as "preauthorized" - ${concatMapStringsSep "\n\n" - (attr: '' - if ! test -e "${statePath}/${attr}.oauth" || [ "$(cat ${statePath}/${attr}.oauth)" != "${cfgIni."${attr}".oauth-client-id}" ]; then - # Configure ${attr}'s OAuth client as "preauthorized" - psql ${database} \ - -c "UPDATE oauthclient SET preauthorized = true WHERE client_id = '${cfgIni."${attr}".oauth-client-id}'" - - printf "%s" "${cfgIni."${attr}".oauth-client-id}" > "${statePath}/${attr}.oauth" - fi - '') - (builtins.attrNames (filterAttrs - (k: v: !(hasInfix "::" k) && builtins.hasAttr "oauth-client-id" v && v.oauth-client-id != null) - cfg.settings))} - ''; - - serviceConfig.ExecStart = "${pkgs.sourcehut.metasrht}/bin/metasrht-api -b :${toString (port + 100)}"; - }; - - metasrht-webhooks = { - after = [ "postgresql.service" "network.target" ]; - requires = [ "postgresql.service" ]; - wantedBy = [ "multi-user.target" ]; - - description = "meta.sr.ht webhooks service"; - serviceConfig = { - Type = "simple"; - User = user; - Restart = "always"; - ExecStart = "${cfg.python}/bin/celery -A ${drv.pname}.webhooks worker --loglevel=info"; - }; - - }; - }; - }; - - services.sourcehut.settings = { - # URL meta.sr.ht is being served at (protocol://domain) - "meta.sr.ht".origin = mkDefault "https://meta.${cfg.originBase}"; - # Address and port to bind the debug server to - "meta.sr.ht".debug-host = mkDefault "0.0.0.0"; - "meta.sr.ht".debug-port = mkDefault port; - # Configures the SQLAlchemy connection string for the database. - "meta.sr.ht".connection-string = mkDefault "postgresql:///${database}?user=${user}&host=/var/run/postgresql"; - # Set to "yes" to automatically run migrations on package upgrade. - "meta.sr.ht".migrate-on-upgrade = mkDefault "yes"; - # If "yes", the user will be sent the stock sourcehut welcome emails after - # signup (requires cron to be configured properly). These are specific to the - # sr.ht instance so you probably want to patch these before enabling this. - "meta.sr.ht".welcome-emails = mkDefault "no"; - - # The redis connection used for the webhooks worker - "meta.sr.ht".webhooks = mkDefault "redis://${rcfg.bind}:${toString rcfg.port}/6"; - - # If "no", public registration will not be permitted. - "meta.sr.ht::settings".registration = mkDefault "no"; - # Where to redirect new users upon registration - "meta.sr.ht::settings".onboarding-redirect = mkDefault "https://meta.${cfg.originBase}"; - # How many invites each user is issued upon registration (only applicable if - # open registration is disabled) - "meta.sr.ht::settings".user-invites = mkDefault 5; - - # Origin URL for API, 100 more than web - "meta.sr.ht".api-origin = mkDefault "http://localhost:5100"; - - # You can add aliases for the client IDs of commonly used OAuth clients here. - # - # Example: - "meta.sr.ht::aliases" = mkDefault { }; - # "meta.sr.ht::aliases"."git.sr.ht" = 12345; - - # "yes" to enable the billing system - "meta.sr.ht::billing".enabled = mkDefault "no"; - # Get your keys at https://dashboard.stripe.com/account/apikeys - "meta.sr.ht::billing".stripe-public-key = mkDefault null; - "meta.sr.ht::billing".stripe-secret-key = mkDefault null; - }; - - services.nginx.virtualHosts."meta.${cfg.originBase}" = { - forceSSL = true; - locations."/".proxyPass = "http://${cfg.address}:${toString port}"; - locations."/query".proxyPass = "http://${cfg.address}:${toString (port + 100)}"; - locations."/static".root = "${pkgs.sourcehut.metasrht}/${pkgs.sourcehut.python.sitePackages}/metasrht"; - }; - }; -} diff --git a/nixos/modules/services/misc/sourcehut/paste.nix b/nixos/modules/services/misc/sourcehut/paste.nix deleted file mode 100644 index b481ebaf8917..000000000000 --- a/nixos/modules/services/misc/sourcehut/paste.nix +++ /dev/null @@ -1,135 +0,0 @@ -{ config, lib, options, pkgs, ... }: - -with lib; -let - cfg = config.services.sourcehut; - opt = options.services.sourcehut; - cfgIni = cfg.settings; - scfg = cfg.paste; - iniKey = "paste.sr.ht"; - - rcfg = config.services.redis; - drv = pkgs.sourcehut.pastesrht; -in -{ - options.services.sourcehut.paste = { - user = mkOption { - type = types.str; - default = "pastesrht"; - description = '' - User for paste.sr.ht. - ''; - }; - - port = mkOption { - type = types.port; - default = 5011; - description = '' - Port on which the "paste" module should listen. - ''; - }; - - database = mkOption { - type = types.str; - default = "paste.sr.ht"; - description = '' - PostgreSQL database name for paste.sr.ht. - ''; - }; - - statePath = mkOption { - type = types.path; - default = "${cfg.statePath}/pastesrht"; - defaultText = literalExpression ''"''${config.${opt.statePath}}/pastesrht"''; - description = '' - State path for pastesrht.sr.ht. - ''; - }; - }; - - config = with scfg; lib.mkIf (cfg.enable && elem "paste" cfg.services) { - users = { - users = { - "${user}" = { - isSystemUser = true; - group = user; - description = "paste.sr.ht user"; - }; - }; - - groups = { - "${user}" = { }; - }; - }; - - services.postgresql = { - authentication = '' - local ${database} ${user} trust - ''; - ensureDatabases = [ database ]; - ensureUsers = [ - { - name = user; - ensurePermissions = { "DATABASE \"${database}\"" = "ALL PRIVILEGES"; }; - } - ]; - }; - - systemd = { - tmpfiles.rules = [ - "d ${statePath} 0750 ${user} ${user} -" - ]; - - services = { - pastesrht = import ./service.nix { inherit config pkgs lib; } scfg drv iniKey { - after = [ "postgresql.service" "network.target" ]; - requires = [ "postgresql.service" ]; - wantedBy = [ "multi-user.target" ]; - - description = "paste.sr.ht website service"; - - serviceConfig.ExecStart = "${cfg.python}/bin/gunicorn ${drv.pname}.app:app -b ${cfg.address}:${toString port}"; - }; - - pastesrht-webhooks = { - after = [ "postgresql.service" "network.target" ]; - requires = [ "postgresql.service" ]; - wantedBy = [ "multi-user.target" ]; - - description = "paste.sr.ht webhooks service"; - serviceConfig = { - Type = "simple"; - User = user; - Restart = "always"; - ExecStart = "${cfg.python}/bin/celery -A ${drv.pname}.webhooks worker --loglevel=info"; - }; - - }; - }; - }; - - services.sourcehut.settings = { - # URL paste.sr.ht is being served at (protocol://domain) - "paste.sr.ht".origin = mkDefault "http://paste.${cfg.originBase}"; - # Address and port to bind the debug server to - "paste.sr.ht".debug-host = mkDefault "0.0.0.0"; - "paste.sr.ht".debug-port = mkDefault port; - # Configures the SQLAlchemy connection string for the database. - "paste.sr.ht".connection-string = mkDefault "postgresql:///${database}?user=${user}&host=/var/run/postgresql"; - # Set to "yes" to automatically run migrations on package upgrade. - "paste.sr.ht".migrate-on-upgrade = mkDefault "yes"; - # paste.sr.ht's OAuth client ID and secret for meta.sr.ht - # Register your client at meta.example.org/oauth - "paste.sr.ht".oauth-client-id = mkDefault null; - "paste.sr.ht".oauth-client-secret = mkDefault null; - "paste.sr.ht".webhooks = mkDefault "redis://${rcfg.bind}:${toString rcfg.port}/5"; - }; - - services.nginx.virtualHosts."paste.${cfg.originBase}" = { - forceSSL = true; - locations."/".proxyPass = "http://${cfg.address}:${toString port}"; - locations."/query".proxyPass = "http://${cfg.address}:${toString (port + 100)}"; - locations."/static".root = "${pkgs.sourcehut.pastesrht}/${pkgs.sourcehut.python.sitePackages}/pastesrht"; - }; - }; -} diff --git a/nixos/modules/services/misc/sourcehut/todo.nix b/nixos/modules/services/misc/sourcehut/todo.nix deleted file mode 100644 index 262fa48f59d4..000000000000 --- a/nixos/modules/services/misc/sourcehut/todo.nix +++ /dev/null @@ -1,163 +0,0 @@ -{ config, lib, options, pkgs, ... }: - -with lib; -let - cfg = config.services.sourcehut; - opt = options.services.sourcehut; - cfgIni = cfg.settings; - scfg = cfg.todo; - iniKey = "todo.sr.ht"; - - rcfg = config.services.redis; - drv = pkgs.sourcehut.todosrht; -in -{ - options.services.sourcehut.todo = { - user = mkOption { - type = types.str; - default = "todosrht"; - description = '' - User for todo.sr.ht. - ''; - }; - - port = mkOption { - type = types.port; - default = 5003; - description = '' - Port on which the "todo" module should listen. - ''; - }; - - database = mkOption { - type = types.str; - default = "todo.sr.ht"; - description = '' - PostgreSQL database name for todo.sr.ht. - ''; - }; - - statePath = mkOption { - type = types.path; - default = "${cfg.statePath}/todosrht"; - defaultText = literalExpression ''"''${config.${opt.statePath}}/todosrht"''; - description = '' - State path for todo.sr.ht. - ''; - }; - }; - - config = with scfg; lib.mkIf (cfg.enable && elem "todo" cfg.services) { - users = { - users = { - "${user}" = { - isSystemUser = true; - group = user; - extraGroups = [ "postfix" ]; - description = "todo.sr.ht user"; - }; - }; - groups = { - "${user}" = { }; - }; - }; - - services.postgresql = { - authentication = '' - local ${database} ${user} trust - ''; - ensureDatabases = [ database ]; - ensureUsers = [ - { - name = user; - ensurePermissions = { "DATABASE \"${database}\"" = "ALL PRIVILEGES"; }; - } - ]; - }; - - systemd = { - tmpfiles.rules = [ - "d ${statePath} 0750 ${user} ${user} -" - ]; - - services = { - todosrht = import ./service.nix { inherit config pkgs lib; } scfg drv iniKey { - after = [ "postgresql.service" "network.target" ]; - requires = [ "postgresql.service" ]; - wantedBy = [ "multi-user.target" ]; - - description = "todo.sr.ht website service"; - - serviceConfig.ExecStart = "${cfg.python}/bin/gunicorn ${drv.pname}.app:app -b ${cfg.address}:${toString port}"; - }; - - todosrht-lmtp = { - after = [ "postgresql.service" "network.target" ]; - bindsTo = [ "postgresql.service" ]; - wantedBy = [ "multi-user.target" ]; - - description = "todo.sr.ht process service"; - serviceConfig = { - Type = "simple"; - User = user; - Restart = "always"; - ExecStart = "${cfg.python}/bin/todosrht-lmtp"; - }; - }; - - todosrht-webhooks = { - after = [ "postgresql.service" "network.target" ]; - requires = [ "postgresql.service" ]; - wantedBy = [ "multi-user.target" ]; - - description = "todo.sr.ht webhooks service"; - serviceConfig = { - Type = "simple"; - User = user; - Restart = "always"; - ExecStart = "${cfg.python}/bin/celery -A ${drv.pname}.webhooks worker --loglevel=info"; - }; - - }; - }; - }; - - services.sourcehut.settings = { - # URL todo.sr.ht is being served at (protocol://domain) - "todo.sr.ht".origin = mkDefault "http://todo.${cfg.originBase}"; - # Address and port to bind the debug server to - "todo.sr.ht".debug-host = mkDefault "0.0.0.0"; - "todo.sr.ht".debug-port = mkDefault port; - # Configures the SQLAlchemy connection string for the database. - "todo.sr.ht".connection-string = mkDefault "postgresql:///${database}?user=${user}&host=/var/run/postgresql"; - # Set to "yes" to automatically run migrations on package upgrade. - "todo.sr.ht".migrate-on-upgrade = mkDefault "yes"; - # todo.sr.ht's OAuth client ID and secret for meta.sr.ht - # Register your client at meta.example.org/oauth - "todo.sr.ht".oauth-client-id = mkDefault null; - "todo.sr.ht".oauth-client-secret = mkDefault null; - # Outgoing email for notifications generated by users - "todo.sr.ht".notify-from = mkDefault "CHANGEME@example.org"; - # The redis connection used for the webhooks worker - "todo.sr.ht".webhooks = mkDefault "redis://${rcfg.bind}:${toString rcfg.port}/1"; - # Network-key - "todo.sr.ht".network-key = mkDefault null; - - # Path for the lmtp daemon's unix socket. Direct incoming mail to this socket. - # Alternatively, specify IP:PORT and an SMTP server will be run instead. - "todo.sr.ht::mail".sock = mkDefault "/tmp/todo.sr.ht-lmtp.sock"; - # The lmtp daemon will make the unix socket group-read/write for users in this - # group. - "todo.sr.ht::mail".sock-group = mkDefault "postfix"; - - "todo.sr.ht::mail".posting-domain = mkDefault "todo.${cfg.originBase}"; - }; - - services.nginx.virtualHosts."todo.${cfg.originBase}" = { - forceSSL = true; - locations."/".proxyPass = "http://${cfg.address}:${toString port}"; - locations."/query".proxyPass = "http://${cfg.address}:${toString (port + 100)}"; - locations."/static".root = "${pkgs.sourcehut.todosrht}/${pkgs.sourcehut.python.sitePackages}/todosrht"; - }; - }; -} From d587a14bca6418deb329fee1704a7080b1a8c38a Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 12 May 2022 00:19:40 +0200 Subject: [PATCH 128/148] sourcehut.buildsrht: 0.79.1 -> 0.80.0 --- pkgs/applications/version-management/sourcehut/builds.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/builds.nix b/pkgs/applications/version-management/sourcehut/builds.nix index e2cc01eb9c70..bef1b175cd68 100644 --- a/pkgs/applications/version-management/sourcehut/builds.nix +++ b/pkgs/applications/version-management/sourcehut/builds.nix @@ -12,13 +12,13 @@ , unzip }: let - version = "0.79.1"; + version = "0.80.0"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "builds.sr.ht"; rev = version; - sha256 = "sha256-8fZ6KdD+9+n0uO3jm0AUyG08oCUNFq1K55ZOwLbkpHk="; + sha256 = "sha256-SzA9bOXiXULRD4Eq9xBbbmMUpXT8egOtooZFF4p79ms="; }; buildsrht-api = buildGoModule ({ From a43c25161c53976ae917b7345a7fc95d273ef4e3 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 12 May 2022 00:38:40 +0200 Subject: [PATCH 129/148] sourcehut.listssrht: 0.51.9 -> 0.51.10 --- pkgs/applications/version-management/sourcehut/lists.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/lists.nix b/pkgs/applications/version-management/sourcehut/lists.nix index d26455311215..213ef3a8cfdf 100644 --- a/pkgs/applications/version-management/sourcehut/lists.nix +++ b/pkgs/applications/version-management/sourcehut/lists.nix @@ -14,13 +14,13 @@ buildPythonPackage rec { pname = "listssrht"; - version = "0.51.9"; + version = "0.51.10"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "lists.sr.ht"; rev = version; - sha256 = "sha256-6iyt0XXAHvyp4bA+VW9uA9YP9wq2Rf/WYVZxylSRf7k="; + sha256 = "sha256-f8KvMctDva31W5c6uAIDDZ0eUrRL5ha10ew2pLEnJtw="; }; listssrht-api = buildGoModule ({ From 2add91db99baca85edf510bcc2a4dfaad10bc23f Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 12 May 2022 00:47:13 +0200 Subject: [PATCH 130/148] sourcehut.todosrht: 0.71.0 -> 0.71.2 --- pkgs/applications/version-management/sourcehut/todo.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/todo.nix b/pkgs/applications/version-management/sourcehut/todo.nix index 4611c63dd0b8..9dbe86e6f63e 100644 --- a/pkgs/applications/version-management/sourcehut/todo.nix +++ b/pkgs/applications/version-management/sourcehut/todo.nix @@ -14,13 +14,13 @@ buildPythonPackage rec { pname = "todosrht"; - version = "0.71.0"; + version = "0.71.2"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "todo.sr.ht"; rev = version; - sha256 = "sha256-IIZKN006UIrdcxF+LYkUtc97QoCnWqzX8036vMctWHY="; + sha256 = "sha256-m7FY+jXpwPnK1+b1iQiDGe8JPfAFQp65BzGH6WvNwhM="; }; patches = [ From 2103e323e8a9ed46ab8e53b0c352bfbc702336a4 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 12 May 2022 01:16:10 +0200 Subject: [PATCH 131/148] sourcehut: passthru nixosTests.sourcehut --- pkgs/applications/version-management/sourcehut/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/applications/version-management/sourcehut/default.nix b/pkgs/applications/version-management/sourcehut/default.nix index 00810f208cc5..aee65dee3bbb 100644 --- a/pkgs/applications/version-management/sourcehut/default.nix +++ b/pkgs/applications/version-management/sourcehut/default.nix @@ -2,6 +2,7 @@ , openssl , callPackage , recurseIntoAttrs +, nixosTests }: # To expose the *srht modules, they have to be a python module so we use `buildPythonModule` @@ -44,4 +45,7 @@ with python.pkgs; recurseIntoAttrs { pagessrht = pagessrht; pastesrht = toPythonApplication pastesrht; todosrht = toPythonApplication todosrht; + passthru.tests = { + nixos-sourcehut = nixosTests.sourcehut; + }; } From cd6808ba9f937f30716e4b844358189a49105f6c Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Fri, 13 May 2022 00:53:16 +0200 Subject: [PATCH 132/148] sourcehut: fix Unix socket support for Redis --- .../services/misc/sourcehut/default.nix | 2 +- .../services/misc/sourcehut/service.nix | 2 +- nixos/tests/sourcehut.nix | 1 + .../version-management/sourcehut/builds.nix | 4 -- .../version-management/sourcehut/core.nix | 2 + .../version-management/sourcehut/git.nix | 4 -- .../version-management/sourcehut/lists.nix | 4 -- .../version-management/sourcehut/meta.nix | 4 -- ...uild-submission-and-queue-monitoring.patch | 69 ------------------- ...ocket-support-in-RedisQueueCollector.patch | 42 +++++++++++ ...-Revert-Add-webhook-queue-monitoring.patch | 33 --------- ...-Revert-Add-webhook-queue-monitoring.patch | 48 ------------- ...-Revert-Add-webhook-queue-monitoring.patch | 48 ------------- ...-Revert-Add-webhook-queue-monitoring.patch | 50 -------------- .../version-management/sourcehut/todo.nix | 5 -- 15 files changed, 47 insertions(+), 271 deletions(-) delete mode 100644 pkgs/applications/version-management/sourcehut/patches/redis-socket/build/0001-Revert-Add-build-submission-and-queue-monitoring.patch create mode 100644 pkgs/applications/version-management/sourcehut/patches/redis-socket/core/0001-Fix-Unix-socket-support-in-RedisQueueCollector.patch delete mode 100644 pkgs/applications/version-management/sourcehut/patches/redis-socket/git/0001-Revert-Add-webhook-queue-monitoring.patch delete mode 100644 pkgs/applications/version-management/sourcehut/patches/redis-socket/lists/0001-Revert-Add-webhook-queue-monitoring.patch delete mode 100644 pkgs/applications/version-management/sourcehut/patches/redis-socket/meta/0001-Revert-Add-webhook-queue-monitoring.patch delete mode 100644 pkgs/applications/version-management/sourcehut/patches/redis-socket/todo/0001-Revert-Add-webhook-queue-monitoring.patch diff --git a/nixos/modules/services/misc/sourcehut/default.nix b/nixos/modules/services/misc/sourcehut/default.nix index 70f6ea7ce974..f5e4742d9027 100644 --- a/nixos/modules/services/misc/sourcehut/default.nix +++ b/nixos/modules/services/misc/sourcehut/default.nix @@ -83,7 +83,7 @@ let python = pkgs.sourcehut.python.withPackages (ps: with ps; [ gunicorn eventlet - # For monitoring Celery: sudo -u listssrht celery --app listssrht.process -b redis+socket:///run/redis-sourcehut/redis.sock?virtual_host=5 flower + # For monitoring Celery: sudo -u listssrht celery --app listssrht.process -b redis+socket:///run/redis-sourcehut/redis.sock?virtual_host=1 flower flower # Sourcehut services srht diff --git a/nixos/modules/services/misc/sourcehut/service.nix b/nixos/modules/services/misc/sourcehut/service.nix index f1706ad0a6a8..4ecc7a726690 100644 --- a/nixos/modules/services/misc/sourcehut/service.nix +++ b/nixos/modules/services/misc/sourcehut/service.nix @@ -148,7 +148,7 @@ in redis = { host = mkOption { type = types.str; - default = "unix:/run/redis-sourcehut-${srvsrht}/redis.sock?db=0"; + default = "unix:///run/redis-sourcehut-${srvsrht}/redis.sock?db=0"; example = "redis://shared.wireguard:6379/0"; description = '' The redis host URL. This is used for caching and temporary storage, and must diff --git a/nixos/tests/sourcehut.nix b/nixos/tests/sourcehut.nix index 34a60247e00e..6998f4f0c104 100644 --- a/nixos/tests/sourcehut.nix +++ b/nixos/tests/sourcehut.nix @@ -195,6 +195,7 @@ in # Testing metasrht machine.wait_for_unit("metasrht-api.service") machine.wait_for_unit("metasrht.service") + machine.wait_for_unit("metasrht-webhooks.service") machine.wait_for_open_port(5000) machine.succeed("curl -sL http://localhost:5000 | grep meta.${domain}") machine.succeed("curl -sL http://meta.${domain} | grep meta.${domain}") diff --git a/pkgs/applications/version-management/sourcehut/builds.nix b/pkgs/applications/version-management/sourcehut/builds.nix index bef1b175cd68..99d6a05c4eb7 100644 --- a/pkgs/applications/version-management/sourcehut/builds.nix +++ b/pkgs/applications/version-management/sourcehut/builds.nix @@ -39,10 +39,6 @@ buildPythonPackage rec { inherit src version; pname = "buildsrht"; - patches = [ - # Revert change breaking Unix socket support for Redis - patches/redis-socket/build/0001-Revert-Add-build-submission-and-queue-monitoring.patch - ]; postPatch = '' substituteInPlace Makefile \ --replace "all: api worker" "" diff --git a/pkgs/applications/version-management/sourcehut/core.nix b/pkgs/applications/version-management/sourcehut/core.nix index 610d5e2647cf..0648f21910fa 100644 --- a/pkgs/applications/version-management/sourcehut/core.nix +++ b/pkgs/applications/version-management/sourcehut/core.nix @@ -48,6 +48,8 @@ buildPythonPackage rec { patches = [ # Disable check for npm ./disable-npm-install.patch + # Fix Unix socket support in RedisQueueCollector + patches/redis-socket/core/0001-Fix-Unix-socket-support-in-RedisQueueCollector.patch ]; nativeBuildInputs = [ diff --git a/pkgs/applications/version-management/sourcehut/git.nix b/pkgs/applications/version-management/sourcehut/git.nix index e56022604fa7..a721da0ecd36 100644 --- a/pkgs/applications/version-management/sourcehut/git.nix +++ b/pkgs/applications/version-management/sourcehut/git.nix @@ -58,10 +58,6 @@ buildPythonPackage rec { inherit src version; pname = "gitsrht"; - patches = [ - # Revert change breaking Unix socket support for Redis - patches/redis-socket/git/0001-Revert-Add-webhook-queue-monitoring.patch - ]; postPatch = '' substituteInPlace Makefile \ --replace "all: api gitsrht-dispatch gitsrht-keys gitsrht-shell gitsrht-update-hook" "" diff --git a/pkgs/applications/version-management/sourcehut/lists.nix b/pkgs/applications/version-management/sourcehut/lists.nix index 213ef3a8cfdf..b9a00ffd2139 100644 --- a/pkgs/applications/version-management/sourcehut/lists.nix +++ b/pkgs/applications/version-management/sourcehut/lists.nix @@ -30,10 +30,6 @@ buildPythonPackage rec { vendorSha256 = "sha256-xnmMkRSokbhWD+kz0XQ9AinYdm6/50FRBISURPvlzD0="; } // import ./fix-gqlgen-trimpath.nix {inherit unzip;}); - patches = [ - # Revert change breaking Unix socket support for Redis - patches/redis-socket/lists/0001-Revert-Add-webhook-queue-monitoring.patch - ]; postPatch = '' substituteInPlace Makefile \ --replace "all: api" "" diff --git a/pkgs/applications/version-management/sourcehut/meta.nix b/pkgs/applications/version-management/sourcehut/meta.nix index 79293736e4ae..896279addd3d 100644 --- a/pkgs/applications/version-management/sourcehut/meta.nix +++ b/pkgs/applications/version-management/sourcehut/meta.nix @@ -40,10 +40,6 @@ buildPythonPackage rec { pname = "metasrht"; inherit version src; - patches = [ - # Revert change breaking Unix socket support for Redis - patches/redis-socket/meta/0001-Revert-Add-webhook-queue-monitoring.patch - ]; postPatch = '' substituteInPlace Makefile \ --replace "all: api" "" diff --git a/pkgs/applications/version-management/sourcehut/patches/redis-socket/build/0001-Revert-Add-build-submission-and-queue-monitoring.patch b/pkgs/applications/version-management/sourcehut/patches/redis-socket/build/0001-Revert-Add-build-submission-and-queue-monitoring.patch deleted file mode 100644 index ae8e95ddc0c2..000000000000 --- a/pkgs/applications/version-management/sourcehut/patches/redis-socket/build/0001-Revert-Add-build-submission-and-queue-monitoring.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 069b03f85847ed4a9223183b62ee53f420838911 Mon Sep 17 00:00:00 2001 -From: Julien Moutinho -Date: Thu, 16 Dec 2021 04:54:24 +0100 -Subject: [PATCH builds.sr.ht] Revert "Add build submission and queue - monitoring" - -This reverts commit 690f1aa16c77e418dc40109cd5e8fdf4a7ed947a. - -This has broken Unix socket support for Redis -See https://lists.sr.ht/~sircmpwn/sr.ht-dev/%3C20211208082636.65665-1-me%40ignaskiela.eu%3E#%3C20211216033723.wefibfulfjhqnhem@sourcephile.fr%3E ---- - buildsrht/app.py | 3 --- - buildsrht/runner.py | 9 +-------- - 2 files changed, 1 insertion(+), 11 deletions(-) - -diff --git a/buildsrht/app.py b/buildsrht/app.py -index e5321a2..7c9977c 100644 ---- a/buildsrht/app.py -+++ b/buildsrht/app.py -@@ -36,9 +36,6 @@ class BuildApp(SrhtFlask): - self.register_blueprint(secrets) - self.register_blueprint(gql_blueprint) - -- from buildsrht.runner import builds_queue_metrics_collector -- self.metrics_registry.register(builds_queue_metrics_collector) -- - @self.context_processor - def inject(): - return { -diff --git a/buildsrht/runner.py b/buildsrht/runner.py -index 7773452..0389c8e 100644 ---- a/buildsrht/runner.py -+++ b/buildsrht/runner.py -@@ -5,13 +5,10 @@ from srht.config import cfg - from srht.database import db - from srht.email import send_email - from srht.oauth import UserType --from srht.metrics import RedisQueueCollector --from prometheus_client import Counter - - allow_free = cfg("builds.sr.ht", "allow-free", default="no") == "yes" - --builds_broker = cfg("builds.sr.ht", "redis") --runner = Celery('builds', broker=builds_broker, config_source={ -+runner = Celery('builds', broker=cfg("builds.sr.ht", "redis"), config_source={ - "CELERY_TASK_SERIALIZER": "json", - "CELERY_ACCEPT_CONTENT": ["json"], - "CELERY_RESULT_SERIALIZER": "json", -@@ -19,9 +16,6 @@ runner = Celery('builds', broker=builds_broker, config_source={ - "CELERY_TASK_PROTOCOL": 1 - }) - --builds_queue_metrics_collector = RedisQueueCollector(builds_broker, "buildsrht_builds", "Number of builds currently in queue") --builds_submitted = Counter("buildsrht_builds_submited", "Number of builds submitted") -- - def queue_build(job, manifest): - from buildsrht.types import JobStatus - job.status = JobStatus.queued -@@ -34,7 +28,6 @@ def queue_build(job, manifest): - cfg("sr.ht", "owner-email"), - "Cryptocurrency mining attempt on builds.sr.ht") - else: -- builds_submitted.inc() - run_build.delay(job.id, manifest.to_dict()) - - def requires_payment(user): --- -2.34.0 - diff --git a/pkgs/applications/version-management/sourcehut/patches/redis-socket/core/0001-Fix-Unix-socket-support-in-RedisQueueCollector.patch b/pkgs/applications/version-management/sourcehut/patches/redis-socket/core/0001-Fix-Unix-socket-support-in-RedisQueueCollector.patch new file mode 100644 index 000000000000..889331f3e07f --- /dev/null +++ b/pkgs/applications/version-management/sourcehut/patches/redis-socket/core/0001-Fix-Unix-socket-support-in-RedisQueueCollector.patch @@ -0,0 +1,42 @@ +From 76dd636151735671be74ba9d55f773e190e22827 Mon Sep 17 00:00:00 2001 +From: Julien Moutinho +Date: Fri, 13 May 2022 22:40:46 +0200 +Subject: [PATCH core.sr.ht] Fix Unix socket support in RedisQueueCollector + +The broker URL is not necessarily in the format expected by Redis.from_url + +Especially, Redis.from_url supports this format for Unix sockets: + unix:///run/redis-sourcehut-metasrht/redis.sock?db=0 +See https://redis-py.readthedocs.io/en/stable/#redis.ConnectionPool.from_url + +Whereas Celery+Kombu support Redis but also other transports +and thus expect another scheme: + redis+socket:///run/redis-sourcehut-metasrht/redis.sock?virtual_host=1 +See https://docs.celeryproject.org/en/stable/userguide/configuration.html#redis-backend-settings +and https://github.com/celery/celery/blob/e5d99801e4b56a02af4a2e183879c767228d2817/celery/backends/redis.py#L299-L352 +and https://github.com/celery/kombu/blob/master/kombu/utils/url.py +--- + srht/metrics.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/srht/metrics.py b/srht/metrics.py +index 68caf8e..2df5777 100644 +--- a/srht/metrics.py ++++ b/srht/metrics.py +@@ -1,11 +1,12 @@ + import time ++from celery import Celery + from prometheus_client.metrics_core import GaugeMetricFamily + from redis import Redis, ResponseError + + + class RedisQueueCollector: + def __init__(self, broker, name, documentation, queue_name="celery"): +- self.redis = Redis.from_url(broker) ++ self.redis = Celery("collector", broker=broker).connection_for_read().channel().client + self.queue_name = queue_name + self.name = name + self.documentation = documentation +-- +2.35.1 + diff --git a/pkgs/applications/version-management/sourcehut/patches/redis-socket/git/0001-Revert-Add-webhook-queue-monitoring.patch b/pkgs/applications/version-management/sourcehut/patches/redis-socket/git/0001-Revert-Add-webhook-queue-monitoring.patch deleted file mode 100644 index f9235102b958..000000000000 --- a/pkgs/applications/version-management/sourcehut/patches/redis-socket/git/0001-Revert-Add-webhook-queue-monitoring.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/gitsrht/app.py b/gitsrht/app.py -index eaae395..731bb03 100644 ---- a/gitsrht/app.py -+++ b/gitsrht/app.py -@@ -55,9 +55,6 @@ class GitApp(SrhtFlask): - self.add_template_filter(url_quote) - self.add_template_filter(commit_links) - -- from gitsrht.webhooks import webhook_metrics_collector -- self.metrics_registry.register(webhook_metrics_collector) -- - @self.context_processor - def inject(): - notice = session.get("notice") -diff --git a/gitsrht/webhooks.py b/gitsrht/webhooks.py -index 36486d0..0109428 100644 ---- a/gitsrht/webhooks.py -+++ b/gitsrht/webhooks.py -@@ -7,12 +7,10 @@ if not hasattr(db, "session"): - db.init() - from srht.webhook import Event - from srht.webhook.celery import CeleryWebhook, make_worker --from srht.metrics import RedisQueueCollector -+from scmsrht.webhooks import UserWebhook - import sqlalchemy as sa - --webhook_broker = cfg("git.sr.ht", "webhooks") --worker = make_worker(broker=webhook_broker) --webhook_metrics_collector = RedisQueueCollector(webhook_broker, "srht_webhooks", "Webhook queue length") -+worker = make_worker(broker=cfg("git.sr.ht", "webhooks")) - - class UserWebhook(CeleryWebhook): - events = [ diff --git a/pkgs/applications/version-management/sourcehut/patches/redis-socket/lists/0001-Revert-Add-webhook-queue-monitoring.patch b/pkgs/applications/version-management/sourcehut/patches/redis-socket/lists/0001-Revert-Add-webhook-queue-monitoring.patch deleted file mode 100644 index 872d285b9bb0..000000000000 --- a/pkgs/applications/version-management/sourcehut/patches/redis-socket/lists/0001-Revert-Add-webhook-queue-monitoring.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 730e090f31b150d42be4b4722751f8e4610835b0 Mon Sep 17 00:00:00 2001 -From: Julien Moutinho -Date: Sat, 12 Feb 2022 00:38:12 +0100 -Subject: [PATCH lists.sr.ht] Revert "Add webhook queue monitoring" - -This reverts commit e74e344808e8d523a9786cefcbf64c9a247d7a0e. - -Which has broken Unix socket support for Redis. -See https://lists.sr.ht/~sircmpwn/sr.ht-dev/%3C20211208082636.65665-1-me%40ignaskiela.eu%3E#%3C20211216033723.wefibfulfjhqnhem@sourcephile.fr%3E ---- - listssrht/app.py | 3 --- - listssrht/webhooks.py | 5 +---- - 2 files changed, 1 insertion(+), 7 deletions(-) - -diff --git a/listssrht/app.py b/listssrht/app.py -index aec59f3..83a355d 100644 ---- a/listssrht/app.py -+++ b/listssrht/app.py -@@ -29,9 +29,6 @@ class ListsApp(SrhtFlask): - self.register_blueprint(user) - self.register_blueprint(gql_blueprint) - -- from listssrht.webhooks import webhook_metrics_collector -- self.metrics_registry.register(webhook_metrics_collector) -- - @self.context_processor - def inject(): - from listssrht.types import ListAccess -diff --git a/listssrht/webhooks.py b/listssrht/webhooks.py -index ae5b1cb..86421ba 100644 ---- a/listssrht/webhooks.py -+++ b/listssrht/webhooks.py -@@ -8,11 +8,8 @@ if not hasattr(db, "session"): - db.init() - from srht.webhook import Event - from srht.webhook.celery import CeleryWebhook, make_worker --from srht.metrics import RedisQueueCollector - --webhook_broker = cfg("lists.sr.ht", "webhooks") --worker = make_worker(broker=webhook_broker) --webhook_metrics_collector = RedisQueueCollector(webhook_broker, "srht_webhooks", "Webhook queue length") -+worker = make_worker(broker=cfg("lists.sr.ht", "webhooks")) - - class ListWebhook(CeleryWebhook): - events = [ --- -2.34.1 - diff --git a/pkgs/applications/version-management/sourcehut/patches/redis-socket/meta/0001-Revert-Add-webhook-queue-monitoring.patch b/pkgs/applications/version-management/sourcehut/patches/redis-socket/meta/0001-Revert-Add-webhook-queue-monitoring.patch deleted file mode 100644 index 9ec37670b060..000000000000 --- a/pkgs/applications/version-management/sourcehut/patches/redis-socket/meta/0001-Revert-Add-webhook-queue-monitoring.patch +++ /dev/null @@ -1,48 +0,0 @@ -From d88bee195797c6c294320617ff14798da94cd0f3 Mon Sep 17 00:00:00 2001 -From: Julien Moutinho -Date: Thu, 16 Dec 2021 04:52:08 +0100 -Subject: [PATCH meta.sr.ht] Revert "Add webhook queue monitoring" - -This reverts commit 9931df3c23094af5179df9ef019ca732b8125dac. - -This has broken Unix socket support for Redis. -See https://lists.sr.ht/~sircmpwn/sr.ht-dev/%3C20211208082636.65665-1-me%40ignaskiela.eu%3E#%3C20211216033723.wefibfulfjhqnhem@sourcephile.fr%3E ---- - metasrht/app.py | 3 --- - metasrht/webhooks.py | 5 +---- - 2 files changed, 1 insertion(+), 7 deletions(-) - -diff --git a/metasrht/app.py b/metasrht/app.py -index b190875..89c59bc 100644 ---- a/metasrht/app.py -+++ b/metasrht/app.py -@@ -49,9 +49,6 @@ class MetaApp(SrhtFlask): - from metasrht.blueprints.billing import billing - self.register_blueprint(billing) - -- from metasrht.webhooks import webhook_metrics_collector -- self.metrics_registry.register(webhook_metrics_collector) -- - @self.context_processor - def inject(): - return { -diff --git a/metasrht/webhooks.py b/metasrht/webhooks.py -index 3e1149e..3f0ba01 100644 ---- a/metasrht/webhooks.py -+++ b/metasrht/webhooks.py -@@ -7,11 +7,8 @@ if not hasattr(db, "session"): - db.init() - from srht.webhook import Event - from srht.webhook.celery import CeleryWebhook, make_worker --from srht.metrics import RedisQueueCollector - --webhook_broker = cfg("meta.sr.ht", "webhooks", "redis://") --worker = make_worker(broker=webhook_broker) --webhook_metrics_collector = RedisQueueCollector(webhook_broker, "srht_webhooks", "Webhook queue length") -+worker = make_worker(broker=cfg("meta.sr.ht", "webhooks", "redis://")) - - class UserWebhook(CeleryWebhook): - events = [ --- -2.34.0 - diff --git a/pkgs/applications/version-management/sourcehut/patches/redis-socket/todo/0001-Revert-Add-webhook-queue-monitoring.patch b/pkgs/applications/version-management/sourcehut/patches/redis-socket/todo/0001-Revert-Add-webhook-queue-monitoring.patch deleted file mode 100644 index 861608c11843..000000000000 --- a/pkgs/applications/version-management/sourcehut/patches/redis-socket/todo/0001-Revert-Add-webhook-queue-monitoring.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 42a27ea60d8454552d54e1f51f1b976d1067fc32 Mon Sep 17 00:00:00 2001 -From: Julien Moutinho -Date: Sat, 12 Feb 2022 00:30:29 +0100 -Subject: [PATCH todo.sr.ht] Revert "Add webhook queue monitoring" - -This reverts commit 320a5e8f7cd16ca43928c36f0320593f84d986fa. - -Which has broken Unix socket support for Redis. -See https://lists.sr.ht/~sircmpwn/sr.ht-dev/%3C20211208082636.65665-1-me%40ignaskiela.eu%3E#%3C20211216033723.wefibfulfjhqnhem@sourcephile.fr%3E ---- - todosrht/flask.py | 3 --- - todosrht/webhooks.py | 6 +----- - 2 files changed, 1 insertion(+), 8 deletions(-) - -diff --git a/todosrht/flask.py b/todosrht/flask.py -index 5e8ac66..9d0fd27 100644 ---- a/todosrht/flask.py -+++ b/todosrht/flask.py -@@ -43,9 +43,6 @@ class TodoApp(SrhtFlask): - self.add_template_filter(urls.tracker_url) - self.add_template_filter(urls.user_url) - -- from todosrht.webhooks import webhook_metrics_collector -- self.metrics_registry.register(webhook_metrics_collector) -- - @self.context_processor - def inject(): - return { -diff --git a/todosrht/webhooks.py b/todosrht/webhooks.py -index eb8e08a..950047f 100644 ---- a/todosrht/webhooks.py -+++ b/todosrht/webhooks.py -@@ -7,13 +7,9 @@ if not hasattr(db, "session"): - db.init() - from srht.webhook import Event - from srht.webhook.celery import CeleryWebhook, make_worker --from srht.metrics import RedisQueueCollector - import sqlalchemy as sa - -- --webhooks_broker = cfg("todo.sr.ht", "webhooks") --worker = make_worker(broker=webhooks_broker) --webhook_metrics_collector = RedisQueueCollector(webhooks_broker, "srht_webhooks", "Webhook queue length") -+worker = make_worker(broker=cfg("todo.sr.ht", "webhooks")) - - import todosrht.tracker_import - --- -2.34.1 - diff --git a/pkgs/applications/version-management/sourcehut/todo.nix b/pkgs/applications/version-management/sourcehut/todo.nix index 9dbe86e6f63e..67367b71ff93 100644 --- a/pkgs/applications/version-management/sourcehut/todo.nix +++ b/pkgs/applications/version-management/sourcehut/todo.nix @@ -23,16 +23,11 @@ buildPythonPackage rec { sha256 = "sha256-m7FY+jXpwPnK1+b1iQiDGe8JPfAFQp65BzGH6WvNwhM="; }; - patches = [ - # Revert change breaking Unix socket support for Redis - patches/redis-socket/todo/0001-Revert-Add-webhook-queue-monitoring.patch - ]; postPatch = '' substituteInPlace Makefile \ --replace "all: api" "" ''; - todosrht-api = buildGoModule ({ inherit src version; pname = "todosrht-api"; From a097ca163e944a44e9a65ecccfcbc59dbe895ddb Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 2 Jun 2022 11:43:21 +0200 Subject: [PATCH 133/148] sourcehut.srht: 0.68.24 -> 0.69.0 --- pkgs/applications/version-management/sourcehut/core.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/core.nix b/pkgs/applications/version-management/sourcehut/core.nix index 0648f21910fa..ff56c62c62e9 100644 --- a/pkgs/applications/version-management/sourcehut/core.nix +++ b/pkgs/applications/version-management/sourcehut/core.nix @@ -29,13 +29,13 @@ buildPythonPackage rec { pname = "srht"; - version = "0.68.24"; + version = "0.69.0"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "core.sr.ht"; rev = version; - sha256 = "sha256-ipukga6vfBgDIXOQCejCkU/iTmBt5egIjB+NlJyL2yo="; + sha256 = "sha256-s/I0wxtPggjTkkTZnhm77PxdQjiT0Vq2MIk7JMvdupc="; fetchSubmodules = true; }; From 5da4b29a99774b3533b27c0d70ca7900d70a3c3d Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 2 Jun 2022 13:35:20 +0200 Subject: [PATCH 134/148] sourcehut: fix update script --- pkgs/applications/version-management/sourcehut/hg.nix | 8 +++++--- pkgs/applications/version-management/sourcehut/update.sh | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/hg.nix b/pkgs/applications/version-management/sourcehut/hg.nix index 2aa4cc2c5059..60f3f3d4aee3 100644 --- a/pkgs/applications/version-management/sourcehut/hg.nix +++ b/pkgs/applications/version-management/sourcehut/hg.nix @@ -1,5 +1,5 @@ { lib -, fetchhg +, fetchFromSourcehut , buildGoModule , buildPythonPackage , srht @@ -14,10 +14,12 @@ buildPythonPackage rec { pname = "hgsrht"; version = "0.31.2"; - src = fetchhg { - url = "https://hg.sr.ht/~sircmpwn/hg.sr.ht"; + src = fetchFromSourcehut { + owner = "~sircmpwn"; + repo = "hg.sr.ht"; rev = version; sha256 = "F0dBykSSrlis+mumULLxvKNxD75DWR9+IDTYbmhkMDI="; + vc = "hg"; }; postPatch = '' substituteInPlace Makefile \ diff --git a/pkgs/applications/version-management/sourcehut/update.sh b/pkgs/applications/version-management/sourcehut/update.sh index 97509397aef5..e13ce09da4c7 100755 --- a/pkgs/applications/version-management/sourcehut/update.sh +++ b/pkgs/applications/version-management/sourcehut/update.sh @@ -16,7 +16,7 @@ version() { } src_url() { - nix-instantiate --eval --strict --expr " with import $root {}; let src = sourcehut.python.pkgs.$1.drvAttrs.src; in src.url or src.meta.homepage" | tr -d '"' + nix-instantiate --eval --strict --expr " with import $root {}; let src = sourcehut.python.pkgs.$1.drvAttrs.src; in src.meta.homepage" | tr -d '"' } get_latest_version() { From f34d654860a09472024e7cce3b63839eb590a8ef Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 2 Jun 2022 13:40:30 +0200 Subject: [PATCH 135/148] nixos/sourcehut: increase RestartSec to better avoid degraded states --- nixos/modules/services/misc/sourcehut/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/modules/services/misc/sourcehut/default.nix b/nixos/modules/services/misc/sourcehut/default.nix index f5e4742d9027..3a9c2808dec2 100644 --- a/nixos/modules/services/misc/sourcehut/default.nix +++ b/nixos/modules/services/misc/sourcehut/default.nix @@ -907,7 +907,7 @@ in port = 5002; extraServices.buildsrht-api = { serviceConfig.Restart = "always"; - serviceConfig.RestartSec = "2s"; + serviceConfig.RestartSec = "5s"; serviceConfig.ExecStart = "${pkgs.sourcehut.buildsrht}/bin/buildsrht-api -b ${cfg.listenAddress}:${toString (cfg.builds.port + 100)}"; }; # TODO: a celery worker on the master and worker are apparently needed @@ -1088,7 +1088,7 @@ in ]; extraServices.gitsrht-api = { serviceConfig.Restart = "always"; - serviceConfig.RestartSec = "2s"; + serviceConfig.RestartSec = "5s"; serviceConfig.ExecStart = "${pkgs.sourcehut.gitsrht}/bin/gitsrht-api -b ${cfg.listenAddress}:${toString (cfg.git.port + 100)}"; }; extraServices.gitsrht-fcgiwrap = mkIf cfg.nginx.enable { @@ -1136,7 +1136,7 @@ in }; extraServices.hgsrht-api = { serviceConfig.Restart = "always"; - serviceConfig.RestartSec = "2s"; + serviceConfig.RestartSec = "5s"; serviceConfig.ExecStart = "${pkgs.sourcehut.hgsrht}/bin/hgsrht-api -b ${cfg.listenAddress}:${toString (cfg.hg.port + 100)}"; }; extraConfig = mkMerge [ @@ -1201,7 +1201,7 @@ in webhooks = true; extraServices.listssrht-api = { serviceConfig.Restart = "always"; - serviceConfig.RestartSec = "2s"; + serviceConfig.RestartSec = "5s"; serviceConfig.ExecStart = "${pkgs.sourcehut.listssrht}/bin/listssrht-api -b ${cfg.listenAddress}:${toString (cfg.lists.port + 100)}"; }; # Receive the mail from Postfix and enqueue them into Redis and PostgreSQL @@ -1258,7 +1258,7 @@ in }; extraServices.metasrht-api = { serviceConfig.Restart = "always"; - serviceConfig.RestartSec = "2s"; + serviceConfig.RestartSec = "5s"; preStart = "set -x\n" + concatStringsSep "\n\n" (attrValues (mapAttrs (k: s: let srvMatch = builtins.match "^([a-z]*)\\.sr\\.ht$" k; srv = head srvMatch; @@ -1370,7 +1370,7 @@ in webhooks = true; extraServices.todosrht-api = { serviceConfig.Restart = "always"; - serviceConfig.RestartSec = "2s"; + serviceConfig.RestartSec = "5s"; serviceConfig.ExecStart = "${pkgs.sourcehut.todosrht}/bin/todosrht-api -b ${cfg.listenAddress}:${toString (cfg.todo.port + 100)}"; }; extraServices.todosrht-lmtp = { From 8f92ed46cf7262156ab08d86145529c95f73ed3a Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 2 Jun 2022 13:44:52 +0200 Subject: [PATCH 136/148] sourcehut: code-style formatting --- pkgs/applications/version-management/sourcehut/builds.nix | 2 +- .../version-management/sourcehut/fix-gqlgen-trimpath.nix | 6 +----- pkgs/applications/version-management/sourcehut/git.nix | 2 +- pkgs/applications/version-management/sourcehut/hg.nix | 3 ++- pkgs/applications/version-management/sourcehut/lists.nix | 2 +- pkgs/applications/version-management/sourcehut/meta.nix | 2 +- pkgs/applications/version-management/sourcehut/pages.nix | 2 +- 7 files changed, 8 insertions(+), 11 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/builds.nix b/pkgs/applications/version-management/sourcehut/builds.nix index 99d6a05c4eb7..f951af1763a2 100644 --- a/pkgs/applications/version-management/sourcehut/builds.nix +++ b/pkgs/applications/version-management/sourcehut/builds.nix @@ -26,7 +26,7 @@ let pname = "buildsrht-api"; modRoot = "api"; vendorSha256 = "sha256-roTwqtg4Y846PNtLdRN/LV3Jd0LVElqjFy3DJcrwoaI="; - } // import ./fix-gqlgen-trimpath.nix {inherit unzip;}); + } // import ./fix-gqlgen-trimpath.nix { inherit unzip; }); buildsrht-worker = buildGoModule { inherit src version; diff --git a/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix b/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix index 1f94913292e0..1a45c8112ba8 100644 --- a/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix +++ b/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix @@ -4,14 +4,12 @@ # No need to workaround -trimpath: it's not used in go-modules, # but do download `go generate`'s dependencies nonetheless. preBuild = '' - set -x go generate ./loaders go generate ./graph - set +x ''; }); - # Workaround: + # Workaround this error: # go: git.sr.ht/~emersion/go-emailthreads@v0.0.0-20220412093310-4fd792e343ba: module lookup disabled by GOPROXY=off # tidy failed: go mod tidy failed: exit status 1 # graph/generate.go:10: running "go": exit status 1 @@ -22,11 +20,9 @@ # This is to give `go generate ./graph` access to gqlgen's *.gotpl files # If it fails, the gqlgenVersion may have to be updated. preBuild = let gqlgenVersion = "0.17.2"; in '' - set -x ${unzip}/bin/unzip ''${GOPROXY#"file://"}/github.com/99designs/gqlgen/@v/v${gqlgenVersion}.zip go generate ./loaders go generate ./graph rm -rf github.com - set +x ''; } diff --git a/pkgs/applications/version-management/sourcehut/git.nix b/pkgs/applications/version-management/sourcehut/git.nix index a721da0ecd36..d25443554b20 100644 --- a/pkgs/applications/version-management/sourcehut/git.nix +++ b/pkgs/applications/version-management/sourcehut/git.nix @@ -23,7 +23,7 @@ let pname = "gitsrht-api"; modRoot = "api"; vendorSha256 = "sha256-0YI20liP0X1McfiSUy29zJk2UqqAPBIfIfPLoJOE1uI="; - } // import ./fix-gqlgen-trimpath.nix {inherit unzip;}); + } // import ./fix-gqlgen-trimpath.nix { inherit unzip; }); gitDispatch = buildGoModule { inherit src version; diff --git a/pkgs/applications/version-management/sourcehut/hg.nix b/pkgs/applications/version-management/sourcehut/hg.nix index 60f3f3d4aee3..f4e61d11959a 100644 --- a/pkgs/applications/version-management/sourcehut/hg.nix +++ b/pkgs/applications/version-management/sourcehut/hg.nix @@ -21,6 +21,7 @@ buildPythonPackage rec { sha256 = "F0dBykSSrlis+mumULLxvKNxD75DWR9+IDTYbmhkMDI="; vc = "hg"; }; + postPatch = '' substituteInPlace Makefile \ --replace "all: api hgsrht-keys" "" @@ -31,7 +32,7 @@ buildPythonPackage rec { pname = "hgsrht-api"; modRoot = "api"; vendorSha256 = "sha256-W7A22qSIgJgcfS7xYNrmbYKaZBXbDtPilM9I6DxmTeU="; - } // import ./fix-gqlgen-trimpath.nix {inherit unzip;}); + } // import ./fix-gqlgen-trimpath.nix { inherit unzip; }); hgsrht-keys = buildGoModule { inherit src version; diff --git a/pkgs/applications/version-management/sourcehut/lists.nix b/pkgs/applications/version-management/sourcehut/lists.nix index b9a00ffd2139..4d5b514f651c 100644 --- a/pkgs/applications/version-management/sourcehut/lists.nix +++ b/pkgs/applications/version-management/sourcehut/lists.nix @@ -28,7 +28,7 @@ buildPythonPackage rec { pname = "listssrht-api"; modRoot = "api"; vendorSha256 = "sha256-xnmMkRSokbhWD+kz0XQ9AinYdm6/50FRBISURPvlzD0="; - } // import ./fix-gqlgen-trimpath.nix {inherit unzip;}); + } // import ./fix-gqlgen-trimpath.nix { inherit unzip;}); postPatch = '' substituteInPlace Makefile \ diff --git a/pkgs/applications/version-management/sourcehut/meta.nix b/pkgs/applications/version-management/sourcehut/meta.nix index 896279addd3d..cac013442586 100644 --- a/pkgs/applications/version-management/sourcehut/meta.nix +++ b/pkgs/applications/version-management/sourcehut/meta.nix @@ -33,7 +33,7 @@ let pname = "metasrht-api"; modRoot = "api"; vendorSha256 = "sha256-3s9PYUy4qS06zyTIRDvnAmhfrjVLBa/03Nu3tMcIReI="; - } // import ./fix-gqlgen-trimpath.nix {inherit unzip;}); + } // import ./fix-gqlgen-trimpath.nix { inherit unzip; }); in buildPythonPackage rec { diff --git a/pkgs/applications/version-management/sourcehut/pages.nix b/pkgs/applications/version-management/sourcehut/pages.nix index faa6dbb4d49d..7569744e9c7d 100644 --- a/pkgs/applications/version-management/sourcehut/pages.nix +++ b/pkgs/applications/version-management/sourcehut/pages.nix @@ -30,4 +30,4 @@ buildGoModule (rec { }; # There is no ./loaders but this does not cause troubles # to go generate -} // import ./fix-gqlgen-trimpath.nix {inherit unzip;}) +} // import ./fix-gqlgen-trimpath.nix { inherit unzip; }) From 4f97b2791fe0564e1e92aa80cb03c3be106366d6 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 2 Jun 2022 13:59:39 +0200 Subject: [PATCH 137/148] sourcehut: improve cross-compiling support --- .../version-management/sourcehut/fix-gqlgen-trimpath.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix b/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix index 1a45c8112ba8..a95c3a3f3fd2 100644 --- a/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix +++ b/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix @@ -15,12 +15,14 @@ # graph/generate.go:10: running "go": exit status 1 proxyVendor = true; + nativeBuildInputs = [ unzip ]; + # Workaround -trimpath in the package derivation: # https://github.com/99designs/gqlgen/issues/1537 # This is to give `go generate ./graph` access to gqlgen's *.gotpl files # If it fails, the gqlgenVersion may have to be updated. preBuild = let gqlgenVersion = "0.17.2"; in '' - ${unzip}/bin/unzip ''${GOPROXY#"file://"}/github.com/99designs/gqlgen/@v/v${gqlgenVersion}.zip + unzip ''${GOPROXY#"file://"}/github.com/99designs/gqlgen/@v/v${gqlgenVersion}.zip go generate ./loaders go generate ./graph rm -rf github.com From a623fb79c0cebd0876bdf5fd48eea972846e1965 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 2 Jun 2022 14:20:31 +0200 Subject: [PATCH 138/148] sourcehut.buildsrht: 0.80.0 -> 0.81.0 --- pkgs/applications/version-management/sourcehut/builds.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/builds.nix b/pkgs/applications/version-management/sourcehut/builds.nix index f951af1763a2..b8f9a0f1522a 100644 --- a/pkgs/applications/version-management/sourcehut/builds.nix +++ b/pkgs/applications/version-management/sourcehut/builds.nix @@ -12,13 +12,13 @@ , unzip }: let - version = "0.80.0"; + version = "0.81.0"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "builds.sr.ht"; rev = version; - sha256 = "sha256-SzA9bOXiXULRD4Eq9xBbbmMUpXT8egOtooZFF4p79ms="; + sha256 = "sha256-oUSzanRFZ2dQTgm/VuNhqUaUAPq7ffxR7OtBKtE61DE="; }; buildsrht-api = buildGoModule ({ From 0d286b8d9671fbb8225ac7e6f548e9b2102c5460 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 2 Jun 2022 14:29:48 +0200 Subject: [PATCH 139/148] sourcehut.gitsrht: 0.78.18 -> 0.78.20 --- pkgs/applications/version-management/sourcehut/git.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/git.nix b/pkgs/applications/version-management/sourcehut/git.nix index d25443554b20..1f76e5cb65f8 100644 --- a/pkgs/applications/version-management/sourcehut/git.nix +++ b/pkgs/applications/version-management/sourcehut/git.nix @@ -9,20 +9,20 @@ , unzip }: let - version = "0.78.18"; + version = "0.78.20"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "git.sr.ht"; rev = version; - sha256 = "sha256-pGWphdFKaOIBIKWMxfNAFqXZQx/qHcrwb5Ylj9uag7s="; + sha256 = "sha256-rZsTtHobsgRVmMOjPa1fiKrPsNyFu/gOsmO0cTl5MqQ="; }; gitApi = buildGoModule ({ inherit src version; pname = "gitsrht-api"; modRoot = "api"; - vendorSha256 = "sha256-0YI20liP0X1McfiSUy29zJk2UqqAPBIfIfPLoJOE1uI="; + vendorSha256 = "sha256-cCs9FUBusaAou9w4TDOg8GKxhRcsPbSNcQpxvFH/+so="; } // import ./fix-gqlgen-trimpath.nix { inherit unzip; }); gitDispatch = buildGoModule { From de3b09c4d08861d9ca78756cf08b9df0a2c0c1e3 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 2 Jun 2022 14:35:27 +0200 Subject: [PATCH 140/148] sourcehut.hgsrht: 0.31.2 -> 0.31.3 --- pkgs/applications/version-management/sourcehut/hg.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/hg.nix b/pkgs/applications/version-management/sourcehut/hg.nix index f4e61d11959a..c1470c3fc5c6 100644 --- a/pkgs/applications/version-management/sourcehut/hg.nix +++ b/pkgs/applications/version-management/sourcehut/hg.nix @@ -12,13 +12,13 @@ buildPythonPackage rec { pname = "hgsrht"; - version = "0.31.2"; + version = "0.31.3"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "hg.sr.ht"; rev = version; - sha256 = "F0dBykSSrlis+mumULLxvKNxD75DWR9+IDTYbmhkMDI="; + sha256 = "4Qe08gqsSTMQVQBchFPEUXuxM8ZAAQGJT1EOcDjkZa0="; vc = "hg"; }; @@ -31,7 +31,7 @@ buildPythonPackage rec { inherit src version; pname = "hgsrht-api"; modRoot = "api"; - vendorSha256 = "sha256-W7A22qSIgJgcfS7xYNrmbYKaZBXbDtPilM9I6DxmTeU="; + vendorSha256 = "sha256-uIP3W7UJkP68HJUF33kz5xfg/KBiaSwMozFYmQJQkys="; } // import ./fix-gqlgen-trimpath.nix { inherit unzip; }); hgsrht-keys = buildGoModule { From 8388db5a9ef8735ec6f966b60ce030889b61c51e Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 2 Jun 2022 14:38:32 +0200 Subject: [PATCH 141/148] sourcehut.listssrht: 0.51.10 -> 0.51.11 --- pkgs/applications/version-management/sourcehut/lists.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/lists.nix b/pkgs/applications/version-management/sourcehut/lists.nix index 4d5b514f651c..d981598a7b19 100644 --- a/pkgs/applications/version-management/sourcehut/lists.nix +++ b/pkgs/applications/version-management/sourcehut/lists.nix @@ -14,13 +14,13 @@ buildPythonPackage rec { pname = "listssrht"; - version = "0.51.10"; + version = "0.51.11"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "lists.sr.ht"; rev = version; - sha256 = "sha256-f8KvMctDva31W5c6uAIDDZ0eUrRL5ha10ew2pLEnJtw="; + sha256 = "sha256-Qb70oOazZfmHpC5r0oMYCFdvfAeKbq3mQA8+M56YYnY="; }; listssrht-api = buildGoModule ({ From fa6e3b6509cc59d2ea89c2a65d50932d9e0b594c Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 2 Jun 2022 14:39:09 +0200 Subject: [PATCH 142/148] sourcehut.mansrht: 0.15.25 -> 0.15.26 --- pkgs/applications/version-management/sourcehut/man.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/man.nix b/pkgs/applications/version-management/sourcehut/man.nix index ccee76defde0..530101d57352 100644 --- a/pkgs/applications/version-management/sourcehut/man.nix +++ b/pkgs/applications/version-management/sourcehut/man.nix @@ -8,13 +8,13 @@ buildPythonPackage rec { pname = "mansrht"; - version = "0.15.25"; + version = "0.15.26"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "man.sr.ht"; rev = version; - sha256 = "sha256-Mq3IHsqSkFHVdmy3g0E+9oLnKORthgv3lqvWyrKMIuU="; + sha256 = "sha256-5xZH6DrTXMdWd26OGICp7lZ/QDjACIa7zNUJHB7jzGo="; }; nativeBuildInputs = srht.nativeBuildInputs; From c32f043d67d616534c5426ae343666fbd6ebfbd7 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 2 Jun 2022 14:44:08 +0200 Subject: [PATCH 143/148] sourcehut.metasrht: 0.58.8 -> 0.58.18 --- pkgs/applications/version-management/sourcehut/meta.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/meta.nix b/pkgs/applications/version-management/sourcehut/meta.nix index cac013442586..4572fc81b288 100644 --- a/pkgs/applications/version-management/sourcehut/meta.nix +++ b/pkgs/applications/version-management/sourcehut/meta.nix @@ -19,20 +19,20 @@ , unzip }: let - version = "0.58.8"; + version = "0.58.18"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "meta.sr.ht"; rev = version; - sha256 = "sha256-lnEt5UoQBd5qlkD+nE6KL5DP4jf1FrAjgA06/mgRxTs="; + sha256 = "sha256-OjbQHAzG2nZwpJUIvhKaCJWZbhZDC2R6C+SkbKUpk8o="; }; metasrht-api = buildGoModule ({ inherit src version; pname = "metasrht-api"; modRoot = "api"; - vendorSha256 = "sha256-3s9PYUy4qS06zyTIRDvnAmhfrjVLBa/03Nu3tMcIReI="; + vendorSha256 = "sha256-kiEuEYZFbwJ6SbKFtxH4SiRaZmqYriRHPoHdTX28+d0="; } // import ./fix-gqlgen-trimpath.nix { inherit unzip; }); in From 2524e0d7f37bee8efb8359080e60a961503cbfa0 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 2 Jun 2022 14:48:35 +0200 Subject: [PATCH 144/148] sourcehut.pagessrht: 0.7.3 -> 0.7.4 --- .../sourcehut/fix-gqlgen-trimpath.nix | 6 ++++-- .../version-management/sourcehut/pages.nix | 13 +++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix b/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix index a95c3a3f3fd2..629d767a1caf 100644 --- a/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix +++ b/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix @@ -1,4 +1,6 @@ -{ unzip }: +{ unzip +, gqlgenVersion ? "0.17.2" +}: { overrideModAttrs = (_: { # No need to workaround -trimpath: it's not used in go-modules, @@ -21,7 +23,7 @@ # https://github.com/99designs/gqlgen/issues/1537 # This is to give `go generate ./graph` access to gqlgen's *.gotpl files # If it fails, the gqlgenVersion may have to be updated. - preBuild = let gqlgenVersion = "0.17.2"; in '' + preBuild = '' unzip ''${GOPROXY#"file://"}/github.com/99designs/gqlgen/@v/v${gqlgenVersion}.zip go generate ./loaders go generate ./graph diff --git a/pkgs/applications/version-management/sourcehut/pages.nix b/pkgs/applications/version-management/sourcehut/pages.nix index 7569744e9c7d..edb9379c6ded 100644 --- a/pkgs/applications/version-management/sourcehut/pages.nix +++ b/pkgs/applications/version-management/sourcehut/pages.nix @@ -6,16 +6,21 @@ buildGoModule (rec { pname = "pagessrht"; - version = "0.7.3"; + version = "0.7.4"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "pages.sr.ht"; rev = version; - sha256 = "sha256-fHhf4VQ82/k4g8pzyuN9Pr2f8mxT8zw+2Nq0nw1Msks="; + sha256 = "sha256-WM9T2LS8yIqaR0PQQRgMk/tiMYcw8DZVPMqMWkj/5RY="; }; - vendorSha256 = "sha256-/+XVl6PZUMOZIiuO6vEu0dacefz2hDSObaP8JsItSTw="; + postPatch = '' + substituteInPlace Makefile \ + --replace "all: server" "" + ''; + + vendorSha256 = "sha256-VOqY/nStqGyfWOXnJSZX8UYyp2kzcibQM2NRNysHYEc="; postInstall = '' mkdir -p $out/share/sql/ @@ -30,4 +35,4 @@ buildGoModule (rec { }; # There is no ./loaders but this does not cause troubles # to go generate -} // import ./fix-gqlgen-trimpath.nix { inherit unzip; }) +} // import ./fix-gqlgen-trimpath.nix { inherit unzip; gqlgenVersion= "0.17.9"; }) From 9bd0b0fdc65953785644e1db5c473b3b36e47d46 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 2 Jun 2022 14:49:06 +0200 Subject: [PATCH 145/148] sourcehut.pastesrht: 0.13.7 -> 0.13.8 --- pkgs/applications/version-management/sourcehut/paste.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/paste.nix b/pkgs/applications/version-management/sourcehut/paste.nix index fbbc5fcd6a9d..e31473bd3436 100644 --- a/pkgs/applications/version-management/sourcehut/paste.nix +++ b/pkgs/applications/version-management/sourcehut/paste.nix @@ -8,15 +8,20 @@ buildPythonPackage rec { pname = "pastesrht"; - version = "0.13.7"; + version = "0.13.8"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "paste.sr.ht"; rev = version; - sha256 = "sha256-EzcS6Zbh+wJinC/GKJOSWUPORODpKEA3tLpLGqoVGBU="; + sha256 = "sha256-Zji9FyYUtsklYz4qyLbtduusteC7WujLCMmvZKcqYis="; }; + postPatch = '' + substituteInPlace Makefile \ + --replace "all: api" "" + ''; + nativeBuildInputs = srht.nativeBuildInputs; propagatedBuildInputs = [ From 010488c27b3b77d69d280f339b3c7f54b898fe4b Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 2 Jun 2022 14:55:20 +0200 Subject: [PATCH 146/148] sourcehut.todosrht: 0.71.2 -> 0.72.2 --- pkgs/applications/version-management/sourcehut/todo.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/todo.nix b/pkgs/applications/version-management/sourcehut/todo.nix index 67367b71ff93..0278fb6bd173 100644 --- a/pkgs/applications/version-management/sourcehut/todo.nix +++ b/pkgs/applications/version-management/sourcehut/todo.nix @@ -14,13 +14,13 @@ buildPythonPackage rec { pname = "todosrht"; - version = "0.71.2"; + version = "0.72.2"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "todo.sr.ht"; rev = version; - sha256 = "sha256-m7FY+jXpwPnK1+b1iQiDGe8JPfAFQp65BzGH6WvNwhM="; + sha256 = "sha256-FLjVO8Y/9s2gFfMXwcY7Rj3WNzPEBYs1AEjiVZFWsT8="; }; postPatch = '' @@ -32,7 +32,7 @@ buildPythonPackage rec { inherit src version; pname = "todosrht-api"; modRoot = "api"; - vendorSha256 = "sha256-ttGT7lUh8O+9KvbaEGWUsthefXQ2ATeli0tnlXCjZFk="; + vendorSha256 = "sha256-LB1H4jwnvoEyaaYJ09NI/M6IkgZwRet/fkso6b9EPV0="; } // import ./fix-gqlgen-trimpath.nix {inherit unzip;}); nativeBuildInputs = srht.nativeBuildInputs; From 17c6f625037d103f491f9bc434bb195fe432e78a Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Wed, 8 Jun 2022 21:25:15 +0200 Subject: [PATCH 147/148] nixos/sourcehut: some settings became mandatory upstream --- .../services/misc/sourcehut/default.nix | 34 ++++++++++------ nixos/tests/sourcehut.nix | 39 +++++++++++++++++++ 2 files changed, 62 insertions(+), 11 deletions(-) diff --git a/nixos/modules/services/misc/sourcehut/default.nix b/nixos/modules/services/misc/sourcehut/default.nix index 3a9c2808dec2..3ff2837900ec 100644 --- a/nixos/modules/services/misc/sourcehut/default.nix +++ b/nixos/modules/services/misc/sourcehut/default.nix @@ -238,20 +238,32 @@ in }; smtp-user = mkOptionNullOrStr "Outgoing SMTP user."; smtp-password = mkOptionNullOrStr "Outgoing SMTP password."; - smtp-from = mkOptionNullOrStr "Outgoing SMTP FROM."; + smtp-from = mkOption { + type = types.str; + description = "Outgoing SMTP FROM."; + }; error-to = mkOptionNullOrStr "Address receiving application exceptions"; error-from = mkOptionNullOrStr "Address sending application exceptions"; - pgp-privkey = mkOptionNullOrStr '' - An absolute file path (which should be outside the Nix-store) - to an OpenPGP private key. + pgp-privkey = mkOption { + type = types.str; + description = '' + An absolute file path (which should be outside the Nix-store) + to an OpenPGP private key. - Your PGP key information (DO NOT mix up pub and priv here) - You must remove the password from your secret key, if present. - You can do this with gpg --edit-key [key-id], - then use the passwd command and do not enter a new password. - ''; - pgp-pubkey = mkOptionNullOrStr "OpenPGP public key."; - pgp-key-id = mkOptionNullOrStr "OpenPGP key identifier."; + Your PGP key information (DO NOT mix up pub and priv here) + You must remove the password from your secret key, if present. + You can do this with gpg --edit-key [key-id], + then use the passwd command and do not enter a new password. + ''; + }; + pgp-pubkey = mkOption { + type = with types; either path str; + description = "OpenPGP public key."; + }; + pgp-key-id = mkOption { + type = types.str; + description = "OpenPGP key identifier."; + }; }; options.objects = { s3-upstream = mkOption { diff --git a/nixos/tests/sourcehut.nix b/nixos/tests/sourcehut.nix index 6998f4f0c104..410660e9dcb0 100644 --- a/nixos/tests/sourcehut.nix +++ b/nixos/tests/sourcehut.nix @@ -169,6 +169,45 @@ in oauth-client-id = "d07cb713d920702e"; }; settings.webhooks.private-key = pkgs.writeText "webhook-key" "Ra3IjxgFiwG9jxgp4WALQIZw/BMYt30xWiOsqD0J7EA="; + settings.mail = { + smtp-from = "root+hut@${domain}"; + # WARNING: take care to keep pgp-privkey outside the Nix store in production, + # or use LoadCredentialEncrypted= + pgp-privkey = toString (pkgs.writeText "sourcehut.pgp-privkey" '' + -----BEGIN PGP PRIVATE KEY BLOCK----- + + lFgEYqDRORYJKwYBBAHaRw8BAQdAehGoy36FUx2OesYm07be2rtLyvR5Pb/ltstd + Gk7hYQoAAP9X4oPmxxrHN8LewBpWITdBomNqlHoiP7mI0nz/BOPJHxEktDZuaXhv + cy90ZXN0cy9zb3VyY2VodXQgPHJvb3QraHV0QHNvdXJjZWh1dC5sb2NhbGRvbWFp + bj6IlwQTFgoAPxYhBPqjgjnL8RHN4JnADNicgXaYm0jJBQJioNE5AhsDBQkDwmcA + BgsJCAcDCgUVCgkICwUWAwIBAAIeBQIXgAAKCRDYnIF2mJtIySVCAP9e2nHsVHSi + 2B1YGZpVG7Xf36vxljmMkbroQy+0gBPwRwEAq+jaiQqlbGhQ7R/HMFcAxBIVsq8h + Aw1rngsUd0o3dAicXQRioNE5EgorBgEEAZdVAQUBAQdAXZV2Sd5ZNBVTBbTGavMv + D6ORrUh8z7TI/3CsxCE7+yADAQgHAAD/c1RU9xH+V/uI1fE7HIn/zL0LUPpsuce2 + cH++g4u3kBgTOYh+BBgWCgAmFiEE+qOCOcvxEc3gmcAM2JyBdpibSMkFAmKg0TkC + GwwFCQPCZwAACgkQ2JyBdpibSMlKagD/cTre6p1m8QuJ7kwmCFRSz5tBzIuYMMgN + xtT7dmS91csA/35fWsOykSiFRojQ7ccCSUTHL7ApF2EbL968tP/D2hIG + =Hjoc + -----END PGP PRIVATE KEY BLOCK----- + ''); + pgp-pubkey = pkgs.writeText "sourcehut.pgp-pubkey" '' + -----BEGIN PGP PUBLIC KEY BLOCK----- + + mDMEYqDRORYJKwYBBAHaRw8BAQdAehGoy36FUx2OesYm07be2rtLyvR5Pb/ltstd + Gk7hYQq0Nm5peG9zL3Rlc3RzL3NvdXJjZWh1dCA8cm9vdCtodXRAc291cmNlaHV0 + LmxvY2FsZG9tYWluPoiXBBMWCgA/FiEE+qOCOcvxEc3gmcAM2JyBdpibSMkFAmKg + 0TkCGwMFCQPCZwAGCwkIBwMKBRUKCQgLBRYDAgEAAh4FAheAAAoJENicgXaYm0jJ + JUIA/17acexUdKLYHVgZmlUbtd/fq/GWOYyRuuhDL7SAE/BHAQCr6NqJCqVsaFDt + H8cwVwDEEhWyryEDDWueCxR3Sjd0CLg4BGKg0TkSCisGAQQBl1UBBQEBB0BdlXZJ + 3lk0FVMFtMZq8y8Po5GtSHzPtMj/cKzEITv7IAMBCAeIfgQYFgoAJhYhBPqjgjnL + 8RHN4JnADNicgXaYm0jJBQJioNE5AhsMBQkDwmcAAAoJENicgXaYm0jJSmoA/3E6 + 3uqdZvELie5MJghUUs+bQcyLmDDIDcbU+3ZkvdXLAP9+X1rDspEohUaI0O3HAklE + xy+wKRdhGy/evLT/w9oSBg== + =pJD7 + -----END PGP PUBLIC KEY BLOCK----- + ''; + pgp-key-id = "0xFAA38239CBF111CDE099C00CD89C8176989B48C9"; + }; }; networking.firewall.allowedTCPPorts = [ 443 ]; From 9d69ea4b7f4e45029c36d84aa06ef960f0d6cbdc Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Wed, 8 Jun 2022 21:25:54 +0200 Subject: [PATCH 148/148] nixos/sourcehut: improve testing --- nixos/tests/sourcehut.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/tests/sourcehut.nix b/nixos/tests/sourcehut.nix index 410660e9dcb0..d52fbddd20f3 100644 --- a/nixos/tests/sourcehut.nix +++ b/nixos/tests/sourcehut.nix @@ -246,7 +246,9 @@ in #machine.wait_for_unit("buildsrht-worker.service") # Testing gitsrht + machine.wait_for_unit("gitsrht-api.service") machine.wait_for_unit("gitsrht.service") + machine.wait_for_unit("gitsrht-webhooks.service") machine.succeed("curl -sL http://git.${domain} | grep git.${domain}") ''; })