diff --git a/nixos/modules/programs/cdemu.nix b/nixos/modules/programs/cdemu.nix index 1aac28af1d2c..cdfab3ee9f39 100644 --- a/nixos/modules/programs/cdemu.nix +++ b/nixos/modules/programs/cdemu.nix @@ -60,7 +60,7 @@ in { systemd.user.services.cdemu-daemon.serviceConfig = { Type = "dbus"; BusName = "net.sf.cdemu.CDEmuDaemon"; - ExecStart = "${pkgs.cdemu-daemon}/bin/cdemu-daemon --config-file \"%h/.config/cdemu-daemon\""; + ExecStart = "${lib.getExe pkgs.cdemu-daemon} --config-file \"%h/.config/cdemu-daemon\""; Restart = "no"; }; diff --git a/nixos/modules/services/backup/tarsnap.nix b/nixos/modules/services/backup/tarsnap.nix index ef531a0707c5..43493997931c 100644 --- a/nixos/modules/services/backup/tarsnap.nix +++ b/nixos/modules/services/backup/tarsnap.nix @@ -87,7 +87,7 @@ in cachedir = lib.mkOption { type = lib.types.nullOr lib.types.path; - default = "/var/cache/tarsnap/${utils.lib.escapeSystemdPath config.keyfile}"; + default = "/var/cache/tarsnap/${utils.escapeSystemdPath config.keyfile}"; defaultText = lib.literalExpression '' "/var/cache/tarsnap/''${utils.escapeSystemdPath config.${options.keyfile}}" ''; diff --git a/nixos/modules/services/desktop-managers/plasma6.nix b/nixos/modules/services/desktop-managers/plasma6.nix index c165c0b47eed..2df28c80e8a1 100644 --- a/nixos/modules/services/desktop-managers/plasma6.nix +++ b/nixos/modules/services/desktop-managers/plasma6.nix @@ -147,6 +147,10 @@ in { spectacle ffmpegthumbs krdp + ] ++ lib.optionals config.services.flatpak.enable [ + # Since PackageKit Nix support is not there yet, + # only install discover if flatpak is enabled. + discover ]; in requiredPackages diff --git a/nixos/modules/services/misc/amazon-ssm-agent.nix b/nixos/modules/services/misc/amazon-ssm-agent.nix index 89acbf09fea8..8267f9c42f8c 100644 --- a/nixos/modules/services/misc/amazon-ssm-agent.nix +++ b/nixos/modules/services/misc/amazon-ssm-agent.nix @@ -37,7 +37,12 @@ in { after = [ "network-online.target" ]; wantedBy = [ "multi-user.target" ]; - path = [ fake-lsb-release pkgs.coreutils ]; + path = [ + fake-lsb-release + pkgs.coreutils + "/run/wrappers" + "/run/current-system/sw" + ]; serviceConfig = { ExecStart = "${cfg.package}/bin/amazon-ssm-agent"; diff --git a/nixos/modules/services/security/authelia.nix b/nixos/modules/services/security/authelia.nix index f73c1ce41e5b..1cc137341e11 100644 --- a/nixos/modules/services/security/authelia.nix +++ b/nixos/modules/services/security/authelia.nix @@ -165,10 +165,10 @@ let log = { level = mkOption { - type = types.enum [ "info" "debug" "trace" ]; + type = types.enum [ "trace" "debug" "info" "warn" "error" ]; default = "debug"; example = "info"; - description = "Level of verbosity for logs: info, debug, trace."; + description = "Level of verbosity for logs."; }; format = mkOption { diff --git a/pkgs/applications/editors/vim/plugins/generated.nix b/pkgs/applications/editors/vim/plugins/generated.nix index 91c4aaf05ad9..9968cc9e3fbd 100644 --- a/pkgs/applications/editors/vim/plugins/generated.nix +++ b/pkgs/applications/editors/vim/plugins/generated.nix @@ -14838,6 +14838,18 @@ final: prev: meta.homepage = "https://github.com/seirl/vim-jinja-languages/"; }; + vim-jjdescription = buildVimPlugin { + pname = "vim-jjdescription"; + version = "2024-05-28"; + src = fetchFromGitHub { + owner = "avm99963"; + repo = "vim-jjdescription"; + rev = "ca14325202f3cd894d01ba833451017624249222"; + sha256 = "1y83fdih991ivlvgcwp0sx97icmf9k6px7mr26vb77izjlf011w2"; + }; + meta.homepage = "https://github.com/avm99963/vim-jjdescription/"; + }; + vim-jsbeautify = buildVimPlugin { pname = "vim-jsbeautify"; version = "2020-12-11"; diff --git a/pkgs/applications/editors/vim/plugins/vim-plugin-names b/pkgs/applications/editors/vim/plugins/vim-plugin-names index 1402e16e7d7e..5d6e94039192 100644 --- a/pkgs/applications/editors/vim/plugins/vim-plugin-names +++ b/pkgs/applications/editors/vim/plugins/vim-plugin-names @@ -1249,6 +1249,7 @@ https://github.com/pangloss/vim-javascript/,, https://github.com/jelera/vim-javascript-syntax/,, https://github.com/lepture/vim-jinja/,, https://github.com/seirl/vim-jinja-languages/,HEAD, +https://github.com/avm99963/vim-jjdescription/,HEAD, https://github.com/maksimr/vim-jsbeautify/,, https://github.com/heavenshell/vim-jsdoc/,, https://github.com/elzr/vim-json/,, diff --git a/pkgs/applications/emulators/cdemu/daemon.nix b/pkgs/applications/emulators/cdemu/daemon.nix index 5382efbff237..0100ea5321d6 100644 --- a/pkgs/applications/emulators/cdemu/daemon.nix +++ b/pkgs/applications/emulators/cdemu/daemon.nix @@ -1,11 +1,14 @@ { stdenv, callPackage, cmake, pkg-config, glib, libao, intltool, libmirage, coreutils }: -stdenv.mkDerivation { +let inherit (callPackage ./common-drv-attrs.nix { - version = "3.2.6"; + version = "3.2.7"; pname = "cdemu-daemon"; - hash = "sha256-puQE4+91xhRuNjVPZYgN/WO0uO8fVAOdxQWOGQ+FfY8="; + hash = "sha256-EKh2G6RA9Yq46BpTAqN2s6TpLJb8gwDuEpGiwdGcelc="; }) pname version src meta; +in +stdenv.mkDerivation { + inherit pname version src; nativeBuildInputs = [ cmake pkg-config intltool ]; buildInputs = [ glib libao libmirage ]; @@ -17,4 +20,16 @@ stdenv.mkDerivation { $out/share/dbus-1/services/net.sf.cdemu.CDEmuDaemon.service \ --replace /bin/true ${coreutils}/bin/true ''; + + meta = { + inherit (meta) + description + license + longDescription + maintainers + platforms + ; + homepage = "https://cdemu.sourceforge.io/about/daemon/"; + mainProgram = "cdemu-daemon"; + }; } diff --git a/pkgs/applications/emulators/cdemu/libmirage.nix b/pkgs/applications/emulators/cdemu/libmirage.nix index bbc013be18a0..2cad36725997 100644 --- a/pkgs/applications/emulators/cdemu/libmirage.nix +++ b/pkgs/applications/emulators/cdemu/libmirage.nix @@ -2,13 +2,15 @@ , glib, libsndfile, zlib, bzip2, xz, libsamplerate, intltool , pcre, util-linux, libselinux, libsepol }: -stdenv.mkDerivation { - +let inherit (callPackage ./common-drv-attrs.nix { - version = "3.2.7"; + version = "3.2.9"; pname = "libmirage"; - hash = "sha256-+okkgNeVS8yoKSrQDy4It7PiPlTSiOsUoFxQ1FS9s9M="; + hash = "sha256-JBd+wHSZRyRW1SZsaAaRO2dNUFkpwRCr3s1f39KyWIs="; }) pname version src meta; +in +stdenv.mkDerivation { + inherit pname version src; PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "${placeholder "out"}/share/gir-1.0"; PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "${placeholder "out"}/lib/girepository-1.0"; @@ -16,4 +18,13 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake pkg-config intltool gobject-introspection ]; propagatedBuildInputs = [ pcre util-linux libselinux libsepol ]; + meta = { + inherit (meta) + maintainers + license + platforms + ; + description = "CD-ROM image access library"; + homepage = "https://cdemu.sourceforge.io/about/libmirage/"; + }; } diff --git a/pkgs/applications/emulators/cdemu/vhba.nix b/pkgs/applications/emulators/cdemu/vhba.nix index 15b69500f3d2..e1d251a76392 100644 --- a/pkgs/applications/emulators/cdemu/vhba.nix +++ b/pkgs/applications/emulators/cdemu/vhba.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "vhba"; - version = "20240202"; + version = "20240917"; src = fetchurl { url = "mirror://sourceforge/cdemu/vhba-module-${version}.tar.xz"; - hash = "sha256-v1hQ1Lj1AiHKh9c0OpKe2oexkfb1roxhQXRUO1ut3oM="; + hash = "sha256-zjTLriw2zvjX0Jxfa9QtaHG5tTC7cLTKEA+WSCP+Dpg="; }; makeFlags = kernel.makeFlags ++ [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" "INSTALL_MOD_PATH=$(out)" ]; diff --git a/pkgs/applications/misc/lunatask/default.nix b/pkgs/applications/misc/lunatask/default.nix index dda7343d25e1..8850ec597fee 100644 --- a/pkgs/applications/misc/lunatask/default.nix +++ b/pkgs/applications/misc/lunatask/default.nix @@ -24,6 +24,8 @@ appimageTools.wrapType2 rec { --replace 'Exec=AppRun' 'Exec=${pname}' ''; + passthru.updateScript = ./update.py; + meta = with lib; { description = "All-in-one encrypted todo list, notebook, habit and mood tracker, pomodoro timer, and journaling app"; longDescription = '' @@ -31,6 +33,7 @@ appimageTools.wrapType2 rec { ''; homepage = "https://lunatask.app"; downloadPage = "https://lunatask.app/download"; + changelog = "https://lunatask.app/releases/${version}"; license = licenses.unfree; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; maintainers = with maintainers; [ henkery ]; diff --git a/pkgs/applications/misc/lunatask/update.py b/pkgs/applications/misc/lunatask/update.py new file mode 100755 index 000000000000..128b7e78fbaf --- /dev/null +++ b/pkgs/applications/misc/lunatask/update.py @@ -0,0 +1,18 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i python --packages python3 python3Packages.feedparser common-updater-scripts +""" +Parses the latest version from atom feed and runs update-source-version +""" + +import subprocess +import feedparser + +URL = "https://lunatask.app/releases/atom.xml" + +feed = feedparser.parse(URL) + +latest_entry = feed.entries[0] + +latest_version = latest_entry.title.split()[-1].lstrip("v") + +subprocess.run(["update-source-version", "lunatask", latest_version], check=True) diff --git a/pkgs/applications/networking/cluster/k3s/docs/USAGE.md b/pkgs/applications/networking/cluster/k3s/docs/USAGE.md index 27c5963bd0b8..326118e1712a 100644 --- a/pkgs/applications/networking/cluster/k3s/docs/USAGE.md +++ b/pkgs/applications/networking/cluster/k3s/docs/USAGE.md @@ -15,7 +15,7 @@ services.k3s.enable = true; services.k3s.role = "server"; services.k3s.extraFlags = toString [ - # "--kubelet-arg=v=4" # Optionally add additional args to k3s + # "--debug" # Optionally add additional args to k3s ]; } ``` diff --git a/pkgs/applications/networking/instant-messengers/discord/default.nix b/pkgs/applications/networking/instant-messengers/discord/default.nix index 891bc2423b98..b62be88b132c 100644 --- a/pkgs/applications/networking/instant-messengers/discord/default.nix +++ b/pkgs/applications/networking/instant-messengers/discord/default.nix @@ -3,7 +3,7 @@ let versions = if stdenv.isLinux then { stable = "0.0.67"; - ptb = "0.0.103"; + ptb = "0.0.105"; canary = "0.0.483"; development = "0.0.28"; } else { @@ -21,7 +21,7 @@ let }; ptb = fetchurl { url = "https://dl-ptb.discordapp.net/apps/linux/${version}/discord-ptb-${version}.tar.gz"; - hash = "sha256-BYzISVHSlKqVN0Egkw5su1wJnrGjQYbxYV840bDCakM="; + hash = "sha256-u/4wWssZxKlHrRW/Vd9pqUfqN2VQGYv1SDktpRsOayM="; }; canary = fetchurl { url = "https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz"; diff --git a/pkgs/applications/networking/termius/default.nix b/pkgs/applications/networking/termius/default.nix index 79ffd109e52d..487b13e55705 100644 --- a/pkgs/applications/networking/termius/default.nix +++ b/pkgs/applications/networking/termius/default.nix @@ -15,8 +15,8 @@ stdenv.mkDerivation rec { pname = "termius"; - version = "9.5.0"; - revision = "203"; + version = "9.6.1"; + revision = "204"; src = fetchurl { # find the latest version with @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { # and the sha512 with # curl -H 'X-Ubuntu-Series: 16' https://api.snapcraft.io/api/v1/snaps/details/termius-app | jq '.download_sha512' -r url = "https://api.snapcraft.io/api/v1/snaps/download/WkTBXwoX81rBe3s3OTt3EiiLKBx2QhuS_${revision}.snap"; - hash = "sha512-BouIQvJZbi350l30gl9fnXKYRHhi5q1oOvyEIVEmd4DjXvJLQisV4cK4OZIJ/bPOCI5DTxNOY7PwEduVQd3SYA=="; + hash = "sha512-ok3B/h+d0Q7k5i+IjgGB+4S5g2kzrQT/b4dYz4k07OnyfjJRgJ4X4f7BFFrwKLd+IbIC5OIibrvivWnkSWU3Ew=="; }; desktopItem = makeDesktopItem { diff --git a/pkgs/applications/science/logic/lean4/default.nix b/pkgs/applications/science/logic/lean4/default.nix index 3e5398e2b784..a2c33db40afd 100644 --- a/pkgs/applications/science/logic/lean4/default.nix +++ b/pkgs/applications/science/logic/lean4/default.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "lean4"; - version = "4.9.0"; + version = "4.9.1"; src = fetchFromGitHub { owner = "leanprover"; repo = "lean4"; rev = "v${finalAttrs.version}"; - hash = "sha256-wi7outnKpz60to6Z7MSGAKK6COxmpJo6iu6Re86jqlo="; + hash = "sha256-C3N56f3mT+5f149T1BIYQil2UleAWmnRYLqUq4zcLgs="; }; postPatch = '' @@ -53,6 +53,7 @@ stdenv.mkDerivation (finalAttrs: { passthru.tests = { version = testers.testVersion { package = finalAttrs.finalPackage; + version = "v${finalAttrs.version}"; }; }; diff --git a/pkgs/by-name/do/docfd/package.nix b/pkgs/by-name/do/docfd/package.nix index ee782a052f06..11ddaace86fe 100644 --- a/pkgs/by-name/do/docfd/package.nix +++ b/pkgs/by-name/do/docfd/package.nix @@ -21,7 +21,7 @@ let in buildDunePackage' rec { pname = "docfd"; - version = "8.0.2"; + version = "8.0.3"; minimalOCamlVersion = "5.1"; @@ -29,7 +29,7 @@ buildDunePackage' rec { owner = "darrenldl"; repo = "docfd"; rev = version; - hash = "sha256-A4feBRZs9EFpfgbGGcaKlwAz59RbKuPZAVJytgYVUAc="; + hash = "sha256-890/3iBruaQtWwlcvwuz4ujp7+P+5y1/2Axx4Iuik8Q="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/fi/firefoxpwa/package.nix b/pkgs/by-name/fi/firefoxpwa/package.nix index 16590548c0a7..45c837756867 100644 --- a/pkgs/by-name/fi/firefoxpwa/package.nix +++ b/pkgs/by-name/fi/firefoxpwa/package.nix @@ -28,13 +28,13 @@ rustPlatform.buildRustPackage rec { pname = "firefoxpwa"; - version = "2.12.3"; + version = "2.12.4"; src = fetchFromGitHub { owner = "filips123"; repo = "PWAsForFirefox"; rev = "v${version}"; - hash = "sha256-+dQr8eMOvCKt3ZEVU/EbEroVSpLQsBC+1Wix01IrOyc="; + hash = "sha256-VNCQUF/Xep/PkrNd9Mzbm3NWPToqXpJM6SzDoqBXbNY="; }; sourceRoot = "${src.name}/native"; diff --git a/pkgs/by-name/la/lazygit/package.nix b/pkgs/by-name/la/lazygit/package.nix index 6d3e74a04758..c9ccf34d2e40 100644 --- a/pkgs/by-name/la/lazygit/package.nix +++ b/pkgs/by-name/la/lazygit/package.nix @@ -7,13 +7,13 @@ }: buildGoModule rec { pname = "lazygit"; - version = "0.44.0"; + version = "0.44.1"; src = fetchFromGitHub { owner = "jesseduffield"; repo = pname; rev = "v${version}"; - hash = "sha256-bJ2wdS0BCAGjfbnMoQSUhw/xAkC5HPRklefXx2ux078="; + hash = "sha256-BP5PMgRq8LHLuUYDrWaX1PgfT9VEhj3xeLE2aDMAPF0="; }; vendorHash = null; diff --git a/pkgs/by-name/ms/msolve/package.nix b/pkgs/by-name/ms/msolve/package.nix index db05acd3bbce..45b7b0f62015 100644 --- a/pkgs/by-name/ms/msolve/package.nix +++ b/pkgs/by-name/ms/msolve/package.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "msolve"; - version = "0.7.1"; + version = "0.7.2"; src = fetchFromGitHub { owner = "algebraic-solving"; repo = "msolve"; rev = "v${finalAttrs.version}"; - hash = "sha256-f1AtZ0tyHg3fqz44GK7eCsye+wiKeBbpKK9JWXpV/tk="; + hash = "sha256-p7fD954aMApyBP58cvGrPwHEqhkxWlaiDHUlQT7kX4c="; }; postPatch = '' diff --git a/pkgs/by-name/ra/radicle-explorer/0001-remove-dependency-on-plausible.patch b/pkgs/by-name/ra/radicle-explorer/0001-remove-dependency-on-plausible.patch new file mode 100644 index 000000000000..06b3511d4078 --- /dev/null +++ b/pkgs/by-name/ra/radicle-explorer/0001-remove-dependency-on-plausible.patch @@ -0,0 +1,77 @@ +From cc4718cbea1bd70de21a2be515a944802246ffc7 Mon Sep 17 00:00:00 2001 +From: Vincent Ambo +Date: Sun, 15 Sep 2024 03:08:28 +0300 +Subject: [PATCH] remove dependency on plausible + +--- + package-lock.json | 9 --------- + package.json | 1 - + src/App.svelte | 8 -------- + 3 files changed, 18 deletions(-) + +diff --git a/package-lock.json b/package-lock.json +index d52de6c0..d96e342f 100644 +--- a/package-lock.json ++++ b/package-lock.json +@@ -29,7 +29,6 @@ + "marked-katex-extension": "^5.1.1", + "marked-linkify-it": "^3.1.11", + "md5": "^2.3.0", +- "plausible-tracker": "^0.3.9", + "svelte": "^4.2.19", + "twemoji": "^14.0.2", + "zod": "^3.23.8" +@@ -3697,14 +3696,6 @@ + "url": "https://github.com/sponsors/jonschlinkert" + } + }, +- "node_modules/plausible-tracker": { +- "version": "0.3.9", +- "resolved": "https://registry.npmjs.org/plausible-tracker/-/plausible-tracker-0.3.9.tgz", +- "integrity": "sha512-hMhneYm3GCPyQon88SZrVJx+LlqhM1kZFQbuAgXPoh/Az2YvO1B6bitT9qlhpiTdJlsT5lsr3gPmzoVjb5CDXA==", +- "engines": { +- "node": ">=10" +- } +- }, + "node_modules/playwright": { + "version": "1.46.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.46.1.tgz", +diff --git a/package.json b/package.json +index 6d569ad9..61e8d892 100644 +--- a/package.json ++++ b/package.json +@@ -73,7 +73,6 @@ + "marked-katex-extension": "^5.1.1", + "marked-linkify-it": "^3.1.11", + "md5": "^2.3.0", +- "plausible-tracker": "^0.3.9", + "svelte": "^4.2.19", + "twemoji": "^14.0.2", + "zod": "^3.23.8" +diff --git a/src/App.svelte b/src/App.svelte +index 8161c390..4281ba61 100644 +--- a/src/App.svelte ++++ b/src/App.svelte +@@ -1,6 +1,4 @@ + +-- +2.46.0 + diff --git a/pkgs/by-name/ra/radicle-explorer/package.nix b/pkgs/by-name/ra/radicle-explorer/package.nix new file mode 100644 index 000000000000..21c37268662b --- /dev/null +++ b/pkgs/by-name/ra/radicle-explorer/package.nix @@ -0,0 +1,130 @@ +{ + radicle-httpd, + fetchFromGitHub, + fetchgit, + lib, + buildNpmPackage, + writeText, + jq, + runCommand, +}: + +let + # radicle-explorer bundles these freely available Emoji assets, but does not + # redistribute them. + twemojiAssets = fetchFromGitHub { + owner = "twitter"; + repo = "twemoji"; + rev = "v14.0.2"; + hash = "sha256-YoOnZ5uVukzi/6bLi22Y8U5TpplPzB7ji42l+/ys5xI="; + meta.license = [ lib.licenses.cc-by-40 ]; + }; + + mkPassthru = self: args: { + # radicle-explorer is configured through static build time configuration. + # + # Using this function you can override the this configuration, for example, + # to configure alternative preferred peers (which are shown in the UI by + # default). + # + # Example usage: + # + # ```nix + # radicle-explorer.withConfig { + # preferredSeeds = [{ + # hostname = "seed.example.com"; + # port = 443; + # scheme = "https"; + # }]; + # } + # ``` + withConfig = + config: + let + overrides = writeText "config-overrides.json" (builtins.toJSON config); + newConfig = runCommand "config.json" { } '' + ${jq}/bin/jq -s '.[0] * .[1]' ${(self args).src}/config/default.json ${overrides} > $out + ''; + in + lib.fix ( + final: + (self args).overrideAttrs (prev: { + preBuild = '' + ${prev.preBuild or ""} + cp ${newConfig} config/local.json + ''; + + passthru = prev.passthru // mkPassthru final args; + }) + ); + + # By default, radicle-explorer includes a dependency that sends requests + # to a web analytics tracking service. Using this attribute yields a + # version of radicle-explorer with this dependency removed. + withoutTrackers = self { + patches = [ ./0001-remove-dependency-on-plausible.patch ]; + npmDepsHash = "sha256:1hbrzfjkfc0q8qk03yi6qb9zqm57h7hnkn7fl0yxkrzbrljaljaz"; + }; + }; +in +lib.fix ( + self: + lib.makeOverridable ( + { + npmDepsHash ? "sha256:0kw6rvqm0s21j1rss35idvgcrzzczfy6qi3323y385djw4ygk5xs", + patches ? [ ], + }@args: + buildNpmPackage { + pname = "radicle-explorer"; + version = radicle-httpd.version; + inherit patches npmDepsHash; + + # radicle-explorer uses the radicle-httpd API, and they are developed in the + # same repo. For this reason we pin the sources to each other, but due to + # radicle-httpd using a more limited sparse checkout we need to carry a + # separate hash. + src = fetchgit { + inherit (radicle-httpd.src) url rev; + hash = "sha256:09m13238h6j7g02r6332ihgyyzbjx90pgz14rz29pgv7936h6il8"; + }; + + postPatch = '' + patchShebangs --build ./scripts + mkdir -p "public/twemoji" + cp -t public/twemoji -r -- ${twemojiAssets}/assets/svg/* + : >scripts/install-twemoji-assets + ''; + + dontConfigure = true; + doCheck = false; + + installPhase = '' + runHook preInstall + mkdir -p "$out" + cp -r -t "$out" build/* + runHook postInstall + ''; + + passthru = mkPassthru self args; + + meta = { + description = "Web frontend for Radicle"; + longDescription = '' + Radicle Explorer is a web-frontend for Radicle which supports browsing + repositories, issues and patches on publicly available Radicle seeds. + + This package builds the web interface, ready to be served by any web + server. + ''; + + homepage = "https://radicle.xyz"; + license = lib.licenses.gpl3; + + maintainers = with lib.maintainers; [ + tazjin + lorenzleutgeb + ]; + }; + } + ) +) { } diff --git a/pkgs/by-name/ra/radicle-httpd/package.nix b/pkgs/by-name/ra/radicle-httpd/package.nix index d5f5f9171563..a42bc9a8a110 100644 --- a/pkgs/by-name/ra/radicle-httpd/package.nix +++ b/pkgs/by-name/ra/radicle-httpd/package.nix @@ -16,12 +16,14 @@ rustPlatform.buildRustPackage rec { version = "0.17.0"; env.RADICLE_VERSION = version; + # You must update the radicle-explorer source hash when changing this. src = fetchgit { url = "https://seed.radicle.xyz/z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git"; rev = "refs/namespaces/z6MkkfM3tPXNPrPevKr3uSiQtHPuwnNhu2yUVjgd2jXVsVz5/refs/tags/v${version}"; hash = "sha256-nstyb1rSll3Sl0DlA9JAAwvr6JN8okJ03WoQnE4dXEk="; sparseCheckout = [ "radicle-httpd" ]; }; + sourceRoot = "${src.name}/radicle-httpd"; cargoHash = "sha256-M4tDtUXS99/Zb1Z71CTdW9gMgRR30rbwA6wK7nlwblQ="; diff --git a/pkgs/by-name/sp/spl/package.nix b/pkgs/by-name/sp/spl/package.nix new file mode 100644 index 000000000000..60204b378ae4 --- /dev/null +++ b/pkgs/by-name/sp/spl/package.nix @@ -0,0 +1,24 @@ +{ + lib, + fetchgit, + rustPlatform, +}: +rustPlatform.buildRustPackage rec { + pname = "spl"; + version = "0.3.2"; + src = fetchgit { + url = "https://git.tudbut.de/tudbut/spl"; + rev = "v${version}"; + hash = "sha256-thTKM07EtgAVvjpIx8pVssTmN0jPK/OrPYhRfwp7T+U="; + }; + + cargoHash = "sha256-7MYwWA3F7uJewmBRR0iQD4iXJZokHqIt9Q9dMoj6JVs="; + + meta = { + description = "Simple, concise, concatenative scripting language"; + homepage = "https://git.tudbut.de/tudbut/spl"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ tudbut ]; + mainProgram = "spl"; + }; +} diff --git a/pkgs/by-name/we/werf/package.nix b/pkgs/by-name/we/werf/package.nix index 4eb34b1cf124..aa914fdd8f7a 100644 --- a/pkgs/by-name/we/werf/package.nix +++ b/pkgs/by-name/we/werf/package.nix @@ -11,13 +11,13 @@ buildGoModule rec { pname = "werf"; - version = "2.10.5"; + version = "2.10.6"; src = fetchFromGitHub { owner = "werf"; repo = "werf"; rev = "v${version}"; - hash = "sha256-pNKcBiZSZa8F8E5grEXbgPpqk9H+mu/TeiU3FSAalQE="; + hash = "sha256-TVjmPylomSp8WT2YW6x6CPkk6FinKGrGRlDEAtl8vRI="; }; vendorHash = "sha256-OR2nIR2q3iRfaSQSQRKn+jbygETx2+WmkOIjOCIB9O8="; diff --git a/pkgs/development/interpreters/elixir/1.17.nix b/pkgs/development/interpreters/elixir/1.17.nix index ac1ddc8134b5..41d72d2ff907 100644 --- a/pkgs/development/interpreters/elixir/1.17.nix +++ b/pkgs/development/interpreters/elixir/1.17.nix @@ -1,8 +1,8 @@ { mkDerivation }: mkDerivation { - version = "1.17.2"; - sha256 = "sha256-8rb2f4CvJzio3QgoxvCv1iz8HooXze0tWUJ4Sc13dxg="; - # https://hexdocs.pm/elixir/1.17.2/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp + version = "1.17.3"; + sha256 = "sha256-7Qo6y0KAQ9lwD4oH+7wQ4W5i6INHIBDN9IQAAsYzNJw="; + # https://hexdocs.pm/elixir/1.17.3/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp minimumOTPVersion = "25"; escriptPath = "lib/elixir/scripts/generate_app.escript"; } diff --git a/pkgs/development/libraries/gbenchmark/default.nix b/pkgs/development/libraries/gbenchmark/default.nix index c89d3413aa2c..bf60ec5e4297 100644 --- a/pkgs/development/libraries/gbenchmark/default.nix +++ b/pkgs/development/libraries/gbenchmark/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { description = "Microbenchmark support library"; homepage = "https://github.com/google/benchmark"; license = licenses.asl20; - platforms = platforms.linux ++ platforms.darwin; + platforms = platforms.linux ++ platforms.darwin ++ platforms.freebsd; maintainers = with maintainers; [ abbradar ]; }; } diff --git a/pkgs/development/libraries/protobuf/27.nix b/pkgs/development/libraries/protobuf/27.nix index 9945587daecc..8e93e443b18e 100644 --- a/pkgs/development/libraries/protobuf/27.nix +++ b/pkgs/development/libraries/protobuf/27.nix @@ -1,6 +1,6 @@ { callPackage, ... } @ args: callPackage ./generic.nix ({ - version = "27.4"; - hash = "sha256-PejX1RlEw8ASU7vWMdpQ8WaPJrxURK01GXBx+pvwV4I="; + version = "27.5"; + hash = "sha256-wUXvdlz19VYpFGU9o0pap/PrwE2AkopLZJVUqfEpJVI="; } // args) diff --git a/pkgs/development/python-modules/geoip2/default.nix b/pkgs/development/python-modules/geoip2/default.nix index b4a458327587..45b9545397ab 100644 --- a/pkgs/development/python-modules/geoip2/default.nix +++ b/pkgs/development/python-modules/geoip2/default.nix @@ -48,7 +48,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "geoip2" ]; disabledTests = - lib.optionals (pythonAtLeast "3.11") [ + lib.optionals (pythonAtLeast "3.10") [ # https://github.com/maxmind/GeoIP2-python/pull/136 "TestAsyncClient" ] diff --git a/pkgs/development/python-modules/tensorflow/bin.nix b/pkgs/development/python-modules/tensorflow/bin.nix index 140a77942dab..b0371e7a20f2 100644 --- a/pkgs/development/python-modules/tensorflow/bin.nix +++ b/pkgs/development/python-modules/tensorflow/bin.nix @@ -20,6 +20,7 @@ distutils, wheel, jax, + ml-dtypes, opt-einsum, tensorflow-estimator-bin, tensorboard, @@ -38,9 +39,10 @@ typing-extensions, }: -# We keep this binary build for two reasons: +# We keep this binary build for three reasons: # - the source build doesn't work on Darwin. # - the source build is currently brittle and not easy to maintain +# - the source build doesn't work on NVIDIA Jetson platforms # unsupported combination assert !(stdenv.isDarwin && cudaSupport); @@ -48,20 +50,23 @@ assert !(stdenv.isDarwin && cudaSupport); let packages = import ./binary-hashes.nix; inherit (cudaPackages) cudatoolkit cudnn; + + isCudaJetson = cudaSupport && cudaPackages.cudaFlags.isJetsonBuild; + isCudaX64 = cudaSupport && stdenv.hostPlatform.isx86_64; in buildPythonPackage { pname = "tensorflow" + lib.optionalString cudaSupport "-gpu"; - inherit (packages) version; + version = packages."${"version" + lib.optionalString isCudaJetson "_jetson"}"; format = "wheel"; src = let pyVerNoDot = lib.strings.stringAsChars (x: lib.optionalString (x != ".") x) python.pythonVersion; platform = stdenv.system; - cuda = lib.optionalString cudaSupport "_gpu"; + cuda = lib.optionalString cudaSupport (if isCudaJetson then "_jetson" else "_gpu"); key = "${platform}_${pyVerNoDot}${cuda}"; in - fetchurl (packages.${key} or (throw "tensoflow-bin: unsupported system: ${stdenv.system}")); + fetchurl (packages.${key} or (throw "tensoflow-bin: unsupported configuration: ${key}")); buildInputs = [ llvmPackages.openmp ]; @@ -73,7 +78,7 @@ buildPythonPackage { protobuf numpy scipy - jax + (if isCudaX64 then jax else ml-dtypes) termcolor grpcio six @@ -90,10 +95,13 @@ buildPythonPackage { h5py ] ++ lib.optional (!isPy3k) mock; - build-system = [ - distutils - wheel - ] ++ lib.optionals cudaSupport [ addDriverRunpath ]; + build-system = + [ + distutils + wheel + ] + ++ lib.optionals cudaSupport [ addDriverRunpath ] + ++ lib.optionals isCudaJetson [ cudaPackages.autoAddCudaCompatRunpath ]; preConfigure = '' unset SOURCE_DATE_EPOCH @@ -103,6 +111,11 @@ buildPythonPackage { pushd dist + for f in tensorflow-*+nv*.whl; do + # e.g. *nv24.07* -> *nv24.7* + mv "$f" "$(sed -E 's/(nv[0-9]+)\.0*([0-9]+)/\1.\2/' <<< "$f")" + done + wheel unpack --dest unpacked ./*.whl rm ./*.whl ( diff --git a/pkgs/development/python-modules/tensorflow/binary-hashes.nix b/pkgs/development/python-modules/tensorflow/binary-hashes.nix index 53cff3494dea..2a6a31b540b2 100644 --- a/pkgs/development/python-modules/tensorflow/binary-hashes.nix +++ b/pkgs/development/python-modules/tensorflow/binary-hashes.nix @@ -1,5 +1,6 @@ { version = "2.17.0"; + version_jetson = "2.16.1+nv24.07"; x86_64-linux_39 = { url = "https://storage.googleapis.com/tensorflow/versions/2.17.0/tensorflow_cpu-2.17.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"; sha256 = "1aacn68b88bnnmpl1q0irih0avzm2lfyhwr3wldg144n5zljlrbx"; @@ -48,6 +49,10 @@ url = "https://storage.googleapis.com/tensorflow/versions/2.17.0/tensorflow-2.17.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl"; sha256 = "1zrscms9qkfpiscnl8c7ibfipwpw8jrdfvwh4wb69p9rxvqgxbbj"; }; + aarch64-linux_310_jetson = { + url = "https://developer.download.nvidia.com/compute/redist/jp/v60/tensorflow/tensorflow-2.16.1+nv24.07-cp310-cp310-linux_aarch64.whl"; + sha256 = "1ymdknl5v41z6z0wg068diici30am8vysg6b6sqxr8w6yk4aib42"; + }; aarch64-darwin_39 = { url = "https://storage.googleapis.com/tensorflow/versions/2.17.0/tensorflow-2.17.0-cp39-cp39-macosx_12_0_arm64.whl"; sha256 = "01a3hjnrgjp2i0ciwyy0gki41cy32prvjhr20zhlcjwbssarxy4p"; diff --git a/pkgs/development/python-modules/tensorflow/prefetcher.sh b/pkgs/development/python-modules/tensorflow/prefetcher.sh index b0ad86eccab8..912977ecc42a 100755 --- a/pkgs/development/python-modules/tensorflow/prefetcher.sh +++ b/pkgs/development/python-modules/tensorflow/prefetcher.sh @@ -1,8 +1,10 @@ #!/usr/bin/env bash version="2.17.0" +version_jetson="2.16.1+nv24.07" bucket="https://storage.googleapis.com/tensorflow/versions/${version}" +bucket_jetson="https://developer.download.nvidia.com/compute/redist/jp/v60/tensorflow" # List of binary wheels for Tensorflow. The most recent versions can be found # on the following page: @@ -20,6 +22,7 @@ url_and_key_list=( "aarch64-linux_310 $bucket/tensorflow-${version}-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl" "aarch64-linux_311 $bucket/tensorflow-${version}-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl" "aarch64-linux_312 $bucket/tensorflow-${version}-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl" +"aarch64-linux_310_jetson $bucket_jetson/tensorflow-${version_jetson}-cp310-cp310-linux_aarch64.whl" "aarch64-darwin_39 $bucket/tensorflow-${version}-cp39-cp39-macosx_12_0_arm64.whl" "aarch64-darwin_310 $bucket/tensorflow-${version}-cp310-cp310-macosx_12_0_arm64.whl" "aarch64-darwin_311 $bucket/tensorflow-${version}-cp311-cp311-macosx_12_0_arm64.whl" @@ -30,6 +33,7 @@ hashfile=binary-hashes.nix rm -f $hashfile echo "{" >> $hashfile echo "version = \"$version\";" >> $hashfile +echo "version_jetson = \"$version_jetson\";" >> $hashfile for url_and_key in "${url_and_key_list[@]}"; do key=$(echo "$url_and_key" | cut -d' ' -f1) diff --git a/pkgs/os-specific/bsd/freebsd/patches/14.1/sys-cdefs-static-assert.patch b/pkgs/os-specific/bsd/freebsd/patches/14.1/sys-cdefs-static-assert.patch new file mode 100644 index 000000000000..b5a054f124d3 --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/patches/14.1/sys-cdefs-static-assert.patch @@ -0,0 +1,41 @@ +From 22cdafe197ac960c5ce839ef6ec699b59f4b0080 Mon Sep 17 00:00:00 2001 +From: Warner Losh +Date: Sat, 20 Jul 2024 09:57:53 -0600 +Subject: cdefs.h: Don't define fallback for _Static_assert + +Remove pre 4.6 code to define _Static_assert in terms of _COUNTER. We +no longer need to support compilers this old (in fact support for all +pre gcc 10 compilers has been removed in -current). This is a partial +MFC of that work because removing this fixes a bug that's oft reported +with -pedantic-errors and C++98 compilations. + +PR: 280382, 276738 +Sponsored by: Netflix + +This is a direct commit to stable/14. +--- + sys/sys/cdefs.h | 9 --------- + 1 file changed, 9 deletions(-) + +diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h +index 19b7d8fe427d..a52864c5db9d 100644 +--- a/sys/sys/cdefs.h ++++ b/sys/sys/cdefs.h +@@ -277,15 +277,6 @@ + #if (defined(__cplusplus) && __cplusplus >= 201103L) || \ + __has_extension(cxx_static_assert) + #define _Static_assert(x, y) static_assert(x, y) +-#elif __GNUC_PREREQ__(4,6) && !defined(__cplusplus) +-/* Nothing, gcc 4.6 and higher has _Static_assert built-in */ +-#elif defined(__COUNTER__) +-#define _Static_assert(x, y) __Static_assert(x, __COUNTER__) +-#define __Static_assert(x, y) ___Static_assert(x, y) +-#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] \ +- __unused +-#else +-#define _Static_assert(x, y) struct __hack + #endif + #endif + +-- +cgit v1.2.3 diff --git a/pkgs/os-specific/linux/device-tree/apply_overlays.py b/pkgs/os-specific/linux/device-tree/apply_overlays.py new file mode 100644 index 000000000000..307c00fa7863 --- /dev/null +++ b/pkgs/os-specific/linux/device-tree/apply_overlays.py @@ -0,0 +1,102 @@ +from argparse import ArgumentParser +from dataclasses import dataclass +from functools import cached_property +import json +from pathlib import Path + +from libfdt import Fdt, FdtException, FDT_ERR_NOSPACE, fdt_overlay_apply + + +@dataclass +class Overlay: + name: str + filter: str + dtbo_file: Path + + @cached_property + def fdt(self): + with self.dtbo_file.open("rb") as fd: + return Fdt(fd.read()) + + @cached_property + def compatible(self): + return get_compatible(self.fdt) + + +def get_compatible(fdt): + root_offset = fdt.path_offset("/") + return set(fdt.getprop(root_offset, "compatible").as_stringlist()) + + +def apply_overlay(dt: Fdt, dto: Fdt) -> Fdt: + while True: + # we need to copy the buffers because they can be left in an inconsistent state + # if the operation fails (ref: fdtoverlay source) + result = dt.as_bytearray().copy() + err = fdt_overlay_apply(result, dto.as_bytearray().copy()) + + if err == 0: + new_dt = Fdt(result) + # trim the extra space from the final tree + new_dt.pack() + return new_dt + + if err == -FDT_ERR_NOSPACE: + # not enough space, add some blank space and try again + # magic number of more space taken from fdtoverlay + dt.resize(dt.totalsize() + 65536) + continue + + raise FdtException(err) + +def main(): + parser = ArgumentParser(description='Apply a list of overlays to a directory of device trees') + parser.add_argument("--source", type=Path, help="Source directory") + parser.add_argument("--destination", type=Path, help="Destination directory") + parser.add_argument("--overlays", type=Path, help="JSON file with overlay descriptions") + args = parser.parse_args() + + source: Path = args.source + destination: Path = args.destination + overlays: Path = args.overlays + + with overlays.open() as fd: + overlays_data = [ + Overlay( + name=item["name"], + filter=item["filter"], + dtbo_file=Path(item["dtboFile"]), + ) + for item in json.load(fd) + ] + + for source_dt in source.glob("**/*.dtb"): + rel_path = source_dt.relative_to(source) + + print(f"Processing source device tree {rel_path}...") + with source_dt.open("rb") as fd: + dt = Fdt(fd.read()) + + dt_compatible = get_compatible(dt) + + for overlay in overlays_data: + if overlay.filter and overlay.filter not in str(rel_path): + print(f" Skipping overlay {overlay.name}: filter does not match") + continue + + if not overlay.compatible.intersection(dt_compatible): + print(f" Skipping overlay {overlay.name}: {overlay.compatible} is incompatible with {dt_compatible}") + continue + + print(f" Applying overlay {overlay.name}") + dt = apply_overlay(dt, overlay.fdt) + + print(f"Saving final device tree {rel_path}...") + dest_path = destination / rel_path + dest_path.parent.mkdir(parents=True, exist_ok=True) + with dest_path.open("wb") as fd: + fd.write(dt.as_bytearray()) + + +if __name__ == '__main__': + main() diff --git a/pkgs/os-specific/linux/device-tree/default.nix b/pkgs/os-specific/linux/device-tree/default.nix index 87c9b84e1240..b8c71cc5a8ae 100644 --- a/pkgs/os-specific/linux/device-tree/default.nix +++ b/pkgs/os-specific/linux/device-tree/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, stdenvNoCC, dtc }: +{ lib, stdenv, stdenvNoCC, dtc, writers, python3 }: { # Compile single Device Tree overlay source @@ -26,41 +26,11 @@ applyOverlays = (base: overlays': stdenvNoCC.mkDerivation { name = "device-tree-overlays"; - nativeBuildInputs = [ dtc ]; - buildCommand = let - overlays = lib.toList overlays'; - in '' - mkdir -p $out - cd "${base}" - find -L . -type f -name '*.dtb' -print0 \ - | xargs -0 cp -v --no-preserve=mode --target-directory "$out" --parents - - for dtb in $(find "$out" -type f -name '*.dtb'); do - dtbCompat=$(fdtget -t s "$dtb" / compatible 2>/dev/null || true) - # skip files without `compatible` string - test -z "$dtbCompat" && continue - - ${lib.flip (lib.concatMapStringsSep "\n") overlays (o: '' - overlayCompat="$(fdtget -t s "${o.dtboFile}" / compatible)" - - # skip incompatible and non-matching overlays - if [[ ! "$dtbCompat" =~ "$overlayCompat" ]]; then - echo "Skipping overlay ${o.name}: incompatible with $(basename "$dtb")" - elif ${if (o.filter == null) then "false" else '' - [[ "''${dtb//${o.filter}/}" == "$dtb" ]] - ''} - then - echo "Skipping overlay ${o.name}: filter does not match $(basename "$dtb")" - else - echo -n "Applying overlay ${o.name} to $(basename "$dtb")... " - mv "$dtb"{,.in} - fdtoverlay -o "$dtb" -i "$dtb.in" "${o.dtboFile}" - echo "ok" - rm "$dtb.in" - fi - '')} - - done + nativeBuildInputs = [ + (python3.pythonOnBuildForHost.withPackages(ps: [ps.libfdt])) + ]; + buildCommand = '' + python ${./apply_overlays.py} --source ${base} --destination $out --overlays ${writers.writeJSON "overlays.json" overlays'} ''; }); } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2c4b0027a301..e7ca94816f17 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15246,7 +15246,7 @@ self: super: with self; { tensorflow-bin = callPackage ../development/python-modules/tensorflow/bin.nix { inherit (pkgs.config) cudaSupport; # https://www.tensorflow.org/install/source#gpu - cudaPackages = pkgs.cudaPackages_11; + cudaPackages = pkgs.cudaPackages_12; }; tensorflow-build = let