mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-08 19:45:42 +03:00
Merge staging-next into staging
This commit is contained in:
commit
141c0ed100
22 changed files with 244 additions and 99 deletions
|
@ -209,6 +209,16 @@
|
|||
<link linkend="opt-services.opensnitch.rules">services.opensnitch.rules</link>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The module <literal>usbmuxd</literal> now has the ability to
|
||||
change the package used by the daemon. In case you’re
|
||||
experiencing issues with <literal>usbmuxd</literal> you can
|
||||
try an alternative program like <literal>usbmuxd2</literal>.
|
||||
Available as
|
||||
<link linkend="opt-services.usbmuxd.package">services.usbmuxd.package</link>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>services.mastodon</literal> gained a tootctl wrapped
|
||||
|
|
|
@ -61,6 +61,8 @@ In addition to numerous new and upgraded packages, this release has the followin
|
|||
|
||||
- The module for the application firewall `opensnitch` got the ability to configure rules. Available as [services.opensnitch.rules](#opt-services.opensnitch.rules)
|
||||
|
||||
- The module `usbmuxd` now has the ability to change the package used by the daemon. In case you're experiencing issues with `usbmuxd` you can try an alternative program like `usbmuxd2`. Available as [services.usbmuxd.package](#opt-services.usbmuxd.package)
|
||||
|
||||
- `services.mastodon` gained a tootctl wrapped named `mastodon-tootctl` similar to `nextcloud-occ` which can be executed from any user and switches to the configured mastodon user with sudo and sources the environment variables.
|
||||
|
||||
- The `dnsmasq` service now takes configuration via the
|
||||
|
|
|
@ -52,13 +52,11 @@ in
|
|||
environment.systemPackages = [ cfg.package ];
|
||||
environment.etc."man_db.conf".text =
|
||||
let
|
||||
mandbForBuild = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then
|
||||
cfg.package
|
||||
else
|
||||
pkgs.buildPackages.man-db;
|
||||
manualCache = pkgs.runCommand "man-cache" { } ''
|
||||
manualCache = pkgs.runCommand "man-cache" {
|
||||
nativeBuildInputs = [ cfg.package ];
|
||||
} ''
|
||||
echo "MANDB_MAP ${cfg.manualPages}/share/man $out" > man.conf
|
||||
${mandbForBuild}/bin/mandb -C man.conf -psc >/dev/null 2>&1
|
||||
mandb -C man.conf -psc >/dev/null 2>&1
|
||||
'';
|
||||
in
|
||||
''
|
||||
|
|
|
@ -1,10 +1,68 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
cfg = config.programs.nix-ld;
|
||||
|
||||
# TODO make glibc here configureable?
|
||||
nix-ld-so = pkgs.runCommand "ld.so" {} ''
|
||||
ln -s "$(cat '${pkgs.stdenv.cc}/nix-support/dynamic-linker')" $out
|
||||
'';
|
||||
|
||||
nix-ld-libraries = pkgs.buildEnv {
|
||||
name = "lb-library-path";
|
||||
pathsToLink = [ "/lib" ];
|
||||
paths = map lib.getLib cfg.libraries;
|
||||
extraPrefix = "/share/nix-ld";
|
||||
ignoreCollisions = true;
|
||||
};
|
||||
|
||||
# We currently take all libraries from systemd and nix as the default.
|
||||
# Is there a better list?
|
||||
baseLibraries = with pkgs; [
|
||||
zlib
|
||||
zstd
|
||||
stdenv.cc.cc
|
||||
curl
|
||||
openssl
|
||||
attr
|
||||
libssh
|
||||
bzip2
|
||||
libxml2
|
||||
acl
|
||||
libsodium
|
||||
util-linux
|
||||
xz
|
||||
systemd
|
||||
];
|
||||
in
|
||||
{
|
||||
meta.maintainers = [ lib.maintainers.mic92 ];
|
||||
options = {
|
||||
programs.nix-ld.enable = lib.mkEnableOption (lib.mdDoc ''nix-ld, Documentation: <https://github.com/Mic92/nix-ld>'');
|
||||
programs.nix-ld = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc ''nix-ld, Documentation: <https://github.com/Mic92/nix-ld>'');
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
description = lib.mdDoc "Which package to use for the nix-ld.";
|
||||
default = pkgs.nix-ld;
|
||||
defaultText = lib.mdDoc "pkgs.nix-ld";
|
||||
};
|
||||
libraries = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.package;
|
||||
description = lib.mdDoc "Libraries that automatically become available to all programs. The default set includes common libraries.";
|
||||
default = baseLibraries;
|
||||
defaultText = lib.mdDoc "baseLibraries";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.programs.nix-ld.enable {
|
||||
systemd.tmpfiles.packages = [ pkgs.nix-ld ];
|
||||
systemd.tmpfiles.packages = [ cfg.package ];
|
||||
|
||||
environment.systemPackages = [ nix-ld-libraries ];
|
||||
|
||||
environment.pathsToLink = [ "/share/nix-ld" ];
|
||||
|
||||
environment.variables = {
|
||||
NIX_LD = toString nix-ld-so;
|
||||
NIX_LD_LIBRARY_PATH = "/run/current-system/sw/share/nix-ld/lib";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ in
|
|||
|
||||
{
|
||||
options.services.usbmuxd = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
|
@ -39,6 +40,15 @@ in
|
|||
The group usbmuxd should use to run after startup.
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.usbmuxd;
|
||||
defaultText = literalExpression "pkgs.usbmuxd";
|
||||
description = lib.mdDoc "Which package to use for the usbmuxd daemon.";
|
||||
relatedPackages = [ "usbmuxd" "usbmuxd2" ];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -68,7 +78,7 @@ in
|
|||
# Trigger the udev rule manually. This doesn't require replugging the
|
||||
# device when first enabling the option to get it to work
|
||||
ExecStartPre = "${pkgs.udev}/bin/udevadm trigger -s usb -a idVendor=${apple}";
|
||||
ExecStart = "${pkgs.usbmuxd}/bin/usbmuxd -U ${cfg.user} -f";
|
||||
ExecStart = "${cfg.package}/bin/usbmuxd -U ${cfg.user} -v";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -12,9 +12,6 @@ import ./make-test-python.nix ({ lib, pkgs, ...} :
|
|||
};
|
||||
testScript = ''
|
||||
start_all()
|
||||
path = "${pkgs.stdenv.cc}/nix-support/dynamic-linker"
|
||||
with open(path) as f:
|
||||
real_ld = f.read().strip()
|
||||
machine.succeed(f"NIX_LD={real_ld} hello")
|
||||
machine.succeed("hello")
|
||||
'';
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue