Merge remote-tracking branch 'origin/staging-next' into staging

This commit is contained in:
K900 2024-12-02 10:34:44 +03:00
commit aa180fdca0
9 changed files with 723 additions and 375 deletions

View File

@ -18,10 +18,7 @@ let
;
inherit (lib.filesystem)
pathIsDirectory
pathIsRegularFile
pathType
packagesFromDirectoryRecursive
;
inherit (lib.strings)
@ -363,30 +360,52 @@ in
directory,
...
}:
assert pathIsDirectory directory;
let
inherit (lib.path) append;
defaultPath = append directory "package.nix";
# Determine if a directory entry from `readDir` indicates a package or
# directory of packages.
directoryEntryIsPackage = basename: type:
type == "directory" || hasSuffix ".nix" basename;
# List directory entries that indicate packages in the given `path`.
packageDirectoryEntries = path:
filterAttrs directoryEntryIsPackage (readDir path);
# Transform a directory entry (a `basename` and `type` pair) into a
# package.
directoryEntryToAttrPair = subdirectory: basename: type:
let
path = subdirectory + "/${basename}";
in
if type == "regular"
then
{
name = removeSuffix ".nix" basename;
value = callPackage path { };
}
else
if type == "directory"
then
{
name = basename;
value = packagesFromDirectory path;
}
else
throw
''
lib.filesystem.packagesFromDirectoryRecursive: Unsupported file type ${type} at path ${toString subdirectory}
'';
# Transform a directory into a package (if there's a `package.nix`) or
# set of packages (otherwise).
packagesFromDirectory = path:
let
defaultPackagePath = path + "/package.nix";
in
if pathExists defaultPackagePath
then callPackage defaultPackagePath { }
else mapAttrs'
(directoryEntryToAttrPair path)
(packageDirectoryEntries path);
in
if pathIsRegularFile defaultPath then
# if `${directory}/package.nix` exists, call it directly
callPackage defaultPath {}
else lib.concatMapAttrs (name: type:
# otherwise, for each directory entry
let path = append directory name; in
if type == "directory" then {
# recurse into directories
"${name}" = packagesFromDirectoryRecursive {
inherit callPackage;
directory = path;
};
} else if type == "regular" && hasSuffix ".nix" name then {
# call .nix files
"${lib.removeSuffix ".nix" name}" = callPackage path {};
} else if type == "regular" then {
# ignore non-nix files
} else throw ''
lib.filesystem.packagesFromDirectoryRecursive: Unsupported file type ${type} at path ${toString path}
''
) (builtins.readDir directory);
packagesFromDirectory directory;
}

View File

