Unverified Commit 10b01dcc authored by Martin Weinelt's avatar Martin Weinelt
Browse files

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

Conflicts:
-	pkgs/development/python-modules/types-setuptools/default.nix
parents 3c4b68b5 fb8c64e6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1359,6 +1359,7 @@ in {
              ''
              else ''
                jq <${pkgs.writeText "database.yml" (builtins.toJSON databaseConfig)} \
                   '${if lib.versionAtLeast (lib.getVersion cfg.packages.gitlab) "15.9" then ".production.main as $main | del(.production.main) | .production |= {main: $main} + ." else ""}' \
                   >'${cfg.statePath}/config/database.yml'
              ''
            }
+0 −73
Original line number Diff line number Diff line
@@ -122,62 +122,8 @@ let
    };
  };

  # The current implementations of `doRename`,  `mkRenamedOptionModule` do not provide the full options path when used with submodules.
  # They would only show `settings.useacl' instead of `services.dokuwiki.sites."site1.local".settings.useacl'
  # The partial re-implementation of these functions is done to help users in debugging by showing the full path.
  mkRenamed = from: to: { config, options, name, ... }: let
    pathPrefix = [ "services" "dokuwiki" "sites" name ];
    fromPath = pathPrefix  ++ from;
    fromOpt = getAttrFromPath from options;
    toOp = getAttrsFromPath to config;
    toPath = pathPrefix ++ to;
  in {
    options = setAttrByPath from (mkOption {
      visible = false;
      description = lib.mdDoc "Alias of {option}${showOption toPath}";
      apply = x: builtins.trace "Obsolete option `${showOption fromPath}' is used. It was renamed to ${showOption toPath}" toOp;
    });
    config = mkMerge [
      {
        warnings = optional fromOpt.isDefined
          "The option `${showOption fromPath}' defined in ${showFiles fromOpt.files} has been renamed to `${showOption toPath}'.";
      }
      (lib.modules.mkAliasAndWrapDefsWithPriority (setAttrByPath to) fromOpt)
    ];
  };

  siteOpts = { options, config, lib, name, ... }:
    {
      imports = [
        (mkRenamed [ "aclUse" ] [ "settings" "useacl" ])
        (mkRenamed [ "superUser" ] [ "settings" "superuser" ])
        (mkRenamed [ "disableActions" ] [ "settings"  "disableactions" ])
        ({ config, options, ... }: let
          showPath = suffix: lib.options.showOption ([ "services" "dokuwiki" "sites" name ] ++ suffix);
          replaceExtraConfig = "Please use `${showPath ["settings"]}' to pass structured settings instead.";
          ecOpt = options.extraConfig;
          ecPath = showPath [ "extraConfig" ];
        in {
          options.extraConfig = mkOption {
            visible = false;
            apply = x: throw "The option ${ecPath} can no longer be used since it's been removed.\n${replaceExtraConfig}";
          };
          config.assertions = [
            {
              assertion = !ecOpt.isDefined;
              message = "The option definition `${ecPath}' in ${showFiles ecOpt.files} no longer has any effect; please remove it.\n${replaceExtraConfig}";
            }
            {
              assertion = config.mergedConfig.useacl -> (config.acl != null || config.aclFile != null);
              message = "Either ${showPath [ "acl" ]} or ${showPath [ "aclFile" ]} is mandatory if ${showPath [ "settings" "useacl" ]} is true";
            }
            {
              assertion = config.usersFile != null -> config.mergedConfig.useacl != false;
              message = "${showPath [ "settings" "useacl" ]} is required when ${showPath [ "usersFile" ]} is set (Currently defined as `${config.usersFile}' in ${showFiles options.usersFile.files}).";
            }
          ];
        })
      ];

      options = {
        enable = mkEnableOption (lib.mdDoc "DokuWiki web application");
@@ -392,21 +338,6 @@ let
          '';
        };

      # Required for the mkRenamedOptionModule
      # TODO: Remove me once https://github.com/NixOS/nixpkgs/issues/96006 is fixed
      # or we don't have any more notes about the removal of extraConfig, ...
      warnings = mkOption {
        type = types.listOf types.unspecified;
        default = [ ];
        visible = false;
        internal = true;
      };
      assertions = mkOption {
        type = types.listOf types.unspecified;
        default = [ ];
        visible = false;
        internal = true;
      };
    };
  };
