Merge master into haskell-updates

This commit is contained in:
github-actions[bot] 2024-01-23 00:13:24 +00:00 committed by GitHub
commit e6af56d8dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
277 changed files with 11353 additions and 6637 deletions

3
.github/CODEOWNERS vendored
View File

@ -51,7 +51,7 @@
/pkgs/build-support/setup-hooks/auto-patchelf.py @layus
/pkgs/pkgs-lib @infinisil
## Format generators/serializers
/pkgs/pkgs-lib/formats/libconfig @ckiee
/pkgs/pkgs-lib/formats/libconfig @ckiee @h7x4
# pkgs/by-name
/pkgs/test/nixpkgs-check-by-name @infinisil
@ -84,7 +84,6 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @raitobezarius
/nixos/README.md @infinisil
/pkgs/README.md @infinisil
/maintainers/README.md @infinisil
/maintainers/* @piegamesde @Janik-Haag
# User-facing development documentation
/doc/development.md @infinisil

View File

@ -12,20 +12,6 @@ Both functions have an argument `kernelPatches` which should be a list of `{name
The kernel derivation created with `pkgs.buildLinux` exports an attribute `features` specifying whether optional functionality is or isnt enabled. This is used in NixOS to implement kernel-specific behaviour.
:::{.example #ex-skip-package-from-kernel-feature}
# Skipping an external package because of a kernel feature
For instance, if the kernel has the `iwlwifi` feature (i.e., has built-in support for Intel wireless chipsets), then NixOS doesnt have to build the external `iwlwifi` package:
```nix
modulesTree = [kernel]
++ pkgs.lib.optional (!kernel.features ? iwlwifi) kernelPackages.iwlwifi
++ ...;
```
:::
If you are using a kernel packaged in Nixpkgs, you can customize it by overriding its arguments. For details on how each argument affects the generated kernel, refer to [the `pkgs.buildLinux` source code](https://github.com/NixOS/nixpkgs/blob/d77bda728d5041c1294a68fb25c79e2d161f62b9/pkgs/os-specific/linux/kernel/generic.nix).
:::{.example #ex-overriding-kernel-derivation}

View File

@ -19316,6 +19316,11 @@
githubId = 1607770;
name = "Ulrik Strid";
};
umlx5h = {
github = "umlx5h";
githubId = 20206121;
name = "umlx5h";
};
unclamped = {
name = "Maru";
email = "clear6860@tutanota.com";

View File

@ -29,6 +29,7 @@ profiles/graphical.section.md
profiles/hardened.section.md
profiles/headless.section.md
profiles/installation-device.section.md
profiles/perlless.section.md
profiles/minimal.section.md
profiles/qemu-guest.section.md
```

View File

@ -0,0 +1,11 @@
# Perlless {#sec-perlless}
::: {.warning}
If you enable this profile, you will NOT be able to switch to a new
configuration and thus you will not be able to rebuild your system with
nixos-rebuild!
:::
Render your system completely perlless (i.e. without the perl interpreter). This
includes a mechanism so that your build fails if it contains a Nix store path
that references the string "perl".

View File

@ -89,3 +89,18 @@ A user can be deleted using `userdel`:
The flag `-r` deletes the user's home directory. Accounts can be
modified using `usermod`. Unix groups can be managed using `groupadd`,
`groupmod` and `groupdel`.
## Create users and groups with `systemd-sysusers` {#sec-systemd-sysusers}
::: {.note}
This is experimental.
:::
Instead of using a custom perl script to create users and groups, you can use
systemd-sysusers:
```nix
systemd.sysusers.enable = true;
```
The primary benefit of this is to remove a dependency on perl.

View File

@ -0,0 +1,36 @@
# `/etc` via overlay filesystem {#sec-etc-overlay}
::: {.note}
This is experimental and requires a kernel version >= 6.6 because it uses
new overlay features and relies on the new mount API.
:::
Instead of using a custom perl script to activate `/etc`, you activate it via an
overlay filesystem:
```nix
system.etc.overlay.enable = true;
```
Using an overlay has two benefits:
1. it removes a dependency on perl
2. it makes activation faster (up to a few seconds)
By default, the `/etc` overlay is mounted writable (i.e. there is a writable
upper layer). However, you can also mount `/etc` immutably (i.e. read-only) by
setting:
```nix
system.etc.overlay.mutable = false;
```
The overlay is atomically replaced during system switch. However, files that
have been modified will NOT be overwritten. This is the biggest change compared
to the perl-based system.
If you manually make changes to `/etc` on your system and then switch to a new
configuration where `system.etc.overlay.mutable = false;`, you will not be able
to see the previously made changes in `/etc` anymore. However the changes are
not completely gone, they are still in the upperdir of the previous overlay in
`/.rw-etc/upper`.

View File

@ -56,4 +56,5 @@ explained in the next sections.
unit-handling.section.md
activation-script.section.md
non-switchable-systems.section.md
etc-overlay.section.md
```

View File

@ -18,6 +18,22 @@ In addition to numerous new and upgraded packages, this release has the followin
- Julia environments can now be built with arbitrary packages from the ecosystem using the `.withPackages` function. For example: `julia.withPackages ["Plots"]`.
- A new option `systemd.sysusers.enable` was added. If enabled, users and
groups are created with systemd-sysusers instead of with a custom perl script.
- A new option `system.etc.overlay.enable` was added. If enabled, `/etc` is
mounted via an overlayfs instead of being created by a custom perl script.
- It is now possible to have a completely perlless system (i.e. a system
without perl). Previously, the NixOS activation depended on two perl scripts
which can now be replaced via an opt-in mechanism. To make your system
perlless, you can use the new perlless profile:
```
{ modulesPath, ... }: {
imports = [ "${modulesPath}/profiles/perlless.nix" ];
}
```
## New Services {#sec-release-24.05-new-services}
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
@ -121,12 +137,22 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
We have added a warning for services that are
`after = [ "network-online.target" ]` but do not depend on it (e.g. using `wants`).
- `services.archisteamfarm` no longer uses the abbreviation `asf` for its state directory (`/var/lib/asf`), user and group (both `asf`). Instead the long name `archisteamfarm` is used.
Configurations with `system.stateVersion` 23.11 or earlier, default to the old stateDirectory until the 24.11 release and must either set the option explicitly or move the data to the new directory.
- `networking.iproute2.enable` now does not set `environment.etc."iproute2/rt_tables".text`.
Setting `environment.etc."iproute2/{CONFIG_FILE_NAME}".text` will override the whole configuration file instead of appending it to the upstream configuration file.
`CONFIG_FILE_NAME` includes `bpf_pinning`, `ematch_map`, `group`, `nl_protos`, `rt_dsfield`, `rt_protos`, `rt_realms`, `rt_scopes`, and `rt_tables`.
- `netbox` was updated to v3.7. `services.netbox.package` still defaults
to v3.6 if `stateVersion` is earlier than 24.05. Refer to upstream's breaking
changes [for
v3.7.0](https://github.com/netbox-community/netbox/releases/tag/v3.7.0) and
upgrade NetBox by changing `services.netbox.package`. Database migrations
will be run automatically.
- The executable file names for `firefox-devedition`, `firefox-beta`, `firefox-esr` now matches their package names, which is consistent with the `firefox-*-bin` packages. The desktop entries are also updated so that you can have multiple editions of firefox in your app launcher.
- switch-to-configuration does not directly call systemd-tmpfiles anymore.

View File

@ -685,7 +685,7 @@ in {
shadow.gid = ids.gids.shadow;
};
system.activationScripts.users = {
system.activationScripts.users = if !config.systemd.sysusers.enable then {
supportsDryActivation = true;
text = ''
install -m 0700 -d /root
@ -694,7 +694,7 @@ in {
${pkgs.perl.withPackages (p: [ p.FileSlurp p.JSON ])}/bin/perl \
-w ${./update-users-groups.pl} ${spec}
'';
};
} else ""; # keep around for backwards compatibility
system.activationScripts.update-lingering = let
lingerDir = "/var/lib/systemd/linger";
@ -711,7 +711,9 @@ in {
'';
# Warn about user accounts with deprecated password hashing schemes
system.activationScripts.hashes = {
# This does not work when the users and groups are created by
# systemd-sysusers because the users are created too late then.
system.activationScripts.hashes = if !config.systemd.sysusers.enable then {
deps = [ "users" ];
text = ''
users=()
@ -729,7 +731,7 @@ in {
printf ' - %s\n' "''${users[@]}"
fi
'';
};
} else ""; # keep around for backwards compatibility
# for backwards compatibility
system.activationScripts.groups = stringAfter [ "users" ] "";

View File

@ -506,7 +506,7 @@
./services/editors/haste.nix
./services/editors/infinoted.nix
./services/finance/odoo.nix
./services/games/asf.nix
./services/games/archisteamfarm.nix
./services/games/crossfire-server.nix
./services/games/deliantra-server.nix
./services/games/factorio.nix
@ -1468,6 +1468,7 @@
./system/boot/stratisroot.nix
./system/boot/modprobe.nix
./system/boot/networkd.nix
./system/boot/uki.nix
./system/boot/unl0kr.nix
./system/boot/plymouth.nix
./system/boot/resolved.nix
@ -1488,6 +1489,7 @@
./system/boot/systemd/repart.nix
./system/boot/systemd/shutdown.nix
./system/boot/systemd/sysupdate.nix
./system/boot/systemd/sysusers.nix
./system/boot/systemd/tmpfiles.nix
./system/boot/systemd/user.nix
./system/boot/systemd/userdbd.nix

View File

@ -0,0 +1,31 @@
# WARNING: If you enable this profile, you will NOT be able to switch to a new
# configuration and thus you will not be able to rebuild your system with
# nixos-rebuild!
{ lib, ... }:
{
# Disable switching to a new configuration. This is not a necessary
# limitation of a perlless system but just a current one. In the future,
# perlless switching might be possible.
system.switch.enable = lib.mkDefault false;
# Remove perl from activation
boot.initrd.systemd.enable = lib.mkDefault true;
system.etc.overlay.enable = lib.mkDefault true;
systemd.sysusers.enable = lib.mkDefault true;
# Random perl remnants
system.disableInstallerTools = lib.mkDefault true;
programs.less.lessopen = lib.mkDefault null;
programs.command-not-found.enable = lib.mkDefault false;
boot.enableContainers = lib.mkDefault false;
environment.defaultPackages = lib.mkDefault [ ];
documentation.info.enable = lib.mkDefault false;
# Check that the system does not contain a Nix store path that contains the
# string "perl".
system.forbiddenDependenciesRegex = "perl";
}

View File

@ -267,8 +267,7 @@ in {
systemd.services.buildbot-master = {
description = "Buildbot Continuous Integration Server.";
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = cfg.packages ++ cfg.pythonPackages python.pkgs;
environment.PYTHONPATH = "${python.withPackages (self: cfg.pythonPackages self ++ [ package ])}/${python.sitePackages}";

View File

@ -1,13 +1,11 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.archisteamfarm;
format = pkgs.formats.json { };
asf-config = format.generate "ASF.json" (cfg.settings // {
configFile = format.generate "ASF.json" (cfg.settings // {
# we disable it because ASF cannot update itself anyways
# and nixos takes care of restarting the service
# is in theory not needed as this is already the default for default builds
@ -30,8 +28,8 @@ let
in
{
options.services.archisteamfarm = {
enable = mkOption {
type = types.bool;
enable = lib.mkOption {
type = lib.types.bool;
description = lib.mdDoc ''
If enabled, starts the ArchisSteamFarm service.
For configuring the SteamGuard token you will need to use the web-ui, which is enabled by default over on 127.0.0.1:1242.
@ -40,14 +38,14 @@ in
default = false;
};
web-ui = mkOption {
type = types.submodule {
web-ui = lib.mkOption {
type = lib.types.submodule {
options = {
enable = mkEnableOption "" // {
enable = lib.mkEnableOption "" // {
description = lib.mdDoc "Whether to start the web-ui. This is the preferred way of configuring things such as the steam guard token.";
};
package = mkPackageOption pkgs [ "ArchiSteamFarm" "ui" ] {
package = lib.mkPackageOption pkgs [ "ArchiSteamFarm" "ui" ] {
extraDescription = ''
::: {.note}
Contents must be in lib/dist
@ -65,7 +63,7 @@ in
description = lib.mdDoc "The Web-UI hosted on 127.0.0.1:1242.";
};
package = mkPackageOption pkgs "ArchiSteamFarm" {
package = lib.mkPackageOption pkgs "ArchiSteamFarm" {
extraDescription = ''
::: {.warning}
Should always be the latest version, for security reasons,
@ -74,15 +72,15 @@ in
'';
};
dataDir = mkOption {
type = types.path;
default = "/var/lib/asf";
dataDir = lib.mkOption {
type = lib.types.path;
default = "/var/lib/archisteamfarm";
description = lib.mdDoc ''
The ASF home directory used to store all data.
If left as the default value this directory will automatically be created before the ASF server starts, otherwise the sysadmin is responsible for ensuring the directory exists with appropriate ownership and permissions.'';
};
settings = mkOption {
settings = lib.mkOption {
type = format.type;
description = lib.mdDoc ''
The ASF.json file, all the options are documented [here](https://github.com/JustArchiNET/ArchiSteamFarm/wiki/Configuration#global-config).
@ -96,13 +94,13 @@ in
default = { };
};
ipcPasswordFile = mkOption {
type = types.nullOr types.path;
ipcPasswordFile = lib.mkOption {
type = with lib.types; nullOr path;
default = null;
description = lib.mdDoc "Path to a file containing the password. The file must be readable by the `asf` user/group.";
description = lib.mdDoc "Path to a file containing the password. The file must be readable by the `archisteamfarm` user/group.";
};
ipcSettings = mkOption {
ipcSettings = lib.mkOption {
type = format.type;
description = lib.mdDoc ''
Settings to write to IPC.config.
@ -120,25 +118,25 @@ in
default = { };
};
bots = mkOption {
type = types.attrsOf (types.submodule {
bots = lib.mkOption {
type = lib.types.attrsOf (lib.types.submodule {
options = {
username = mkOption {
type = types.str;
username = lib.mkOption {
type = lib.types.str;
description = lib.mdDoc "Name of the user to log in. Default is attribute name.";
default = "";
};
passwordFile = mkOption {
type = types.path;
description = lib.mdDoc "Path to a file containing the password. The file must be readable by the `asf` user/group.";
passwordFile = lib.mkOption {
type = lib.types.path;
description = lib.mdDoc "Path to a file containing the password. The file must be readable by the `archisteamfarm` user/group.";
};
enabled = mkOption {
type = types.bool;
enabled = lib.mkOption {
type = lib.types.bool;
default = true;
description = lib.mdDoc "Whether to enable the bot on startup.";
};
settings = mkOption {
type = types.attrs;
settings = lib.mkOption {
type = lib.types.attrs;
description = lib.mdDoc ''
Additional settings that are documented [here](https://github.com/JustArchiNET/ArchiSteamFarm/wiki/Configuration#bot-config).
'';
@ -152,7 +150,7 @@ in
example = {
exampleBot = {
username = "alice";
passwordFile = "/var/lib/asf/secrets/password";
passwordFile = "/var/lib/archisteamfarm/secrets/password";
settings = { SteamParentalCode = "1234"; };
};
};
@ -160,32 +158,34 @@ in
};
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
# TODO: drop with 24.11
services.archisteamfarm.dataDir = lib.mkIf (lib.versionAtLeast config.system.stateVersion "24.05") (lib.mkDefault "/var/lib/asf");
users = {
users.asf = {
users.archisteamfarm = {
home = cfg.dataDir;
isSystemUser = true;
group = "asf";
group = "archisteamfarm";
description = "Archis-Steam-Farm service user";
};
groups.asf = { };
groups.archisteamfarm = { };
};
systemd.services = {
asf = {
archisteamfarm = {
description = "Archis-Steam-Farm Service";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = mkMerge [
(mkIf (cfg.dataDir == "/var/lib/asf") {
StateDirectory = "asf";
serviceConfig = lib.mkMerge [
(lib.mkIf (lib.hasPrefix "/var/lib/" cfg.dataDir) {
StateDirectory = lib.last (lib.splitString "/" cfg.dataDir);
StateDirectoryMode = "700";
})
{
User = "asf";
Group = "asf";
User = "archisteamfarm";
Group = "archisteamfarm";
WorkingDirectory = cfg.dataDir;
Type = "simple";
ExecStart = "${lib.getExe cfg.package} --no-restart --process-required --service --system-required --path ${cfg.dataDir}";
@ -217,12 +217,10 @@ in
RestrictNamespaces = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
SystemCallArchitectures = "native";
UMask = "0077";
# we luckily already have systemd v247+
SecureBits = "noroot-locked";
SystemCallArchitectures = "native";
SystemCallFilter = [ "@system-service" "~@privileged" ];
UMask = "0077";
}
];
@ -232,7 +230,7 @@ in
mkdir -p $out
# clean potential removed bots
rm -rf $out/*.json
for i in ${strings.concatStringsSep " " (lists.map (x: "${getName x},${x}") (attrsets.mapAttrsToList mkBot cfg.bots))}; do IFS=",";
for i in ${lib.concatStringsSep " " (map (x: "${lib.getName x},${x}") (lib.mapAttrsToList mkBot cfg.bots))}; do IFS=",";
set -- $i
ln -fs $2 $out/$1
done
@ -242,22 +240,22 @@ in
''
mkdir -p config
cp --no-preserve=mode ${asf-config} config/ASF.json
cp --no-preserve=mode ${configFile} config/ASF.json
${optionalString (cfg.ipcPasswordFile != null) ''
${lib.optionalString (cfg.ipcPasswordFile != null) ''
${replaceSecretBin} '#ipcPassword#' '${cfg.ipcPasswordFile}' config/ASF.json
''}
${optionalString (cfg.ipcSettings != {}) ''
${lib.optionalString (cfg.ipcSettings != {}) ''
ln -fs ${ipc-config} config/IPC.config
''}
${optionalString (cfg.ipcSettings != {}) ''
${lib.optionalString (cfg.ipcSettings != {}) ''
ln -fs ${createBotsScript}/* config/
''}
rm -f www
${optionalString cfg.web-ui.enable ''
${lib.optionalString cfg.web-ui.enable ''
ln -s ${cfg.web-ui.package}/ www
''}
'';
@ -267,6 +265,6 @@ in
meta = {
buildDocsInSandbox = false;
maintainers = with maintainers; [ lom SuperSandro2000 ];
maintainers = with lib.maintainers; [ lom SuperSandro2000 ];
};
}

View File

@ -119,10 +119,9 @@ let
''
plugin {
sieve_plugins = ${concatStringsSep " " cfg.sieve.plugins}
sieve_extensions = ${concatStringsSep " " (map (el: "+${el}") cfg.sieve.extensions)}
sieve_global_extensions = ${concatStringsSep " " (map (el: "+${el}") cfg.sieve.globalExtensions)}
''
(optionalString (cfg.sieve.extensions != []) ''sieve_extensions = ${concatMapStringsSep " " (el: "+${el}") cfg.sieve.extensions}'')
(optionalString (cfg.sieve.globalExtensions != []) ''sieve_global_extensions = ${concatMapStringsSep " " (el: "+${el}") cfg.sieve.globalExtensions}'')
(optionalString (cfg.imapsieve.mailbox != []) ''
${
concatStringsSep "\n" (flatten (imap1 (

View File

@ -1,7 +1,5 @@
{ config, lib, ... }:
with lib;
let
cfg = config.nix.gc;
in
@ -14,14 +12,14 @@ in
nix.gc = {
automatic = mkOption {
automatic = lib.mkOption {
default = false;
type = types.bool;
type = lib.types.bool;
description = lib.mdDoc "Automatically run the garbage collector at a specific time.";
};
dates = mkOption {
type = types.str;
dates = lib.mkOption {
type = lib.types.singleLineStr;
default = "03:15";
example = "weekly";
description = lib.mdDoc ''
@ -33,9 +31,9 @@ in
'';
};
randomizedDelaySec = mkOption {
randomizedDelaySec = lib.mkOption {
default = "0";
type = types.str;
type = lib.types.singleLineStr;
example = "45min";
description = lib.mdDoc ''
Add a randomized delay before each garbage collection.
@ -45,9 +43,9 @@ in
'';
};
persistent = mkOption {
persistent = lib.mkOption {
default = true;
type = types.bool;
type = lib.types.bool;
example = false;
description = lib.mdDoc ''
Takes a boolean argument. If true, the time when the service
@ -61,10 +59,10 @@ in
'';
};
options = mkOption {
options = lib.mkOption {
default = "";
example = "--max-freed $((64 * 1024**3))";
type = types.str;
type = lib.types.singleLineStr;
description = lib.mdDoc ''
Options given to {file}`nix-collect-garbage` when the
garbage collector is run automatically.
@ -89,7 +87,8 @@ in
systemd.services.nix-gc = lib.mkIf config.nix.enable {
description = "Nix Garbage Collector";
script = "exec ${config.nix.package.out}/bin/nix-collect-garbage ${cfg.options}";
startAt = optional cfg.automatic cfg.dates;
serviceConfig.Type = "oneshot";
startAt = lib.optional cfg.automatic cfg.dates;
};
systemd.timers.nix-gc = lib.mkIf cfg.automatic {

View File

@ -18,6 +18,13 @@ in
<http://bird.network.cz/>
'';
};
autoReload = mkOption {
type = types.bool;
default = true;
description = lib.mdDoc ''
Whether bird2 should be automatically reloaded when the configuration changes.
'';
};
checkConfig = mkOption {
type = types.bool;
default = true;
@ -68,7 +75,7 @@ in
systemd.services.bird2 = {
description = "BIRD Internet Routing Daemon";
wantedBy = [ "multi-user.target" ];
reloadTriggers = [ config.environment.etc."bird/bird2.conf".source ];
reloadTriggers = lib.optional cfg.autoReload config.environment.etc."bird/bird2.conf".source;
serviceConfig = {
Type = "forking";
Restart = "on-failure";

View File

@ -59,9 +59,11 @@ let
${optionalString i.vmacXmitBase "vmac_xmit_base"}
${optionalString (i.unicastSrcIp != null) "unicast_src_ip ${i.unicastSrcIp}"}
unicast_peer {
${concatStringsSep "\n" i.unicastPeers}
}
${optionalString (builtins.length i.unicastPeers > 0) ''
unicast_peer {
${concatStringsSep "\n" i.unicastPeers}
}
''}
virtual_ipaddress {
${concatMapStringsSep "\n" virtualIpLine i.virtualIps}
@ -138,6 +140,7 @@ let
in
{
meta.maintainers = [ lib.maintainers.raitobezarius ];
options = {
services.keepalived = {

View File

@ -95,6 +95,7 @@ in
uid = config.ids.uids.messagebus;
description = "D-Bus system message bus daemon user";
home = homeDir;
homeMode = "0755";
group = "messagebus";
};

View File

@ -75,13 +75,17 @@ in {
package = lib.mkOption {
type = lib.types.package;
default =
if lib.versionAtLeast config.system.stateVersion "23.11"
if lib.versionAtLeast config.system.stateVersion "24.05"
then pkgs.netbox_3_7
else if lib.versionAtLeast config.system.stateVersion "23.11"
then pkgs.netbox_3_6
else if lib.versionAtLeast config.system.stateVersion "23.05"
then pkgs.netbox_3_5
else pkgs.netbox_3_3;
defaultText = lib.literalExpression ''
if lib.versionAtLeast config.system.stateVersion "23.11"
if lib.versionAtLeast config.system.stateVersion "24.05"
then pkgs.netbox_3_7
else if lib.versionAtLeast config.system.stateVersion "23.11"
then pkgs.netbox_3_6
else if lib.versionAtLeast config.system.stateVersion "23.05"
then pkgs.netbox_3_5
@ -306,12 +310,13 @@ in {
${pkg}/bin/netbox trace_paths --no-input
${pkg}/bin/netbox collectstatic --no-input
${pkg}/bin/netbox remove_stale_contenttypes --no-input
# TODO: remove the condition when we remove netbox_3_3
${lib.optionalString
(lib.versionAtLeast cfg.package.version "3.5.0")
"${pkg}/bin/netbox reindex --lazy"}
${pkg}/bin/netbox reindex --lazy
${pkg}/bin/netbox clearsessions
${pkg}/bin/netbox clearcache
${lib.optionalString
# The clearcache command was removed in 3.7.0:
# https://github.com/netbox-community/netbox/issues/14458
(lib.versionOlder cfg.package.version "3.7.0")
"${pkg}/bin/netbox clearcache"}
echo "${cfg.package.version}" > "$versionFile"
'';

View File

@ -0,0 +1,169 @@
{ config, lib, pkgs, utils, ... }:
let
cfg = config.systemd.sysusers;
userCfg = config.users;
sysusersConfig = pkgs.writeTextDir "00-nixos.conf" ''
# Type Name ID GECOS Home directory Shell
# Users
${lib.concatLines (lib.mapAttrsToList
(username: opts:
let
uid = if opts.uid == null then "-" else toString opts.uid;
in
''u ${username} ${uid}:${opts.group} "${opts.description}" ${opts.home} ${utils.toShellPath opts.shell}''
)
userCfg.users)
}
# Groups
${lib.concatLines (lib.mapAttrsToList
(groupname: opts: ''g ${groupname} ${if opts.gid == null then "-" else toString opts.gid}'') userCfg.groups)
}
# Group membership
${lib.concatStrings (lib.mapAttrsToList
(groupname: opts: (lib.concatMapStrings (username: "m ${username} ${groupname}\n")) opts.members ) userCfg.groups)
}
'';
staticSysusersCredentials = pkgs.runCommand "static-sysusers-credentials" { } ''
mkdir $out; cd $out
${lib.concatLines (
(lib.mapAttrsToList
(username: opts: "echo -n '${opts.initialHashedPassword}' > 'passwd.hashed-password.${username}'")
(lib.filterAttrs (_username: opts: opts.initialHashedPassword != null) userCfg.users))
++
(lib.mapAttrsToList
(username: opts: "echo -n '${opts.initialPassword}' > 'passwd.plaintext-password.${username}'")
(lib.filterAttrs (_username: opts: opts.initialPassword != null) userCfg.users))
++
(lib.mapAttrsToList
(username: opts: "cat '${opts.hashedPasswordFile}' > 'passwd.hashed-password.${username}'")
(lib.filterAttrs (_username: opts: opts.hashedPasswordFile != null) userCfg.users))
)
}
'';
staticSysusers = pkgs.runCommand "static-sysusers"
{
nativeBuildInputs = [ pkgs.systemd ];
} ''
mkdir $out
export CREDENTIALS_DIRECTORY=${staticSysusersCredentials}
systemd-sysusers --root $out ${sysusersConfig}/00-nixos.conf
'';
in
{
options = {
# This module doesn't set it's own user options but reuses the ones from
# users-groups.nix
systemd.sysusers = {
enable = lib.mkEnableOption (lib.mdDoc "systemd-sysusers") // {
description = lib.mdDoc ''
If enabled, users are created with systemd-sysusers instead of with
the custom `update-users-groups.pl` script.
Note: This is experimental.
'';
};
};
};
config = lib.mkIf cfg.enable {
assertions = [
{
assertion = config.system.activationScripts.users == "";
message = "system.activationScripts.users has to be empty to use systemd-sysusers";
}
{
assertion = config.users.mutableUsers -> config.system.etc.overlay.enable;
message = "config.users.mutableUsers requires config.system.etc.overlay.enable.";
}
];
systemd = lib.mkMerge [
({
# Create home directories, do not create /var/empty even if that's a user's
# home.
tmpfiles.settings.home-directories = lib.mapAttrs'
(username: opts: lib.nameValuePair opts.home {
d = {
mode = opts.homeMode;
user = username;
group = opts.group;
};
})
(lib.filterAttrs (_username: opts: opts.home != "/var/empty") userCfg.users);
})
(lib.mkIf config.users.mutableUsers {
additionalUpstreamSystemUnits = [
"systemd-sysusers.service"
];
services.systemd-sysusers = {
# Enable switch-to-configuration to restart the service.
unitConfig.ConditionNeedsUpdate = [ "" ];
requiredBy = [ "sysinit-reactivation.target" ];
before = [ "sysinit-reactivation.target" ];
restartTriggers = [ "${config.environment.etc."sysusers.d".source}" ];
serviceConfig = {
LoadCredential = lib.mapAttrsToList
(username: opts: "passwd.hashed-password.${username}:${opts.hashedPasswordFile}")
(lib.filterAttrs (_username: opts: opts.hashedPasswordFile != null) userCfg.users);
SetCredential = (lib.mapAttrsToList
(username: opts: "passwd.hashed-password.${username}:${opts.initialHashedPassword}")
(lib.filterAttrs (_username: opts: opts.initialHashedPassword != null) userCfg.users))
++
(lib.mapAttrsToList
(username: opts: "passwd.plaintext-password.${username}:${opts.initialPassword}")
(lib.filterAttrs (_username: opts: opts.initialPassword != null) userCfg.users))
;
};
};
})
];
environment.etc = lib.mkMerge [
(lib.mkIf (!userCfg.mutableUsers) {
"passwd" = {
source = "${staticSysusers}/etc/passwd";
mode = "0644";
};
"group" = {
source = "${staticSysusers}/etc/group";
mode = "0644";
};
"shadow" = {
source = "${staticSysusers}/etc/shadow";
mode = "0000";
};
"gshadow" = {
source = "${staticSysusers}/etc/gshadow";
mode = "0000";
};
})
(lib.mkIf userCfg.mutableUsers {
"sysusers.d".source = sysusersConfig;
})
];
};
meta.maintainers = with lib.maintainers; [ nikstur ];
}

View File

@ -0,0 +1,85 @@
{ config, lib, pkgs, ... }:
let
cfg = config.boot.uki;
inherit (pkgs.stdenv.hostPlatform) efiArch;
format = pkgs.formats.ini { };
ukifyConfig = format.generate "ukify.conf" cfg.settings;
in
{
options = {
boot.uki = {
name = lib.mkOption {
type = lib.types.str;
description = lib.mdDoc "Name of the UKI";
};
version = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = config.system.image.version;
defaultText = lib.literalExpression "config.system.image.version";
description = lib.mdDoc "Version of the image or generation the UKI belongs to";
};
settings = lib.mkOption {
type = format.type;
description = lib.mdDoc ''
The configuration settings for ukify. These control what the UKI
contains and how it is built.
'';
};
};
system.boot.loader.ukiFile = lib.mkOption {
type = lib.types.str;
internal = true;
description = lib.mdDoc "Name of the UKI file";
};
};
config = {
boot.uki.name = lib.mkOptionDefault (if config.system.image.id != null then
config.system.image.id
else
"nixos");
boot.uki.settings = lib.mkOptionDefault {
UKI = {
Linux = "${config.boot.kernelPackages.kernel}/${config.system.boot.loader.kernelFile}";
Initrd = "${config.system.build.initialRamdisk}/${config.system.boot.loader.initrdFile}";
Cmdline = "init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams}";
Stub = "${pkgs.systemd}/lib/systemd/boot/efi/linux${efiArch}.efi.stub";
Uname = "${config.boot.kernelPackages.kernel.modDirVersion}";
OSRelease = "@${config.system.build.etc}/etc/os-release";
# This is needed for cross compiling.
EFIArch = efiArch;
};
};
system.boot.loader.ukiFile =
let
name = config.boot.uki.name;
version = config.boot.uki.version;
versionInfix = if version != null then "_${version}" else "";
in
name + versionInfix + ".efi";
system.build.uki = pkgs.runCommand config.system.boot.loader.ukiFile { } ''
mkdir -p $out
${pkgs.buildPackages.systemdUkify}/lib/systemd/ukify build \
--config=${ukifyConfig} \
--output="$out/${config.system.boot.loader.ukiFile}"
'';
meta.maintainers = with lib.maintainers; [ nikstur ];
};
}

View File

@ -0,0 +1,209 @@
#!/usr/bin/env python3
"""Build a composefs dump from a Json config
See the man page of composefs-dump for details about the format:
https://github.com/containers/composefs/blob/main/man/composefs-dump.md
Ensure to check the file with the check script when you make changes to it:
./check-build-composefs-dump.sh ./build-composefs_dump.py
"""
import glob
import json
import os
import sys
from enum import Enum
from pathlib import Path
from typing import Any
Attrs = dict[str, Any]
class FileType(Enum):
"""The filetype as defined by the `st_mode` stat field in octal
You can check the st_mode stat field of a path in Python with
`oct(os.stat("/path/").st_mode)`
"""
directory = "4"
file = "10"
symlink = "12"
class ComposefsPath:
path: str
size: int
filetype: FileType
mode: str
uid: str
gid: str
payload: str
rdev: str = "0"
nlink: int = 1
mtime: str = "1.0"
content: str = "-"
digest: str = "-"
def __init__(
self,
attrs: Attrs,
size: int,
filetype: FileType,
mode: str,
payload: str,
path: str | None = None,
):
if path is None:
path = attrs["target"]
self.path = "/" + path
self.size = size
self.filetype = filetype
self.mode = mode
self.uid = attrs["uid"]
self.gid = attrs["gid"]
self.payload = payload
def write_line(self) -> str:
line_list = [
str(self.path),
str(self.size),
f"{self.filetype.value}{self.mode}",
str(self.nlink),
str(self.uid),
str(self.gid),
str(self.rdev),
str(self.mtime),
str(self.payload),
str(self.content),
str(self.digest),
]
return " ".join(line_list)
def eprint(*args, **kwargs) -> None:
print(args, **kwargs, file=sys.stderr)
def leading_directories(path: str) -> list[str]:
"""Return the leading directories of path
Given the path "alsa/conf.d/50-pipewire.conf", for example, this function
returns `[ "alsa", "alsa/conf.d" ]`.
"""
parents = list(Path(path).parents)
parents.reverse()
# remove the implicit `.` from the start of a relative path or `/` from an
# absolute path
del parents[0]
return [str(i) for i in parents]
def add_leading_directories(
target: str, attrs: Attrs, paths: dict[str, ComposefsPath]
) -> None:
"""Add the leading directories of a target path to the composefs paths
mkcomposefs expects that all leading directories are explicitly listed in
the dump file. Given the path "alsa/conf.d/50-pipewire.conf", for example,
this function adds "alsa" and "alsa/conf.d" to the composefs paths.
"""
path_components = leading_directories(target)
for component in path_components:
composefs_path = ComposefsPath(
attrs,
path=component,
size=4096,
filetype=FileType.directory,
mode="0755",
payload="-",
)
paths[component] = composefs_path
def main() -> None:
"""Build a composefs dump from a Json config
This config describes the files that the final composefs image is supposed
to contain.
"""
config_file = sys.argv[1]
if not config_file:
eprint("No config file was supplied.")
sys.exit(1)
with open(config_file, "rb") as f:
config = json.load(f)
if not config:
eprint("Config is empty.")
sys.exit(1)
eprint("Building composefs dump...")
paths: dict[str, ComposefsPath] = {}
for attrs in config:
target = attrs["target"]
source = attrs["source"]
mode = attrs["mode"]
if "*" in source: # Path with globbing
glob_sources = glob.glob(source)
for glob_source in glob_sources:
basename = os.path.basename(glob_source)
glob_target = f"{target}/{basename}"
composefs_path = ComposefsPath(
attrs,
path=glob_target,
size=100,
filetype=FileType.symlink,
mode="0777",
payload=glob_source,
)
paths[glob_target] = composefs_path
add_leading_directories(glob_target, attrs, paths)
else: # Without globbing
if mode == "symlink":
composefs_path = ComposefsPath(
attrs,
# A high approximation of the size of a symlink
size=100,
filetype=FileType.symlink,
mode="0777",
payload=source,
)
else:
if os.path.isdir(source):
composefs_path = ComposefsPath(
attrs,
size=4096,
filetype=FileType.directory,
mode=mode,
payload=source,
)
else:
composefs_path = ComposefsPath(
attrs,
size=os.stat(source).st_size,
filetype=FileType.file,
mode=mode,
payload=target,
)
paths[target] = composefs_path
add_leading_directories(target, attrs, paths)
composefs_dump = ["/ 4096 40755 1 0 0 0 0.0 - - -"] # Root directory
for key in sorted(paths):
composefs_path = paths[key]
eprint(composefs_path.path)
composefs_dump.append(composefs_path.write_line())
print("\n".join(composefs_dump))
if __name__ == "__main__":
main()

View File

@ -0,0 +1,8 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p black ruff mypy
file=$1
black --check --diff $file
ruff --line-length 88 $file
mypy --strict $file

View File

@ -1,12 +1,96 @@
{ config, lib, ... }:
let
inherit (lib) stringAfter;
in {
{
imports = [ ./etc.nix ];
config = {
system.activationScripts.etc =
stringAfter [ "users" "groups" ] config.system.build.etcActivationCommands;
};
config = lib.mkMerge [
{
system.activationScripts.etc =
lib.stringAfter [ "users" "groups" ] config.system.build.etcActivationCommands;
}
(lib.mkIf config.system.etc.overlay.enable {
assertions = [
{
assertion = config.boot.initrd.systemd.enable;
message = "`system.etc.overlay.enable` requires `boot.initrd.systemd.enable`";
}
{
assertion = (!config.system.etc.overlay.mutable) -> config.systemd.sysusers.enable;
message = "`system.etc.overlay.mutable = false` requires `systemd.sysusers.enable`";
}
{
assertion = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.6";
message = "`system.etc.overlay.enable requires a newer kernel, at least version 6.6";
}
{
assertion = config.systemd.sysusers.enable -> (config.users.mutableUsers == config.system.etc.overlay.mutable);
message = ''
When using systemd-sysusers and mounting `/etc` via an overlay, users
can only be mutable when `/etc` is mutable and vice versa.
'';
}
];
boot.initrd.availableKernelModules = [ "loop" "erofs" "overlay" ];
boot.initrd.systemd = {
mounts = [
{
where = "/run/etc-metadata";
what = "/sysroot${config.system.build.etcMetadataImage}";
type = "erofs";
options = "loop";
unitConfig.RequiresMountsFor = [
"/sysroot/nix/store"
];
}
{
where = "/sysroot/etc";
what = "overlay";
type = "overlay";
options = lib.concatStringsSep "," ([
"relatime"
"redirect_dir=on"
"metacopy=on"
"lowerdir=/run/etc-metadata::/sysroot${config.system.build.etcBasedir}"
] ++ lib.optionals config.system.etc.overlay.mutable [
"rw"
"upperdir=/sysroot/.rw-etc/upper"
"workdir=/sysroot/.rw-etc/work"
] ++ lib.optionals (!config.system.etc.overlay.mutable) [
"ro"
]);
wantedBy = [ "initrd-fs.target" ];
before = [ "initrd-fs.target" ];
requires = lib.mkIf config.system.etc.overlay.mutable [ "rw-etc.service" ];
after = lib.mkIf config.system.etc.overlay.mutable [ "rw-etc.service" ];
unitConfig.RequiresMountsFor = [
"/sysroot/nix/store"
"/run/etc-metadata"
];
}
];
services = lib.mkIf config.system.etc.overlay.mutable {
rw-etc = {
unitConfig = {
DefaultDependencies = false;
RequiresMountsFor = "/sysroot";
};
serviceConfig = {
Type = "oneshot";
ExecStart = ''
/bin/mkdir -p -m 0755 /sysroot/.rw-etc/upper /sysroot/.rw-etc/work
'';
};
};
};
};
})
];
}

View File

@ -62,6 +62,16 @@ let
]) etc'}
'';
etcHardlinks = filter (f: f.mode != "symlink") etc';
build-composefs-dump = pkgs.runCommand "build-composefs-dump.py"
{
buildInputs = [ pkgs.python3 ];
} ''
install ${./build-composefs-dump.py} $out
patchShebangs --host $out
'';
in
{
@ -72,6 +82,30 @@ in
options = {
system.etc.overlay = {
enable = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Mount `/etc` as an overlayfs instead of generating it via a perl script.
Note: This is currently experimental. Only enable this option if you're
confident that you can recover your system if it breaks.
'';
};
mutable = mkOption {
type = types.bool;
default = true;
description = lib.mdDoc ''
Whether to mount `/etc` mutably (i.e. read-write) or immutably (i.e. read-only).
If this is false, only the immutable lowerdir is mounted. If it is
true, a writable upperdir is mounted on top.
'';
};
};
environment.etc = mkOption {
default = {};
example = literalExpression ''
@ -190,12 +224,84 @@ in
config = {
system.build.etc = etc;
system.build.etcActivationCommands =
''
# Set up the statically computed bits of /etc.
echo "setting up /etc..."
${pkgs.perl.withPackages (p: [ p.FileSlurp ])}/bin/perl ${./setup-etc.pl} ${etc}/etc
system.build.etcActivationCommands = let
etcOverlayOptions = lib.concatStringsSep "," ([
"relatime"
"redirect_dir=on"
"metacopy=on"
] ++ lib.optionals config.system.etc.overlay.mutable [
"upperdir=/.rw-etc/upper"
"workdir=/.rw-etc/work"
]);
in if config.system.etc.overlay.enable then ''
# This script atomically remounts /etc when switching configuration. On a (re-)boot
# this should not run because /etc is mounted via a systemd mount unit
# instead. To a large extent this mimics what composefs does. Because
# it's relatively simple, however, we avoid the composefs dependency.
if [[ ! $IN_NIXOS_SYSTEMD_STAGE1 ]]; then
echo "remounting /etc..."
tmpMetadataMount=$(mktemp --directory)
mount --type erofs ${config.system.build.etcMetadataImage} $tmpMetadataMount
# Mount the new /etc overlay to a temporary private mount.
# This needs the indirection via a private bind mount because you
# cannot move shared mounts.
tmpEtcMount=$(mktemp --directory)
mount --bind --make-private $tmpEtcMount $tmpEtcMount
mount --type overlay overlay \
--options lowerdir=$tmpMetadataMount::${config.system.build.etcBasedir},${etcOverlayOptions} \
$tmpEtcMount
# Move the new temporary /etc mount underneath the current /etc mount.
#
# This should eventually use util-linux to perform this move beneath,
# however, this functionality is not yet in util-linux. See this
# tracking issue: https://github.com/util-linux/util-linux/issues/2604
${pkgs.move-mount-beneath}/bin/move-mount --move --beneath $tmpEtcMount /etc
# Unmount the top /etc mount to atomically reveal the new mount.
umount /etc
fi
'' else ''
# Set up the statically computed bits of /etc.
echo "setting up /etc..."
${pkgs.perl.withPackages (p: [ p.FileSlurp ])}/bin/perl ${./setup-etc.pl} ${etc}/etc
'';
system.build.etcBasedir = pkgs.runCommandLocal "etc-lowerdir" { } ''
set -euo pipefail
makeEtcEntry() {
src="$1"
target="$2"
mkdir -p "$out/$(dirname "$target")"
cp "$src" "$out/$target"
}
mkdir -p "$out"
${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [
"makeEtcEntry"
# Force local source paths to be added to the store
"${etcEntry.source}"
etcEntry.target
]) etcHardlinks}
'';
system.build.etcMetadataImage =
let
etcJson = pkgs.writeText "etc-json" (builtins.toJSON etc');
etcDump = pkgs.runCommand "etc-dump" { } "${build-composefs-dump} ${etcJson} > $out";
in
pkgs.runCommand "etc-metadata.erofs" {
nativeBuildInputs = [ pkgs.composefs pkgs.erofs-utils ];
} ''
mkcomposefs --from-file ${etcDump} $out
fsck.erofs $out
'';
};
}

View File

@ -109,6 +109,17 @@ in {
'';
};
fixedRandomDelay = mkOption {
default = false;
type = types.bool;
example = true;
description = lib.mdDoc ''
Make the randomized delay consistent between runs.
This reduces the jitter between automatic upgrades.
See {option}`randomizedDelaySec` for configuring the randomized delay.
'';
};
rebootWindow = mkOption {
description = lib.mdDoc ''
Define a lower and upper time value (in HH:MM format) which
@ -253,6 +264,7 @@ in {
systemd.timers.nixos-upgrade = {
timerConfig = {
RandomizedDelaySec = cfg.randomizedDelaySec;
FixedRandomDelay = cfg.fixedRandomDelay;
Persistent = cfg.persistent;
};
};

View File

@ -207,7 +207,10 @@ in
networking.usePredictableInterfaceNames = false;
# Make it easy to log in as root when running the test interactively.
users.users.root.initialHashedPassword = mkOverride 150 "";
# This needs to be a file because of a quirk in systemd credentials,
# where you cannot specify an empty string as a value. systemd-sysusers
# uses credentials to set passwords on users.
users.users.root.hashedPasswordFile = mkOverride 150 "${pkgs.writeText "hashed-password.root" ""}";
services.xserver.displayManager.job.logToJournal = true;

View File

@ -0,0 +1,30 @@
{ lib, ... }: {
name = "activation-etc-overlay-immutable";
meta.maintainers = with lib.maintainers; [ nikstur ];
nodes.machine = { pkgs, ... }: {
system.etc.overlay.enable = true;
system.etc.overlay.mutable = false;
# Prerequisites
systemd.sysusers.enable = true;
users.mutableUsers = false;
boot.initrd.systemd.enable = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
specialisation.new-generation.configuration = {
environment.etc."newgen".text = "newgen";
};
};
testScript = ''
machine.succeed("findmnt --kernel --type overlay /etc")
machine.fail("stat /etc/newgen")
machine.succeed("/run/current-system/specialisation/new-generation/bin/switch-to-configuration switch")
assert machine.succeed("cat /etc/newgen") == "newgen"
'';
}

View File

@ -0,0 +1,30 @@
{ lib, ... }: {
name = "activation-etc-overlay-mutable";
meta.maintainers = with lib.maintainers; [ nikstur ];
nodes.machine = { pkgs, ... }: {
system.etc.overlay.enable = true;
system.etc.overlay.mutable = true;
# Prerequisites
boot.initrd.systemd.enable = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
specialisation.new-generation.configuration = {
environment.etc."newgen".text = "newgen";
};
};
testScript = ''
machine.succeed("findmnt --kernel --type overlay /etc")
machine.fail("stat /etc/newgen")
machine.succeed("echo -n 'mutable' > /etc/mutable")
machine.succeed("/run/current-system/specialisation/new-generation/bin/switch-to-configuration switch")
assert machine.succeed("cat /etc/newgen") == "newgen"
assert machine.succeed("cat /etc/mutable") == "mutable"
'';
}

View File

@ -0,0 +1,24 @@
{ lib, ... }:
{
name = "activation-perlless";
meta.maintainers = with lib.maintainers; [ nikstur ];
nodes.machine = { pkgs, modulesPath, ... }: {
imports = [ "${modulesPath}/profiles/perlless.nix" ];
boot.kernelPackages = pkgs.linuxPackages_latest;
virtualisation.mountHostNixStore = false;
virtualisation.useNixStoreImage = true;
};
testScript = ''
perl_store_paths = machine.succeed("ls /nix/store | grep perl || true")
print(perl_store_paths)
assert len(perl_store_paths) == 0
'';
}

View File

@ -285,6 +285,9 @@ in {
activation = pkgs.callPackage ../modules/system/activation/test.nix { };
activation-var = runTest ./activation/var.nix;
activation-nix-channel = runTest ./activation/nix-channel.nix;
activation-etc-overlay-mutable = runTest ./activation/etc-overlay-mutable.nix;
activation-etc-overlay-immutable = runTest ./activation/etc-overlay-immutable.nix;
activation-perlless = runTest ./activation/perlless.nix;
etcd = handleTestOn ["x86_64-linux"] ./etcd.nix {};
etcd-cluster = handleTestOn ["x86_64-linux"] ./etcd-cluster.nix {};
etebase-server = handleTest ./etebase-server.nix {};
@ -569,8 +572,8 @@ in {
netdata = handleTest ./netdata.nix {};
networking.networkd = handleTest ./networking.nix { networkd = true; };
networking.scripted = handleTest ./networking.nix { networkd = false; };
netbox_3_5 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_3_5; };
netbox_3_6 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_3_6; };
netbox_3_7 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_3_7; };
netbox-upgrade = handleTest ./web-apps/netbox-upgrade.nix {};
# TODO: put in networking.nix after the test becomes more complete
networkingProxy = handleTest ./networking-proxy.nix {};
@ -866,6 +869,8 @@ in {
systemd-repart = handleTest ./systemd-repart.nix {};
systemd-shutdown = handleTest ./systemd-shutdown.nix {};
systemd-sysupdate = runTest ./systemd-sysupdate.nix;
systemd-sysusers-mutable = runTest ./systemd-sysusers-mutable.nix;
systemd-sysusers-immutable = runTest ./systemd-sysusers-immutable.nix;
systemd-timesyncd = handleTest ./systemd-timesyncd.nix {};
systemd-timesyncd-nscd-dnssec = handleTest ./systemd-timesyncd-nscd-dnssec.nix {};
systemd-user-tmpfiles-rules = handleTest ./systemd-user-tmpfiles-rules.nix {};

View File

@ -10,10 +10,6 @@ let
imageId = "nixos-appliance";
imageVersion = "1-rc1";
bootLoaderConfigPath = "/loader/entries/nixos.conf";
kernelPath = "/EFI/nixos/kernel.efi";
initrdPath = "/EFI/nixos/initrd.efi";
in
{
name = "appliance-gpt-image";
@ -54,19 +50,8 @@ in
"/EFI/BOOT/BOOT${lib.toUpper efiArch}.EFI".source =
"${pkgs.systemd}/lib/systemd/boot/efi/systemd-boot${efiArch}.efi";
# TODO: create an abstraction for Boot Loader Specification (BLS) entries.
"${bootLoaderConfigPath}".source = pkgs.writeText "nixos.conf" ''
title NixOS
linux ${kernelPath}
initrd ${initrdPath}
options init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams}
'';
"${kernelPath}".source =
"${config.boot.kernelPackages.kernel}/${config.system.boot.loader.kernelFile}";
"${initrdPath}".source =
"${config.system.build.initialRamdisk}/${config.system.boot.loader.initrdFile}";
"/EFI/Linux/${config.system.boot.loader.ukiFile}".source =
"${config.system.build.uki}/${config.system.boot.loader.ukiFile}";
};
repartConfig = {
Type = "esp";
@ -119,8 +104,6 @@ in
assert 'IMAGE_VERSION="${imageVersion}"' in os_release
bootctl_status = machine.succeed("bootctl status")
assert "${bootLoaderConfigPath}" in bootctl_status
assert "${kernelPath}" in bootctl_status
assert "${initrdPath}" in bootctl_status
assert "Boot Loader Specification Type #2 (.efi)" in bootctl_status
'';
}

View File

@ -27,9 +27,11 @@ in {
services.ayatana-indicators = {
enable = true;
packages = with pkgs; [
ayatana-indicator-datetime
ayatana-indicator-messages
] ++ (with pkgs.lomiri; [
lomiri-indicator-network
telephony-service
]);
};
@ -42,6 +44,25 @@ in {
networking.networkmanager.enable = true; # lomiri-network-indicator
# TODO potentially urfkill for lomiri-network-indicator?
services.dbus.packages = with pkgs.lomiri; [
libusermetrics
];
environment.systemPackages = with pkgs.lomiri; [
lomiri-schemas
];
services.telepathy.enable = true;
users.users.usermetrics = {
group = "usermetrics";
home = "/var/lib/usermetrics";
createHome = true;
isSystemUser = true;
};
users.groups.usermetrics = { };
};
# TODO session indicator starts up in a semi-broken state, but works fine after a restart. maybe being started before graphical session is truly up & ready?
@ -69,7 +90,7 @@ in {
# Now check if all indicators were brought up successfully, and kill them for later
'' + (runCommandOverAyatanaIndicators (service: let serviceExec = builtins.replaceStrings [ "." ] [ "-" ] service; in ''
machine.succeed("pgrep -f ${serviceExec}")
machine.succeed("pgrep -u ${user} -f ${serviceExec}")
machine.succeed("pkill -f ${serviceExec}")
'')) + ''

View File

@ -1,5 +1,6 @@
import ./make-test-python.nix ({ pkgs, ... }: {
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "keepalived";
maintainers = [ lib.maintainers.raitobezarius ];
nodes = {
node1 = { pkgs, ... }: {

View File

@ -0,0 +1,64 @@
{ lib, ... }:
let
rootPassword = "$y$j9T$p6OI0WN7.rSfZBOijjRdR.$xUOA2MTcB48ac.9Oc5fz8cxwLv1mMqabnn333iOzSA6";
normaloPassword = "$y$j9T$3aiOV/8CADAK22OK2QT3/0$67OKd50Z4qTaZ8c/eRWHLIM.o3ujtC1.n9ysmJfv639";
newNormaloPassword = "mellow";
in
{
name = "activation-sysusers-immutable";
meta.maintainers = with lib.maintainers; [ nikstur ];
nodes.machine = {
systemd.sysusers.enable = true;
users.mutableUsers = false;
# Override the empty root password set by the test instrumentation
users.users.root.hashedPasswordFile = lib.mkForce null;
users.users.root.initialHashedPassword = rootPassword;
users.users.normalo = {
isNormalUser = true;
initialHashedPassword = normaloPassword;
};
specialisation.new-generation.configuration = {
users.users.new-normalo = {
isNormalUser = true;
initialPassword = newNormaloPassword;
};
};
};
testScript = ''
with subtest("Users are not created with systemd-sysusers"):
machine.fail("systemctl status systemd-sysusers.service")
machine.fail("ls /etc/sysusers.d")
with subtest("Correct mode on the password files"):
assert machine.succeed("stat -c '%a' /etc/passwd") == "644\n"
assert machine.succeed("stat -c '%a' /etc/group") == "644\n"
assert machine.succeed("stat -c '%a' /etc/shadow") == "0\n"
assert machine.succeed("stat -c '%a' /etc/gshadow") == "0\n"
with subtest("root user has correct password"):
print(machine.succeed("getent passwd root"))
assert "${rootPassword}" in machine.succeed("getent shadow root"), "root user password is not correct"
with subtest("normalo user is created"):
print(machine.succeed("getent passwd normalo"))
assert machine.succeed("stat -c '%U' /home/normalo") == "normalo\n"
assert "${normaloPassword}" in machine.succeed("getent shadow normalo"), "normalo user password is not correct"
machine.succeed("/run/current-system/specialisation/new-generation/bin/switch-to-configuration switch")
with subtest("new-normalo user is created after switching to new generation"):
print(machine.succeed("getent passwd new-normalo"))
print(machine.succeed("getent shadow new-normalo"))
assert machine.succeed("stat -c '%U' /home/new-normalo") == "new-normalo\n"
'';
}

View File

@ -0,0 +1,71 @@
{ lib, ... }:
let
rootPassword = "$y$j9T$p6OI0WN7.rSfZBOijjRdR.$xUOA2MTcB48ac.9Oc5fz8cxwLv1mMqabnn333iOzSA6";
normaloPassword = "hello";
newNormaloPassword = "$y$j9T$p6OI0WN7.rSfZBOijjRdR.$xUOA2MTcB48ac.9Oc5fz8cxwLv1mMqabnn333iOzSA6";
in
{
name = "activation-sysusers-mutable";
meta.maintainers = with lib.maintainers; [ nikstur ];
nodes.machine = { pkgs, ... }: {
systemd.sysusers.enable = true;
users.mutableUsers = true;
# Prerequisites
system.etc.overlay.enable = true;
boot.initrd.systemd.enable = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
# Override the empty root password set by the test instrumentation
users.users.root.hashedPasswordFile = lib.mkForce null;
users.users.root.initialHashedPassword = rootPassword;
users.users.normalo = {
isNormalUser = true;
initialPassword = normaloPassword;
};
specialisation.new-generation.configuration = {
users.users.new-normalo = {
isNormalUser = true;
initialHashedPassword = newNormaloPassword;
};
};
};
testScript = ''
machine.wait_for_unit("systemd-sysusers.service")
with subtest("systemd-sysusers.service contains the credentials"):
sysusers_service = machine.succeed("systemctl cat systemd-sysusers.service")
print(sysusers_service)
assert "SetCredential=passwd.plaintext-password.normalo:${normaloPassword}" in sysusers_service
with subtest("Correct mode on the password files"):
assert machine.succeed("stat -c '%a' /etc/passwd") == "644\n"
assert machine.succeed("stat -c '%a' /etc/group") == "644\n"
assert machine.succeed("stat -c '%a' /etc/shadow") == "0\n"
assert machine.succeed("stat -c '%a' /etc/gshadow") == "0\n"
with subtest("root user has correct password"):
print(machine.succeed("getent passwd root"))
assert "${rootPassword}" in machine.succeed("getent shadow root"), "root user password is not correct"
with subtest("normalo user is created"):
print(machine.succeed("getent passwd normalo"))
assert machine.succeed("stat -c '%U' /home/normalo") == "normalo\n"
machine.succeed("/run/current-system/specialisation/new-generation/bin/switch-to-configuration switch")
with subtest("new-normalo user is created after switching to new generation"):
print(machine.succeed("getent passwd new-normalo"))
assert machine.succeed("stat -c '%U' /home/new-normalo") == "new-normalo\n"
assert "${newNormaloPassword}" in machine.succeed("getent shadow new-normalo"), "new-normalo user password is not correct"
'';
}

View File

@ -1,6 +1,6 @@
import ../make-test-python.nix ({ lib, pkgs, ... }: let
oldNetbox = pkgs.netbox_3_5;
newNetbox = pkgs.netbox_3_6;
oldNetbox = pkgs.netbox_3_6;
newNetbox = pkgs.netbox_3_7;
in {
name = "netbox-upgrade";

View File

@ -1,5 +1,5 @@
{ lib
, buildGo121Module
, buildGoModule
, fetchFromGitHub
, pkg-config
, alsa-lib
@ -7,7 +7,7 @@
, nix-update-script
}:
buildGo121Module rec {
buildGoModule rec {
pname = "go-musicfox";
version = "4.3.0";

View File

@ -8,13 +8,13 @@
stdenv.mkDerivation rec {
pname = "pt2-clone";
version = "1.65.1";
version = "1.66.1";
src = fetchFromGitHub {
owner = "8bitbubsy";
repo = "pt2-clone";
rev = "v${version}";
sha256 = "sha256-0bZGiulLeAZ8bR0lj0Bm7te3T3YhxSOBFgMgWADRkIY=";
sha256 = "sha256-j7VPC1sj1Q+wL2TBgv06uYLPqym8F57HG1SRvj0Ggeo=";
};
nativeBuildInputs = [ cmake ];

View File

@ -7,24 +7,32 @@
, pkg-config
, ffmpeg
, dbus
, libpulseaudio
}:
rustPlatform.buildRustPackage rec {
pname = "songrec";
version = "0.3.3";
version = "0.4.1";
src = fetchFromGitHub {
owner = "marin-m";
repo = pname;
rev = version;
hash = "sha256-K80uoMfwkyH/K8t6zdkq1ZYTpI0dAIvO2K2kzpzDoN0=";
hash = "sha256-QgmeO6dE5d0X7iMjqvDz/i9tKEzGNzTYqZRXRgYepCg=";
};
cargoHash = "sha256-Xmey+goHGTWMgKIJRzKMi9Y1bv677Yo2sfDaMauvZsM=";
cargoHash = "sha256-K6dkKtrHQVJfFo3yCWFb0zO4fJDunygU7hCnjAi4svc=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ alsa-lib dbus gtk3 openssl ffmpeg ];
buildInputs = [
alsa-lib
dbus
gtk3
openssl
ffmpeg
libpulseaudio
];
postInstall = ''
mv packaging/rootfs/usr/share $out/share

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, bluez, dbus, glew, glfw, imgui, makeDesktopItem, copyDesktopItems }:
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, pkg-config, bluez, dbus, glew, glfw, imgui, makeDesktopItem, copyDesktopItems }:
stdenv.mkDerivation rec {
pname = "SonyHeadphonesClient";
@ -12,6 +12,16 @@ stdenv.mkDerivation rec {
fetchSubmodules = true;
};
patches = [
(fetchpatch {
name = "include-cstdint-to-fix-gcc-compiling.patch";
url = "https://github.com/Plutoberth/SonyHeadphonesClient/commit/4da8a12b22f8a45e79aa53d4cae88ca99b51d41f.patch";
stripLen = 2;
extraPrefix = "";
hash = "sha256-IZR/Znj40pUEC9gmNJDMPWuZOM2ueAgykZFn5DVn6es=";
})
];
nativeBuildInputs = [ cmake pkg-config copyDesktopItems ];
buildInputs = [ bluez dbus glew glfw imgui ];

View File

@ -5,14 +5,14 @@
python3.pkgs.buildPythonApplication rec {
pname = "unifi-protect-backup";
version = "0.10.2";
version = "0.10.3";
pyproject = true;
src = fetchFromGitHub {
owner = "ep1cman";
repo = "unifi-protect-backup";
rev = "refs/tags/v${version}";
hash = "sha256-EQCI7TkkOhDASMo5yKfAca/gB4ayyPOaDVK6WEaAIgc=";
hash = "sha256-jICnm9EfPyOLVbZfF+TYcQJo0ZXUDpFgYpL5Zf9b8Bc=";
};
pythonRelaxDeps = [

View File

@ -1267,8 +1267,8 @@ let
mktplcRef = {
name = "elixir-ls";
publisher = "JakeBecker";
version = "0.18.1";
sha256 = "sha256-PdXoc9+ejYr1SiikuabUH+2tt1tByJn5gycaHrHuaBE=";
version = "0.19.0";
sha256 = "sha256-31eenBOVUEY3MFaVmAjZsypr7U0d6IfVR3ZJfDqi3OY=";
};
meta = {
changelog = "https://marketplace.visualstudio.com/items/JakeBecker.elixir-ls/changelog";

View File

@ -15,11 +15,11 @@ let
archive_fmt = if stdenv.isDarwin then "zip" else "tar.gz";
sha256 = {
x86_64-linux = "1fhvzwhkcqn3bxh92nidhg2bagxbxyg7c8b582wz1msp1l7c27mq";
x86_64-darwin = "1fspzw4zz8z9f91xhaw5h9r82q8anlk9ck3n3sms3vrb2g992xdr";
aarch64-linux = "1hynvczhz946xz9ygrsax1ap3kyw5wm19mn6s9vcdw7wg8imvcyr";
aarch64-darwin = "0kfr8i7z8x4ys2qsabfg78yvk42f0lnaax0l0wdiv94pp0iixijy";
armv7l-linux = "0vcywp0cqd1rxvb2zf4h3l5sc9rbi88w1v087q12q265c56izzw8";
x86_64-linux = "0nd9hipz1jhjdv6hrm6q2jpppanh8nmkpy9zpayymy4dwif8a49q";
x86_64-darwin = "1fk146dikiy8dab83v4j6jrnzdg8dxnjvwmdddif130jrpxsp875";
aarch64-linux = "0zqm8zl3vhisp6rlb2vhc2i0z4rln38858l07r70jr76zxbbs5xv";
aarch64-darwin = "0i0bsrygdg2ij3wf0jm9n6fci5zrghnvzdw0p528c08rjgkhrmrb";
armv7l-linux = "0h0v5irf23ijn21j4sll2ynj12wclm17bh46s1dlpzy73f4h17jb";
}.${system} or throwSystem;
sourceRoot = lib.optionalString (!stdenv.isDarwin) ".";
@ -29,7 +29,7 @@ in
# Please backport all compatible updates to the stable release.
# This is important for the extension ecosystem.
version = "1.85.1.23348";
version = "1.85.2.24019";
pname = "vscodium";
executableName = "codium";

View File

@ -33,13 +33,13 @@
stdenv.mkDerivation rec {
pname = "cemu";
version = "2.0-61";
version = "2.0-65";
src = fetchFromGitHub {
owner = "cemu-project";
repo = "Cemu";
rev = "v${version}";
hash = "sha256-oKVVBie3Q3VtsHbh0wJfdlx1YnF424hib8mFRYnbgXY=";
hash = "sha256-jsDmxol3zZMmpo4whDeUXTzfO+QVK/h6lItXTyJyoak=";
};
patches = [

View File

@ -1,54 +1,72 @@
{ lib
, fetchFromGitHub
, stdenv
, SDL2
, cmake
, extra-cmake-modules
, fetchFromGitHub
, libarchive
, libpcap
, libsForQt5
, libslirp
, libGL
, pkg-config
, qtbase
, qtmultimedia
, SDL2
, stdenv
, wayland
, wrapQtAppsHook
, zstd
}:
stdenv.mkDerivation rec {
let
inherit (libsForQt5)
qtbase
qtmultimedia
wrapQtAppsHook;
in
stdenv.mkDerivation (finalAttrs: {
pname = "melonDS";
version = "0.9.5";
version = "0.9.5-unstable-2024-01-17";
src = fetchFromGitHub {
owner = "Arisotura";
repo = pname;
rev = version;
sha256 = "sha256-n4Vkxb/7fr214PgB6VFNgH1tMDgTBS/UHUQ6V4uGkDA=";
owner = "melonDS-emu";
repo = "melonDS";
rev = "7897bd387bfd37615a049eba28d02dc23cfa5194";
hash = "sha256-7BrUa8QJnudJkiCtuBdfar+FeeJSrdMGJdhXrPP6uww=";
};
nativeBuildInputs = [
cmake
extra-cmake-modules
pkg-config
wrapQtAppsHook
];
buildInputs = [
SDL2
extra-cmake-modules
libarchive
libslirp
libGL
qtbase
qtmultimedia
SDL2
wayland
zstd
];
qtWrapperArgs = [ "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libpcap ]}" ];
strictDeps = true;
meta = with lib; {
qtWrapperArgs = [
"--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libpcap ]}"
];
meta = {
homepage = "https://melonds.kuribo64.net/";
description = "Work in progress Nintendo DS emulator";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ artemist benley shamilton xfix ];
platforms = platforms.linux;
license = with lib.licenses; [ gpl3Plus ];
mainProgram = "melonDS";
maintainers = with lib.maintainers; [
AndersonTorres
artemist
benley
shamilton
xfix
];
platforms = lib.platforms.linux;
};
}
})

View File

@ -1,13 +1,13 @@
{ stdenv, fetchFromGitHub, unstableGitUpdater }:
stdenv.mkDerivation {
pname = "yuzu-compatibility-list";
version = "unstable-2024-01-08";
version = "unstable-2024-01-21";
src = fetchFromGitHub {
owner = "flathub";
repo = "org.yuzu_emu.yuzu";
rev = "0f5500f50e2a5ac7e40e6f5f8aeb160d46348828";
hash = "sha256-0JHl7myoa3MlfucmbKB5tubJ6sQ2IlTIL3i2yveOvaU=";
rev = "a3dd360e8b6e8c0c93d40f00416534c8b4bcd59a";
hash = "sha256-nXh5cJTS1zCa6GoH+AoisTIohsRruycqosxpmFAsaSw=";
};
buildCommand = ''

View File

@ -1,7 +1,7 @@
# Generated by ./update.sh - do not update manually!
# Last updated: 2024-01-10
# Last updated: 2024-01-22
{
version = "4056";
distHash = "sha256:14qd5v238pka9axrxjbaawr0kpkkbd95mzri6jdjxjyzbkk03hmb";
fullHash = "sha256:0fb4i6708q59ql9ffrw2myanqgxpy20z971y6l7yvxm1pqw9qhyx";
version = "4079";
distHash = "sha256:12cwzgdnpla9m24cla1596p773zpdgmi0zlyvdypmdx0qzwgwkpp";
fullHash = "sha256:1zp2nz9blsim2xmwb3pah38nrdysa3yrlqgb051n8b8qp6fp5979";
}

View File

@ -47,13 +47,13 @@
}:
stdenv.mkDerivation(finalAttrs: {
pname = "yuzu";
version = "1676";
version = "1689";
src = fetchFromGitHub {
owner = "yuzu-emu";
repo = "yuzu-mainline";
rev = "mainline-0-${finalAttrs.version}";
hash = "sha256-vRrliVuGXI/Dpmdkbj+P5hshzPzB6nijrXQfLXHaGqk=";
hash = "sha256-5ITGFWS0OJLXyNoAleZrJob2jz1He1LEOvQzjIlMmPQ=";
fetchSubmodules = true;
};

View File

@ -5,14 +5,14 @@
python3.pkgs.buildPythonApplication rec {
pname = "tuifi-manager";
version = "3.3.1";
version = "3.3.5";
format = "pyproject";
src = fetchFromGitHub {
owner = "GiorgosXou";
repo = "TUIFIManager";
rev = "v.${version}";
hash = "sha256-yBMme0LJSlEXPxE9NMr0Z5VJWcWOzzdvbTnavkLHsvo=";
rev = "refs/tags/v.${version}";
hash = "sha256-O4cAHFurgF6QzpeAMoipX2/JywU1drZOTw/Ob9Pa8WQ=";
};
postPatch = ''

View File

@ -31,16 +31,16 @@
rustPlatform.buildRustPackage rec {
pname = "yazi";
version = "0.2.1";
version = "0.2.2";
src = fetchFromGitHub {
owner = "sxyazi";
repo = pname;
rev = "v${version}";
hash = "sha256-XdN2oP5c2lK+bR3i+Hwd4oOlccMQisbzgevHsZ8YbSQ=";
hash = "sha256-XF5zCFXiViFsRPqI6p1Z7093NSWrGmcoyWcGEagIoEA=";
};
cargoHash = "sha256-0JNKlzmMS5wcTW0faTnhFgNK2VHXixNnMx6ZS3eKbPA=";
cargoHash = "sha256-9fXHpq5lXG9Gup1dZPlXiNilbP79fJ3Jp3+ZD7mAzP4=";
env.YAZI_GEN_COMPLETIONS = true;

View File

@ -30,5 +30,9 @@ stdenv.mkDerivation rec {
license = licenses.bsd3;
maintainers = with maintainers; [ bcdarwin ];
platforms = with platforms; unix;
# As of 2024-01-20, this fails with:
# error while loading shared libraries: libvtkInteractionWidgets.so.1: cannot open shared object file: No such file or directory
# Tracking issue: https://github.com/NixOS/nixpkgs/issues/262328
broken = true;
};
}

View File

@ -1,6 +1,7 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, nix-update-script
, cmake
, pkg-config
@ -35,9 +36,24 @@ stdenv.mkDerivation rec {
sha256 = "sha256-s1eWZMVitVSP7nJJ5wXvnV8uI6yto7LmvlvocOwVAxw=";
};
patches = [
(fetchpatch {
name = "0001-assimp-Include-cstdint-for-std-uint32_t.patch";
url = "https://github.com/assimp/assimp/commit/108e3192a201635e49e99a91ff2044e1851a2953.patch";
stripLen = 1;
extraPrefix = "externals/assimp/";
hash = "sha256-rk0EFmgeZVwvx3NJOOob5Jwj9/J+eOtuAzfwp88o+J4=";
})
];
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "set(CMAKE_OSX_ARCHITECTURES x86_64)" ""
# Outdated vendored assimp, many warnings with newer compilers, too old for CMake option to control this
# Note that this -Werror caused issues on darwin, so make sure to re-check builds there before removing this
substituteInPlace externals/assimp/code/CMakeLists.txt \
--replace 'TARGET_COMPILE_OPTIONS(assimp PRIVATE -Werror)' ""
'';
nativeBuildInputs = [ cmake pkg-config makeWrapper ];

View File

@ -1,34 +1,30 @@
{ lib, stdenv, fetchFromGitHub, mkDerivation, qtbase, mesa_glu }:
{ lib, stdenv, fetchFromGitHub, mkDerivation, cmake }:
mkDerivation rec {
pname = "fstl";
version = "0.9.4";
version = "0.10.0";
buildInputs = [qtbase mesa_glu];
nativeBuildInputs = [ cmake ];
prePatch = ''
sed -i "s|/usr/bin|$out/bin|g" qt/fstl.pro
'';
installPhase = lib.optionalString stdenv.isDarwin ''
runHook preInstall
preBuild = ''
qmake qt/fstl.pro
'';
postInstall = lib.optionalString stdenv.isDarwin ''
mkdir -p $out/Applications
mv fstl.app $out/Applications
runHook postInstall
'';
src = fetchFromGitHub {
owner = "mkeeter";
owner = "fstl-app";
repo = "fstl";
rev = "v" + version;
sha256 = "028hzdv11hgvcpc36q5scf4nw1256qswh37xhfn5a0iv7wycmnif";
hash = "sha256-z2X78GW/IeiPCnwkeLBCLjILhfMe2sT3V9Gbw4TSf4c=";
};
meta = with lib; {
description = "The fastest STL file viewer";
homepage = "https://github.com/mkeeter/fstl";
homepage = "https://github.com/fstl-app/fstl";
license = licenses.mit;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ tweber ];

View File

@ -2,13 +2,13 @@
buildPythonApplication rec {
pname = "gallery-dl";
version = "1.26.6";
version = "1.26.7";
format = "setuptools";
src = fetchPypi {
inherit version;
pname = "gallery_dl";
sha256 = "sha256-QgvwxH8wbwxfjZaea89sINtHbSXyIq5XGpWUi6rOX+k=";
sha256 = "sha256-+aoXcxJVBp9nXKS+3+CG7XkDMemSgvExMXtnR2FDhYs=";
};
propagatedBuildInputs = [

View File

@ -8,16 +8,16 @@
buildGoModule rec {
pname = "ipatool";
version = "2.1.3";
version = "2.1.4";
src = fetchFromGitHub {
owner = "majd";
repo = "ipatool";
rev = "v${version}";
hash = "sha256-kIFKVIhH+Vjt05XzR5jNwYQokNLSckdiWJ97A03Lgqc=";
hash = "sha256-e+gkr8i6dVfxyBM5Vi2YpW4eQ4LE2vhgQadLAFeHK4Q=";
};
vendorHash = "sha256-ZTz3eW/rs3bV16Ugd4kUOW7NaXzBa5c9qTIqRCanPRU=";
vendorHash = "sha256-aVMWXlHMGdbApKLhuZZpaAYY5QpMMgXc/6f9r79/dTw=";
ldflags = [
"-s"

View File

@ -3,15 +3,15 @@
}:
let
pname = "josm";
version = "18907";
version = "18940";
srcs = {
jar = fetchurl {
url = "https://josm.openstreetmap.de/download/josm-snapshot-${version}.jar";
hash = "sha256-EASSuZn18oruUmPFNZ1Bwv0krTJa0tw4ddTJzkGEjW8=";
hash = "sha256-NfSTwh0SabdVQwh7tA5Xx80Qbp+V/ZcurKkr+AhPoz8=";
};
macosx = fetchurl {
url = "https://josm.openstreetmap.de/download/macosx/josm-macos-${version}-java17.zip";
hash = "sha256-tEJKBst+n669JENURd9ipFzV7yS/JZWEYkflq8d4g2Q=";
hash = "sha256-b/8vSEy3qXmRjRZ43MMISB6qZHne7nuZ+tFy8Dmbp18=";
};
pkg = fetchsvn {
url = "https://josm.openstreetmap.de/svn/trunk/native/linux/tested";

View File

@ -4,8 +4,6 @@ ocamlPackages.buildDunePackage rec {
pname = "orpie";
version = "1.6.1";
duneVersion = "3";
src = fetchFromGitHub {
owner = "pelzlpj";
repo = pname;

View File

@ -2,14 +2,14 @@
rustPlatform.buildRustPackage rec {
pname = "oxker";
version = "0.5.0";
version = "0.6.0";
src = fetchCrate {
inherit pname version;
sha256 = "sha256-DylYRuEy0qjhjCEoTmjCJAT3nD31D8Xaaw13oexViAg=";
sha256 = "sha256-s1PVm5RBqHe5XVHt5Wgm05+6xXJYnMU9QO7Z8567oKk=";
};
cargoHash = "sha256-gmzXl2psj4mftX/0Hsbki/eRQHWnspkYlzQAX4gv4vo=";
cargoHash = "sha256-zZFys59vEiGfB9NlAY5yjHBeXf8zQ3npFF7sg2SQTwU=";
meta = with lib; {
description = "A simple tui to view & control docker containers";

View File

@ -18,14 +18,14 @@
mkDerivation rec {
pname = "qcad";
version = "3.29.0.0";
version = "3.29.2.0";
src = fetchFromGitHub {
name = "qcad-${version}-src";
owner = "qcad";
repo = "qcad";
rev = "v${version}";
sha256 = "sha256-Nx16TJrtxUUdeSobTYdgoDUzm1IcTGbaKnW/9YXozgo=";
sha256 = "sha256-7SX0hBSySY8AgmIwVjuszrfdfVKZ8axQzkpON9mjHgg=";
};
patches = [

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, cmake, StormLib }:
{ lib, stdenv, fetchurl, cmake, stormlib }:
stdenv.mkDerivation rec {
pname = "smpq";
@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
];
nativeBuildInputs = [ cmake ];
buildInputs = [ StormLib ];
buildInputs = [ stormlib ];
meta = with lib; {
description = "StormLib MPQ archiving utility";

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "timewarrior";
version = "1.7.0";
version = "1.7.1";
src = fetchFromGitHub {
owner = "GothenburgBitFactory";
repo = "timewarrior";
rev = "v${version}";
sha256 = "sha256-6s/fifjGCkk8JiADPbeiqsKMgY0fkIJBqRPco+rmP1A=";
sha256 = "sha256-sc4AfdXLuA9evoGU6Z97+Hq7zj9nx093+nPALRkhziQ=";
fetchSubmodules = true;
};

View File

@ -27,12 +27,12 @@
stdenv.mkDerivation rec {
pname = "tuba";
version = "0.6.1";
version = "0.6.2";
src = fetchFromGitHub {
owner = "GeopJr";
repo = "Tuba";
rev = "v${version}";
hash = "sha256-Tt2g7xwXf/o/ip5RgUCXclL9omWa/pRglkDMoEGn1AM=";
hash = "sha256-SRK3I4sKJEaWBNs9VOs7Bhth/7gxybWpXJTn4DiQi6U=";
};
nativeBuildInputs = [

View File

@ -1,10 +1,10 @@
{ lib
, buildGo121Module
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
buildGo121Module rec {
buildGoModule rec {
pname = "k0sctl";
version = "0.17.4";

View File

@ -9,13 +9,13 @@
buildGoModule rec {
pname = "kaniko";
version = "1.19.2";
version = "1.20.0";
src = fetchFromGitHub {
owner = "GoogleContainerTools";
repo = "kaniko";
rev = "v${version}";
hash = "sha256-YxOuZb1R9Orm3RTnZyzi54VzQbbmE+lO+4osvG97pwE=";
hash = "sha256-/JSrkxhW2w9K+MGp7+4xMGwWM8dpwRoUam02K+8NsCU=";
};
vendorHash = null;

View File

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "kubecm";
version = "0.26.0";
version = "0.27.1";
src = fetchFromGitHub {
owner = "sunny0826";
repo = "kubecm";
rev = "v${version}";
hash = "sha256-53diz+TNGRmNbSZJAIKPFi0x/BdL02Tjb847I/XdhW0=";
hash = "sha256-Fg+jlnYkdv9Vfj94lxfmhoc6pyM0EAqwIBepFXYoO5M=";
};
vendorHash = "sha256-QPd7gUEY6qNdl96slKvY7+Av6fCU9q+XdjKNKUXz2Wo=";
vendorHash = "sha256-wj/IHNN8r6pwkKk0ZmpRjxr5nE2c+iypjCsZb+i5vwo=";
ldflags = [ "-s" "-w" "-X github.com/sunny0826/kubecm/version.Version=${version}"];
doCheck = false;

View File

@ -1,6 +1,6 @@
{ lib, buildGo121Module, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub }:
buildGo121Module rec {
buildGoModule rec {
pname = "kubectl-klock";
version = "0.5.0";

View File

@ -1,10 +1,10 @@
{ lib
, buildGo121Module
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
buildGo121Module rec {
buildGoModule rec {
pname = "timoni";
version = "0.17.0";

View File

@ -1,9 +1,9 @@
{
"version" = "1.11.54";
"version" = "1.11.55";
"hashes" = {
"desktopSrcHash" = "sha256-lKqcFe73UoGExSK7GGLiknLiRcaP3mIwLzqWdwOKHvQ=";
"desktopSrcHash" = "sha256-Gk6RjhU0vJymz2KmaNJgnuGcSVyJo53iWR3naOx49X4=";
"desktopYarnHash" = "0v3j54a2ixik424za0iwj4sf60g934480jyp5lblhg7z8y5xqks8";
"webSrcHash" = "sha256-4cAa1QjM3N0xFcwwgFtUMJ2hh9uYDn+BE8tcsIuU4U0=";
"webYarnHash" = "13rbll0p4fmmmx3vqdyb5zlxy6zj6sbfklw5v73dacy0j8hzvz2i";
"webSrcHash" = "sha256-dAfPYw3qqj+xY3ZaACsT/Vtp57mag6PJtquxqXZ6F1Q=";
"webYarnHash" = "1aqhdk9mgz5hq7iawjclzfd78wi64kygkklwg6sp6qfv1ayi6b51";
};
}

View File

@ -1,8 +1,8 @@
# Generated by ./update.sh - do not update manually!
# Last updated: 2023-12-29
# Last updated: 2024-01-19
{
version = "3.2.3-20201";
urlhash = "9681283b";
arm64_hash = "sha256-mEXhswuV31kxGX3aTmyqThjkA6VnA4aZ/vLQTgbMaxI=";
amd64_hash = "sha256-iMMQqdfYgdf8szDZ1Frv+oBjRZsPkew+pCaXgu6cxrY=";
version = "3.2.5-20979";
urlhash = "c64ca459";
arm64_hash = "sha256-zzLCWI/0L/6opFpTEQN2xdhqWA8i3pYI+K/0z63tOh4=";
amd64_hash = "sha256-XDQg98Bo0o7BGkMkl6vpUSvUd0wAbMa0cPVFPrIqWAY=";
}

View File

@ -1,11 +1,11 @@
{ lib
, stdenv
, fetchFromGitHub
, buildGo121Module
, buildGoModule
, cmake
, extra-cmake-modules
, git
, go_1_21
, go
, wrapQtAppsHook
, qtbase
, qtquickcontrols2
@ -28,13 +28,14 @@ let
hash = "sha256-nY6DEHkDVWIlvc64smXb9KshrhNgNLKiilYydbMKCqc=";
};
goDeps = (buildGo121Module {
goDeps = (buildGoModule {
pname = "tailwrap";
inherit src version;
modRoot = "tailwrap";
vendorHash = "sha256-Y9xhoTf3vCtiNi5qOPg020EQmASo58BZI3rAoUEC8qE=";
}).goModules;
in stdenv.mkDerivation {
in
stdenv.mkDerivation {
pname = "ktailctl";
inherit version src;
@ -56,7 +57,7 @@ in stdenv.mkDerivation {
cmake
extra-cmake-modules
git
go_1_21
go
wrapQtAppsHook
];

View File

@ -1,6 +1,7 @@
{ stdenv
, lib
, buildFHSEnvChroot
, copyDesktopItems
, fetchurl
, gsettings-desktop-schemas
, makeDesktopItem
@ -10,7 +11,7 @@
, configText ? ""
}:
let
version = "2306";
version = "2309.1";
sysArch =
if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
@ -19,17 +20,13 @@ let
# For USB support, ensure that /var/run/vmware/<YOUR-UID>
# exists and is owned by you. Then run vmware-usbarbitrator as root.
bins = [
"vmware-view"
"vmware-usbarbitrator"
];
mainProgram = "vmware-view";
# This forces the default GTK theme (Adwaita) because Horizon is prone to
# UI usability issues when using non-default themes, such as Adwaita-dark.
wrapBinCommands = name: ''
makeWrapper "$out/bin/${name}" "$out/bin/${name}_wrapper" \
wrapBinCommands = path: name: ''
makeWrapper "$out/${path}/${name}" "$out/bin/${name}_wrapper" \
--set GTK_THEME Adwaita \
--suffix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" \
--suffix LD_LIBRARY_PATH : "$out/lib/vmware/view/crtbora:$out/lib/vmware"
@ -39,8 +36,8 @@ let
pname = "vmware-horizon-files";
inherit version;
src = fetchurl {
url = "https://download3.vmware.com/software/CART24FQ2_LIN_2306_TARBALL/VMware-Horizon-Client-Linux-2306-8.10.0-21964631.tar.gz";
sha256 = "6051f6f1617385b3c211b73ff42dad27e2d22362df6ffd2f3d9f559d0b5743ea";
url = "https://download3.vmware.com/software/CART24FQ4_LIN_2309.1_TARBALL/VMware-Horizon-Client-Linux-2309.1-8.11.1-22775487.tar.gz";
sha256 = "3f66d21c0e97324d1cb85ac75132a69768e8e7ff57da33841e4e8bd37089d245";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
@ -49,7 +46,7 @@ let
chmod -R u+w ext/usr/lib
mv ext/usr $out
cp -r ext/bin ext/lib $out/
cp -r ext/lib $out/
# Horizon includes a copy of libstdc++ which is loaded via $LD_LIBRARY_PATH
# when it cannot detect a new enough version already present on the system.
@ -62,7 +59,8 @@ let
mkdir $out/lib/vmware/view/pkcs11
ln -s ${opensc}/lib/pkcs11/opensc-pkcs11.so $out/lib/vmware/view/pkcs11/libopenscpkcs11.so
${lib.concatMapStrings wrapBinCommands bins}
${wrapBinCommands "bin" "vmware-view"}
${wrapBinCommands "lib/vmware/view/usb" "vmware-usbarbitrator"}
'';
};
@ -121,11 +119,6 @@ let
mimeTypes = [ "x-scheme-handler/vmware-view" ];
};
binLinkCommands = lib.concatMapStringsSep
"\n"
(bin: "ln -s ${vmwareFHSUserEnv bin}/bin/${bin} $out/bin/")
bins;
in
stdenv.mkDerivation {
pname = "vmware-horizon-client";
@ -133,10 +126,16 @@ stdenv.mkDerivation {
dontUnpack = true;
nativeBuildInputs = [ copyDesktopItems ];
desktopItems = [ desktopItem ];
installPhase = ''
mkdir -p $out/bin $out/share/applications
cp ${desktopItem}/share/applications/* $out/share/applications/
${binLinkCommands}
runHook preInstall
mkdir -p $out/bin
ln -s ${vmwareFHSUserEnv "vmware-view"}/bin/vmware-view $out/bin/
ln -s ${vmwareFHSUserEnv "vmware-usbarbitrator"}/bin/vmware-usbarbitrator $out/bin/
runHook postInstall
'';
unwrapped = vmwareHorizonClientFiles;

View File

@ -7,16 +7,16 @@
buildGoModule rec {
pname = "seaweedfs";
version = "3.61";
version = "3.62";
src = fetchFromGitHub {
owner = "seaweedfs";
repo = "seaweedfs";
rev = version;
hash = "sha256-pDCTiuM3PBQxDIwWCDP9ZIjhVMCg70bZzYntJaUn574=";
hash = "sha256-z4RyrrM27krm54iVWKDbMB14MiiydLj4Z/RdjYMZxh0=";
};
vendorHash = "sha256-9i11Kf6rIS1ktHMCk9y3+e0u1hDGNRP/oHKWpOVayy4=";
vendorHash = "sha256-WAGuaL8kDtMUDkHetWagCGZS91Y3Tg2DV2StKgRpuIg=";
subPackages = [ "weed" ];

View File

@ -21,13 +21,13 @@
}:
let
version = "2.3.3";
version = "2.4.0";
src = fetchFromGitHub {
owner = "paperless-ngx";
repo = "paperless-ngx";
rev = "refs/tags/v${version}";
hash = "sha256-2XnOap37ZQjT0qx2ygxXo7n1HJcIEoc5TrMI1JIk4G8=";
hash = "sha256-bIiUG5yLpKOoxByef2Wm7MmSoL5zAYE9x6/zZywG9aE=";
};
python = python3;
@ -52,7 +52,7 @@ let
cd src-ui
'';
npmDepsHash = "sha256-BFfbRrpF8p0AfEdl/KDWWG7qN+F9edvTW3j9jgvLIrc=";
npmDepsHash = "sha256-4PIslsmbcET/kKLZ/gijwEyBB9zgZR6vMU9h9enzScE=";
nativeBuildInputs = [
pkg-config

View File

@ -6,13 +6,13 @@
stdenv.mkDerivation rec {
pname = "abracadabra";
version = "2.3.4";
version = "2.3.5";
src = fetchFromGitHub {
owner = "KejPi";
repo = "AbracaDABra";
rev = "v${version}";
hash = "sha256-giQJ6lOD5TaOa98e7nXf6/HHxP6/TxD9Pgr7xAxvZzs=";
hash = "sha256-iWXQ4Tjqz9Y+pihuMDBKi3iwuo5eAyyAMNtRBxojOhs=";
};
nativeBuildInputs = [

View File

@ -59,6 +59,9 @@ stdenv.mkDerivation {
# Required for a local QCMaquis build
./qcmaquis.patch
# PyParsing >= 3.11 compatibility, can be removed on next release
./pyparsing.patch
];
postPatch = ''

View File

@ -0,0 +1,37 @@
diff --git a/Tools/pymolcas/emil_grammar.py b/Tools/pymolcas/emil_grammar.py
index acbbae8..509c56f 100644
--- a/Tools/pymolcas/emil_grammar.py
+++ b/Tools/pymolcas/emil_grammar.py
@@ -15,6 +15,14 @@
from __future__ import (unicode_literals, division, absolute_import, print_function)
+try:
+ u = unicode
+ del u
+ py2 = True
+except NameError:
+ pass
+
+
from re import sub
from pyparsing import *
@@ -24,6 +32,8 @@ def chomp(s):
def chompAction(s, l, t):
try:
+ if (py2):
+ pass
return list(map(lambda s: chomp(unicode(s)), t))
except NameError:
return list(map(chomp, t))
@@ -33,6 +43,8 @@ def removeEMILEnd(s):
def removeEMILEndAction(s, l, t):
try:
+ if (py2):
+ pass
return list(map(lambda s: removeEMILEnd(unicode(s)), t))
except NameError:
return list(map(removeEMILEnd, t))

View File

@ -7,13 +7,13 @@
}:
python3.pkgs.buildPythonApplication rec {
pname = "nanovna-saver";
version = "0.6.0";
version = "0.6.3";
src = fetchFromGitHub {
owner = "NanoVNA-Saver";
repo = pname;
rev = "v${version}";
sha256 = "sha256-2vDjAdEL8eNje5bm/1m+Fdi+PCGxpXwpxe2KvlLYB58=";
rev = "refs/tags/v${version}";
sha256 = "sha256-lL6n3hcsIbLmrRKPi/ckWW2XUAtmBqvMSplkWOF4VKQ=";
};
nativeBuildInputs = [

View File

@ -122,10 +122,8 @@ in
simulide_1_1_0 = generic {
version = "1.1.0";
release = "RC1";
# The 1.1.0 branch didn't get merged correctly from trunk
# See: https://simulide.com/p/forum/topic/new-files-missing-from-1-1-0-rc1-after-merge
branch = "trunk";
rev = "2162";
branch = "1.1.0";
rev = "1912";
sha256 = "sha256-bgRAqt7h2LtU2Ze6Jiz8APhyPcV15v4ofxIilIeZV9E=";
};
}

View File

@ -7,13 +7,13 @@
stdenv.mkDerivation rec {
pname = "eigenmath";
version = "unstable-2023-12-31";
version = "unstable-2024-01-22";
src = fetchFromGitHub {
owner = "georgeweigt";
repo = pname;
rev = "cc92936e226b0a4c77cdc5d00b7a02c472746f6f";
hash = "sha256-wY06pZzqcgYdBS7ecB3ZnvmK74ve651n6aHHAN5DWdw=";
rev = "db4b22cd536cefbdf0b6c928f11c793a5580da0b";
hash = "sha256-T1GXh1go08XVTToEg5Dq4BuwTCxxqYwQsx+c8g1RPxg=";
};
checkPhase = let emulator = stdenv.hostPlatform.emulator buildPackages; in ''

View File

@ -4,11 +4,11 @@
stdenv.mkDerivation rec {
pname = "cvs-fast-export";
version = "1.62";
version = "1.63";
src = fetchurl {
url = "http://www.catb.org/~esr/cvs-fast-export/cvs-fast-export-${version}.tar.gz";
sha256 = "sha256-ix0fg2wn2yStrgEhAxsSXvLu+C7sb2V5oyVCfhAe/R8=";
sha256 = "sha256-YZF2QebWbvn/N9pLpccudZsFHzocJp/3M0Gx9p7fQ5Y=";
};
strictDeps = true;

View File

@ -3,7 +3,8 @@
, libX11, libXi, libxcb, libXext, libXcursor, glib, libXScrnSaver, libxkbfile, libXtst
, nss, nspr, cups, fetchzip, expat, gdk-pixbuf, libXdamage, libXrandr, dbus
, makeDesktopItem, openssl, wrapGAppsHook, at-spi2-atk, at-spi2-core, libuuid
, e2fsprogs, krb5, libdrm, mesa, unzip, copyDesktopItems, libxshmfence, libxkbcommon
, e2fsprogs, krb5, libdrm, mesa, unzip, copyDesktopItems, libxshmfence, libxkbcommon, git
, libGL, zlib, cacert
}:
with lib;
@ -91,12 +92,14 @@ let
mesa
libxshmfence
libxkbcommon
libGL
zlib
];
desktopItems = [ (makeDesktopItem {
name = pname;
exec = pname;
icon = pname;
name = "GitKraken";
exec = "gitkraken";
icon = "gitkraken";
desktopName = "GitKraken";
genericName = "Git Client";
categories = [ "Development" ];
@ -112,25 +115,37 @@ let
mkdir -p $out/share/${pname}/
cp -R $src/* $out/share/${pname}
mkdir -p $out/bin
ln -s $out/share/${pname}/${pname} $out/bin/
mkdir -p $out/share/pixmaps
cp ${pname}.png $out/share/pixmaps/${pname}.png
cp gitkraken.png $out/share/pixmaps/
runHook postInstall
'';
postFixup = ''
pushd $out/share/${pname}
for file in ${pname} chrome-sandbox chrome_crashpad_handler; do
for file in gitkraken chrome-sandbox chrome_crashpad_handler; do
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $file
done
for file in $(find . -type f \( -name \*.node -o -name ${pname} -o -name \*.so\* \) ); do
for file in $(find . -type f \( -name \*.node -o -name gitkraken -o -name git -o -name git-\* -o -name scalar -o -name \*.so\* \) ); do
patchelf --set-rpath ${libPath}:$out/share/${pname} $file || true
done
popd
# SSL and permissions fix for bundled nodegit
pushd $out/share/${pname}/resources/app.asar.unpacked/node_modules/@axosoft/nodegit/build/Release
mv nodegit-ubuntu-18.node nodegit-ubuntu-18-ssl-1.1.1.node
mv nodegit-ubuntu-18-ssl-static.node nodegit-ubuntu-18.node
chmod 755 nodegit-ubuntu-18.node
popd
# Devendor bundled git
rm -rf $out/share/${pname}/resources/app.asar.unpacked/git
ln -s ${git} $out/share/${pname}/resources/app.asar.unpacked/git
# GitKraken expects the CA bundle to be located in the bundled git directory. Since we replace it with
# the one from nixpkgs, which doesn't provide a CA bundle, we need to explicitly set its location at runtime
makeWrapper $out/share/${pname}/gitkraken $out/bin/gitkraken --set GIT_SSL_CAINFO "${cacert}/etc/ssl/certs/ca-bundle.crt"
'';
};

View File

@ -7,10 +7,10 @@
stdenv.mkDerivation rec {
pname = "bilibili";
version = "1.12.5-2";
version = "1.13.0-2";
src = fetchurl {
url = "https://github.com/msojocs/bilibili-linux/releases/download/v${version}/io.github.msojocs.bilibili_${version}_amd64.deb";
hash = "sha256-oaQvJQVHXm7I+3rjt0DPMwGOXLhwgJP6wWu2bhaA1s4=";
hash = "sha256-svTD8YZBFj0K9/3ggojiH+8cMRkCxHr/hHTC24NL2tE=";
};
unpackPhase = ''

View File

@ -82,6 +82,7 @@ let
"email" = "someone@nixos.org";
"phone" = "+31 71 452 5670";
"country" = "nl";
"street" = "-";
"state" = "Province of Utrecht";
"city" = "Utrecht";
"product" = PRODUCT;
@ -109,6 +110,7 @@ let
--data-ascii "$REQJSON" \
--compressed \
"$SITEURL/$DOWNLOADID")
echo "resolveurl is $RESOLVEURL"
curl \
--retry 3 --retry-delay 3 \
@ -252,7 +254,7 @@ buildFHSEnv {
description = "Professional video editing, color, effects and audio post-processing";
homepage = "https://www.blackmagicdesign.com/products/davinciresolve";
license = licenses.unfree;
maintainers = with maintainers; [ jshcmpbll ];
maintainers = with maintainers; [ jshcmpbll orivej ];
platforms = [ "x86_64-linux" ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
mainProgram = "davinci-resolve";

View File

@ -20,6 +20,8 @@
obs-command-source = callPackage ./obs-command-source.nix { };
obs-composite-blur = callPackage ./obs-composite-blur.nix { };
obs-freeze-filter = qt6Packages.callPackage ./obs-freeze-filter.nix { };
obs-gradient-source = callPackage ./obs-gradient-source.nix { };

View File

@ -0,0 +1,35 @@
{ lib
, stdenv
, fetchFromGitHub
, obs-studio
, cmake
}:
stdenv.mkDerivation rec {
pname = "obs-composite-blur";
version = "1.1.0";
src = fetchFromGitHub {
owner = "FiniteSingularity";
repo = "obs-composite-blur";
rev = "refs/tags/v${version}";
hash = "sha256-icn0X+c7Uf0nTFaVDVTPi26sfWTSeoAj7+guEn9gi9Y=";
};
buildInputs = [
obs-studio
];
nativeBuildInputs = [
cmake
];
meta = with lib; {
description = "A comprehensive blur plugin for OBS that provides several different blur algorithms, and proper compositing";
homepage = "https://github.com/FiniteSingularity/obs-composite-blur";
license = licenses.gpl2Only;
maintainers = with maintainers; [ GaetanLepage ];
mainProgram = "obs-composite-blur";
platforms = platforms.linux;
};
}

View File

@ -19,12 +19,12 @@
}:
stdenv.mkDerivation rec {
pname = "vdr-markad";
version = "3.4.3";
version = "3.4.5";
src = fetchFromGitHub {
repo = "vdr-plugin-markad";
owner = "kfb77";
sha256 = "sha256-1+NpfZaXUaNSRbN07FrjDNqbOotmvrAwf4uLKhnKGkQ=";
sha256 = "sha256-qg3Y449n0xPMQSEn8QwvFC1FA8/MfhY0KPHPHGbApbA=";
rev = "V${version}";
};

View File

@ -49,17 +49,10 @@ stdenv.mkDerivation ({
nativeImageBuildArgs = nativeImageBuildArgs ++ extraNativeImageBuildArgs ++ [ graalvmXmx ];
# Workaround GraalVM issue where the builder does not have access to the
# environment variables since 21.0.0
# https://github.com/oracle/graal/pull/6095
# https://github.com/oracle/graal/pull/6095
# https://github.com/oracle/graal/issues/7502
env.NATIVE_IMAGE_DEPRECATED_BUILDER_SANITATION = "true";
buildPhase = args.buildPhase or ''
runHook preBuild
native-image -jar "$jar" ''${nativeImageBuildArgs[@]}
native-image -jar "$jar" $(export -p | sed -n 's/^declare -x \([^=]\+\)=.*$/ -E\1/p' | tr -d \\n) ''${nativeImageBuildArgs[@]}
runHook postBuild
'';

View File

@ -39,7 +39,7 @@ stdenv.mkDerivation {
enableParallelBuilding = true;
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
NIX_CFLAGS_COMPILE = [
env.NIX_CFLAGS_COMPILE = toString ([
# workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: diffio.o:(.bss+0x16): multiple definition of `bflag'; diffdir.o:(.bss+0x6): first defined here
@ -47,8 +47,11 @@ stdenv.mkDerivation {
# hide really common warning that floods the logs:
# warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
"-D_DEFAULT_SOURCE"
];
LDFLAGS = lib.optionalString enableStatic "-static";
] ++ lib.optionals stdenv.cc.isClang [
# error: call to undeclared function 'p9mbtowc'; ISO C99 and later do not support implicit function declarations
"-Wno-error=implicit-function-declaration"
]);
env.LDFLAGS = lib.optionalString enableStatic "-static";
makeFlags = [
"PREFIX=${placeholder "out"}"
];

View File

@ -33,11 +33,11 @@
stdenv.mkDerivation (finalAttrs: {
pname = "apt";
version = "2.7.8";
version = "2.7.9";
src = fetchurl {
url = "mirror://debian/pool/main/a/apt/apt_${finalAttrs.version}.tar.xz";
hash = "sha256-nAmiwfGEiftDDWFrk+bfWhX2FHOFanidXjzOCtIZXcY=";
hash = "sha256-Zm9BzWQf+YlMulMbDMT88ZnmSUWH/LgqObANyItGuyc=";
};
# cycle detection; lib can't be split

View File

@ -0,0 +1,163 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, gitUpdater
, nixosTests
, ayatana-indicator-messages
, cmake
, dbus
, dbus-test-runner
, evolution-data-server
, glib
, gst_all_1
, gtest
, intltool
, libaccounts-glib
, libayatana-common
, libical
, libnotify
, libuuid
, lomiri
, pkg-config
, properties-cpp
, python3
, systemd
, tzdata
, wrapGAppsHook
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ayatana-indicator-datetime";
version = "23.10.1";
src = fetchFromGitHub {
owner = "AyatanaIndicators";
repo = "ayatana-indicator-datetime";
# Release wasn't tagged?
# https://github.com/AyatanaIndicators/ayatana-indicator-datetime/issues/121
rev = "d8debd706fe92de09e5c654c4ea2cc5dd5ce0529";
hash = "sha256-cm1zhG9TODGe79n/fGuyVnWL/sjxUc3ZCu9FhqA1NLE=";
};
patches = [
# Fix test-menus building & running
# Remove when https://github.com/AyatanaIndicators/ayatana-indicator-datetime/pull/122 merged & in release
(fetchpatch {
name = "0001-ayatana-indicator-datetime-tests-test-menu-Fix-build.patch";
url = "https://github.com/AyatanaIndicators/ayatana-indicator-datetime/commit/a6527e90d855d43f43e1ff9bccda2fa22d3c60ab.patch";
hash = "sha256-RZY51UnrMcXbZbwyuCHSxY6toGByaObSEntVnIMz7+w=";
})
(fetchpatch {
name = "0002-ayatana-indicator-datetime-tests-Fix-show_alarms-tests.patch";
url = "https://github.com/AyatanaIndicators/ayatana-indicator-datetime/commit/5186b51c004ec25e8a44fe5918bceb3d45abb108.patch";
hash = "sha256-goVcpN0MNOic8mpdJdhjgS9LHQLVEZT6ZEg1PqLvmsE=";
})
];
postPatch = ''
# Queries systemd user unit dir via pkg_get_variable, can't override prefix
substituteInPlace data/CMakeLists.txt \
--replace 'pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir)' 'set(SYSTEMD_USER_DIR ''${CMAKE_INSTALL_PREFIX}/lib/systemd/user)' \
--replace '/etc' "\''${CMAKE_INSTALL_SYSCONFDIR}"
# Looking for Lomiri schemas for code generation
substituteInPlace src/CMakeLists.txt \
--replace '/usr/share/accountsservice' '${lomiri.lomiri-schemas}/share/accountsservice'
'';
strictDeps = true;
nativeBuildInputs = [
cmake
glib # for schema hook
intltool
pkg-config
wrapGAppsHook
];
buildInputs = [
ayatana-indicator-messages
evolution-data-server
glib
libaccounts-glib
libayatana-common
libical
libnotify
libuuid
properties-cpp
systemd
] ++ (with gst_all_1; [
gstreamer
gst-plugins-base
gst-plugins-good
]) ++ (with lomiri; [
cmake-extras
lomiri-schemas
lomiri-sounds
lomiri-url-dispatcher
]);
nativeCheckInputs = [
dbus
(python3.withPackages (ps: with ps; [
python-dbusmock
]))
tzdata
];
checkInputs = [
dbus-test-runner
gtest
];
cmakeFlags = [
(lib.cmakeBool "GSETTINGS_LOCALINSTALL" true)
(lib.cmakeBool "GSETTINGS_COMPILE" true)
(lib.cmakeBool "ENABLE_LOMIRI_FEATURES" true)
(lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck)
(lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" (lib.concatStringsSep ";" [
# Exclude tests
"-E" (lib.strings.escapeShellArg "(${lib.concatStringsSep "|" [
# evolution-data-server tests have been silently failing on upstream CI for awhile,
# 23.10.0 release has fixed the silentness but left the tests broken.
# https://github.com/AyatanaIndicators/ayatana-indicator-datetime/commit/3e65062b5bb0957b5bb683ff04cb658d9d530477
"^test-eds-ics"
]})")
]))
];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
enableParallelChecking = false;
preCheck = ''
export XDG_DATA_DIRS=${glib.passthru.getSchemaDataDirPath libayatana-common}
'';
passthru = {
ayatana-indicators = [
"ayatana-indicator-datetime"
];
tests = {
inherit (nixosTests) ayatana-indicators;
};
# Latest release wasn't tagged, Don't try to bump down
#updateScript = gitUpdater { };
};
meta = with lib; {
description = "Ayatana Indicator providing clock and calendar";
longDescription = ''
This Ayatana Indicator provides a combined calendar, clock, alarm and
event management tool.
'';
homepage = "https://github.com/AyatanaIndicators/ayatana-indicator-datetime";
# Latest release wasn't tagged
# changelog = "https://github.com/AyatanaIndicators/ayatana-indicator-datetime/blob/${finalAttrs.version}/ChangeLog";
changelog = "https://github.com/AyatanaIndicators/ayatana-indicator-datetime/blob/${finalAttrs.finalPackage.src.rev}/ChangeLog";
license = licenses.gpl3Only;
maintainers = with maintainers; [ OPNA2608 ];
platforms = platforms.linux;
};
})

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation (final: {
pname = "boxed-cpp";
version = "1.1.0";
version = "1.2.0";
src = fetchFromGitHub {
owner = "contour-terminal";
repo = "boxed-cpp";
rev = "v${final.version}";
hash = "sha256-8qhP1yXdRTbU/IbDAaQrdjzIMM5ZjCAULI07dw44XcE=";
hash = "sha256-Su0FdDi1JVoXd7rJ1SG4cQg2G/+mW5iU1892ee6mRl8=";
};
nativeBuildInputs = [ cmake ];

View File

@ -0,0 +1,62 @@
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, exiv2
, flex
, libewf
, libxml2
, openssl
, tre
, zlib
}:
stdenv.mkDerivation (finalAttrs: {
pname = "bulk_extractor";
version = "2.0.6";
src = fetchFromGitHub {
owner = "simsong";
repo = "bulk_extractor";
rev = "v${finalAttrs.version}";
hash = "sha256-LNdRN4pEA0rVEyKiBKGJgTKA4veVvsuP3ufiolHTk/s=";
fetchSubmodules = true;
};
enableParallelBuilding = true;
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [
exiv2
flex
libewf
libxml2
openssl
tre
zlib
];
meta = with lib; {
description = "A digital forensics tool for extracting information from file systems";
longDescription = ''
bulk_extractor is a C++ program that scans a disk image, a file, or a
directory of files and extracts useful information without parsing
the file system or file system structures. The results are stored in
feature files that can be easily inspected, parsed, or processed with
automated tools.
'';
mainProgram = "bulk_extractor";
homepage = "https://github.com/simsong/bulk_extractor";
downloadPage = "http://downloads.digitalcorpora.org/downloads/bulk_extractor/";
changelog = "https://github.com/simsong/bulk_extractor/blob/${finalAttrs.src.rev}/ChangeLog";
maintainers = with maintainers; [ d3vil0p3r ];
platforms = with platforms; unix ++ windows;
license = with licenses; [
mit
cpl10
gpl3Only
lgpl21Only
lgpl3Only
licenses.openssl
];
};
})

View File

@ -6,14 +6,14 @@
python3.pkgs.buildPythonApplication rec {
pname = "gato";
version = "1.5";
version = "1.6";
pyproject = true;
src = fetchFromGitHub {
owner = "praetorian-inc";
repo = "gato";
rev = "refs/tags/${version}";
hash = "sha256-M9ONeLjEKQD5Kys7OriM34dEBWDKW3qrBk9lu2TitGE=";
hash = "sha256-vXQFgP0KDWo1VWe7tMGCB2yEYlr/1KMXsiNupBVLBqc=";
};
postPatch = ''

View File

@ -0,0 +1,51 @@
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
buildGoModule rec {
pname = "gtrash";
version = "0.0.5";
src = fetchFromGitHub {
owner = "umlx5h";
repo = "gtrash";
rev = "v${version}";
hash = "sha256-5+wcrU2mx/ZawMCSCU4xddMlMVpoIW/Duv7XqUVIDoo=";
};
vendorHash = "sha256-iWNuPxetYH9xJpf3WMoA5c50kII9DUpWvhTVSE1kSk0=";
subPackages = [ "." ];
# disabled because it is required to run on docker.
doCheck = false;
CGO_ENABLED = 0;
GOFLAGS = [ "-trimpath" ];
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
"-X main.builtBy=nixpkgs"
];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd gtrash \
--bash <($out/bin/gtrash completion bash) \
--fish <($out/bin/gtrash completion fish) \
--zsh <($out/bin/gtrash completion zsh)
'';
meta = with lib; {
description = "A Trash CLI manager written in Go";
homepage = "https://github.com/umlx5h/gtrash";
changelog = "https://github.com/umlx5h/gtrash/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ umlx5h ];
mainProgram = "gtrash";
};
}

View File

@ -6,7 +6,7 @@
let
pname = "lefthook";
version = "1.5.6";
version = "1.5.7";
in
buildGoModule rec {
inherit pname version;
@ -15,7 +15,7 @@ buildGoModule rec {
owner = "evilmartians";
repo = "lefthook";
rev = "v${version}";
hash = "sha256-6RSIrsm2VNlOtjAwz/HuCH4VOz/3W6snHSI1LypINYU=";
hash = "sha256-0z4hTx9ClGh20Ncf23SbwuPBdGoFz80FQUx7s77l7y8=";
};
vendorHash = "sha256-/VLS7+nPERjIU7V2CzqXH69Z3/y+GKZbAFn+KcRKRuA=";

View File

@ -0,0 +1,29 @@
{ lib
, stdenv
, fetchFromGitHub
}:
stdenv.mkDerivation {
pname = "move-mount-beneath";
version = "unstable-2023-11-26";
src = fetchFromGitHub {
owner = "brauner";
repo = "move-mount-beneath";
rev = "d3d16c0d7766eb1892fcc24a75f8d35df4b0fe45";
hash = "sha256-hUboFthw9ABwK6MRSNg7+iu9YbiJALNdsw9Ub3v43n4=";
};
installPhase = ''
runHook preInstall
install -D move-mount $out/bin/move-mount
runHook postInstall
'';
meta = {
description = "Toy binary to illustrate adding a mount beneath an existing mount";
homepage = "https://github.com/brauner/move-mount-beneath";
license = lib.licenses.mit0;
maintainers = with lib.maintainers; [ nikstur ];
};
}

View File

@ -0,0 +1,31 @@
{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "nvdtools";
version = "0.1.5";
src = fetchFromGitHub {
owner = "facebookincubator";
repo = "nvdtools";
rev = "refs/tags/v${version}";
hash = "sha256-uB7dfqGaoP9Xx04BykscIFQ2rckaMaj93gh5mhgMqfw=";
};
vendorHash = "sha256-DzhP42DaddIm+/Z3a83rWX5WY+tM1P+vBNe6B91L7E8=";
ldflags = [
"-s"
"-w"
];
meta = with lib; {
description = "Tools to work with the feeds (vulnerabilities, CPE dictionary etc.) distributed by National Vulnerability Database";
homepage = "https://github.com/facebookincubator/nvdtools";
changelog = "https://github.com/facebookincubator/nvdtools/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -0,0 +1,79 @@
diff --git a/ext/test/http/curl_http_test.cc b/ext/test/http/curl_http_test.cc
index 7c66d98b..62d40f49 100644
--- a/ext/test/http/curl_http_test.cc
+++ b/ext/test/http/curl_http_test.cc
@@ -229,7 +229,7 @@ TEST_F(BasicCurlHttpTests, HttpResponse)
ASSERT_EQ(count, 4);
}
-TEST_F(BasicCurlHttpTests, SendGetRequest)
+TEST_F(BasicCurlHttpTests, DISABLED_SendGetRequest)
{
received_requests_.clear();
auto session_manager = http_client::HttpClientFactory::Create();
@@ -246,7 +246,7 @@ TEST_F(BasicCurlHttpTests, SendGetRequest)
ASSERT_TRUE(handler->got_response_);
}
-TEST_F(BasicCurlHttpTests, SendPostRequest)
+TEST_F(BasicCurlHttpTests, DISABLED_SendPostRequest)
{
received_requests_.clear();
auto session_manager = http_client::HttpClientFactory::Create();
@@ -325,7 +325,7 @@ TEST_F(BasicCurlHttpTests, CurlHttpOperations)
delete handler;
}
-TEST_F(BasicCurlHttpTests, SendGetRequestSync)
+TEST_F(BasicCurlHttpTests, DISABLED_SendGetRequestSync)
{
received_requests_.clear();
curl::HttpClientSync http_client;
@@ -336,7 +336,7 @@ TEST_F(BasicCurlHttpTests, SendGetRequestSync)
EXPECT_EQ(result.GetSessionState(), http_client::SessionState::Response);
}
-TEST_F(BasicCurlHttpTests, SendGetRequestSyncTimeout)
+TEST_F(BasicCurlHttpTests, DISABLED_SendGetRequestSyncTimeout)
{
received_requests_.clear();
curl::HttpClientSync http_client;
@@ -350,7 +350,7 @@ TEST_F(BasicCurlHttpTests, SendGetRequestSyncTimeout)
result.GetSessionState() == http_client::SessionState::SendFailed);
}
-TEST_F(BasicCurlHttpTests, SendPostRequestSync)
+TEST_F(BasicCurlHttpTests, DISABLED_SendPostRequestSync)
{
received_requests_.clear();
curl::HttpClientSync http_client;
@@ -378,7 +378,7 @@ TEST_F(BasicCurlHttpTests, GetBaseUri)
"http://127.0.0.1:31339/");
}
-TEST_F(BasicCurlHttpTests, SendGetRequestAsync)
+TEST_F(BasicCurlHttpTests, DISABLED_SendGetRequestAsync)
{
curl::HttpClient http_client;
@@ -452,7 +452,7 @@ TEST_F(BasicCurlHttpTests, SendGetRequestAsyncTimeout)
}
}
-TEST_F(BasicCurlHttpTests, SendPostRequestAsync)
+TEST_F(BasicCurlHttpTests, DISABLED_SendPostRequestAsync)
{
curl::HttpClient http_client;
@@ -491,7 +491,7 @@ TEST_F(BasicCurlHttpTests, SendPostRequestAsync)
}
}
-TEST_F(BasicCurlHttpTests, FinishInAsyncCallback)
+TEST_F(BasicCurlHttpTests, DISABLED_FinishInAsyncCallback)
{
curl::HttpClient http_client;
--
2.40.1

Some files were not shown because too many files have changed in this diff Show More