Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into staging-next
Browse files Browse the repository at this point in the history
  • Loading branch information
K900 committed Oct 28, 2024
2 parents dcd9458 + 703fc88 commit 66f01b7
Show file tree
Hide file tree
Showing 92 changed files with 1,477 additions and 2,576 deletions.
6 changes: 3 additions & 3 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/nim.section.md
- pkgs/development/compilers/nim/*
- pkgs/development/nim-packages/**/*
- pkgs/top-level/nim-packages.nix
- pkgs/build-support/build-nim-package.nix
- pkgs/by-name/ni/nim*
- pkgs/top-level/nim-overrides.nix

"6.topic: nodejs":
- any:
Expand Down
4 changes: 3 additions & 1 deletion ci/OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,9 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
/pkgs/by-name/ne/nemo-* @mkg20001

# nim
/pkgs/development/compilers/nim @ehmry
/doc/languages-frameworks/nim.section.md @ehmry
/pkgs/build-support/build-nim-package.nix @ehmry
/pkgs/top-level/nim-overrides.nix @ehmry

# terraform providers
/pkgs/applications/networking/cluster/terraform-providers @zowoq
Expand Down
10 changes: 5 additions & 5 deletions nixos/doc/manual/development/writing-nixos-tests.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,20 @@ nix-build -A nixosTests.hostname

### Testing outside the NixOS project {#sec-call-nixos-test-outside-nixos}

Outside the `nixpkgs` repository, you can instantiate the test by first importing the NixOS library,
Outside the `nixpkgs` repository, you can use the `runNixOSTest` function from
`pkgs.testers`:

```nix
let nixos-lib = import (nixpkgs + "/nixos/lib") { };
let pkgs = import <nixpkgs> {};
in
nixos-lib.runTest {
pkgs.testers.runNixOSTest {
imports = [ ./test.nix ];
hostPkgs = pkgs; # the Nixpkgs package set used outside the VMs
defaults.services.foo.package = mypkg;
}
```

`runTest` returns a derivation that runs the test.
`runNixOSTest` returns a derivation that runs the test.

## Configuring the nodes {#sec-nixos-test-nodes}

Expand Down
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2411.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,8 @@

- The arguments from [](#opt-services.postgresql.initdbArgs) now get shell-escaped.

- Mattermost has been updated from 9.5 to 9.11 ESR. See the [changelog](https://docs.mattermost.com/about/mattermost-v9-changelog.html#release-v9-11-extended-support-release) for more details.

- `cargo-tauri.hook` was introduced to help users build [Tauri](https://tauri.app/) projects. It is meant to be used alongside
`rustPlatform.buildRustPackage` and Node hooks such as `npmConfigHook`, `pnpm.configHook`, and the new `yarnConfig`

Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/programs/_1password.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ in
enable = lib.mkEnableOption "the 1Password CLI tool";

package = lib.mkPackageOption pkgs "1Password CLI" {
default = [ "_1password" ];
default = [ "_1password-cli" ];
};
};
};
Expand Down
19 changes: 10 additions & 9 deletions nixos/modules/programs/wayland/uwsm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,19 @@ in
systemd.packages = [ cfg.package ];
environment.pathsToLink = [ "/share/uwsm" ];

services.graphical-desktop.enable = true;

# UWSM recommends dbus broker for better compatibility
services.dbus.implementation = "broker";

services.displayManager.sessionPackages = lib.mapAttrsToList (
name: value:
mk_uwsm_desktop_entry {
inherit name;
inherit (value) prettyName comment binPath;
}
) cfg.waylandCompositors;
services.displayManager = {
enable = true;
sessionPackages = lib.mapAttrsToList (
name: value:
mk_uwsm_desktop_entry {
inherit name;
inherit (value) prettyName comment binPath;
}
) cfg.waylandCompositors;
};
};

meta.maintainers = with lib.maintainers; [
Expand Down
21 changes: 20 additions & 1 deletion nixos/modules/services/misc/calibre-server.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let
"--port" = cfg.port;
"--auth-mode" = cfg.auth.mode;
"--userdb" = cfg.auth.userDb;
}) ++ [(lib.optionalString (cfg.auth.enable == true) "--enable-auth")])
}) ++ [ (lib.optionalString (cfg.auth.enable == true) "--enable-auth") ] ++ cfg.extraFlags)
);
in

Expand Down Expand Up @@ -42,6 +42,15 @@ in
'';
};

extraFlags = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
description = ''
Extra flags to pass to the calibre-server command.
See the [calibre-server documentation](${generatedDocumentationLink}) for details.
'';
};

user = lib.mkOption {
type = lib.types.str;
default = "calibre-server";
Expand Down Expand Up @@ -73,6 +82,13 @@ in
'';
};