in
@@ -440,10 +371,6 @@ in
  # implementation
  config = mkIf (eachSite != {}) (mkMerge [{

    warnings = flatten (mapAttrsToList (_: cfg: cfg.warnings) eachSite);

    assertions = flatten (mapAttrsToList (_: cfg: cfg.assertions) eachSite);

    services.phpfpm.pools = mapAttrs' (hostName: cfg: (
      nameValuePair "dokuwiki-${hostName}" {
        inherit user;
+2 −2
Original line number Diff line number Diff line
@@ -13,13 +13,13 @@

stdenv.mkDerivation rec {
  pname = "ft2-clone";
  version = "1.74";
  version = "1.75";

  src = fetchFromGitHub {
    owner = "8bitbubsy";
    repo = "ft2-clone";
    rev = "v${version}";
    hash = "sha256-plr5vmtYL0adeocY4/3hRI2RQ7lDkLvBbQPq2Jw6MvU=";
    hash = "sha256-K+RUsRr19fc0E9VhZWIawxkGXCTwqXl3a13pRiRxDPg=";
  };

  nativeBuildInputs = [ cmake ];
+40 −9
Original line number Diff line number Diff line
{ lib
, stdenv
, python3
, fetchFromGitHub
, fetchPypi
, curl
, wget
, git
, ripgrep
, postlight-parser
, readability-extractor
, chromium
, yt-dlp
}:

let
@@ -34,6 +43,8 @@ let
          rev = "e43f383dae3a35237e42f6acfe1207a8e7e7bdf5";
          hash = "sha256-NAMa78KhAuoJfp0Cb0Codz84sRfRQ1JhSLNYRI4GBPM=";
        };
        # possibly a real issue, but that version is not supported anymore
        disabledTests = [ "test_should_highlight_bash_syntax_without_name" ];
      });
    };
  };
@@ -41,31 +52,51 @@ in

python.pkgs.buildPythonApplication rec {
  pname = "archivebox";
  version = "0.6.2";
  version = "0.7.2";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    sha256 = "sha256-zHty7lTra6yab9d0q3EqsPG3F+lrnZL6PjQAbL1A2NY=";
    hash = "sha256-hdBUEX2tOWN2b11w6aG3x7MP7KQTj4Rwc2w8XvABGf4=";
  };

  nativeBuildInputs = with python.pkgs; [
    pdm-backend
  ];

  propagatedBuildInputs = with python.pkgs; [
    requests
    mypy-extensions
    croniter
    dateparser
    django
    django-extensions
    dateparser
    youtube-dl
    ipython
    mypy-extensions
    python-crontab
    croniter
    requests
    w3lib
    ipython
    yt-dlp
  ];

  makeWrapperArgs = [
    "--set USE_NODE True" # used through dependencies, not needed explicitly
    "--set READABILITY_BINARY ${lib.meta.getExe readability-extractor}"
    "--set MERCURY_BINARY ${lib.meta.getExe postlight-parser}"
    "--set CURL_BINARY ${lib.meta.getExe curl}"
    "--set RIPGREP_BINARY ${lib.meta.getExe ripgrep}"
    "--set WGET_BINARY ${lib.meta.getExe wget}"
    "--set GIT_BINARY ${lib.meta.getExe git}"
    "--set YOUTUBEDL_BINARY ${lib.meta.getExe yt-dlp}"
  ] ++ (if (lib.meta.availableOn stdenv.hostPlatform chromium) then [
    "--set CHROME_BINARY ${chromium}/bin/chromium-browser"
  ] else [
    "--set-default USE_CHROME False"
  ]);

  meta = with lib; {
    description = "Open source self-hosted web archiving";
    homepage = "https://archivebox.io";
    license = licenses.mit;
    maintainers = with maintainers; [ siraben ];
    maintainers = with maintainers; [ siraben viraptor ];
    platforms = platforms.unix;
  };
}
+9 −3
Original line number Diff line number Diff line
@@ -5,13 +5,13 @@

appimageTools.wrapAppImage rec {
  pname = "bazecor";
  version = "1.3.8";
  version = "1.3.9";

  src = appimageTools.extract {
    inherit pname version;
    src = fetchurl {
      url = "https://github.com/Dygmalab/Bazecor/releases/download/v${version}/Bazecor-${version}-x64.AppImage";
      hash = "sha256-SwlSH5z0p9ZVoDQzj4GxO3g/iHG8zQZndE4TmqdMtZQ=";
      hash = "sha256-qve5xxhhyVej8dPDkZ7QQdeDUmqGO4pHJTykbS4RhAk=";
    };

    # Workaround for https://github.com/Dygmalab/Bazecor/issues/370
@@ -26,7 +26,7 @@ appimageTools.wrapAppImage rec {

  # also make sure to update the udev rules in ./10-dygma.rules; most recently
  # taken from
  # https://github.com/Dygmalab/Bazecor/blob/v1.3.8/src/main/utils/udev.ts#L6
  # https://github.com/Dygmalab/Bazecor/blob/v1.3.9/src/main/utils/udev.ts#L6

  extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p) ++ [
    p.glib
@@ -39,6 +39,12 @@ appimageTools.wrapAppImage rec {
  extraInstallCommands = ''
    mv $out/bin/bazecor-* $out/bin/bazecor

    install -m 444 -D ${src}/Bazecor.desktop -t $out/share/applications
    substituteInPlace $out/share/applications/Bazecor.desktop \
      --replace 'Exec=Bazecor' 'Exec=bazecor'

    install -m 444 -D ${src}/bazecor.png -t $out/share/pixmaps

    mkdir -p $out/lib/udev/rules.d
    ln -s --target-directory=$out/lib/udev/rules.d ${./10-dygma.rules}
  '';
Loading