Unverified Commit a951f081 authored by github-actions[bot]'s avatar github-actions[bot] Committed by GitHub
Browse files

Merge master into staging-next

parents 159994ed 7746ea98
Loading
Loading
Loading
Loading
+46 −27
Original line number Diff line number Diff line
@@ -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 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}
        if type == "regular"
        then
        {
          name = removeSuffix ".nix" basename;
          value = callPackage path { };
        }
        else
        if type == "directory"
        then
        {
          name = basename;
          value = packagesFromDirectory path;
        }
        else
        throw
          ''
    ) (builtins.readDir directory);
            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
    packagesFromDirectory directory;
}
+1 −1
Original line number Diff line number Diff line
@@ -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
+2 −2
Original line number Diff line number Diff line
{ 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 ];
+3 −3
Original line number Diff line number Diff line
@@ -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" ];
+2 −2
Original line number Diff line number Diff line
import ./generic.nix {
  major_version = "5";
  minor_version = "2";
  patch_version = "0";
  sha256 = "sha256-L0v0efUUefm/jH8WlKbqcza793T0rW2mtZ0a1JOd2Kc=";
  patch_version = "1";
  sha256 = "sha256-Bs2noj15wdOzazqnKDpe1YeY3dhx8sJpcSYR3Gn1c7I=";
}
Loading