Skip to content

Commit

Permalink
Merge staging-next into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Aug 12, 2024
2 parents ea9560a + 8674a36 commit 4bad747
Show file tree
Hide file tree
Showing 40 changed files with 253 additions and 102 deletions.
19 changes: 18 additions & 1 deletion nixos/modules/system/activation/specialisation.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{ config, lib, pkgs, extendModules, noUserModules, ... }:
{ config, lib, extendModules, noUserModules, ... }:

let
inherit (lib)
attrNames
concatStringsSep
filter
length
mapAttrs
mapAttrsToList
match
mkOption
types
;
Expand Down Expand Up @@ -73,6 +77,19 @@ in
};

config = {
assertions = [(
let
invalidNames = filter (name: match "[[:alnum:]_]+" name == null) (attrNames config.specialisation);
in
{
assertion = length invalidNames == 0;
message = ''
Specialisation names can only contain alphanumeric characters and underscores
Invalid specialisation names: ${concatStringsSep ", " invalidNames}
'';
}
)];

system.systemBuilderCommands = ''
mkdir $out/specialisation
${concatStringsSep "\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def from_path(cls: Type["Entry"], path: Path) -> "Entry":
# Matching nixos*-generation-$number*.conf
rex_generation = re.compile(r"^nixos.*-generation-([0-9]+).*\.conf$")
# Matching nixos*-generation-$number-specialisation-$specialisation_name*.conf
rex_specialisation = re.compile(r"^nixos.*-generation-([0-9]+)-specialisation-([a-zA-Z0-9]+).*\.conf$")
rex_specialisation = re.compile(r"^nixos.*-generation-([0-9]+)-specialisation-([a-zA-Z0-9_]+).*\.conf$")
profile = rex_profile.sub(r"\1", filename) if rex_profile.match(filename) else None
specialisation = rex_specialisation.sub(r"\2", filename) if rex_specialisation.match(filename) else None
try:
Expand Down
33 changes: 33 additions & 0 deletions nixos/tests/nixos-rebuild-specialisations.nix
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,32 @@ import ./make-test-python.nix ({ pkgs, ... }: {
}
'';

wrongConfigFile = pkgs.writeText "configuration.nix" ''
{ lib, pkgs, ... }: {
imports = [
./hardware-configuration.nix
<nixpkgs/nixos/modules/testing/test-instrumentation.nix>
];
boot.loader.grub = {
enable = true;
device = "/dev/vda";
forceInstall = true;
};
documentation.enable = false;
environment.systemPackages = [
(pkgs.writeShellScriptBin "parent" "")
];
specialisation.foo-bar = {
inheritParentConfig = true;
configuration = { ... }: { };
};
}
'';
in
''
machine.start()
Expand Down Expand Up @@ -116,5 +142,12 @@ import ./make-test-python.nix ({ pkgs, ... }: {
with subtest("Make sure nonsense command combinations are forbidden"):
machine.fail("nixos-rebuild boot --specialisation foo")
machine.fail("nixos-rebuild boot -c foo")
machine.copy_from_host(
"${wrongConfigFile}",
"/etc/nixos/configuration.nix",
)
with subtest("Make sure that invalid specialisation names are rejected"):
machine.fail("nixos-rebuild switch")
'';
})
4 changes: 2 additions & 2 deletions pkgs/applications/editors/vscode/extensions/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1625,8 +1625,8 @@ let
mktplcRef = {
name = "elixir-ls";
publisher = "JakeBecker";
version = "0.23.0";
hash = "sha256-eqS/xYK7yh7MvPAl61o1ZJ9wH9amqngJupU+puDq9xs=";
version = "0.23.1";
hash = "sha256-rwpaixQbuxVkH4wlKPG4Qk69IylwjfCtyfUcqCuN/e8=";
};
meta = {
changelog = "https://marketplace.visualstudio.com/items/JakeBecker.elixir-ls/changelog";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/video/pipe-viewer/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ let
in
buildPerlModule rec {
pname = "pipe-viewer";
version = "0.5.1";
version = "0.5.2";

src = fetchFromGitHub {
owner = "trizen";
repo = "pipe-viewer";
rev = version;
hash = "sha256-GTmva1pDG1g2wZoS3ABYxhWdbARdlcS0rxGjkdJL7js=";
hash = "sha256-TCcAQjz0B3eWILMAoqHCnMLvu8zD0W5wOFg+UaMPmXg=";
};

nativeBuildInputs = [ makeWrapper ]
Expand Down
10 changes: 10 additions & 0 deletions pkgs/applications/window-managers/i3/bumblebee-status/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
, lib
, glibcLocales
, python
, fetchpatch
, fetchFromGitHub
# Usage: bumblebee-status.override { plugins = p: [p.arandr p.bluetooth2]; };
, plugins ? p: [ ]
Expand Down Expand Up @@ -29,6 +30,15 @@ python.pkgs.buildPythonPackage {
hash = "sha256-+RCg2XZv0AJnexi7vnQhEXB1qSoKBN1yKWm3etdys1s=";
};

patches = [
# fix build with Python 3.12
# https://github.com/tobi-wan-kenobi/bumblebee-status/pull/1019
(fetchpatch {
url = "https://github.com/tobi-wan-kenobi/bumblebee-status/commit/2fe8f1ff1444daf155b18318005f33a76a5d64b4.patch";
hash = "sha256-BC1cgQDMJkhuEgq8NJ28521CHbEfqIMueHkFXXlZz2w=";
})
];

buildInputs = lib.concatMap (p: p.buildInputs or [ ]) selectedPlugins;
propagatedBuildInputs = lib.concatMap (p: p.propagatedBuildInputs or [ ]) selectedPlugins;

Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/gh/gh-dash/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

buildGoModule rec {
pname = "gh-dash";
version = "4.5.0";
version = "4.5.2";

src = fetchFromGitHub {
owner = "dlvhdr";
repo = "gh-dash";
rev = "v${version}";
hash = "sha256-zLKQbw9d20KKuK5j9RhZPLSDRrw5SQ8vycIEfRmUEzI=";
hash = "sha256-lOJN4wSxE3VX/Pb8Aa+ex6hkiPieFelmtn84+SmzOxE=";
};

vendorHash = "sha256-JOd2czYWVgE1jBfeuoVRp+oE/asyk50o5Pf021jD5mY=";
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ autoSignDarwinBinariesHook
, buildDotnetModule
{ buildDotnetModule
, darwin
, dotnetCorePackages
, fetchFromGitHub
, fetchpatch
Expand Down Expand Up @@ -114,7 +114,7 @@ buildDotnetModule rec {
which
git
] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
autoSignDarwinBinariesHook
darwin.autoSignDarwinBinariesHook
];

buildInputs = [ stdenv.cc.cc.lib ];
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions pkgs/by-name/li/lint-staged/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

buildNpmPackage rec {
pname = "lint-staged";
version = "15.2.7";
version = "15.2.8";

src = fetchFromGitHub {
owner = "okonet";
repo = "lint-staged";
rev = "v${version}";
hash = "sha256-V7NJ8UWORo+APCVJmC6l6uQUazLrG94O9V4yC3McBp4=";
hash = "sha256-N1mPtF23YP1yeVNUPIxCAFK3ozOCMKV3ZTt+axIWFmQ=";
};

npmDepsHash = "sha256-9Twg9jppFkp0cpxJfBVmWRMwKsXnJ+tUBH8qMYAm1cY=";
npmDepsHash = "sha256-ivlbaTCvVbs7k4zpP7fFbMdWuO5rOcT/5451PQh2CKs=";

dontNpmBuild = true;

Expand Down
6 changes: 3 additions & 3 deletions pkgs/by-name/ma/maa-cli/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@

rustPlatform.buildRustPackage rec {
pname = "maa-cli";
version = "0.4.9";
version = "0.4.10";

src = fetchFromGitHub {
owner = "MaaAssistantArknights";
repo = "maa-cli";
rev = "v${version}";
hash = "sha256-klcS4SNMB5bAy4Gzk9NgbjbZL+7kh0lNXwIwJoXBbVU=";
hash = "sha256-qCIA+VN7mSfeLwN+O2wm0CYDQMCUQzZrj5RxpDEEKQk=";
};

nativeBuildInputs = [
Expand All @@ -44,7 +44,7 @@ rustPlatform.buildRustPackage rec {
buildNoDefaultFeatures = true;
buildFeatures = [ "git2" ];

cargoHash = "sha256-C4NkJc7msyaUjQAsc0kbDwkr0cj3Esv+JjA24RvFsXA=";
cargoHash = "sha256-exLXowD2QTW4IZHIO3PDv6cf0O0deNPuqrCIcTnnJQA=";

# maa-cli would only seach libMaaCore.so and resources in itself's path
# https://github.com/MaaAssistantArknights/maa-cli/issues/67
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/ma/marwaita-orange/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@

stdenv.mkDerivation rec {
pname = "marwaita-orange";
version = "20.3";
version = "20.3.1";

src = fetchFromGitHub {
owner = "darkomarko42";
repo = pname;
rev = version;
hash = "sha256-RT7+LmauSAavl4ZA9vuKNrh/x8cGUb9V4RecxI/fN+E=";
hash = "sha256-DdtFAUoIT51kGrEz1IpLvuJMEL+pMDICobuNV6UfC6Q=";
};

buildInputs = [
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/op/openvas-scanner/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@

stdenv.mkDerivation rec {
pname = "openvas-scanner";
version = "23.8.2";
version = "23.8.4";

src = fetchFromGitHub {
owner = "greenbone";
repo = "openvas-scanner";
rev = "refs/tags/v${version}";
hash = "sha256-sHu6GF+T5Ce2aiGccv9uM+KdAWCLB8CCXujxgxhg4Ho=";
hash = "sha256-Bxna9ylQ9MZf/YWLIVI61tRjU5H4Ipqkiz+z21qiaGg=";
};

nativeBuildInputs = [
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/qu/quarkus/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

stdenv.mkDerivation (finalAttrs: {
pname = "quarkus-cli";
version = "3.13.0";
version = "3.13.2";

src = fetchurl {
url = "https://github.com/quarkusio/quarkus/releases/download/${finalAttrs.version}/quarkus-cli-${finalAttrs.version}.tar.gz";
hash = "sha256-KWVbEtT3uluvLqbRk4tLPA7tGn9gf+Ee5hBrzlWtuhg=";
hash = "sha256-6rt40cQde6ck0Eq3YRfN+l2QP18CHTxFj2EJyiPgkrE=";
};

nativeBuildInputs = [ makeWrapper ];
Expand Down
29 changes: 29 additions & 0 deletions pkgs/development/libraries/x265/darwin-__rdtsc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From 5ad351f7d271d0be0611797542c831898b2f531c Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyich@gmail.com>
Date: Sun, 11 Aug 2024 22:09:34 +0100
Subject: [PATCH] source/test/testharness.h: don't redefine `__rdtsc()` builtin

On darwin clang-16 provides `__rdtsc()` builtin. As a result the build
fails in `nixpkgs` as:

source/test/testharness.h:78:24: error: static declaration of '__rdtsc' follows non-static declaration
static inline uint32_t __rdtsc(void)
^
x265_3.6/source/test/testharness.h:78:24: note: '__rdtsc' is a builtin with type 2

The change avoid redefinition on targets that define `__rdtsc()` builtin.
---
source/test/testharness.h | 2 ++
1 file changed, 2 insertions(+)

--- a/test/testharness.h
+++ b/test/testharness.h
@@ -69,6 +69,8 @@ protected:
#include <intrin.h>
#elif HAVE_RDTSC
#include <intrin.h>
+#elif defined(__has_builtin) && __has_builtin(__rdtsc)
+/* compiler-provided builtin */
#elif (!defined(__APPLE__) && (defined (__GNUC__) && (defined(__x86_64__) || defined(__i386__))))
#include <x86intrin.h>
#elif ( !defined(__APPLE__) && defined (__GNUC__) && defined(__ARM_NEON__))
6 changes: 6 additions & 0 deletions pkgs/development/libraries/x265/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ stdenv.mkDerivation rec {
hash = "sha256-ZjUx80HFOJ9GDXMOYuEKT8yjQoyiyhCWk4Z7xf4uKAc=";
};

# TODO: apply patch unconditionally in staging. It's conditional to
# save rebuild on staging-next.
patches = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
./darwin-__rdtsc.patch
];

sourceRoot = "x265_${version}/source";

postPatch = ''
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/anthropic/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

buildPythonPackage rec {
pname = "anthropic";
version = "0.32.0";
version = "0.33.0";
pyproject = true;

disabled = pythonOlder "3.8";
Expand All @@ -31,7 +31,7 @@ buildPythonPackage rec {
owner = "anthropics";
repo = "anthropic-sdk-python";
rev = "refs/tags/v${version}";
hash = "sha256-en2vaHI+fE4Jrh91EtFyWRBr+k6KVPanwiOXkZBi3Ts=";
hash = "sha256-Xaj4FPveqiivud6Hi/LlRkM9/8jrvX6IDirO/laad5U=";
};

build-system = [
Expand Down
11 changes: 6 additions & 5 deletions pkgs/development/python-modules/argilla/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
packaging,
pandas,
passlib,
setuptools,
peft,
pgmpy,
plotly,
Expand All @@ -47,11 +48,10 @@
scikit-learn,
sentence-transformers,
seqeval,
setuptools,
smart-open,
snorkel,
spacy,
spacy-transformers,
spacy,
sqlalchemy,
tqdm,
transformers,
Expand All @@ -67,7 +67,7 @@

buildPythonPackage rec {
pname = "argilla";
version = "1.29.0";
version = "1.29.1";
pyproject = true;

disabled = pythonOlder "3.8";
Expand All @@ -76,9 +76,11 @@ buildPythonPackage rec {
owner = "argilla-io";
repo = "argilla";
rev = "refs/tags/v${version}";
hash = "sha256-+eQNvLDV063JY6CyngpGyo4NdSd6HvAHFgGWtPfZNVQ=";
hash = "sha256-ndendXlgACFdwnZ/P2W22Tr/Ji8AYw/6jtb8F3/zqSA=";
};

sourceRoot = "${src.name}/${pname}";

pythonRelaxDeps = [
"httpx"
"numpy"
Expand All @@ -89,7 +91,6 @@ buildPythonPackage rec {

build-system = [ setuptools ];


dependencies = [
httpx
deprecated
Expand Down
Loading

0 comments on commit 4bad747

Please sign in to comment.