Unverified Commit 2d27efd0 authored by nixpkgs-ci[bot]'s avatar nixpkgs-ci[bot] Committed by GitHub
Browse files

Merge master into staging-nixos

parents f8ca3c71 a6ef64ca
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -8757,6 +8757,12 @@
    githubId = 40620903;
    name = "figsoda";
  };
  fin-w = {
    email = "fin-w@tutanota.com";
    github = "fin-w";
    githubId = 41450706;
    name = "fin-w";
  };
  fionera = {
    email = "nix@fionera.de";
    github = "fionera";
+29 −8
Original line number Diff line number Diff line
{
  pkgs,
  lib,
  config,
  lib,
  pkgs,
  ...
}:

let
  cfg = config.services.devpi-server;

  cfg = config.services.devpi-server;
  package = cfg.package.override { inherit (cfg) extraPackages; };
  secretsFileName = "devpi-secret-file";

  stateDirName = "devpi";

  runtimeDir = "/run/${stateDirName}";
  serverDir = "/var/lib/${stateDirName}";

in

{

  options.services.devpi-server = {

    enable = lib.mkEnableOption "Devpi Server";

    package = lib.mkPackageOption pkgs "devpi-server" { };
@@ -57,6 +61,20 @@ in
      description = "The port on which Devpi Server will listen.";
    };

    extraPackages = lib.mkOption {
      default = (ps: [ ]);
      defaultText = lib.literalExpression "ps: [ ]";
      example = lib.literalExpression ''
        ps: with ps; [ devpi-web devpi-ldap ]
      '';
      type =
        with lib.types;
        coercedTo (listOf lib.types.package) (v: (_: v)) (functionTo (listOf lib.types.package));
      description = ''
        Plugins and extra Python packages to be available to devpi-server.
      '';
    };

    openFirewall = lib.mkEnableOption "opening the default ports in the firewall for Devpi Server";
  };

@@ -80,7 +98,7 @@ in
          # already initialized the package index, exit gracefully
          exit 0
        fi
        ${cfg.package}/bin/devpi-init --serverdir ${serverDir} ''
        ${package}/bin/devpi-init --serverdir ${serverDir} ''
      + lib.optionalString cfg.replica "--role=replica --master-url=${cfg.primaryUrl}";

      serviceConfig = {
@@ -109,7 +127,7 @@ in
                [ "--role=master" ]
            );
          in
          "${cfg.package}/bin/devpi-server ${lib.concatStringsSep " " args}";
          "${package}/bin/devpi-server ${lib.concatStringsSep " " args}";
        DynamicUser = true;
        StateDirectory = stateDirName;
        RuntimeDirectory = stateDirName;
@@ -125,5 +143,8 @@ in
    };
  };

  meta.maintainers = [ lib.maintainers.cafkafk ];
  meta.maintainers = with lib.maintainers; [
    cafkafk
    confus
  ];
}
+31 −17
Original line number Diff line number Diff line
@@ -17,24 +17,38 @@
        environment.IMMICH_LOG_LEVEL = "verbose";
      };

      services.postgresql.extensions = lib.mkForce (ps: [
        ps.pgvector
        # pin vectorchord to an older version simulate version bump
        (ps.vectorchord.overrideAttrs (prevAttrs': rec {
          version = "0.5.2";
      services.postgresql.extensions = lib.mkForce (
        ps:
        let
          # Pin vectorchord to an older version simulate version bump.
          # This version must have a different "schema" version than the latest version in nixpkgs.
          # See version number at https://github.com/tensorchord/VectorChord/blob/1.1.0/crates/vchordrq/src/tuples.rs#L23
          vectorchord =
            (ps.vectorchord.override {
              cargo-pgrx_0_17_0 = pkgs.cargo-pgrx_0_16_0;
            }).overrideAttrs
              (
                finalAttrs: _: {
                  version = "1.0.0";
                  src = pkgs.fetchFromGitHub {
                    owner = "tensorchord";
                    repo = "vectorchord";
            tag = version;
            hash = "sha256-KGwiY5t1ivFiYex3D20y3sdiu3CT9LCDd2fPnRE56jM=";
                    tag = finalAttrs.version;
                    hash = "sha256-+BOuiinbKPZZaDl9aYsIoZPgvLZ4FA6Rb4/W+lAz4so=";
                  };

                  cargoDeps = pkgs.rustPlatform.fetchCargoVendor {
            inherit src;
            hash = "sha256-Vn3c/xuUpQzERJ74I0qbvufTZtW3goefPa5B/nOUO48=";
                    inherit (finalAttrs) src;
                    hash = "sha256-kwe2x7OTjpdPonZsvnR1C/89D5W/R5JswYF79YcSFEA=";
                  };
        }))
      ]);
                }
              );
        in
        [
          ps.pgvector
          vectorchord
        ]
      );

      specialisation."immich-vectorchord-upgraded".configuration = {
        # needs to be lower than mkForce, otherwise it does not get rid of the previous version
+14 −3
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ let
        optional = false;
      };
    in
    map (x: defaultPlugin // (if (x ? plugin) then x else { plugin = x; })) plugins;
    map (x: defaultPlugin // (if x ? plugin then x else { plugin = x; })) plugins;

  pluginWithConfigType =
    with lib;
@@ -78,17 +78,26 @@ in

    userPluginViml = lib.mkOption {
      readOnly = true;
      type = lib.types.listOf (lib.types.lines);
      type = lib.types.listOf lib.types.lines;
      description = ''
        The viml config set by the user.
      '';
    };

    pluginPython3Packages = lib.mkOption {
      readOnly = true;
      type = lib.types.listOf (lib.types.functionTo (lib.types.listOf lib.types.package));
      example = lib.literalExpression "[ (ps: [ ps.python-language-server ]) ]";
      description = ''
        Packages required by the plugins to work with the python3 provider.
      '';
    };

  };

  config =
    let
      pluginsNormalized = normalizePlugins config.plugins;
      pluginsNormalized = config.plugins;
    in
    {
      pluginAdvisedLua =
@@ -111,5 +120,7 @@ in
      userPluginViml = lib.foldl (
        acc: p: if p.config != null then acc ++ [ p.config ] else acc
      ) [ ] pluginsNormalized;

      pluginPython3Packages = map (plugin: plugin.python3Dependencies or (_: [ ])) pluginsNormalized;
    };
}
+2 −7
Original line number Diff line number Diff line
@@ -99,24 +99,19 @@ let
        inherit plugins;
      };

      pluginsNormalized = normalizePlugins plugins;
      pluginsNormalized = checked_cfg.plugins;

      vimPackage = normalizedPluginsToVimPackage pluginsNormalized;

      getDeps = attrname: map (plugin: plugin.${attrname} or (_: [ ]));

      requiredPlugins = vimUtils.requiredPluginsForPackage vimPackage;
      pluginPython3Packages = getDeps "python3Dependencies" requiredPlugins;
    in
    {
      # plugins' python dependencies
      inherit pluginPython3Packages;

      # viml config set by the user along with the plugin
      inherit (checked_cfg)
        userPluginViml
        runtimeDeps
        pluginAdvisedLua
        pluginPython3Packages
        ;

      # A Vim "package", see ':h packages'
Loading