@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: {
# the way the client parses things
# - Instead, we use `yq-go` to convert it to yaml
# Config validation needs to happen after yarnConfigHook, since it's what sets the yarn offline cache
postYarnConfigHook = lib.optional (settings != { }) ''
preBuild = lib.optional (settings != { }) ''
echo "Writing settings override..."
yq --output-format yml '${builtins.toFile "conf.json" ''${builtins.toJSON settings}''}' > user-data/conf.yml
yarn validate-config --offline

View File

@ -1,13 +1,13 @@
{ lib, stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
pname = "entt";
version = "3.13.2";
version = "3.14.0";
src = fetchFromGitHub {
owner = "skypjack";
repo = "entt";
rev = "v${version}";
hash = "sha256-botX9T9KEXbctI1hUOt983y2rtWDeXyTonGYpJ6eGr8=";
hash = "sha256-IPAM7fr/tvSOMKWUbXbloNAnlp5t7J0ynSsTMZ2jKYs=";
};
nativeBuildInputs = [ cmake ];

View File

@ -8,18 +8,18 @@
buildGoModule rec {
pname = "mercure";
version = "0.16.3";
version = "0.17.1";
src = fetchFromGitHub {
owner = "dunglas";
repo = "mercure";
rev = "v${version}";
hash = "sha256-mRBnjX9jXo2yoftDo8F6kNZeddFkFyUQ6eWxWoxzk2w=";
hash = "sha256-TRKlX4dNCvD9wBp+JNpmB9J1lt0Eyc0pQ/ucvtiDGto=";
};
sourceRoot = "${src.name}/caddy";
vendorHash = "sha256-ylPHBb/3lX9vwszyf7QzGPxGXE/Jt3cLKhsfmGMG8WM=";
vendorHash = "sha256-0tyvb11rBtrTbA+eAV1E5Y2tZeAwtrpONHBOLaVxuaQ=";
subPackages = [ "mercure" ];
excludedPackages = [ "../cmd/mercure" ];

View File

@ -1,6 +1,6 @@
import ./generic.nix {
major_version = "5";
minor_version = "2";
patch_version = "0";
sha256 = "sha256-L0v0efUUefm/jH8WlKbqcza793T0rW2mtZ0a1JOd2Kc=";
patch_version = "1";
sha256 = "sha256-Bs2noj15wdOzazqnKDpe1YeY3dhx8sJpcSYR3Gn1c7I=";
}

View File

@ -307,8 +307,8 @@ in {
};
ruby_3_2 = generic {
version = rubyVersion "3" "2" "5" "";
hash = "sha256-7wYQtJj2D7XP13tRrbPBD0yo7ZoXy4fGHlvqMUrDShY=";
version = rubyVersion "3" "2" "6" "";
hash = "sha256-2ctl7N8/GGaWOfJji2M3ntb7sX2Trk5ybU6yv2ikg3A=";
cargoHash = "sha256-6du7RJo0DH+eYMOoh3L31F3aqfR5+iG1iKauSV1uNcQ=";
};

View File

@ -25,6 +25,7 @@
"5.1.0" = "4.17.1-501";
"5.1.1" = "4.17.1-501";
"5.2.0" = "5.2.1-502";
"5.2.1" = "5.2.1-502";
}."${ocaml.version}"
}:

File diff suppressed because it is too large Load Diff

View File

@ -16,25 +16,25 @@
}:
rustPlatform.buildRustPackage rec {
pname = "edgedb";
version = "5.5.2";
version = "6.0.0";
src = fetchFromGitHub {
owner = "edgedb";
repo = "edgedb-cli";
rev = "refs/tags/v${version}";
hash = "sha256-CSs1Ql0zsGgSmZrlZIfj2pJdtAax7HUlfCq8oTbReng=";
hash = "sha256-GBtqAHmXHgsWRXelOQ9i3R0VL8OqcASfpWU/EJaimNo=";
fetchSubmodules = true;
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"edgedb-derive-0.5.2" = "sha256-5nvpkmTRcGO4a/Mc+qLp2+u9bWSnHQ/1NT2FW9ii0AU=";
"edgeql-parser-0.1.0" = "sha256-dhLwBW4ellai9R9TjlJ/qEhZQRXE9D/+QxZsq3I9PRk=";
"edgedb-derive-0.5.2" = "sha256-r1KWnIbX/TV2ZK/WXtYaNsGOqxMeykD1bgFyA992FGE=";
"edgeql-parser-0.1.0" = "sha256-qyY8mvZhLgQJgT7ZtxkyhpQMCLPGAIzw/E64rMiOAkw=";
"rexpect-0.5.0" = "sha256-vstAL/fJWWx7WbmRxNItKpzvgGF3SvJDs5isq9ym/OA=";
"scram-0.7.0" = "sha256-QTPxyXBpMXCDkRRJEMYly1GKp90khrwwuMI1eHc2H+Y=";
"serde_str-1.0.0" = "sha256-CMBh5lxdQb2085y0jc/DrV6B8iiXvVO2aoZH/lFFjak=";
"test-utils-0.1.0" = "sha256-FoF/U89Q9E2Dlmpoh+cfDcScmhcsSNut+rE7BECJSJI=";
"test-utils-0.1.0" = "sha256-u29t7o+iBw3ja0LdbsQVntQMm5j4a2pDIyDfAvDGHiI=";
"warp-0.3.6" = "sha256-knDt2aw/PJ0iabhKg+okwwnEzCY+vQVhE7HKCTM6QbE=";
};
};