From da0626cad7513b0d2fb603107051edd8a4dc377f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 4 Sep 2021 10:18:48 +0200 Subject: [PATCH 01/10] sad: init at 0.4.14 --- pkgs/tools/text/sad/default.nix | 25 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 pkgs/tools/text/sad/default.nix diff --git a/pkgs/tools/text/sad/default.nix b/pkgs/tools/text/sad/default.nix new file mode 100644 index 000000000000..2b748d60d1fe --- /dev/null +++ b/pkgs/tools/text/sad/default.nix @@ -0,0 +1,25 @@ +{ lib +, fetchFromGitHub +, rustPlatform +}: + +rustPlatform.buildRustPackage rec { + pname = "sad"; + version = "0.4.14"; + + src = fetchFromGitHub { + owner = "ms-jpq"; + repo = pname; + rev = "v${version}"; + sha256 = "03b6qxkn8sqv06gs4p6wg02arz0n9llc3z92zhfd5ipz8han83fd"; + }; + + cargoSha256 = "13nkd4354siy8pr2032bxz2z5x8b378mccq6pnm71cpl9dl6w4ad"; + + meta = with lib; { + description = "CLI tool to search and replace"; + homepage = "https://github.com/ms-jpq/sad"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cd2f731315d5..d328c40b000c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8758,6 +8758,8 @@ with pkgs; sacad = callPackage ../tools/misc/sacad { }; + sad = callPackage ../tools/text/sad { }; + safecopy = callPackage ../tools/system/safecopy { }; sacd = callPackage ../tools/cd-dvd/sacd { }; From 1b4038bddfac009f0eccf516e4874219bfc331d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 4 Sep 2021 10:52:31 +0200 Subject: [PATCH 02/10] linux_zen: 5.13.13-zen1 -> 5.14.1-zen1 --- pkgs/os-specific/linux/kernel/linux-zen.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-zen.nix b/pkgs/os-specific/linux/kernel/linux-zen.nix index 7750b776575c..b19b52132352 100644 --- a/pkgs/os-specific/linux/kernel/linux-zen.nix +++ b/pkgs/os-specific/linux/kernel/linux-zen.nix @@ -2,7 +2,7 @@ let # having the full version string here makes it easier to update - modDirVersion = "5.13.13-zen1"; + modDirVersion = "5.14.1-zen1"; parts = lib.splitString "-" modDirVersion; version = lib.elemAt parts 0; suffix = lib.elemAt parts 1; @@ -19,7 +19,7 @@ buildLinux (args // { owner = "zen-kernel"; repo = "zen-kernel"; rev = "v${modDirVersion}"; - sha256 = "sha256-aTTbhXy0wsDDCSbX1k27l9g3FliqwE6TbRq2zkI3mnw="; + sha256 = "sha256-InfDIs+eELLJE5aw7mD8Jo7SlrpeI/ZuD3z4TyFf7/k="; }; structuredExtraConfig = with lib.kernel; { From 019200160c257bf5cd4880d2501e03c9868ed89b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 5 Sep 2021 11:44:57 +0200 Subject: [PATCH 03/10] python3Packages.numpy-stl: use pytestCheckHook --- .../python-modules/numpy-stl/default.nix | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/numpy-stl/default.nix b/pkgs/development/python-modules/numpy-stl/default.nix index bc8f6159bbba..040c34ee8006 100644 --- a/pkgs/development/python-modules/numpy-stl/default.nix +++ b/pkgs/development/python-modules/numpy-stl/default.nix @@ -1,4 +1,13 @@ -{ lib, buildPythonPackage, fetchPypi, cython, numpy, nine, pytest, pytest-runner, python-utils, enum34 }: +{ lib +, buildPythonPackage +, cython +, enum34 +, fetchPypi +, nine +, numpy +, pytestCheckHook +, python-utils +}: buildPythonPackage rec { pname = "numpy-stl"; @@ -9,15 +18,24 @@ buildPythonPackage rec { sha256 = "3e635b6fb6112a3c5e00e9e20eedab93b9b0c45ff1cc34eb7bdc0b3e922e2d77"; }; - checkInputs = [ pytest pytest-runner ]; + propagatedBuildInputs = [ + cython + enum34 + nine + numpy + python-utils + ]; - checkPhase = "py.test"; + checkInputs = [ + pytestCheckHook + ]; - propagatedBuildInputs = [ cython numpy nine python-utils enum34 ]; + pythonImportsCheck = [ "stl" ]; meta = with lib; { description = "Library to make reading, writing and modifying both binary and ascii STL files easy"; homepage = "https://github.com/WoLpH/numpy-stl/"; license = licenses.bsd3; + maintainers = with maintainers; [ ]; }; } From 7559cd66012025da118062d3c8b32dbfc4a9d41e Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Sun, 5 Sep 2021 12:53:12 +0800 Subject: [PATCH 04/10] bamf: 0.5.4 -> 0.5.5 --- pkgs/development/libraries/bamf/default.nix | 11 ++-- .../bamf/gtester2xunit-python3.patch | 53 ------------------- 2 files changed, 3 insertions(+), 61 deletions(-) delete mode 100644 pkgs/development/libraries/bamf/gtester2xunit-python3.patch diff --git a/pkgs/development/libraries/bamf/default.nix b/pkgs/development/libraries/bamf/default.nix index f1a7420fbce7..f53ea0d705cc 100644 --- a/pkgs/development/libraries/bamf/default.nix +++ b/pkgs/development/libraries/bamf/default.nix @@ -23,14 +23,14 @@ stdenv.mkDerivation rec { pname = "bamf"; - version = "0.5.4"; + version = "0.5.5"; outputs = [ "out" "dev" "devdoc" ]; src = fetchgit { url = "https://git.launchpad.net/~unity-team/bamf"; - rev = version; - sha256 = "1klvij1wyhdj5d8sr3b16pfixc1yk8ihglpjykg7zrr1f50jfgsz"; + rev = "${version}+21.10.20210710-0ubuntu1"; + sha256 = "0iwz5z5cz9r56pmfjvjd2kcjlk416dw6g38svs33ynssjgsqbdm0"; }; nativeBuildInputs = [ @@ -57,11 +57,6 @@ stdenv.mkDerivation rec { libwnck ]; - patches = [ - # Port tests and checks to python3 lxml. - ./gtester2xunit-python3.patch - ]; - # Fix hard-coded path # https://bugs.launchpad.net/bamf/+bug/1780557 postPatch = '' diff --git a/pkgs/development/libraries/bamf/gtester2xunit-python3.patch b/pkgs/development/libraries/bamf/gtester2xunit-python3.patch deleted file mode 100644 index 8dc478541943..000000000000 --- a/pkgs/development/libraries/bamf/gtester2xunit-python3.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index 41cb7db..93ef0ec 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -115,9 +115,9 @@ GTK_DOC_CHECK(1.0) - - AC_PATH_PROG([PYTHON],[python]) - AC_MSG_CHECKING(for gtester2xunit dependencies) --if !($PYTHON -c "import libxslt, libxml2" 2> /dev/null); then -+if !($PYTHON -c "import lxml" 2> /dev/null); then - AC_MSG_RESULT([no]) -- AC_MSG_ERROR([You need to install python-libxslt1 and python-libxml2]); -+ AC_MSG_ERROR([You need to install python-lxml]); - fi - AC_MSG_RESULT([yes]) - -@@ -189,6 +189,6 @@ ${PACKAGE}-${VERSION} - Introspection: ${enable_introspection} - Headless tests: ${enable_headless_tests} - Coverage Reporting: ${use_gcov} -- Export actions menus: ${enable_export_actions_menu} -+ Export actions menus: ${enable_export_actions_menu} - - EOF -diff --git a/tests/gtester2xunit.py b/tests/gtester2xunit.py -index fbe3c66..861d541 100755 ---- a/tests/gtester2xunit.py -+++ b/tests/gtester2xunit.py -@@ -1,18 +1,17 @@ - #! /usr/bin/python - from argparse import ArgumentParser --import libxslt --import libxml2 - import sys - import os -+from lxml import etree - - XSL_TRANSFORM='/usr/share/gtester2xunit/gtester.xsl' - - def transform_file(input_filename, output_filename, xsl_file): -- gtester = libxml2.parseFile(xsl_file) -- style = libxslt.parseStylesheetDoc(gtester) -- doc = libxml2.parseFile(input_filename) -- result = style.applyStylesheet(doc, None) -- result.saveFormatFile(filename=output_filename, format=True) -+ gtester = etree.parse(xsl_file) -+ style = etree.XSLT(gtester) -+ doc = etree.parse(input_filename) -+ result = style(doc) -+ result.write(filename=output_filename, format=True) - - - def get_output_filename(input_filename): From 39688bfb41799c5e836128b3126e966ab3585c6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 5 Sep 2021 20:47:12 +0200 Subject: [PATCH 05/10] knot-dns: upstream patch that should fix aarch64-darwin --- pkgs/servers/dns/knot-dns/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/servers/dns/knot-dns/default.nix b/pkgs/servers/dns/knot-dns/default.nix index 4adb649e0868..4a8ed6a0b080 100644 --- a/pkgs/servers/dns/knot-dns/default.nix +++ b/pkgs/servers/dns/knot-dns/default.nix @@ -1,6 +1,7 @@ { lib, stdenv, fetchurl, pkg-config, gnutls, liburcu, lmdb, libcap_ng, libidn2, libunistring , systemd, nettle, libedit, zlib, libiconv, libintl, libmaxminddb, libbpf, nghttp2, libmnl , autoreconfHook, nixosTests +, fetchpatch }: stdenv.mkDerivation rec { @@ -25,6 +26,11 @@ stdenv.mkDerivation rec { # They are later created from NixOS itself. ./dont-create-run-time-dirs.patch ./runtime-deps.patch + # rename task_t to worker_task_t to fix redefinition issues on (aach64-)darwin + (fetchpatch { + url = "https://gitlab.nic.cz/knot/knot-dns/-/commit/a70b718085f9b97e556970444313c37a702a60f7.diff"; + sha256 = "0m776pb9iga0lj2gadk23shfrcfrsrzlyaj8800klw7xh6qq32bm"; + }) ]; nativeBuildInputs = [ pkg-config autoreconfHook ]; From 8666c95a0e66f91ba3d67d0d31e1c04c2c12035f Mon Sep 17 00:00:00 2001 From: Kira Bruneau Date: Sun, 5 Sep 2021 16:41:57 -0400 Subject: [PATCH 06/10] grafana: add meta.mainProgram --- pkgs/servers/monitoring/grafana/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/monitoring/grafana/default.nix b/pkgs/servers/monitoring/grafana/default.nix index c252747c2fcf..379a50770447 100644 --- a/pkgs/servers/monitoring/grafana/default.nix +++ b/pkgs/servers/monitoring/grafana/default.nix @@ -71,5 +71,6 @@ buildGoModule rec { homepage = "https://grafana.com"; maintainers = with maintainers; [ offline fpletz willibutz globin ma27 Frostman ]; platforms = platforms.linux ++ platforms.darwin; + mainProgram = "grafana-server"; }; } From f1312d514d0d5d4c2254fb7f8a9a4388a6cd1145 Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Sun, 5 Sep 2021 14:39:01 -0500 Subject: [PATCH 07/10] git-cliff: init at 0.2.6 --- .../git-and-tools/git-cliff/default.nix | 27 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/applications/version-management/git-and-tools/git-cliff/default.nix diff --git a/pkgs/applications/version-management/git-and-tools/git-cliff/default.nix b/pkgs/applications/version-management/git-and-tools/git-cliff/default.nix new file mode 100644 index 000000000000..b0a5ca641a41 --- /dev/null +++ b/pkgs/applications/version-management/git-and-tools/git-cliff/default.nix @@ -0,0 +1,27 @@ +{ lib, stdenv, fetchFromGitHub, rustPlatform, Security }: + +rustPlatform.buildRustPackage rec { + pname = "git-cliff"; + version = "0.2.6"; + + src = fetchFromGitHub { + owner = "orhun"; + repo = "git-cliff"; + rev = "v${version}"; + sha256 = "sha256-oQ23jvKR4HGIMnW56FVE0XlBpO4pnMBbRXVoc6OuiHo="; + }; + + cargoSha256 = "sha256-49RHGOhTaYrg+JKYZMWcgSL7dxe6H50G6n9tJyGaLMQ="; + + # attempts to run the program on .git in src which is not deterministic + doCheck = false; + + buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + + meta = with lib; { + description = "A highly customizable Changelog Generator that follows Conventional Commit specifications"; + homepage = "https://github.com/orhun/git-cliff"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ siraben ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 618ec5cdddae..25ac1bac5606 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5277,6 +5277,10 @@ with pkgs; git-cinnabar = callPackage ../applications/version-management/git-and-tools/git-cinnabar { }; + git-cliff = callPackage ../applications/version-management/git-and-tools/git-cliff { + inherit (pkgs.darwin.apple_sdk.frameworks) Security; + }; + git-codeowners = callPackage ../applications/version-management/git-and-tools/git-codeowners { }; git-codereview = callPackage ../applications/version-management/git-and-tools/git-codereview { }; From d44b6ae6cb4d262b7281896df6f79fba04b67837 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Sat, 4 Sep 2021 15:31:07 -0700 Subject: [PATCH 08/10] modules/programs/bash: Fix ShellCheck warnings https://github.com/koalaman/shellcheck/wiki/SC2086 Double quote to prevent globbing and word splitting. https://github.com/koalaman/shellcheck/wiki/SC2166 Prefer `[ p ] && [ q ]` as `[ p -a q ]` is not well defined. https://github.com/koalaman/shellcheck/wiki/SC2219 Instead of `let expr`, prefer `(( expr ))` . Signed-off-by: Anders Kaseorg --- nixos/modules/programs/bash/bash-completion.nix | 2 +- nixos/modules/programs/bash/bash.nix | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nixos/modules/programs/bash/bash-completion.nix b/nixos/modules/programs/bash/bash-completion.nix index f07b1b636ef9..b8e5b1bfa336 100644 --- a/nixos/modules/programs/bash/bash-completion.nix +++ b/nixos/modules/programs/bash/bash-completion.nix @@ -26,7 +26,7 @@ in shopt -s nullglob for p in $NIX_PROFILES; do for m in "$p/etc/bash_completion.d/"*; do - . $m + . "$m" done done eval "$nullglobStatus" diff --git a/nixos/modules/programs/bash/bash.nix b/nixos/modules/programs/bash/bash.nix index 908ab34b08d0..7281126979e5 100644 --- a/nixos/modules/programs/bash/bash.nix +++ b/nixos/modules/programs/bash/bash.nix @@ -78,10 +78,10 @@ in promptInit = mkOption { default = '' # Provide a nice prompt if the terminal supports it. - if [ "$TERM" != "dumb" -o -n "$INSIDE_EMACS" ]; then + if [ "$TERM" != "dumb" ] || [ -n "$INSIDE_EMACS" ]; then PROMPT_COLOR="1;31m" - let $UID && PROMPT_COLOR="1;32m" - if [ -n "$INSIDE_EMACS" -o "$TERM" == "eterm" -o "$TERM" == "eterm-color" ]; then + ((UID)) && PROMPT_COLOR="1;32m" + if [ -n "$INSIDE_EMACS" ] || [ "$TERM" = "eterm" ] || [ "$TERM" = "eterm-color" ]; then # Emacs term mode doesn't support xterm title escape sequence (\e]0;) PS1="\n\[\033[$PROMPT_COLOR\][\u@\h:\w]\\$\[\033[0m\] " else @@ -173,7 +173,7 @@ in # /etc/bashrc: DO NOT EDIT -- this file has been generated automatically. # Only execute this file once per shell. - if [ -n "$__ETC_BASHRC_SOURCED" -o -n "$NOSYSBASHRC" ]; then return; fi + if [ -n "$__ETC_BASHRC_SOURCED" ] || [ -n "$NOSYSBASHRC" ]; then return; fi __ETC_BASHRC_SOURCED=1 # If the profile was not loaded in a parent process, source From d8ef13fc13974b1406fd8aa9afd683f91c522052 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Sat, 4 Sep 2021 15:32:08 -0700 Subject: [PATCH 09/10] modules/programs/command-not-found: Fix ShellCheck warnings https://github.com/koalaman/shellcheck/wiki/SC2086 Double quote to prevent globbing and word splitting. https://github.com/koalaman/shellcheck/wiki/SC2166 Prefer `[ p ] && [ q ]` as `[ p -a q ]` is not well defined. Signed-off-by: Anders Kaseorg --- .../programs/command-not-found/command-not-found.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/modules/programs/command-not-found/command-not-found.nix b/nixos/modules/programs/command-not-found/command-not-found.nix index 79786584c666..4d2a89b51584 100644 --- a/nixos/modules/programs/command-not-found/command-not-found.nix +++ b/nixos/modules/programs/command-not-found/command-not-found.nix @@ -49,10 +49,10 @@ in '' # This function is called whenever a command is not found. command_not_found_handle() { - local p=${commandNotFound}/bin/command-not-found - if [ -x $p -a -f ${cfg.dbPath} ]; then + local p='${commandNotFound}/bin/command-not-found' + if [ -x "$p" ] && [ -f '${cfg.dbPath}' ]; then # Run the helper program. - $p "$@" + "$p" "$@" # Retry the command if we just installed it. if [ $? = 126 ]; then "$@" @@ -70,10 +70,10 @@ in '' # This function is called whenever a command is not found. command_not_found_handler() { - local p=${commandNotFound}/bin/command-not-found - if [ -x $p -a -f ${cfg.dbPath} ]; then + local p='${commandNotFound}/bin/command-not-found' + if [ -x "$p" ] && [ -f '${cfg.dbPath}' ]; then # Run the helper program. - $p "$@" + "$p" "$@" # Retry the command if we just installed it. if [ $? = 126 ]; then From 85763b63cc24286b11e93ea118dc4195ad511a76 Mon Sep 17 00:00:00 2001 From: happysalada Date: Sun, 5 Sep 2021 11:39:08 +0900 Subject: [PATCH 10/10] caddy: 2.4.4 -> 2.4.5 --- pkgs/servers/caddy/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/caddy/default.nix b/pkgs/servers/caddy/default.nix index 801601487913..2b159cf8c875 100644 --- a/pkgs/servers/caddy/default.nix +++ b/pkgs/servers/caddy/default.nix @@ -2,7 +2,7 @@ buildGoModule rec { pname = "caddy"; - version = "2.4.4"; + version = "2.4.5"; subPackages = [ "cmd/caddy" ]; @@ -10,10 +10,10 @@ buildGoModule rec { owner = "caddyserver"; repo = pname; rev = "v${version}"; - sha256 = "sha256-POdDORICDE49BQ5LLTs4GTb1VoSXZD4K4MpRkVoj+AY="; + sha256 = "sha256-/DZnIXAvhCaXFl4DvYP4LSFQQytzj6HWYsmqx5T8GNM="; }; - vendorSha256 = "sha256-JAQaxEmdX0fpDahe55pEKnUW64k8JjrytkBrXpQJz3I="; + vendorSha256 = "sha256-ZevSZ8zTGtkrrJF0xvAtxCgP0CsxcORqD40LkMQ0aWc="; passthru.tests = { inherit (nixosTests) caddy; };