openFirewall = lib.mkOption {
type = lib.types.bool;
default = false;
description =
"Open ports in the firewall for the Calibre Server web interface.";
};

auth = {
enable = lib.mkOption {
type = lib.types.bool;
Expand Down Expand Up @@ -137,6 +153,9 @@ in
};
};

networking.firewall =
lib.mkIf cfg.openFirewall { allowedTCPPorts = [ cfg.port ]; };

};

meta.maintainers = with lib.maintainers; [ gaelreyrol ];
Expand Down
4 changes: 2 additions & 2 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -849,8 +849,8 @@ in {
qemu-vm-volatile-root = runTest ./qemu-vm-volatile-root.nix;
qemu-vm-external-disk-image = runTest ./qemu-vm-external-disk-image.nix;
qemu-vm-store = runTest ./qemu-vm-store.nix;
qgis = handleTest ./qgis.nix { qgisPackage = pkgs.qgis; };
qgis-ltr = handleTest ./qgis.nix { qgisPackage = pkgs.qgis-ltr; };
qgis = handleTest ./qgis.nix { package = pkgs.qgis; };
qgis-ltr = handleTest ./qgis.nix { package = pkgs.qgis-ltr; };
qownnotes = handleTest ./qownnotes.nix {};
qtile = handleTestOn ["x86_64-linux" "aarch64-linux"] ./qtile/default.nix {};
quake3 = handleTest ./quake3.nix {};
Expand Down
62 changes: 59 additions & 3 deletions nixos/tests/qgis.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import ./make-test-python.nix ({ pkgs, lib, qgisPackage, ... }:
import ./make-test-python.nix ({ pkgs, lib, package, ... }:
let
qgisPackage = package.override { withServer = true; };
testScript = pkgs.writeTextFile {
name = "qgis-test.py";
text = (builtins.readFile ../../pkgs/applications/gis/qgis/test.py);
Expand All @@ -12,19 +13,74 @@ import ./make-test-python.nix ({ pkgs, lib, qgisPackage, ... }:
};

nodes = {
machine = { pkgs, ... }: {
machine = { config, pkgs, ... }:

let
qgisServerUser = config.services.nginx.user;
qgisServerSocket = "/run/qgis_mapserv.socket";
in
{
virtualisation.diskSize = 2 * 1024;

imports = [ ./common/x11.nix ];
environment.systemPackages = [ qgisPackage ];
environment.systemPackages = [
qgisPackage
];

systemd.sockets.qgis-server = {
listenStreams = [ qgisServerSocket ];
socketConfig = {
Accept = false;
SocketUser = qgisServerUser;
SocketMode = 0600;
};
wantedBy = ["sockets.target" "qgis-server.service"];
before = [ "qgis-server.service" ];
};

systemd.services.qgis-server = {
description = "QGIS server";
serviceConfig = {
User = qgisServerUser;
StandardOutput = "null";
StandardError = "journal";
StandardInput = "socket";
Environment = [
"QT_QPA_PLATFORM_PLUGIN_PATH=${pkgs.libsForQt5.qt5.qtbase}/${pkgs.libsForQt5.qt5.qtbase.qtPluginPrefix}/platforms"
"QGIS_SERVER_LOG_LEVEL=0"
"QGIS_SERVER_LOG_STDERR=1"
];
ExecStart = "${qgisPackage}/lib/cgi-bin/qgis_mapserv.fcgi";
};
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
};

services.nginx = {
enable = true;
virtualHosts."qgis" = {
locations."~".extraConfig = ''
gzip off;
include ${pkgs.nginx}/conf/fastcgi_params;
include ${pkgs.nginx}/conf/fastcgi.conf;
fastcgi_pass unix:${qgisServerSocket};
'';
};
};
};
};

testScript = ''
start_all()
# test desktop
machine.succeed("${qgisPackage}/bin/qgis --version | grep 'QGIS ${qgisPackage.version}'")
machine.succeed("${qgisPackage}/bin/qgis --code ${testScript}")
# test server
machine.succeed("${qgisPackage}/bin/qgis_mapserver --version | grep 'QGIS ${qgisPackage.version}'")
machine.succeed("curl --head http://localhost | grep 'Server:.*${qgisPackage.version}'")
machine.succeed("curl http://localhost/index.json | grep 'Landing page as JSON'")
'';
})
25 changes: 14 additions & 11 deletions pkgs/applications/editors/vim/plugins/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2008,20 +2008,23 @@ in
meta.homepage = "https://github.com/ackyshake/Spacegray.vim/";
};

sqlite-lua = super.sqlite-lua.overrideAttrs (oa: {
postPatch =
let
libsqlite = "${sqlite.out}/lib/libsqlite3${stdenv.hostPlatform.extensions.sharedLibrary}";
in
''
sqlite-lua = super.sqlite-lua.overrideAttrs (
oa:
let
libsqlite = "${sqlite.out}/lib/libsqlite3${stdenv.hostPlatform.extensions.sharedLibrary}";
in
{
postPatch = ''
substituteInPlace lua/sqlite/defs.lua \
--replace "path = vim.g.sqlite_clib_path" "path = vim.g.sqlite_clib_path or ${lib.escapeShellArg libsqlite}"
--replace-fail "path = vim.g.sqlite_clib_path" "path = vim.g.sqlite_clib_path or '${lib.escapeShellArg libsqlite}'"
'';

passthru = oa.passthru // {
initLua = ''vim.g.sqlite_clib_path = "${sqlite.out}/lib/libsqlite3${stdenv.hostPlatform.extensions.sharedLibrary}"'';
};
});
passthru = oa.passthru // {
initLua = ''vim.g.sqlite_clib_path = "${libsqlite}"'';
};
nvimRequireCheck = "sqlite";
}
);

