···185185 */186186 makeBinPath = makeSearchPathOutput "bin" "bin";187187188188+ /* Normalize path, removing extranous /s189189+190190+ Type: normalizePath :: string -> string191191+192192+ Example:193193+ normalizePath "/a//b///c/"194194+ => "/a/b/c/"195195+ */196196+ normalizePath = s: (builtins.foldl' (x: y: if y == "/" && hasSuffix "/" x then x else x+y) "" (splitString "" s));197197+188198 /* Depending on the boolean `cond', return either the given string189199 or the empty string. Useful to concatenate against a bigger string.190200···304294 map f (stringToCharacters s)305295 );306296297297+ /* Convert char to ascii value, must be in printable range298298+299299+ Type: charToInt :: string -> int300300+301301+ Example:302302+ charToInt "A"303303+ => 65304304+ charToInt "("305305+ => 40306306+307307+ */308308+ charToInt = let309309+ table = import ./ascii-table.nix;310310+ in c: builtins.getAttr c table;311311+307312 /* Escape occurrence of the elements of `list` in `string` by308313 prefixing it with a backslash.309314···329304 => "\\(foo\\)"330305 */331306 escape = list: replaceChars list (map (c: "\\${c}") list);307307+308308+ /* Escape occurence of the element of `list` in `string` by309309+ converting to its ASCII value and prefixing it with \\x.310310+ Only works for printable ascii characters.311311+312312+ Type: escapeC = [string] -> string -> string313313+314314+ Example:315315+ escapeC [" "] "foo bar"316316+ => "foo\\x20bar"317317+318318+ */319319+ escapeC = list: replaceChars list (map (c: "\\x${ toLower (lib.toHexString (charToInt c))}") list);332320333321 /* Quote string to be used safely within the Bourne shell.334322
···311311 </listitem>312312 <listitem>313313 <para>314314+ <link xlink:href="https://ntfy.sh">ntfy.sh</link>, a push315315+ notification service. Available as316316+ <link linkend="opt-services.ntfy-sh.enable">services.ntfy-sh</link>317317+ </para>318318+ </listitem>319319+ <listitem>320320+ <para>314321 <link xlink:href="https://git.sr.ht/~migadu/alps">alps</link>,315322 a simple and extensible webmail. Available as316323 <link linkend="opt-services.alps.enable">services.alps</link>.
+2
nixos/doc/manual/release-notes/rl-2211.section.md
···112112113113- [Outline](https://www.getoutline.com/), a wiki and knowledge base similar to Notion. Available as [services.outline](#opt-services.outline.enable).114114115115+- [ntfy.sh](https://ntfy.sh), a push notification service. Available as [services.ntfy-sh](#opt-services.ntfy-sh.enable)116116+115117- [alps](https://git.sr.ht/~migadu/alps), a simple and extensible webmail. Available as [services.alps](#opt-services.alps.enable).116118117119- [endlessh-go](https://github.com/shizunge/endlessh-go), an SSH tarpit that exposes Prometheus metrics. Available as [services.endlessh-go](#opt-services.endlessh-go.enable).
+13-5
nixos/lib/utils.nix
···3939 || hasPrefix a'.mountPoint b'.mountPoint4040 || any (hasPrefix a'.mountPoint) b'.depends;41414242- # Escape a path according to the systemd rules, e.g. /dev/xyzzy4343- # becomes dev-xyzzy. FIXME: slow.4444- escapeSystemdPath = s:4545- replaceChars ["/" "-" " "] ["-" "\\x2d" "\\x20"]4646- (removePrefix "/" s);4242+ # Escape a path according to the systemd rules. FIXME: slow4343+ # The rules are described in systemd.unit(5) as follows:4444+ # The escaping algorithm operates as follows: given a string, any "/" character is replaced by "-", and all other characters which are not ASCII alphanumerics, ":", "_" or "." are replaced by C-style "\x2d" escapes. In addition, "." is replaced with such a C-style escape when it would appear as the first character in the escaped string.4545+ # When the input qualifies as absolute file system path, this algorithm is extended slightly: the path to the root directory "/" is encoded as single dash "-". In addition, any leading, trailing or duplicate "/" characters are removed from the string before transformation. Example: /foo//bar/baz/ becomes "foo-bar-baz".4646+ escapeSystemdPath = s: let4747+ replacePrefix = p: r: s: (if (hasPrefix p s) then r + (removePrefix p s) else s);4848+ trim = s: removeSuffix "/" (removePrefix "/" s);4949+ normalizedPath = strings.normalizePath s;5050+ in5151+ replaceChars ["/"] ["-"]5252+ (replacePrefix "." (strings.escapeC ["."] ".")5353+ (strings.escapeC (stringToCharacters " !\"#$%&'()*+,;<=>=@[\\]^`{|}~-")5454+ (if normalizedPath == "/" then normalizedPath else trim normalizedPath)));47554856 # Quotes an argument for use in Exec* service lines.4957 # systemd accepts "-quoted strings with escape sequences, toJSON produces
···11+{ lib22+, vscode-utils33+, sumneko-lua-language-server44+}:55+66+vscode-utils.buildVscodeMarketplaceExtension {77+ mktplcRef = {88+ name = "lua";99+ publisher = "sumneko";1010+ version = "3.5.6";1111+ sha256 = "sha256-Unzs9rX/0MlQprSvScdBCCFMeLCaGzWsMbcFqSKY2XY=";1212+ };1313+1414+ patches = [ ./remove-chmod.patch ];1515+1616+ postInstall = ''1717+ ln -sf ${sumneko-lua-language-server}/bin/lua-language-server \1818+ $out/$installPrefix/server/bin/lua-language-server1919+ '';2020+2121+ meta = with lib; {2222+ description = "The Lua language server provides various language features for Lua to make development easier and faster.";2323+ homepage = "https://marketplace.visualstudio.com/items?itemName=sumneko.lua";2424+ license = licenses.mit;2525+ maintainers = with maintainers; [ lblasc ];2626+ };2727+}
···2233stdenv.mkDerivation rec {44 pname = "signal-cli";55- version = "0.11.3";55+ version = "0.11.4";6677 # Building from source would be preferred, but is much more involved.88 src = fetchurl {99 url = "https://github.com/AsamK/signal-cli/releases/download/v${version}/signal-cli-${version}-Linux.tar.gz";1010- sha256 = "sha256-2Tn/04Bbj+mUsV0gftEUXQmFYWTQyVaPNHZQVk57Avo=";1010+ sha256 = "sha256-1NwaR8EMH2EQKskkPSrfWbUu8Ib7DwI6UNL3nOtc/tM=";1111 };12121313 buildInputs = lib.optionals stdenv.isLinux [ libmatthew_java dbus dbus_java ];
···2424 # Add all supported builds as attributes2525 allBuilds = mapAttrs' (version: file: nameValuePair (computeName version) (buildTensorRTPackage (removeAttrs file ["fileVersionCuda"]))) supportedVersions;2626 # Set the default attributes, e.g. tensorrt = tensorrt_8_4;2727- defaultBuild = { "tensorrt" = allBuilds.${computeName tensorRTDefaultVersion}; };2727+ defaultBuild = { "tensorrt" = if allBuilds ? ${computeName tensorRTDefaultVersion}2828+ then allBuilds.${computeName tensorRTDefaultVersion}2929+ else throw "tensorrt-${tensorRTDefaultVersion} does not support your cuda version ${cudaVersion}"; };2830 in allBuilds // defaultBuild;29313032 tensorRTVersions = {
···11+#!/usr/bin/env nix-shell22+#!nix-shell -i bash -p curl gnused nix-prefetch common-updater-scripts33+set -euo pipefail44+55+root="$(dirname "$(readlink -f "$0")")"66+77+version=$(curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} -s https://api.github.com/repos/microsoft/playwright-python/releases/latest | jq -r '.tag_name | sub("^v"; "")')88+99+# Most of the time, this should be the latest stable release of the Node-based1010+# Playwright version, but that isn't a guarantee, so this needs to be specified1111+# as well:1212+setup_py_url="https://github.com/microsoft/playwright-python/raw/v${version}/setup.py"1313+driver_version=$(curl -Ls "$setup_py_url" | grep '^driver_version =' | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')1414+1515+fetch_driver_arch() {1616+ nix-prefetch-url "https://playwright.azureedge.net/builds/driver/playwright-${version}-${1}.zip"1717+}1818+1919+replace_sha() {2020+ sed -i "s|$1 = \".\{44,52\}\"|$1 = \"$2\"|" "$root/default.nix"2121+}2222+2323+# Replace SHAs for the driver downloads2424+replace_sha "x86_64-linux" "$(fetch_driver_arch "linux")"2525+replace_sha "x86_64-darwin" "$(fetch_driver_arch "mac")"2626+replace_sha "aarch64-linux" "$(fetch_driver_arch "linux-arm64")"2727+replace_sha "aarch64-darwin" "$(fetch_driver_arch "mac-arm64")"2828+2929+# Update the version stamps3030+sed -i "s/driverVersion = \"[^\$]*\"/driverVersion = \"$driver_version\"/" "$root/default.nix"3131+update-source-version playwright "$version" --rev="v$version"
···12121313buildPythonPackage rec {1414 pname = "selenium";1515- version = "4.4.2";1515+ version = "4.5.0";1616 disabled = pythonOlder "3.7";17171818 src = fetchFromGitHub {1919 owner = "SeleniumHQ";2020 repo = "selenium";2121- rev = "refs/tags/selenium-${version}-python"; # check if there is a newer tag with -python suffix2222- hash = "sha256-sJJ3i4mnGp5fDgo64p6B2vRCqp/Wm99VoyRLyy4nBH8=";2121+ # check if there is a newer tag with or without -python suffix2222+ rev = "refs/tags/selenium-${version}";2323+ hash = "sha256-K90CQYTeX9GKpP0ahxLx2HO5HG0P6MN7jeWmHtfiOns=";2324 };24252526 postPatch = ''···5150 description = "Bindings for Selenium WebDriver";5251 homepage = "https://selenium.dev/";5352 license = licenses.asl20;5454- maintainers = with maintainers; [ jraygauthier ];5353+ maintainers = with maintainers; [ jraygauthier SuperSandro2000 ];5554 };5655}
···11+{ lib, rustPlatform, fetchCrate, installShellFiles }:22+33+rustPlatform.buildRustPackage rec {44+ pname = "cauwugo";55+ version = "0.1.0";66+77+ src = fetchCrate {88+ inherit version;99+ pname = "bpaf_cauwugo";1010+ sha256 = "sha256-9gWUu2qbscKlbWZlRbOn+rrmizegkHxPnwnAmpaV1Ww=";1111+ };1212+1313+ cargoSha256 = "sha256-dXlSBb3ey3dAiifrQ9Bbhscnm1QmcChiQbX1ic069V4=";1414+1515+ nativeBuildInputs = [ installShellFiles ];1616+1717+ postInstall = ''1818+ installShellCompletion --cmd cauwugo \1919+ --bash <($out/bin/cauwugo --bpaf-complete-style-bash) \2020+ --fish <($out/bin/cauwugo --bpaf-complete-style-fish) \2121+ --zsh <($out/bin/cauwugo --bpaf-complete-style-zsh)2222+ '';2323+2424+ meta = with lib; {2525+ description = "An alternative cargo frontend that implements dynamic shell completion for usual cargo commands";2626+ homepage = "https://github.com/pacak/bpaf/tree/master/bpaf_cauwugo";2727+ license = with licenses; [ mit /* or */ asl20 ];2828+ maintainers = with maintainers; [ figsoda ];2929+ };3030+}
+3-3
pkgs/servers/consul/default.nix
···2233buildGoModule rec {44 pname = "consul";55- version = "1.13.2";55+ version = "1.13.3";66 rev = "v${version}";7788 # Note: Currently only release tags are supported, because they have the Consul UI···1717 owner = "hashicorp";1818 repo = pname;1919 inherit rev;2020- sha256 = "sha256-+5I5hsVuLZve4FJHe41rKycWuKNv7UdxCSi4kaKk2/w=";2020+ sha256 = "sha256-pTBeR7WP25Ng1OiVkZ60wTYnSOWahkx6LYHScnX0fWw=";2121 };22222323 passthru.tests.consul = nixosTests.consul;···2626 # has a split module structure in one repo2727 subPackages = ["." "connect/certgen"];28282929- vendorSha256 = "sha256-SjTG1/WhfGhLuUherVHEC3PmDz4HLMS2Cg0ReKTm0zk=";2929+ vendorSha256 = "sha256-ZarkaUP9jwwP9FReaVAfPaQzKFETUEHsCsVDGFYKJvU=";30303131 doCheck = false;3232
+3-3
pkgs/servers/plex/raw.nix
···1212# server, and the FHS userenv and corresponding NixOS module should1313# automatically pick up the changes.1414stdenv.mkDerivation rec {1515- version = "1.29.0.6244-819d3678c";1515+ version = "1.29.1.6316-f4cdfea9c";1616 pname = "plexmediaserver";17171818 # Fetch the source1919 src = if stdenv.hostPlatform.system == "aarch64-linux" then fetchurl {2020 url = "https://downloads.plex.tv/plex-media-server-new/${version}/debian/plexmediaserver_${version}_arm64.deb";2121- sha256 = "sha256-f9QRaAF9qE3NpCt3lMWQ7MAbfLI7YQaIIF/fkJorUxY=";2121+ sha256 = "sha256-FiUeZFIeXk27VQY99d2a98iBQgy7ESKd0HvYRclQHq8=";2222 } else fetchurl {2323 url = "https://downloads.plex.tv/plex-media-server-new/${version}/debian/plexmediaserver_${version}_amd64.deb";2424- sha256 = "sha256-iGMO6uuNm2c7UBZvA5dYaSxUrEQCL1tR9zLA3rZhBn4=";2424+ sha256 = "sha256-6VSYQO6KmbAC4vlU3McF4QmuJIopBVB7aV5bpNqOSv0=";2525 };26262727 outputs = [ "out" "basedb" ];
···11+{ lib22+, fetchFromGitHub33+, python344+}:55+let66+ py = python3.override {77+ packageOverrides = final: prev: {88+ flask = prev.flask.overridePythonAttrs (old: rec {99+ version = "2.1.3";1010+ src = old.src.override {1111+ inherit version;1212+ sha256 = "sha256-FZcuUBffBXXD1sCQuhaLbbkCWeYgrI1+qBOjlrrVtss=";1313+ };1414+ });1515+ flask-restful = prev.flask-restful.overridePythonAttrs (old: rec {1616+ disabledTests = old.disabledTests or [ ] ++ [1717+ # fails because of flask or werkzeug downgrade1818+ "test_redirect"1919+ ];2020+ });2121+ werkzeug = prev.werkzeug.overridePythonAttrs (old: rec {2222+ version = "2.0.3";2323+ src = old.src.override {2424+ inherit version;2525+ sha256 = "sha256-uGP4/wV8UiFktgZ8niiwQRYbS+W6TQ2s7qpQoWOCLTw=";2626+ };2727+ });2828+ };2929+ };3030+in3131+py.pkgs.buildPythonApplication rec {3232+ pname = "changedetection-io";3333+ version = "0.39.20.3";3434+ format = "setuptools";3535+3636+ src = fetchFromGitHub {3737+ owner = "dgtlmoon";3838+ repo = "changedetection.io";3939+ rev = version;4040+ sha256 = "sha256-0Sv/1YoZuSnslQgMOu+uHTxb9QewXPC0tLAvzJA4Aa8=";4141+ };4242+4343+ postPatch = ''4444+ substituteInPlace requirements.txt \4545+ --replace "bs4" "beautifulsoup4" \4646+ --replace "cryptography ~= 3.4" "cryptography" \4747+ --replace "selenium ~= 4.1.0" "selenium"4848+ '';4949+5050+ propagatedBuildInputs = with py.pkgs; [5151+ flask5252+ flask-wtf5353+ eventlet5454+ validators5555+ timeago5656+ inscriptis5757+ feedgen5858+ flask-login5959+ flask-restful6060+ pytz6161+ brotli6262+ requests6363+ urllib36464+ chardet6565+ wtforms6666+ jsonpath-ng6767+ jq6868+ apprise6969+ paho-mqtt7070+ cryptography7171+ beautifulsoup47272+ lxml7373+ selenium7474+ werkzeug7575+ playwright7676+ ] ++ requests.optional-dependencies.socks;7777+7878+ # tests can currently not be run in one pytest invocation and without docker7979+ doCheck = false;8080+8181+ checkInputs = with py.pkgs; [8282+ pytest-flask8383+ pytestCheckHook8484+ ];8585+8686+ meta = with lib; {8787+ homepage = "https://github.com/dgtlmoon/changedetection.io";8888+ description = "Simplest self-hosted free open source website change detection tracking, monitoring and notification service";8989+ license = licenses.asl20;9090+ maintainers = with maintainers; [ SuperSandro2000 ];9191+ };9292+}
+2-2
pkgs/test/cuda/cuda-samples/extension.nix
···1111 "11.4" = "082dkk5y34wyvjgj2p5j1d00rk8xaxb9z0mhvz16bd469r1bw2qk";1212 "11.5" = "sha256-AKRZbke0K59lakhTi8dX2cR2aBuWPZkiQxyKaZTvHrI=";1313 "11.6" = "sha256-AsLNmAplfuQbXg9zt09tXAuFJ524EtTYsQuUlV1tPkE=";1414- # the tag 11.7 does not exists: see https://github.com/NVIDIA/cuda-samples/issues/1281514 # maybe fixed by https://github.com/NVIDIA/cuda-samples/pull/1331616- "11.7" = throw "The tag 11.7 of cuda-samples does not exists (see see https://github.com/NVIDIA/cuda-samples/issues/128)";1515+ "11.7" = throw "The tag 11.7 of cuda-samples does not exist";1616+ "11.8" = throw "The tag 11.8 of cuda-samples does not exist";1717 }.${prev.cudaVersion};18181919in {
+2-2
pkgs/tools/admin/credhub-cli/default.nix
···2233buildGoModule rec {44 pname = "credhub-cli";55- version = "2.9.5";55+ version = "2.9.6";6677 src = fetchFromGitHub {88 owner = "cloudfoundry-incubator";99 repo = "credhub-cli";1010 rev = version;1111- sha256 = "sha256-M2FIzLl1pQ/TJinG4UOh2VQWfZx4iT3Qw6pJhjv88cM=";1111+ sha256 = "sha256-g7LJlMKwV3Cq0LEBPWPgzPJAp9W6bwVuuVVv/ZhuBSM=";1212 };13131414 # these tests require network access that we're not going to give them
···3535 --replace "= gcc" "=${stdenv.cc.targetPrefix}cc" \3636 --replace "= g++" "=${stdenv.cc.targetPrefix}c++" \3737 --replace "-DGNU_RUNTIME=1" "" \3838- --replace "-fgnu-runtime" "-fobjc-nonfragile-abi"3838+ --replace "-fgnu-runtime" "-fobjc-runtime=gnustep-2.0"3939 done40404141 # we need to build inside this directory as well, so we have to make it writeable
+3-3
pkgs/tools/filesystems/lfs/default.nix
···5566rustPlatform.buildRustPackage rec {77 pname = "lfs";88- version = "2.5.0";88+ version = "2.6.0";991010 src = fetchFromGitHub {1111 owner = "Canop";1212 repo = pname;1313 rev = "v${version}";1414- sha256 = "sha256-7dSBac+rLedgko4KLVS9ZWrj/IlXJMsnbQFzyQxv4LQ=";1414+ sha256 = "sha256-+BkHE4vl1oYNR5SX2y7Goly7OwGDXRoZex6YL7Xv2QI=";1515 };16161717- cargoSha256 = "sha256-stDxDBftIVZqgy49VGJHx+JTzflVE91QN75aSWhvgSs=";1717+ cargoSha256 = "sha256-njrjuLHDmcubw8lLPpS9K5la0gRIKq4OrP+MXs1Ro/o=";18181919 meta = with lib; {2020 description = "Get information on your mounted disks";