diff --git a/ci/OWNERS b/ci/OWNERS index 7c775d469baa..a51ed3ce62db 100644 --- a/ci/OWNERS +++ b/ci/OWNERS @@ -228,7 +228,7 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt /pkgs/tools/misc/esphome @mweinelt # Network Time Daemons -/pkgs/tools/networking/chrony @thoughtpolice +/pkgs/by-name/ch/chrony @thoughtpolice /pkgs/tools/networking/ntp @thoughtpolice /pkgs/tools/networking/openntpd @thoughtpolice /nixos/modules/services/networking/ntp @thoughtpolice diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index a00e69190f72..342c9cc61beb 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -205,6 +205,8 @@ - `grafana` has been updated to version 11.1. This version doesn't support setting `http_addr` to a hostname anymore, an IP address is expected. +- `deno` has been updated to v2 which has breaking changes. Upstream will be abandoning v1 soon but for now you can use `deno_1` if you are yet to migrate (will be removed prior to cutting a final 24.11 release). + - `knot-dns` has been updated to version 3.4.x. Check the [migration guide](https://www.knot-dns.cz/docs/latest/html/migration.html#upgrade-3-3-x-to-3-4-x) for breaking changes. - `services.kubernetes.kubelet.clusterDns` now accepts a list of DNS resolvers rather than a single string, bringing the module more in line with the upstream Kubelet configuration schema. diff --git a/nixos/modules/security/pam.nix b/nixos/modules/security/pam.nix index 2ff08cbfde81..acd0673877b8 100644 --- a/nixos/modules/security/pam.nix +++ b/nixos/modules/security/pam.nix @@ -287,6 +287,18 @@ let ''; }; + rssh = lib.mkOption { + default = false; + type = lib.types.bool; + description = '' + If set, the calling user's SSH agent is used to authenticate + against the configured keys. This module works in a manner + similar to pam_ssh_agent_auth, but supports a wider range + of SSH key types, including those protected by security + keys (FIDO2). + ''; + }; + duoSecurity = { enable = lib.mkOption { default = false; @@ -673,6 +685,7 @@ let { name = "ssh_agent_auth"; enable = config.security.pam.sshAgentAuth.enable && cfg.sshAgentAuth; control = "sufficient"; modulePath = "${pkgs.pam_ssh_agent_auth}/libexec/pam_ssh_agent_auth.so"; settings = { file = lib.concatStringsSep ":" config.security.pam.sshAgentAuth.authorizedKeysFiles; }; } + (let inherit (config.security.pam) rssh; in { name = "rssh"; enable = rssh.enable && cfg.rssh; control = "sufficient"; modulePath = "${pkgs.pam_rssh}/lib/libpam_rssh.so"; inherit (rssh) settings; }) (let p11 = config.security.pam.p11; in { name = "p11"; enable = cfg.p11Auth; control = p11.control; modulePath = "${pkgs.pam_p11}/lib/security/pam_p11.so"; args = [ "${pkgs.opensc}/lib/opensc-pkcs11.so" ]; }) @@ -950,8 +963,9 @@ let value.source = pkgs.writeText "${name}.pam" service.text; }; - optionalSudoConfigForSSHAgentAuth = lib.optionalString config.security.pam.sshAgentAuth.enable '' - # Keep SSH_AUTH_SOCK so that pam_ssh_agent_auth.so can do its magic. + optionalSudoConfigForSSHAgentAuth = lib.optionalString + (config.security.pam.sshAgentAuth.enable || config.security.pam.rssh.enable) '' + # Keep SSH_AUTH_SOCK so that pam_ssh_agent_auth.so and libpam_rssh.so can do their magic. Defaults env_keep+=SSH_AUTH_SOCK ''; @@ -1068,6 +1082,55 @@ in }; }; + security.pam.rssh = { + enable = lib.mkEnableOption "authenticating using a signature performed by the ssh-agent"; + + settings = lib.mkOption { + type = lib.types.submodule { + freeformType = moduleSettingsType; + options = { + auth_key_file = lib.mkOption { + type = with lib.types; nullOr nonEmptyStr; + description = '' + Path to file with trusted public keys in OpenSSH's `authorized_keys` format. The following + variables are expanded to the respective PAM items: + + - `service`: `PAM_SERVICE`, the service name, + - `user`: `PAM_USER`, the username of the entity under whose identity service will be given, + - `tty`: `PAM_TTY`, the terminal name, + - `rhost`: `PAM_RHOST`, the requesting hostname, and + - `ruser`: `PAM_RUSER`, the requesting entity. + + These PAM items are explained in {manpage}`pam_get_item(3)`. + + Variables may be specified as `$var`, `''${var}` or `''${var:defaultValue}`. + + ::: {.note} + Specifying user-writeable files here results in an insecure configuration: a malicious process + can then edit such an `authorized_keys` file and bypass the ssh-agent-based authentication. + + This option is ignored if {option}`security.pam.rssh.settings.authorized_keys_command` is set. + + If both this option and {option}`security.pam.rssh.settings.authorized_keys_command` are unset, + the keys will be read from `''${HOME}/.ssh/authorized_keys`, which should be considered + insecure. + ''; + default = "/etc/ssh/authorized_keys.d/$ruser"; + }; + }; + }; + + default = { }; + description = '' + Options to pass to the pam_rssh module. Refer to + + for supported values. + + ${moduleSettingsDescription} + ''; + }; + }; + security.pam.enableOTPW = lib.mkEnableOption "the OTPW (one-time password) PAM module"; security.pam.dp9ik = { @@ -1512,16 +1575,30 @@ in Did you forget to set `services.openssh.enable` ? ''; } + { + assertion = with config.security.pam.rssh; + enable -> (settings.auth_key_file or null != null || settings.authorized_keys_command or null != null); + message = '' + security.pam.rssh.enable requires either security.pam.rssh.settings.auth_key_file or + security.pam.rssh.settings.authorized_keys_command to be set. + ''; + } ]; warnings = lib.optional - (with lib; with config.security.pam.sshAgentAuth; + (with config.security.pam.sshAgentAuth; enable && lib.any (s: lib.hasPrefix "%h" s || lib.hasPrefix "~" s) authorizedKeysFiles) ''config.security.pam.sshAgentAuth.authorizedKeysFiles contains files in the user's home directory. Specifying user-writeable files there result in an insecure configuration: a malicious process can then edit such an authorized_keys file and bypass the ssh-agent-based authentication. See https://github.com/NixOS/nixpkgs/issues/31611 + '' ++ lib.optional + (with config.security.pam.rssh; + enable && settings.auth_key_file or null != null && settings.authorized_keys_command or null != null) '' + security.pam.rssh.settings.auth_key_file will be ignored as + security.pam.rssh.settings.authorized_keys_command has been specified. + Explictly set the former to null to silence this warning. ''; environment.systemPackages = diff --git a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/lsp-bridge/default.nix b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/lsp-bridge/default.nix index 1ac75625f469..f7e57946bbaa 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/lsp-bridge/default.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/lsp-bridge/default.nix @@ -24,18 +24,19 @@ let setuptools sexpdata six + watchdog ] ); in melpaBuild { pname = "lsp-bridge"; - version = "0-unstable-2024-10-04"; + version = "0-unstable-2024-10-07"; src = fetchFromGitHub { owner = "manateelazycat"; repo = "lsp-bridge"; - rev = "2d0cd0bea3bd503ca3bb7bcf4a6a78af091c7ecc"; - hash = "sha256-q6xIYUhXTqGeR9tnjd1xnCOnOeOMypJN6vfGjZDuIIM="; + rev = "f726a341c283a5b84d3587cf84e40817b8ec72c6"; + hash = "sha256-JL02pYjM5DyUt5wCNN0UnLVSXv9DCfSaSBGy5PzLvyA="; }; patches = [ diff --git a/pkgs/applications/version-management/subversion/default.nix b/pkgs/applications/version-management/subversion/default.nix index 11d9c7fefdff..39966c8c7386 100644 --- a/pkgs/applications/version-management/subversion/default.nix +++ b/pkgs/applications/version-management/subversion/default.nix @@ -136,7 +136,7 @@ let in { subversion = common { - version = "1.14.3"; - sha256 = "sha256-lJ79RRoJQ19+hXNXTHHHtxsZTYRIkPpJzWHSJi6hpEA="; + version = "1.14.4"; + sha256 = "sha256-ROrRFucuSA8Q8SPJFLtvn4wEFxHAQe16v/G4Y0oZnjw="; }; } diff --git a/pkgs/by-name/bi/biglybt/package.nix b/pkgs/by-name/bi/biglybt/package.nix index 81c2fa31f9c3..4f11683dd18f 100644 --- a/pkgs/by-name/bi/biglybt/package.nix +++ b/pkgs/by-name/bi/biglybt/package.nix @@ -9,11 +9,11 @@ stdenv.mkDerivation rec { pname = "biglybt"; - version = "3.6.0.0"; + version = "3.7.0.0"; src = fetchurl { url = "https://github.com/BiglySoftware/BiglyBT/releases/download/v${version}/GitHub_BiglyBT_unix.tar.gz"; - hash = "sha256-a7g9sB3orO2m0X7qNwQ1dDygYPhs/b6kX0RDSG8Wq2U="; + hash = "sha256-CfLKoX77yCanSzHq+Fy3jRqQAC2GeUo2SO9x0mk2Tf4="; }; nativeBuildInputs = [ wrapGAppsHook3 ]; diff --git a/pkgs/tools/networking/chrony/makefile.patch b/pkgs/by-name/ch/chrony/makefile.patch similarity index 100% rename from pkgs/tools/networking/chrony/makefile.patch rename to pkgs/by-name/ch/chrony/makefile.patch diff --git a/pkgs/by-name/ch/chrony/package.nix b/pkgs/by-name/ch/chrony/package.nix new file mode 100644 index 000000000000..9cfdfd020c2e --- /dev/null +++ b/pkgs/by-name/ch/chrony/package.nix @@ -0,0 +1,116 @@ +{ + lib, + stdenv, + overrideSDK, + fetchurl, + pkg-config, + gnutls, + libedit, + texinfo, + libcap, + libseccomp, + pps-tools, + nixosTests, +}: + +let + stdenv' = + if stdenv.hostPlatform.isDarwin then + overrideSDK stdenv { + darwinSdkVersion = "11.0"; + darwinMinVersion = "10.13"; + } + else + stdenv; +in +stdenv'.mkDerivation rec { + pname = "chrony"; + version = "4.6.1"; + + src = fetchurl { + url = "https://chrony-project.org/releases/${pname}-${version}.tar.gz"; + hash = "sha256-Vx/3P78K4wl/BgTsouALHYuy6Rr/4aNJR4X/IdYZnFw="; + }; + + outputs = [ + "out" + "man" + ]; + + nativeBuildInputs = [ pkg-config ]; + + buildInputs = + [ + gnutls + libedit + texinfo + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + libcap + libseccomp + pps-tools + ]; + + configureFlags = [ + "--enable-ntp-signd" + "--sbindir=$(out)/bin" + "--chronyrundir=/run/chrony" + ] ++ lib.optional stdenv.hostPlatform.isLinux "--enable-scfilter"; + + patches = [ + # Cleanup the installation script + ./makefile.patch + ]; + + postPatch = '' + patchShebangs test + + # nts_ke_session unit test fails, so drop it. + # TODO: try again when updating? + rm test/unit/nts_ke_session.c + ''; + + enableParallelBuilding = true; + doCheck = true; + + hardeningEnable = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "pie" ]; + + passthru.tests = { + inherit (nixosTests) chrony chrony-ptp; + }; + + meta = { + description = "Sets your computer's clock from time servers on the Net"; + homepage = "https://chrony-project.org/"; + license = lib.licenses.gpl2Only; + platforms = + with lib.platforms; + builtins.concatLists [ + linux + freebsd + netbsd + darwin + illumos + ]; + maintainers = with lib.maintainers; [ + fpletz + thoughtpolice + vifino + ]; + + longDescription = '' + Chronyd is a daemon which runs in background on the system. It obtains + measurements via the network of the system clock’s offset relative to + time servers on other systems and adjusts the system time accordingly. + For isolated systems, the user can periodically enter the correct time by + hand (using Chronyc). In either case, Chronyd determines the rate at + which the computer gains or loses time, and compensates for this. Chronyd + implements the NTP protocol and can act as either a client or a server. + + Chronyc provides a user interface to Chronyd for monitoring its + performance and configuring various settings. It can do so while running + on the same computer as the Chronyd instance it is controlling or a + different computer. + ''; + }; +} diff --git a/pkgs/by-name/de/deno/1/librusty_v8.nix b/pkgs/by-name/de/deno/1/librusty_v8.nix new file mode 100644 index 000000000000..f36371830ebf --- /dev/null +++ b/pkgs/by-name/de/deno/1/librusty_v8.nix @@ -0,0 +1,12 @@ +# auto-generated file -- DO NOT EDIT! +{ fetchLibrustyV8 }: + +fetchLibrustyV8 { + version = "0.105.0"; + shas = { + x86_64-linux = "sha256-9yON4DNPxm4IUZSLZp9VZtzSRPPWX1tEuQLVJmN8cLs="; + aarch64-linux = "sha256-5vAjw2vimjCHKPxjIp5vcwMCWUUDYVlk4QyOeEI0DLY="; + x86_64-darwin = "sha256-o4WRkg4ptiJTNMkorn5K+P8xOJwpChM5PqkZCjP076g="; + aarch64-darwin = "sha256-ZuWBnvxu1PgDtjtguxtj3BhFO01AChlbjAS0kZUws3A="; + }; +} diff --git a/pkgs/by-name/de/deno/1/package.nix b/pkgs/by-name/de/deno/1/package.nix new file mode 100644 index 000000000000..3b2774153171 --- /dev/null +++ b/pkgs/by-name/de/deno/1/package.nix @@ -0,0 +1,118 @@ +{ + stdenv, + lib, + callPackage, + fetchFromGitHub, + rustPlatform, + cmake, + protobuf, + installShellFiles, + libiconv, + darwin, + librusty_v8 ? callPackage ./librusty_v8.nix { + inherit (callPackage ../fetchers.nix { }) fetchLibrustyV8; + }, +}: +rustPlatform.buildRustPackage rec { + pname = "deno"; + version = "1.46.3"; + + src = fetchFromGitHub { + owner = "denoland"; + repo = "deno"; + rev = "refs/tags/v${version}"; + hash = "sha256-AM6SjcIHo6Koxcnznhkv3cXoKaMy2TEVpiWe/bczDuA="; + }; + + cargoHash = "sha256-D+CZpb6OTzM5Il0k8GQB7qSONy4myE5yKlaSkLLqHT8="; + + postPatch = '' + # upstream uses lld on aarch64-darwin for faster builds + # within nix lld looks for CoreFoundation rather than CoreFoundation.tbd and fails + substituteInPlace .cargo/config.toml --replace "-fuse-ld=lld " "" + ''; + + # uses zlib-ng but can't dynamically link yet + # https://github.com/rust-lang/libz-sys/issues/158 + nativeBuildInputs = [ + # required by libz-ng-sys crate + cmake + # required by deno_kv crate + protobuf + installShellFiles + ]; + buildInputs = lib.optionals stdenv.isDarwin ( + [ + libiconv + darwin.libobjc + ] + ++ (with darwin.apple_sdk_11_0.frameworks; [ + Security + CoreServices + Metal + MetalPerformanceShaders + Foundation + QuartzCore + ]) + ); + + buildAndTestSubdir = "cli"; + + # work around "error: unknown warning group '-Wunused-but-set-parameter'" + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-unknown-warning-option"; + # The v8 package will try to download a `librusty_v8.a` release at build time to our read-only filesystem + # To avoid this we pre-download the file and export it via RUSTY_V8_ARCHIVE + env.RUSTY_V8_ARCHIVE = librusty_v8; + + # Tests have some inconsistencies between runs with output integration tests + # Skipping until resolved + doCheck = false; + + preInstall = '' + find ./target -name libswc_common${stdenv.hostPlatform.extensions.sharedLibrary} -delete + ''; + + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd deno \ + --bash <($out/bin/deno completions bash) \ + --fish <($out/bin/deno completions fish) \ + --zsh <($out/bin/deno completions zsh) + ''; + + doInstallCheck = true; + installCheckPhase = '' + runHook preInstallCheck + $out/bin/deno --help + $out/bin/deno --version | grep "deno ${version}" + runHook postInstallCheck + ''; + + passthru.tests = callPackage ./tests { }; + + meta = with lib; { + homepage = "https://deno.land/"; + changelog = "https://github.com/denoland/deno/releases/tag/v${version}"; + description = "Secure runtime for JavaScript and TypeScript"; + longDescription = '' + Deno aims to be a productive and secure scripting environment for the modern programmer. + Deno will always be distributed as a single executable. + Given a URL to a Deno program, it is runnable with nothing more than the ~15 megabyte zipped executable. + Deno explicitly takes on the role of both runtime and package manager. + It uses a standard browser-compatible protocol for loading modules: URLs. + Among other things, Deno is a great replacement for utility scripts that may have been historically written with + bash or python. + ''; + license = licenses.mit; + mainProgram = "deno"; + maintainers = with maintainers; [ jk ]; + platforms = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + # NOTE: `aligned_alloc` error on darwin SDK < 10.15. Can't do usual overrideSDK with rust toolchain in current implementation. + # Should be fixed with darwin SDK refactor and can be revisited. + badPlatforms = [ "x86_64-darwin" ]; + }; +} diff --git a/pkgs/by-name/de/deno/1/tests/basic.ts b/pkgs/by-name/de/deno/1/tests/basic.ts new file mode 100644 index 000000000000..5959aa217b3c --- /dev/null +++ b/pkgs/by-name/de/deno/1/tests/basic.ts @@ -0,0 +1 @@ +console.log(1 + 1) diff --git a/pkgs/by-name/de/deno/1/tests/default.nix b/pkgs/by-name/de/deno/1/tests/default.nix new file mode 100644 index 000000000000..c28490ee0d00 --- /dev/null +++ b/pkgs/by-name/de/deno/1/tests/default.nix @@ -0,0 +1,79 @@ +{ + deno, + runCommand, + lib, + testers, +}: +let + testDenoRun = + name: + { + args ? "", + dir ? ./. + "/${name}", + file ? "index.ts", + expected ? "", + expectFailure ? false, + }: + let + command = "deno run ${args} ${dir}/${file}"; + in + runCommand "deno-test-${name}" + { + nativeBuildInputs = [ deno ]; + meta.timeout = 60; + } + '' + HOME=$(mktemp -d) + if output=$(${command} 2>&1); then + if [[ $output =~ '${expected}' ]]; then + echo "Test '${name}' passed" + touch $out + else + echo -n ${lib.escapeShellArg command} >&2 + echo " output did not match what was expected." >&2 + echo "The expected was:" >&2 + echo '${expected}' >&2 + echo "The output was:" >&2 + echo "$output" >&2 + exit 1 + fi + else + if [[ "${toString expectFailure}" == "1" ]]; then + echo "Test '${name}' failed as expected" + touch $out + exit 0 + fi + echo -n ${lib.escapeShellArg command} >&2 + echo " returned a non-zero exit code." >&2 + echo "$output" >&2 + exit 1 + fi + ''; +in +(lib.mapAttrs testDenoRun { + basic = { + dir = ./.; + file = "basic.ts"; + expected = "2"; + }; + import-json = { + expected = "hello from JSON"; + }; + import-ts = { + expected = "hello from ts"; + }; + read-file = { + args = "--allow-read"; + expected = "hello from a file"; + }; + fail-read-file = { + expectFailure = true; + dir = ./read-file; + }; +}) +// { + version = testers.testVersion { + package = deno; + command = "deno --version"; + }; +} diff --git a/pkgs/by-name/de/deno/1/tests/import-json/data.json b/pkgs/by-name/de/deno/1/tests/import-json/data.json new file mode 100644 index 000000000000..7f0de9ebe0b9 --- /dev/null +++ b/pkgs/by-name/de/deno/1/tests/import-json/data.json @@ -0,0 +1 @@ +{ "msg": "hello from JSON" } diff --git a/pkgs/by-name/de/deno/1/tests/import-json/index.ts b/pkgs/by-name/de/deno/1/tests/import-json/index.ts new file mode 100644 index 000000000000..525f25f74da2 --- /dev/null +++ b/pkgs/by-name/de/deno/1/tests/import-json/index.ts @@ -0,0 +1,2 @@ +import file from "./data.json" assert { type: "json" }; +console.log(file.msg); diff --git a/pkgs/by-name/de/deno/1/tests/import-ts/index.ts b/pkgs/by-name/de/deno/1/tests/import-ts/index.ts new file mode 100644 index 000000000000..34fec283a169 --- /dev/null +++ b/pkgs/by-name/de/deno/1/tests/import-ts/index.ts @@ -0,0 +1,3 @@ +import { sayHello } from "./lib.ts" + +sayHello("ts") diff --git a/pkgs/by-name/de/deno/1/tests/import-ts/lib.ts b/pkgs/by-name/de/deno/1/tests/import-ts/lib.ts new file mode 100644 index 000000000000..3b5e05aaaaf3 --- /dev/null +++ b/pkgs/by-name/de/deno/1/tests/import-ts/lib.ts @@ -0,0 +1,3 @@ +export function sayHello(thing: string) { + console.log(`hello from ${thing}`); +} diff --git a/pkgs/by-name/de/deno/1/tests/read-file/data.txt b/pkgs/by-name/de/deno/1/tests/read-file/data.txt new file mode 100644 index 000000000000..7eee1b0c107c --- /dev/null +++ b/pkgs/by-name/de/deno/1/tests/read-file/data.txt @@ -0,0 +1 @@ +hello from a file diff --git a/pkgs/by-name/de/deno/1/tests/read-file/index.ts b/pkgs/by-name/de/deno/1/tests/read-file/index.ts new file mode 100644 index 000000000000..be792a3d6628 --- /dev/null +++ b/pkgs/by-name/de/deno/1/tests/read-file/index.ts @@ -0,0 +1,5 @@ +// trim 'file://' prefix +const thisDir = Deno.mainModule.substring(7, Deno.mainModule.length); +const getParent = (path: string) => path.substring(0, path.lastIndexOf("/")) +const text = await Deno.readTextFile(getParent(thisDir) + "/data.txt"); +console.log(text); diff --git a/pkgs/by-name/de/deno/fetchers.nix b/pkgs/by-name/de/deno/fetchers.nix new file mode 100644 index 000000000000..b98b4aa6fa12 --- /dev/null +++ b/pkgs/by-name/de/deno/fetchers.nix @@ -0,0 +1,21 @@ +# not a stable interface, do not reference outside the deno package but make a +# copy if you need +{ + lib, + stdenv, + fetchurl, +}: + +{ + fetchLibrustyV8 = + args: + fetchurl { + name = "librusty_v8-${args.version}"; + url = "https://github.com/denoland/rusty_v8/releases/download/v${args.version}/librusty_v8_release_${stdenv.hostPlatform.rust.rustcTarget}.a.gz"; + sha256 = args.shas.${stdenv.hostPlatform.system}; + meta = { + inherit (args) version; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + }; + }; +} diff --git a/pkgs/by-name/de/deno/librusty_v8.nix b/pkgs/by-name/de/deno/librusty_v8.nix index bb9e09d2e2f8..9a9e756ac7e1 100644 --- a/pkgs/by-name/de/deno/librusty_v8.nix +++ b/pkgs/by-name/de/deno/librusty_v8.nix @@ -1,23 +1,12 @@ # auto-generated file -- DO NOT EDIT! -{ lib, stdenv, fetchurl }: +{ fetchLibrustyV8 }: -let - fetch_librusty_v8 = args: fetchurl { - name = "librusty_v8-${args.version}"; - url = "https://github.com/denoland/rusty_v8/releases/download/v${args.version}/librusty_v8_release_${stdenv.hostPlatform.rust.rustcTarget}.a.gz"; - sha256 = args.shas.${stdenv.hostPlatform.system}; - meta = { - inherit (args) version; - sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; - }; - }; -in -fetch_librusty_v8 { - version = "0.105.0"; +fetchLibrustyV8 { + version = "0.106.0"; shas = { - x86_64-linux = "sha256-9yON4DNPxm4IUZSLZp9VZtzSRPPWX1tEuQLVJmN8cLs="; - aarch64-linux = "sha256-5vAjw2vimjCHKPxjIp5vcwMCWUUDYVlk4QyOeEI0DLY="; - x86_64-darwin = "sha256-o4WRkg4ptiJTNMkorn5K+P8xOJwpChM5PqkZCjP076g="; - aarch64-darwin = "sha256-ZuWBnvxu1PgDtjtguxtj3BhFO01AChlbjAS0kZUws3A="; + x86_64-linux = "sha256-jLYl/CJp2Z+Ut6qZlh6u+CtR8KN+ToNTB+72QnVbIKM="; + aarch64-linux = "sha256-uAkBMg6JXA+aILd8TzDtuaEdM3Axiw43Ad5tZzxNt5w="; + x86_64-darwin = "sha256-60aR0YvQT8KyacY8J3fWKZcf9vny51VUB19NVpurS/A="; + aarch64-darwin = "sha256-pd/I6Mclj2/r/uJTIywnolPKYzeLu1c28d/6D56vkzQ="; }; } diff --git a/pkgs/by-name/de/deno/package.nix b/pkgs/by-name/de/deno/package.nix index 687d837952a2..efb9cdcf7941 100644 --- a/pkgs/by-name/de/deno/package.nix +++ b/pkgs/by-name/de/deno/package.nix @@ -9,20 +9,26 @@ installShellFiles, libiconv, darwin, - librusty_v8 ? callPackage ./librusty_v8.nix { }, + librusty_v8 ? callPackage ./librusty_v8.nix { + inherit (callPackage ./fetchers.nix { }) fetchLibrustyV8; + }, }: + +let + canExecute = stdenv.buildPlatform.canExecute stdenv.hostPlatform; +in rustPlatform.buildRustPackage rec { pname = "deno"; - version = "1.46.3"; + version = "2.0.0"; src = fetchFromGitHub { owner = "denoland"; repo = "deno"; rev = "refs/tags/v${version}"; - hash = "sha256-AM6SjcIHo6Koxcnznhkv3cXoKaMy2TEVpiWe/bczDuA="; + hash = "sha256-3PfAjn2zWgxJOYgKwR7lvXu+rIENIHBMPwMM6dWNgR4="; }; - cargoHash = "sha256-D+CZpb6OTzM5Il0k8GQB7qSONy4myE5yKlaSkLLqHT8="; + cargoHash = "sha256-3r5B9yWXKO/8ah+Etflws8RnlRTAdaaC5HZMlZduyHE="; postPatch = '' # upstream uses lld on aarch64-darwin for faster builds @@ -54,14 +60,13 @@ rustPlatform.buildRustPackage rec { ]) ); - # work around "error: unknown warning group '-Wunused-but-set-parameter'" - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-unknown-warning-option"; - buildAndTestSubdir = "cli"; + # work around "error: unknown warning group '-Wunused-but-set-parameter'" + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-unknown-warning-option"; # The v8 package will try to download a `librusty_v8.a` release at build time to our read-only filesystem # To avoid this we pre-download the file and export it via RUSTY_V8_ARCHIVE - RUSTY_V8_ARCHIVE = librusty_v8; + env.RUSTY_V8_ARCHIVE = librusty_v8; # Tests have some inconsistencies between runs with output integration tests # Skipping until resolved @@ -71,15 +76,15 @@ rustPlatform.buildRustPackage rec { find ./target -name libswc_common${stdenv.hostPlatform.extensions.sharedLibrary} -delete ''; - postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + postInstall = lib.optionalString (canExecute) '' installShellCompletion --cmd deno \ --bash <($out/bin/deno completions bash) \ --fish <($out/bin/deno completions fish) \ --zsh <($out/bin/deno completions zsh) ''; - doInstallCheck = true; - installCheckPhase = '' + doInstallCheck = canExecute; + installCheckPhase = lib.optionalString (canExecute) '' runHook preInstallCheck $out/bin/deno --help $out/bin/deno --version | grep "deno ${version}" diff --git a/pkgs/by-name/de/deno/tests/default.nix b/pkgs/by-name/de/deno/tests/default.nix index b6787c913b12..c28490ee0d00 100644 --- a/pkgs/by-name/de/deno/tests/default.nix +++ b/pkgs/by-name/de/deno/tests/default.nix @@ -1,43 +1,54 @@ -{ deno, runCommand, lib, testers }: +{ + deno, + runCommand, + lib, + testers, +}: let testDenoRun = name: - { args ? "" - , dir ? ./. + "/${name}" - , file ? "index.ts" - , expected ? "" - , expectFailure ? false + { + args ? "", + dir ? ./. + "/${name}", + file ? "index.ts", + expected ? "", + expectFailure ? false, }: let command = "deno run ${args} ${dir}/${file}"; in - runCommand "deno-test-${name}" { nativeBuildInputs = [ deno ]; meta.timeout = 60; } '' - HOME=$(mktemp -d) - if output=$(${command} 2>&1); then - if [[ $output =~ '${expected}' ]]; then - echo "Test '${name}' passed" - touch $out + runCommand "deno-test-${name}" + { + nativeBuildInputs = [ deno ]; + meta.timeout = 60; + } + '' + HOME=$(mktemp -d) + if output=$(${command} 2>&1); then + if [[ $output =~ '${expected}' ]]; then + echo "Test '${name}' passed" + touch $out + else + echo -n ${lib.escapeShellArg command} >&2 + echo " output did not match what was expected." >&2 + echo "The expected was:" >&2 + echo '${expected}' >&2 + echo "The output was:" >&2 + echo "$output" >&2 + exit 1 + fi else + if [[ "${toString expectFailure}" == "1" ]]; then + echo "Test '${name}' failed as expected" + touch $out + exit 0 + fi echo -n ${lib.escapeShellArg command} >&2 - echo " output did not match what was expected." >&2 - echo "The expected was:" >&2 - echo '${expected}' >&2 - echo "The output was:" >&2 + echo " returned a non-zero exit code." >&2 echo "$output" >&2 exit 1 fi - else - if [[ "${toString expectFailure}" == "1" ]]; then - echo "Test '${name}' failed as expected" - touch $out - exit 0 - fi - echo -n ${lib.escapeShellArg command} >&2 - echo " returned a non-zero exit code." >&2 - echo "$output" >&2 - exit 1 - fi - ''; + ''; in (lib.mapAttrs testDenoRun { basic = { @@ -59,8 +70,8 @@ in expectFailure = true; dir = ./read-file; }; -}) // -{ +}) +// { version = testers.testVersion { package = deno; command = "deno --version"; diff --git a/pkgs/by-name/de/deno/tests/import-json/index.ts b/pkgs/by-name/de/deno/tests/import-json/index.ts index 525f25f74da2..3768d0c2cb63 100644 --- a/pkgs/by-name/de/deno/tests/import-json/index.ts +++ b/pkgs/by-name/de/deno/tests/import-json/index.ts @@ -1,2 +1,2 @@ -import file from "./data.json" assert { type: "json" }; +import file from "./data.json" with { type: "json" }; console.log(file.msg); diff --git a/pkgs/by-name/de/deno/update/common.ts b/pkgs/by-name/de/deno/update/common.ts index a31805269cb2..ee0d2c0dd1ff 100644 --- a/pkgs/by-name/de/deno/update/common.ts +++ b/pkgs/by-name/de/deno/update/common.ts @@ -3,15 +3,11 @@ interface GHRelease { } const decode = (buffer: Uint8Array) => new TextDecoder("utf-8").decode(buffer); -const decodeTrim = (b: Uint8Array) => decode(b).trimEnd(); export const run = async (command: string, args: string[]) => { - const cmd = Deno.run({ - cmd: [command, ...args], - stdout: "piped", - stderr: "piped", - }); - if (!(await cmd.status()).success) { - const error = await cmd.stderrOutput().then(decodeTrim); + const cmd = new Deno.Command(command, { args }); + const { code, stdout, stderr } = await cmd.output(); + if (code !== 0) { + const error = decode(stderr).trimEnd(); // Known error we can ignore if (error.includes("'allow-unsafe-native-code-during-evaluation'")) { // Extract the target sha256 out of the error @@ -26,7 +22,7 @@ export const run = async (command: string, args: string[]) => { } throw new Error(error); } - return cmd.output().then(decodeTrim); + return decode(stdout).trimEnd(); }; // Exports diff --git a/pkgs/by-name/de/deno/update/librusty_v8.ts b/pkgs/by-name/de/deno/update/librusty_v8.ts index 301af63cb99b..ce739a8167dd 100644 --- a/pkgs/by-name/de/deno/update/librusty_v8.ts +++ b/pkgs/by-name/de/deno/update/librusty_v8.ts @@ -1,4 +1,4 @@ -import * as toml from "https://deno.land/std@0.202.0/toml/mod.ts"; +import * as toml from "jsr:@std/toml@1.0.1"; import { getExistingVersion, logger, run, write } from "./common.ts"; const log = logger("librusty_v8"); @@ -40,22 +40,15 @@ fetchurl { const templateDeps = (version: string, deps: PrefetchResult[]) => `# auto-generated file -- DO NOT EDIT! -{ lib, stdenv, fetchurl }: +{ fetchLibrustyV8 }: -let - fetch_librusty_v8 = args: fetchurl { - name = "librusty_v8-\${args.version}"; - url = "https://github.com/denoland/rusty_v8/releases/download/v\${args.version}/librusty_v8_release_\${stdenv.hostPlatform.rust.rustcTarget}.a.gz"; - sha256 = args.shas.\${stdenv.hostPlatform.system}; - meta = { - inherit (args) version; - sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; - }; - }; -in -fetch_librusty_v8 { +fetchLibrustyV8 { version = "${version}"; shas = { + x86_64-linux = "sha256-jLYl/CJp2Z+Ut6qZlh6u+CtR8KN+ToNTB+72QnVbIKM="; + aarch64-linux = "sha256-uAkBMg6JXA+aILd8TzDtuaEdM3Axiw43Ad5tZzxNt5w="; + x86_64-darwin = "sha256-60aR0YvQT8KyacY8J3fWKZcf9vny51VUB19NVpurS/A="; + aarch64-darwin = "sha256-pd/I6Mclj2/r/uJTIywnolPKYzeLu1c28d/6D56vkzQ="; ${deps.map(({ arch, sha256 }) => ` ${arch.nix} = "${sha256}";`).join("\n")} }; } diff --git a/pkgs/by-name/ex/exo/package.nix b/pkgs/by-name/ex/exo/package.nix index 1880b3386ea2..fb2bfbe7b18a 100644 --- a/pkgs/by-name/ex/exo/package.nix +++ b/pkgs/by-name/ex/exo/package.nix @@ -6,14 +6,14 @@ }: python3Packages.buildPythonApplication { pname = "exo"; - version = "0-unstable-2024-10-06"; + version = "0-unstable-2024-10-09"; pyproject = true; src = fetchFromGitHub { owner = "exo-explore"; repo = "exo"; - rev = "7b2a523fd1e5f1281d89bc1f664a29dc2003b787"; - hash = "sha256-o4tNbU9oa7WsAQ6eiTHqQVhliXbG/Y8d7PeH2TTWgGk="; + rev = "c1a26cd7fa447b2802a4bececfd7cb9d316c0600"; + hash = "sha256-jtcfGmk03Yf5IaswIvi6N9oMXzNPYlJBf4WMLkogUVo="; }; build-system = with python3Packages; [ setuptools ]; diff --git a/pkgs/applications/version-management/glab/default.nix b/pkgs/by-name/gl/glab/package.nix similarity index 81% rename from pkgs/applications/version-management/glab/default.nix rename to pkgs/by-name/gl/glab/package.nix index 31af00105113..c0a321858f0e 100644 --- a/pkgs/applications/version-management/glab/default.nix +++ b/pkgs/by-name/gl/glab/package.nix @@ -1,17 +1,17 @@ -{ lib, buildGoModule, fetchFromGitLab, installShellFiles, stdenv }: +{ lib, buildGo123Module, fetchFromGitLab, installShellFiles, stdenv }: -buildGoModule rec { +buildGo123Module rec { pname = "glab"; - version = "1.45.0"; + version = "1.47.0"; src = fetchFromGitLab { owner = "gitlab-org"; repo = "cli"; rev = "v${version}"; - hash = "sha256-jTpddpS+FYSQg2aRxQiVlG+bitiIqmZ4kxOJLPZkICo="; + hash = "sha256-mAM11nQ6YJJWNFOR9xQbgma7Plvo4MdcW2Syniw7o60="; }; - vendorHash = "sha256-o0sYObTeDgG+3X3YEnDbk1h4DkEiMwEgYMF7hGjCL3Q="; + vendorHash = "sha256-uwSVdebZtIpSol553gJC0ItkEqa6qXXOAVFvzjsHSSI="; ldflags = [ "-s" diff --git a/pkgs/by-name/li/librewolf-bin/package.nix b/pkgs/by-name/li/librewolf-bin/package.nix index 221d8092ec6b..d6b0960df7c6 100644 --- a/pkgs/by-name/li/librewolf-bin/package.nix +++ b/pkgs/by-name/li/librewolf-bin/package.nix @@ -6,11 +6,11 @@ let pname = "librewolf-bin"; - upstreamVersion = "129.0.2-1"; + upstreamVersion = "131.0.2-1"; version = lib.replaceStrings [ "-" ] [ "." ] upstreamVersion; src = fetchurl { url = "https://gitlab.com/api/v4/projects/24386000/packages/generic/librewolf/${upstreamVersion}/LibreWolf.x86_64.AppImage"; - hash = "sha256-h4SZnI2BwCSsLADYIxTXu82Jyst1hqYGHt54MnluLss="; + hash = "sha256-Sj3WkY3t8UHsh2v3xPaDb0IGp66YQIw9MKmmFFQCGvk="; }; appimageContents = appimageTools.extract { inherit pname version src; }; in @@ -31,8 +31,5 @@ appimageTools.wrapType2 { platforms = [ "x86_64-linux" ]; mainProgram = "librewolf"; sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; - knownVulnerabilities = [ - "CVE-2024-9680" - ]; }; } diff --git a/pkgs/by-name/mo/mold/package.nix b/pkgs/by-name/mo/mold/package.nix index b96a53f9749a..cb230726487f 100644 --- a/pkgs/by-name/mo/mold/package.nix +++ b/pkgs/by-name/mo/mold/package.nix @@ -23,13 +23,13 @@ stdenv.mkDerivation rec { pname = "mold"; - version = "2.34.0"; + version = "2.34.1"; src = fetchFromGitHub { owner = "rui314"; repo = "mold"; rev = "v${version}"; - hash = "sha256-QH9mtigVqt9ZrVBUyQcgUMW/8jtXHSYDWz6pprt6Hlk="; + hash = "sha256-x5fQ+dJFcxwENyTpZpQsMqTLtYQ8uuhUHV8jDpmltWg="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/mu/music-assistant/package.nix b/pkgs/by-name/mu/music-assistant/package.nix index 654fdfedafe9..65f46c184a42 100644 --- a/pkgs/by-name/mu/music-assistant/package.nix +++ b/pkgs/by-name/mu/music-assistant/package.nix @@ -24,14 +24,14 @@ in python.pkgs.buildPythonApplication rec { pname = "music-assistant"; - version = "2.2.6"; + version = "2.2.7"; pyproject = true; src = fetchFromGitHub { owner = "music-assistant"; repo = "server"; rev = "refs/tags/${version}"; - hash = "sha256-BEbcIq+qtJ1OffT2we6qajzvDYDu09rMcmJF1F06xZQ="; + hash = "sha256-GMjeNX8C027F+Wl/HfluWap9pDOeQwlM9qOs0Sp5tTI="; }; patches = [ diff --git a/pkgs/by-name/te/terraform-docs/package.nix b/pkgs/by-name/te/terraform-docs/package.nix index df4457de8e54..6a395109426f 100644 --- a/pkgs/by-name/te/terraform-docs/package.nix +++ b/pkgs/by-name/te/terraform-docs/package.nix @@ -1,7 +1,9 @@ { + stdenv, lib, buildGoModule, fetchFromGitHub, + installShellFiles, }: buildGoModule rec { pname = "terraform-docs"; @@ -16,6 +18,17 @@ buildGoModule rec { vendorHash = "sha256-aweKTHQBYYqSp8CymwhnVv1WNQ7cZ1/bJNz7DSo7PKc="; + excludedPackages = [ "scripts" ]; + + nativeBuildInputs = [ installShellFiles ]; + + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + $out/bin/terraform-docs completion bash >terraform-docs.bash + $out/bin/terraform-docs completion fish >terraform-docs.fish + $out/bin/terraform-docs completion zsh >terraform-docs.zsh + installShellCompletion terraform-docs.{bash,fish,zsh} + ''; + meta = with lib; { description = "Utility to generate documentation from Terraform modules in various output formats"; mainProgram = "terraform-docs"; diff --git a/pkgs/by-name/tt/ttop/lock.json b/pkgs/by-name/tt/ttop/lock.json index 16c54d52f980..0b93ea7b4e43 100644 --- a/pkgs/by-name/tt/ttop/lock.json +++ b/pkgs/by-name/tt/ttop/lock.json @@ -10,19 +10,19 @@ "rev": "9f51fc4e94d0960ab63fa6ea274518159720aa69", "sha256": "1n8cx5vl26ppjsn889zmfpa37yhlxahy2va4bqp6q4v4r1dl1h14", "srcDir": "src", - "url": "https://github.com/Yardanico/asciigraph/archive/9f51fc4e94d0960ab63fa6ea274518159720aa69.tar.gz" + "url": "https://github.com/nimbackup/asciigraph/archive/9f51fc4e94d0960ab63fa6ea274518159720aa69.tar.gz" }, { "method": "fetchzip", "packages": [ "illwill" ], - "path": "/nix/store/3lmm3z36qn4gz7bfa209zv0pqrpm3di9-source", - "ref": "v0.3.2", - "rev": "1d12cb36ab7b76c31d2d25fa421013ecb382e625", - "sha256": "0f9yncl5gbdja18mrqf5ixrdgrh95k0khda923dm1jd1x1b7ar8z", + "path": "/nix/store/k3sxzm7qnkgnwkrfd8hc3gkwzbayb1h1-source", + "ref": "v0.4.1", + "rev": "2736d9e0eb6b2bf32cd2fdb8226407a388362cd1", + "sha256": "0hiic5yjsaw6sgl1jzmfpm5g6a5ckzmd29c3pzg30glchn2g94sk", "srcDir": "", - "url": "https://github.com/johnnovak/illwill/archive/1d12cb36ab7b76c31d2d25fa421013ecb382e625.tar.gz" + "url": "https://github.com/johnnovak/illwill/archive/99a120f7f69868b94f5d35ce7e21dd12535de70c.tar.gz" }, { "method": "fetchzip", @@ -52,12 +52,12 @@ "packages": [ "zippy" ], - "path": "/nix/store/dj520pi1q9xh5gplcjs0jsn5wgnaa0cr-source", - "ref": "0.10.11", - "rev": "9560f3d20479fb390c97f731ef8d100f1ed54e6c", - "sha256": "140r42kgynwsnrga4x2mildx9pflwniyhjjzmid2jvnl4i6jrsr4", + "path": "/nix/store/zcd2hmjxlkp1bpb7c9xrpg153ssj3w0b-source", + "ref": "0.10.16", + "rev": "a99f6a7d8a8e3e0213b3cad0daf0ea974bf58e3f", + "sha256": "16qdnyql8d7nm7nwwpq0maflm3p6cpbb2jfaqx6xkld9xkc9lsbv", "srcDir": "src", - "url": "https://github.com/guzba/zippy/archive/9560f3d20479fb390c97f731ef8d100f1ed54e6c.tar.gz" + "url": "https://github.com/guzba/zippy/archive/a99f6a7d8a8e3e0213b3cad0daf0ea974bf58e3f.tar.gz" } ] } diff --git a/pkgs/by-name/tt/ttop/package.nix b/pkgs/by-name/tt/ttop/package.nix index 013bac08fea2..041ecff72011 100644 --- a/pkgs/by-name/tt/ttop/package.nix +++ b/pkgs/by-name/tt/ttop/package.nix @@ -2,13 +2,13 @@ buildNimPackage (finalAttrs: { pname = "ttop"; - version = "1.2.8"; + version = "1.5.2"; src = fetchFromGitHub { owner = "inv2004"; repo = "ttop"; rev = "v${finalAttrs.version}"; - hash = "sha256-QMUrA3OjxlDa1OxptJL7T3SPDTzSwVz6zz+ueh9eovM="; + hash = "sha256-/rs5JjTXxptVHXL3fY8qP6Be3r5N871CEbUH7w6zx4A="; }; lockFile = ./lock.json; diff --git a/pkgs/by-name/ze/zed-editor/Cargo.lock b/pkgs/by-name/ze/zed-editor/Cargo.lock index 7c92ef0f5257..446a1b96b34f 100644 --- a/pkgs/by-name/ze/zed-editor/Cargo.lock +++ b/pkgs/by-name/ze/zed-editor/Cargo.lock @@ -14398,7 +14398,7 @@ dependencies = [ [[package]] name = "zed" -version = "0.156.0" +version = "0.156.1" dependencies = [ "activity_indicator", "anyhow", diff --git a/pkgs/by-name/ze/zed-editor/package.nix b/pkgs/by-name/ze/zed-editor/package.nix index 1fc895ae5ed4..186e1b0e40a0 100644 --- a/pkgs/by-name/ze/zed-editor/package.nix +++ b/pkgs/by-name/ze/zed-editor/package.nix @@ -86,13 +86,13 @@ let in rustPlatform.buildRustPackage rec { pname = "zed-editor"; - version = "0.156.0"; + version = "0.156.1"; src = fetchFromGitHub { owner = "zed-industries"; repo = "zed"; rev = "refs/tags/v${version}"; - hash = "sha256-HdiEVRssMJmn+ifa0oWhHzRXB9L4oyji0DZ3PopHSoY="; + hash = "sha256-cu+XcFJ6VAP+7fqVhptnjDNpRkq/lRmJBCNkiy5Mka8="; fetchSubmodules = true; }; diff --git a/pkgs/development/compilers/llvm/19/libclc/use-default-paths.patch b/pkgs/development/compilers/llvm/19/libclc/use-default-paths.patch new file mode 100644 index 000000000000..09079242eeac --- /dev/null +++ b/pkgs/development/compilers/llvm/19/libclc/use-default-paths.patch @@ -0,0 +1,31 @@ +From e8b910246d0c7c3d9fff994f71c6f8a48ec09a50 Mon Sep 17 00:00:00 2001 +From: Tristan Ross +Date: Sat, 24 Aug 2024 19:56:24 -0700 +Subject: [PATCH] [libclc] use default paths with find_program when possible + +--- + libclc/CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 02bb859ae8590b..6bcd8ae52a5794 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -55,7 +55,7 @@ if( LIBCLC_STANDALONE_BUILD OR CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DI + # Import required tools + if( NOT EXISTS ${LIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR} ) + foreach( tool IN ITEMS clang llvm-as llvm-link opt ) +- find_program( LLVM_TOOL_${tool} ${tool} PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH ) ++ find_program( LLVM_TOOL_${tool} ${tool} PATHS ${LLVM_TOOLS_BINARY_DIR} ) + set( ${tool}_exe ${LLVM_TOOL_${tool}} ) + set( ${tool}_target ) + endforeach() +@@ -104,7 +104,7 @@ foreach( tool IN ITEMS clang opt llvm-as llvm-link ) + endforeach() + + # llvm-spirv is an optional dependency, used to build spirv-* targets. +-find_program( LLVM_SPIRV llvm-spirv PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH ) ++find_program( LLVM_SPIRV llvm-spirv PATHS ${LLVM_TOOLS_BINARY_DIR} ) + + if( LLVM_SPIRV ) + add_executable( libclc::llvm-spirv IMPORTED GLOBAL ) diff --git a/pkgs/development/compilers/llvm/common/default.nix b/pkgs/development/compilers/llvm/common/default.nix index 72eafab19660..55d26de9fc09 100644 --- a/pkgs/development/compilers/llvm/common/default.nix +++ b/pkgs/development/compilers/llvm/common/default.nix @@ -294,6 +294,12 @@ let path = ../14; } ]; + "libclc/use-default-paths.patch" = [ + { + after = "19"; + path = ../19; + } + ]; }; constraints = patches."${p}" or null; diff --git a/pkgs/development/compilers/llvm/common/libclc.nix b/pkgs/development/compilers/llvm/common/libclc.nix index 4c2081e693c1..299b27417b6a 100644 --- a/pkgs/development/compilers/llvm/common/libclc.nix +++ b/pkgs/development/compilers/llvm/common/libclc.nix @@ -1,10 +1,28 @@ -{ lib, stdenv, version, runCommand, monorepoSrc, llvm, buildPackages, buildLlvmTools, ninja, cmake, python3 }: - +{ + lib, + stdenv, + version, + runCommand, + monorepoSrc, + llvm, + buildPackages, + buildLlvmTools, + ninja, + cmake, + python3, + release_version, + getVersionFile, +}: +let + spirv-llvm-translator = buildPackages.spirv-llvm-translator.override { + inherit (buildLlvmTools) llvm; + }; +in stdenv.mkDerivation rec { pname = "libclc"; inherit version; - src = runCommand "${pname}-src-${version}" {} '' + src = runCommand "${pname}-src-${version}" { } '' mkdir -p "$out" cp -r ${monorepoSrc}/cmake "$out" cp -r ${monorepoSrc}/${pname} "$out" @@ -12,31 +30,52 @@ stdenv.mkDerivation rec { sourceRoot = "${src.name}/${pname}"; - outputs = [ "out" "dev" ]; - - patches = [ - ./libclc/libclc-gnu-install-dirs.patch + outputs = [ + "out" + "dev" ]; - # cmake expects all required binaries to be in the same place, so it will not be able to find clang without the patch - postPatch = '' - substituteInPlace CMakeLists.txt \ - --replace 'find_program( LLVM_CLANG clang PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ - 'find_program( LLVM_CLANG clang PATHS "${buildLlvmTools.clang.cc}/bin" NO_DEFAULT_PATH )' \ - --replace 'find_program( LLVM_AS llvm-as PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ - 'find_program( LLVM_AS llvm-as PATHS "${buildLlvmTools.llvm}/bin" NO_DEFAULT_PATH )' \ - --replace 'find_program( LLVM_LINK llvm-link PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ - 'find_program( LLVM_LINK llvm-link PATHS "${buildLlvmTools.llvm}/bin" NO_DEFAULT_PATH )' \ - --replace 'find_program( LLVM_OPT opt PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ - 'find_program( LLVM_OPT opt PATHS "${buildLlvmTools.llvm}/bin" NO_DEFAULT_PATH )' \ - --replace 'find_program( LLVM_SPIRV llvm-spirv PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ - 'find_program( LLVM_SPIRV llvm-spirv PATHS "${buildPackages.spirv-llvm-translator.override { inherit (buildLlvmTools) llvm; }}/bin" NO_DEFAULT_PATH )' - '' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' - substituteInPlace CMakeLists.txt \ - --replace 'COMMAND prepare_builtins' 'COMMAND ${buildLlvmTools.libclc.dev}/bin/prepare_builtins' - ''; + patches = + [ ./libclc/libclc-gnu-install-dirs.patch ] + # LLVM 19 changes how host tools are looked up. + # Need to remove NO_DEFAULT_PATH and the PATHS arguments for find_program + # so CMake can actually find the tools in nativeBuildInputs. + # https://github.com/llvm/llvm-project/pull/105969 + ++ lib.optional (lib.versionAtLeast release_version "19") ( + getVersionFile "libclc/use-default-paths.patch" + ); - nativeBuildInputs = [ cmake ninja python3 ]; + # cmake expects all required binaries to be in the same place, so it will not be able to find clang without the patch + postPatch = + lib.optionalString (lib.versionOlder release_version "19") '' + substituteInPlace CMakeLists.txt \ + --replace 'find_program( LLVM_CLANG clang PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ + 'find_program( LLVM_CLANG clang PATHS "${buildLlvmTools.clang.cc}/bin" NO_DEFAULT_PATH )' \ + --replace 'find_program( LLVM_AS llvm-as PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ + 'find_program( LLVM_AS llvm-as PATHS "${buildLlvmTools.llvm}/bin" NO_DEFAULT_PATH )' \ + --replace 'find_program( LLVM_LINK llvm-link PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ + 'find_program( LLVM_LINK llvm-link PATHS "${buildLlvmTools.llvm}/bin" NO_DEFAULT_PATH )' \ + --replace 'find_program( LLVM_OPT opt PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ + 'find_program( LLVM_OPT opt PATHS "${buildLlvmTools.llvm}/bin" NO_DEFAULT_PATH )' \ + --replace 'find_program( LLVM_SPIRV llvm-spirv PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ + 'find_program( LLVM_SPIRV llvm-spirv PATHS "${spirv-llvm-translator}/bin" NO_DEFAULT_PATH )' + '' + + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' + substituteInPlace CMakeLists.txt \ + --replace 'COMMAND prepare_builtins' 'COMMAND ${buildLlvmTools.libclc.dev}/bin/prepare_builtins' + ''; + + nativeBuildInputs = + [ + cmake + ninja + python3 + ] + ++ lib.optional (lib.versionAtLeast release_version "19") [ + buildLlvmTools.clang.cc + buildLlvmTools.llvm + spirv-llvm-translator + ]; buildInputs = [ llvm ]; strictDeps = true; diff --git a/pkgs/development/compilers/spirv-llvm-translator/default.nix b/pkgs/development/compilers/spirv-llvm-translator/default.nix index 89e4452e7d4b..dd4bb0b76627 100644 --- a/pkgs/development/compilers/spirv-llvm-translator/default.nix +++ b/pkgs/development/compilers/spirv-llvm-translator/default.nix @@ -1,12 +1,14 @@ -{ lib, stdenv -, fetchFromGitHub -, fetchpatch -, cmake -, pkg-config -, lit -, llvm -, spirv-headers -, spirv-tools +{ + lib, + stdenv, + fetchFromGitHub, + fetchpatch, + cmake, + pkg-config, + lit, + llvm, + spirv-headers, + spirv-tools, }: let @@ -15,31 +17,50 @@ let # ROCm, if actively updated will always be at the latest version branch = - if llvmMajor == "18" then rec { - version = "18.1.0"; - rev = "v${version}"; - hash = "sha256-64guZiuO7VpaX01wNIjV7cnjEAe6ineMdY44S6sA33k="; - } else if llvmMajor == "17" || isROCm then rec { - version = "17.0.0"; - rev = "v${version}"; - hash = "sha256-Rzm5Py9IPFtS9G7kME+uSwZ/0gPGW6MlL35ZWk4LfHM="; - } else if llvmMajor == "16" then rec { - version = "16.0.0"; - rev = "v${version}"; - hash = "sha256-EUabcYqSjXshbPmcs1DRLvCSL1nd9rEdpqELBrItCW8="; - } else if llvmMajor == "15" then rec { - version = "15.0.0"; - rev = "v${version}"; - hash = "sha256-OsDohXRxovtEXaWiRGp8gJ0dXmoALyO+ZimeSO8aPVI="; - } else if llvmMajor == "14" then { - version = "14.0.0+unstable-2024-07-15"; - rev = "2823e7052b7999c10fff63bc8089e5aa205716f4"; - hash = "sha256-8/4B74hYge6WiH7PzRGEgE3W7f9IkQ4VMmfkWKYA/l4="; - } else if llvmMajor == "11" then { - version = "11.0.0+unstable-2022-05-04"; - rev = "4ef524240833abfeee1c5b9fff6b1bd53f4806b3"; # 267 commits ahead of v11.0.0 - hash = "sha256-NoIoa20+2sH41rEnr8lsMhtfesrtdPINiXtUnxYVm8s="; - } else throw "Incompatible LLVM version."; + if llvmMajor == "19" then + rec { + version = "19.1.0"; + rev = "dad1f0eaab8047a4f73c50ed5f3d1694b78aae97"; + hash = "sha256-mUvDF5y+cBnqUaHjyiiE8cJGH5MfQMqGFy6bYv9vCVY="; + } + else if llvmMajor == "18" then + rec { + version = "18.1.0"; + rev = "v${version}"; + hash = "sha256-64guZiuO7VpaX01wNIjV7cnjEAe6ineMdY44S6sA33k="; + } + else if llvmMajor == "17" || isROCm then + rec { + version = "17.0.0"; + rev = "v${version}"; + hash = "sha256-Rzm5Py9IPFtS9G7kME+uSwZ/0gPGW6MlL35ZWk4LfHM="; + } + else if llvmMajor == "16" then + rec { + version = "16.0.0"; + rev = "v${version}"; + hash = "sha256-EUabcYqSjXshbPmcs1DRLvCSL1nd9rEdpqELBrItCW8="; + } + else if llvmMajor == "15" then + rec { + version = "15.0.0"; + rev = "v${version}"; + hash = "sha256-OsDohXRxovtEXaWiRGp8gJ0dXmoALyO+ZimeSO8aPVI="; + } + else if llvmMajor == "14" then + { + version = "14.0.0+unstable-2024-07-15"; + rev = "2823e7052b7999c10fff63bc8089e5aa205716f4"; + hash = "sha256-8/4B74hYge6WiH7PzRGEgE3W7f9IkQ4VMmfkWKYA/l4="; + } + else if llvmMajor == "11" then + { + version = "11.0.0+unstable-2022-05-04"; + rev = "4ef524240833abfeee1c5b9fff6b1bd53f4806b3"; # 267 commits ahead of v11.0.0 + hash = "sha256-NoIoa20+2sH41rEnr8lsMhtfesrtdPINiXtUnxYVm8s="; + } + else + throw "Incompatible LLVM version."; in stdenv.mkDerivation { pname = "SPIRV-LLVM-Translator"; @@ -51,71 +72,87 @@ stdenv.mkDerivation { inherit (branch) rev hash; }; - patches = lib.optionals (llvmMajor == "18") [ - # Fixes build after SPV_INTEL_maximum_registers breaking change - # TODO: remove on next spirv-headers release - (fetchpatch { - url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/d970c9126c033ebcbb7187bc705eae2e54726b74.patch"; - revert = true; - hash = "sha256-71sJuGqVjTcB549eIiCO0LoqAgxkdEHCoxh8Pd/Qzz8="; - }) - ] ++ lib.optionals (lib.versionAtLeast llvmMajor "15" && lib.versionOlder llvmMajor "18") [ - # Fixes build after spirv-headers breaking change - (fetchpatch { - url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/0166a0fb86dc6c0e8903436bbc3a89bc3273ebc0.patch"; - excludes = ["spirv-headers-tag.conf"]; - hash = "sha256-17JJG8eCFVphElY5fVT/79hj0bByWxo8mVp1ZNjQk/M="; - }) - ] ++ lib.optionals (llvmMajor == "16") [ - # Fixes builds that link against external LLVM dynamic library - (fetchpatch { - url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/f3b9b604d7eda18d0d1029d94a6eebd33aa3a3fe.patch"; - hash = "sha256-opDjyZcy7O4wcSfm/A51NCIiDyIvbcmbv9ns1njdJbc="; - }) - ] ++ lib.optionals (llvmMajor == "14") [ - (fetchpatch { - # tries to install llvm-spirv into llvm nix store path - url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/cce9a2f130070d799000cac42fe24789d2b777ab.patch"; - revert = true; - hash = "sha256-GbFacttZRDCgA0jkUoFA4/B3EDn3etweKvM09OwICJ8="; - }) - ]; + patches = + lib.optionals (llvmMajor == "18") [ + # Fixes build after SPV_INTEL_maximum_registers breaking change + # TODO: remove on next spirv-headers release + (fetchpatch { + url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/d970c9126c033ebcbb7187bc705eae2e54726b74.patch"; + revert = true; + hash = "sha256-71sJuGqVjTcB549eIiCO0LoqAgxkdEHCoxh8Pd/Qzz8="; + }) + ] + ++ lib.optionals (lib.versionAtLeast llvmMajor "15" && lib.versionOlder llvmMajor "18") [ + # Fixes build after spirv-headers breaking change + (fetchpatch { + url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/0166a0fb86dc6c0e8903436bbc3a89bc3273ebc0.patch"; + excludes = [ "spirv-headers-tag.conf" ]; + hash = "sha256-17JJG8eCFVphElY5fVT/79hj0bByWxo8mVp1ZNjQk/M="; + }) + ] + ++ lib.optionals (llvmMajor == "16") [ + # Fixes builds that link against external LLVM dynamic library + (fetchpatch { + url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/f3b9b604d7eda18d0d1029d94a6eebd33aa3a3fe.patch"; + hash = "sha256-opDjyZcy7O4wcSfm/A51NCIiDyIvbcmbv9ns1njdJbc="; + }) + ] + ++ lib.optionals (llvmMajor == "14") [ + (fetchpatch { + # tries to install llvm-spirv into llvm nix store path + url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/cce9a2f130070d799000cac42fe24789d2b777ab.patch"; + revert = true; + hash = "sha256-GbFacttZRDCgA0jkUoFA4/B3EDn3etweKvM09OwICJ8="; + }) + ]; - nativeBuildInputs = [ pkg-config cmake ] - ++ (if isROCm then [ llvm ] else [ llvm.dev ]); + nativeBuildInputs = [ + pkg-config + cmake + ] ++ (if isROCm then [ llvm ] else [ llvm.dev ]); - buildInputs = [ spirv-headers spirv-tools ] - ++ lib.optionals (!isROCm) [ llvm ]; + buildInputs = [ + spirv-headers + spirv-tools + ] ++ lib.optionals (!isROCm) [ llvm ]; nativeCheckInputs = [ lit ]; - cmakeFlags = [ - "-DLLVM_INCLUDE_TESTS=ON" - "-DLLVM_DIR=${(if isROCm then llvm else llvm.dev)}" - "-DBUILD_SHARED_LIBS=YES" - "-DLLVM_SPIRV_BUILD_EXTERNAL=YES" - # RPATH of binary /nix/store/.../bin/llvm-spirv contains a forbidden reference to /build/ - "-DCMAKE_SKIP_BUILD_RPATH=ON" - ] ++ lib.optional (llvmMajor != "11") "-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=${spirv-headers.src}"; + cmakeFlags = + [ + "-DLLVM_INCLUDE_TESTS=ON" + "-DLLVM_DIR=${(if isROCm then llvm else llvm.dev)}" + "-DBUILD_SHARED_LIBS=YES" + "-DLLVM_SPIRV_BUILD_EXTERNAL=YES" + # RPATH of binary /nix/store/.../bin/llvm-spirv contains a forbidden reference to /build/ + "-DCMAKE_SKIP_BUILD_RPATH=ON" + ] + ++ lib.optional (llvmMajor != "11") "-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=${spirv-headers.src}" + ++ lib.optional (llvmMajor == "19") "-DBASE_LLVM_VERSION=${lib.versions.majorMinor llvm.version}.0"; # FIXME: CMake tries to run "/llvm-lit" which of course doesn't exist doCheck = false; - makeFlags = [ "all" "llvm-spirv" ]; + makeFlags = [ + "all" + "llvm-spirv" + ]; - postInstall = '' - install -D tools/llvm-spirv/llvm-spirv $out/bin/llvm-spirv - '' + lib.optionalString stdenv.hostPlatform.isDarwin '' - install_name_tool $out/bin/llvm-spirv \ - -change @rpath/libLLVMSPIRVLib.dylib $out/lib/libLLVMSPIRVLib.dylib - ''; + postInstall = + '' + install -D tools/llvm-spirv/llvm-spirv $out/bin/llvm-spirv + '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' + install_name_tool $out/bin/llvm-spirv \ + -change @rpath/libLLVMSPIRVLib.dylib $out/lib/libLLVMSPIRVLib.dylib + ''; meta = with lib; { - homepage = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator"; + homepage = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator"; description = "Tool and a library for bi-directional translation between SPIR-V and LLVM IR"; mainProgram = "llvm-spirv"; - license = licenses.ncsa; - platforms = platforms.unix; + license = licenses.ncsa; + platforms = platforms.unix; maintainers = with maintainers; [ gloaming ]; }; } diff --git a/pkgs/development/libraries/level-zero/default.nix b/pkgs/development/libraries/level-zero/default.nix index 8b87f0af9f9b..e0d130d80f44 100644 --- a/pkgs/development/libraries/level-zero/default.nix +++ b/pkgs/development/libraries/level-zero/default.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation rec { pname = "level-zero"; - version = "1.17.42"; + version = "1.17.45"; src = fetchFromGitHub { owner = "oneapi-src"; repo = "level-zero"; rev = "refs/tags/v${version}"; - hash = "sha256-IjYRzjC7CUPDdVBVoWSZtUQaY7QtSfS/Nej/2BdVziY="; + hash = "sha256-2uWZsy8aIV/ToDVuVxpyXoI1GbwZ9IxeLh+1hgjlfEM="; }; nativeBuildInputs = [ cmake addDriverRunpath ]; diff --git a/pkgs/development/python-modules/beancount-black/default.nix b/pkgs/development/python-modules/beancount-black/default.nix index c229ec89cea2..4ee5b85f0091 100644 --- a/pkgs/development/python-modules/beancount-black/default.nix +++ b/pkgs/development/python-modules/beancount-black/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "beancount-black"; - version = "1.0.4"; + version = "1.0.5"; disabled = pythonOlder "3.9"; format = "pyproject"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "LaunchPlatform"; repo = "beancount-black"; rev = "refs/tags/${version}"; - hash = "sha256-GrdQCxVsAzCusxxfQHF48doWG8OVrqBayCFof9RHTkE="; + hash = "sha256-vo11mlgDhyc8YFnULJ4AFrANWmGpAMNX5jJ6QaUNqk0="; }; buildInputs = [ poetry-core ]; diff --git a/pkgs/development/python-modules/cgal/default.nix b/pkgs/development/python-modules/cgal/default.nix index e66d56879f1a..0b461c3b803a 100644 --- a/pkgs/development/python-modules/cgal/default.nix +++ b/pkgs/development/python-modules/cgal/default.nix @@ -21,14 +21,14 @@ buildPythonPackage rec { pname = "cgal"; - version = "5.6.1.post202403291426"; + version = "6.0.post202410011635"; pyproject = true; src = fetchFromGitHub { owner = "CGAL"; repo = "cgal-swig-bindings"; - rev = "v${version}"; - hash = "sha256-EcvS1TWL3uGCE1G8Lbfiu/AzifMdUSei+z91bzkiKes="; + rev = "refs/tags/v${version}"; + hash = "sha256-KXcXykL/m+A5dCDc+f8j7GgVeQahAOaZ/+LLKHyqbS4="; }; dontUseCmakeConfigure = true; diff --git a/pkgs/development/python-modules/drf-extra-fields/default.nix b/pkgs/development/python-modules/drf-extra-fields/default.nix new file mode 100644 index 000000000000..76966803cf29 --- /dev/null +++ b/pkgs/development/python-modules/drf-extra-fields/default.nix @@ -0,0 +1,55 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + django, + djangorestframework, + filetype, + pillow, + psycopg2, + pytestCheckHook, + pytest-django, +}: + +buildPythonPackage rec { + pname = "drf-extra-fields"; + version = "3.7.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "hipo"; + repo = "drf-extra-fields"; + rev = "v${version}"; + hash = "sha256-Ym4vnZ/t0ZdSxU53BC0ducJl1YiTygRSWql/35PNbOU"; + }; + + build-system = [ setuptools ]; + + dependencies = [ + django + djangorestframework + filetype + ]; + + optional-dependencies = { + Base64ImageField = [ pillow ]; + }; + + nativeCheckInputs = [ + (django.override { withGdal = true; }) + psycopg2 + pytestCheckHook + pytest-django + ] ++ optional-dependencies.Base64ImageField; + + pythonImportsCheck = [ "drf_extra_fields" ]; + + meta = { + description = "Extra Fields for Django Rest Framework"; + homepage = "https://github.com/Hipo/drf-extra-fields"; + changelog = "https://github.com/Hipo/drf-extra-fields/releases/tag/${src.rev}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ felbinger ]; + }; +} diff --git a/pkgs/development/python-modules/labelbox/default.nix b/pkgs/development/python-modules/labelbox/default.nix index 09e7f9fa4845..060b8d94441e 100644 --- a/pkgs/development/python-modules/labelbox/default.nix +++ b/pkgs/development/python-modules/labelbox/default.nix @@ -31,7 +31,7 @@ buildPythonPackage rec { pname = "labelbox"; - version = "5.1.0"; + version = "5.2.1"; pyproject = true; disabled = pythonOlder "3.8"; @@ -40,7 +40,7 @@ buildPythonPackage rec { owner = "Labelbox"; repo = "labelbox-python"; rev = "refs/tags/v.${version}"; - hash = "sha256-M55cwT7BrY+8m9ec+2bKDCxGkHJp/c50Gzib4sEg7Bk="; + hash = "sha256-vfhlzkCTm1fhvCpzwAaXWPyXE8/2Yx63fTVHl5CWon4="; }; sourceRoot = "${src.name}/libs/labelbox"; diff --git a/pkgs/development/python-modules/netbox-documents/default.nix b/pkgs/development/python-modules/netbox-documents/default.nix new file mode 100644 index 000000000000..099911166d03 --- /dev/null +++ b/pkgs/development/python-modules/netbox-documents/default.nix @@ -0,0 +1,43 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + drf-extra-fields, + python, + netbox, +}: + +buildPythonPackage rec { + pname = "netbox-documents"; + version = "0.7.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "jasonyates"; + repo = "netbox-documents"; + rev = "v${version}"; + hash = "sha256-Uijdaicbx9A9fBgFx3zyhhFlokFdb9TSolnExbfkkc4="; + }; + + build-system = [ setuptools ]; + + dependencies = [ drf-extra-fields ]; + + nativeCheckInputs = [ netbox ]; + + preFixup = '' + export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH + ''; + + dontUsePythonImportsCheck = python.pythonVersion != netbox.python.pythonVersion; + pythonImportsCheck = [ "netbox_documents" ]; + + meta = { + description = "Plugin designed to faciliate the storage of site, circuit, device type and device specific documents within NetBox"; + homepage = "https://github.com/jasonyates/netbox-documents"; + changelog = "https://github.com/jasonyates/netbox-documents/releases/tag/${src.rev}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ felbinger ]; + }; +} diff --git a/pkgs/development/python-modules/opentelemetry-instrumentation-celery/default.nix b/pkgs/development/python-modules/opentelemetry-instrumentation-celery/default.nix new file mode 100644 index 000000000000..bb6c9e5716ef --- /dev/null +++ b/pkgs/development/python-modules/opentelemetry-instrumentation-celery/default.nix @@ -0,0 +1,46 @@ +{ + lib, + buildPythonPackage, + hatchling, + opentelemetry-api, + opentelemetry-instrumentation, + opentelemetry-semantic-conventions, + opentelemetry-test-utils, + billiard, + celery, + pytestCheckHook, +}: + +buildPythonPackage rec { + inherit (opentelemetry-instrumentation) version src; + pname = "opentelemetry-instrumentation-celery"; + pyproject = true; + + sourceRoot = "${opentelemetry-instrumentation.src.name}/instrumentation/opentelemetry-instrumentation-celery"; + + build-system = [ hatchling ]; + + dependencies = [ + billiard + celery + opentelemetry-api + opentelemetry-instrumentation + opentelemetry-semantic-conventions + ]; + + optional-dependencies = { + instruments = [ celery ]; + }; + + nativeCheckInputs = [ + opentelemetry-test-utils + pytestCheckHook + ]; + + pythonImportsCheck = [ "opentelemetry.instrumentation.celery" ]; + + meta = opentelemetry-instrumentation.meta // { + homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/instrumentation/opentelemetry-instrumentation-celery"; + description = "Celery instrumentation for OpenTelemetry"; + }; +} diff --git a/pkgs/development/python-modules/plotly/default.nix b/pkgs/development/python-modules/plotly/default.nix index 8bd265181aa1..6a4bed2545ba 100644 --- a/pkgs/development/python-modules/plotly/default.nix +++ b/pkgs/development/python-modules/plotly/default.nix @@ -1,5 +1,6 @@ { lib, + stdenv, buildPythonPackage, fetchFromGitHub, setuptools, @@ -70,6 +71,9 @@ buildPythonPackage rec { scikit-image ]; + # the check inputs are broken on darwin + doCheck = !stdenv.hostPlatform.isDarwin; + disabledTests = [ # FAILED plotly/matplotlylib/mplexporter/tests/test_basic.py::test_legend_dots - AssertionError: assert '3' == '2' "test_legend_dots" @@ -116,6 +120,9 @@ buildPythonPackage rec { "test_dependencies_not_imported" # FAILED test_init/test_lazy_imports.py::test_lazy_imports - AssertionError: assert 'plotly' not in {'IPython':