ssr = super.ssr-nvim.overrideAttrs {
dependencies = with self; [ nvim-treesitter ];
Expand Down
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 @@ -4585,8 +4585,8 @@ let
mktplcRef = {
name = "svelte-vscode";
publisher = "svelte";
version = "108.3.3";
hash = "sha256-q7w8DPzBLpD+13v7RnyDdC3ocDKAihHBVt3pnwSTwio=";
version = "109.1.0";
hash = "sha256-ozD9k/zfklwBJtc1WdC52hgJckxBgVRmcZOwSYboACM=";
};
meta = {
changelog = "https://github.com/sveltejs/language-tools/releases";
Expand Down
2 changes: 2 additions & 0 deletions pkgs/applications/gis/qgis/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@

# unwrapped package parameters
, withGrass ? false
, withServer ? false
, withWebKit ? false
}:
let
qgis-unwrapped = libsForQt5.callPackage ./unwrapped.nix {
withGrass = withGrass;
withServer = withServer;
withWebKit = withWebKit;
};
in symlinkJoin rec {
Expand Down
2 changes: 2 additions & 0 deletions pkgs/applications/gis/qgis/ltr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@

# unwrapped package parameters
, withGrass ? false
, withServer ? false
, withWebKit ? false
}:
let
qgis-ltr-unwrapped = libsForQt5.callPackage ./unwrapped-ltr.nix {
withGrass = withGrass;
withServer = withServer;
withWebKit = withWebKit;
};
in symlinkJoin rec {
Expand Down
6 changes: 5 additions & 1 deletion pkgs/applications/gis/qgis/unwrapped-ltr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
, wrapQtAppsHook

, withGrass
, withServer
, withWebKit

, bison
Expand Down Expand Up @@ -155,7 +156,10 @@ in mkDerivation rec {
"-DWITH_PDAL=True"
"-DENABLE_TESTS=False"
] ++ lib.optional (!withWebKit) "-DWITH_QTWEBKIT=OFF"
++ lib.optional withGrass (let
++ lib.optional withServer [
"-DWITH_SERVER=True"
"-DQGIS_CGIBIN_SUBDIR=${placeholder "out"}/lib/cgi-bin"
] ++ lib.optional withGrass (let
gmajor = lib.versions.major grass.version;
gminor = lib.versions.minor grass.version;
in "-DGRASS_PREFIX${gmajor}=${grass}/grass${gmajor}${gminor}"
Expand Down
6 changes: 5 additions & 1 deletion pkgs/applications/gis/qgis/unwrapped.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
, wrapQtAppsHook

, withGrass
, withServer
, withWebKit

, bison
Expand Down Expand Up @@ -157,7 +158,10 @@ in mkDerivation rec {
"-DENABLE_TESTS=False"
"-DQT_PLUGINS_DIR=${qtbase}/${qtbase.qtPluginPrefix}"
] ++ lib.optional (!withWebKit) "-DWITH_QTWEBKIT=OFF"
++ lib.optional withGrass (let
++ lib.optional withServer [
"-DWITH_SERVER=True"
"-DQGIS_CGIBIN_SUBDIR=${placeholder "out"}/lib/cgi-bin"
] ++ lib.optional withGrass (let
gmajor = lib.versions.major grass.version;
gminor = lib.versions.minor grass.version;
in "-DGRASS_PREFIX${gmajor}=${grass}/grass${gmajor}${gminor}"
Expand Down
Loading

0 comments on commit 66f01b7

Please sign in to comment.