Merge remote-tracking branch 'origin/master' into haskell-updates

This commit is contained in:
sternenseemann 2023-08-16 18:33:51 +02:00
commit f3403ee5a2
193 changed files with 3511 additions and 5701 deletions

2
.github/CODEOWNERS vendored
View File

@ -296,6 +296,8 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
# Dotnet
/pkgs/build-support/dotnet @IvarWithoutBones
/pkgs/development/compilers/dotnet @IvarWithoutBones
/pkgs/test/dotnet @IvarWithoutBones
/doc/languages-frameworks/dotnet.section.md @IvarWithoutBones
# Node.js
/pkgs/build-support/node/build-npm-package @lilyinstarlight @winterqt

View File

@ -210,3 +210,5 @@ buildDotnetGlobalTool {
};
}
```
When packaging a new .NET application in nixpkgs, you can tag the [`@NixOS/dotnet`](https://github.com/orgs/nixos/teams/dotnet) team for help and code review.

View File

@ -116,7 +116,7 @@ let
inherit (self.derivations) lazyDerivation;
inherit (self.meta) addMetaAttrs dontDistribute setName updateName
appendToName mapDerivationAttrset setPrio lowPrio lowPrioSet hiPrio
hiPrioSet getLicenseFromSpdxId getExe;
hiPrioSet getLicenseFromSpdxId getExe getExe';
inherit (self.filesystem) pathType pathIsDirectory pathIsRegularFile;
inherit (self.sources) cleanSourceFilter
cleanSource sourceByRegex sourceFilesBySuffices

View File

@ -143,9 +143,24 @@ rec {
=> "/nix/store/am9ml4f4ywvivxnkiaqwr0hyxka1xjsf-mustache-go-1.3.0/bin/mustache"
*/
getExe = x:
"${lib.getBin x}/bin/${x.meta.mainProgram or (
let
y = x.meta.mainProgram or (
# This could be turned into an error when 23.05 is at end of life
lib.warn "getExe: Package ${lib.strings.escapeNixIdentifier x.meta.name or x.pname or x.name} does not have the meta.mainProgram attribute. We'll assume that the main program has the same name for now, but this behavior is deprecated, because it leads to surprising errors when the assumption does not hold. If the package has a main program, please set `meta.mainProgram` in its definition to make this warning go away. Otherwise, if the package does not have a main program, or if you don't control its definition, specify the full path to the program, such as \"\${lib.getBin foo}/bin/bar\"."
lib.getName x
)}";
lib.warn "getExe: Package ${lib.strings.escapeNixIdentifier x.meta.name or x.pname or x.name} does not have the meta.mainProgram attribute. We'll assume that the main program has the same name for now, but this behavior is deprecated, because it leads to surprising errors when the assumption does not hold. If the package has a main program, please set `meta.mainProgram` in its definition to make this warning go away. Otherwise, if the package does not have a main program, or if you don't control its definition, use getExe' to specify the name to the program, such as lib.getExe' foo \"bar\"."
lib.getName
x
);
in
getExe' x y;
/* Get the path of a program of a derivation.
Type: getExe' :: derivation -> string -> string
Example:
getExe' pkgs.hello "hello"
=> "/nix/store/g124820p9hlv4lj8qplzxw1c44dxaw1k-hello-2.12/bin/hello"
getExe' pkgs.imagemagick "convert"
=> "/nix/store/5rs48jamq7k6sal98ymj9l4k2bnwq515-imagemagick-7.1.1-15/bin/convert"
*/
getExe' = x: y: "${lib.getBin x}/bin/${y}";
}

View File

@ -221,6 +221,8 @@ rec {
vendors = setTypes types.openVendor {
apple = {};
pc = {};
knuth = {};
# Actually matters, unlocking some MinGW-w64-specific options in GCC. See
# bottom of https://sourceforge.net/p/mingw-w64/wiki2/Unicode%20apps/
w64 = {};

View File

@ -1466,6 +1466,15 @@
githubId = 1482768;
name = "Benjamin Asbach";
};
asciimoth = {
name = "Andrew";
email = "ascii@moth.contact";
github = "asciimoth";
githubId = 91414737;
keys = [{
fingerprint = "C5C8 4658 CCFD 7E8E 71DE E933 AF3A E54F C3A3 5C9F";
}];
};
ashalkhakov = {
email = "artyom.shalkhakov@gmail.com";
github = "ashalkhakov";
@ -7528,6 +7537,12 @@
githubId = 7558482;
name = "Jack Gerrits";
};
jaduff = {
email = "jdduffpublic@proton.me";
github = "jaduff";
githubId = 10690970;
name = "James Duff";
};
jagajaga = {
email = "ars.seroka@gmail.com";
github = "jagajaga";
@ -17056,6 +17071,13 @@
githubId = 1292007;
name = "Sébastien Maccagnoni";
};
tiredofit = {
email = "dave@tiredofit.ca";
github = "tiredofit";
githubId = 23528985;
name = "Dave Conroy";
matrix = "@dave:tiredofit.ca";
};
tirex = {
email = "szymon@kliniewski.pl";
name = "Szymon Kliniewski";

View File

@ -181,6 +181,19 @@ with lib.maintainers; {
shortName = "Cosmopolitan";
};
dotnet = {
members = [
ivar
mdarocha
corngood
raphaelr
jamiemagee
anpin
];
scope = "Maintainers of the .NET build tools and packages";
shortName = "dotnet";
};
deepin = {
members = [
rewine

View File

@ -118,3 +118,33 @@ the symlink, and this path is in `/nix/store/.../lib/systemd/user/`.
Hence [garbage collection](#sec-nix-gc) will remove that file and you
will wind up with a broken symlink in your systemd configuration, which
in turn will not make the service / timer start on login.
## Template units {#sect-nixos-systemd-template-units}
systemd supports templated units where a base unit can be started multiple
times with a different parameter. The syntax to accomplish this is
`service-name@instance-name.service`. Units get the instance name passed to
them (see `systemd.unit(5)`). NixOS has support for these kinds of units and
for template-specific overrides. A service needs to be defined twice, once
for the base unit and once for the instance. All instances must include
`overrideStrategy = "asDropin"` for the change detection to work. This
example illustrates this:
```nix
{
systemd.services = {
"base-unit@".serviceConfig = {
ExecStart = "...";
User = "...";
};
"base-unit@instance-a" = {
overrideStrategy = "asDropin"; # needed for templates to work
wantedBy = [ "multi-user.target" ]; # causes NixOS to manage the instance
};
"base-unit@instance-b" = {
overrideStrategy = "asDropin"; # needed for templates to work
wantedBy = [ "multi-user.target" ]; # causes NixOS to manage the instance
serviceConfig.User = "root"; # also override something for this specific instance
};
};
}
```

View File

@ -7,6 +7,7 @@ You can quickly check your edits with the following:
```ShellSession
$ cd /path/to/nixpkgs
$ $EDITOR doc/nixos/manual/... # edit the manual
$ nix-build nixos/release.nix -A manual.x86_64-linux
```
@ -14,24 +15,96 @@ If the build succeeds, the manual will be in `./result/share/doc/nixos/index.htm
There's also [a convenient development daemon](https://nixos.org/manual/nixpkgs/unstable/#sec-contributing-devmode).
**Contributing to the man pages**
The above instructions don't deal with the appendix of available `configuration.nix` options, and the manual pages related to NixOS. These are built, and written in a different location and in a different format, as explained in the next sections.
The man pages are written in [DocBook] which is XML.
## Contributing to the `configuration.nix` options documentation {#sec-contributing-options}
To see what your edits look like:
The documentation for all the different `configuration.nix` options is automatically generated by reading the `description`s of all the NixOS options defined at `nixos/modules/`. If you want to improve such `description`, find it in the `nixos/modules/` directory, and edit it and open a pull request.
To see how your changes render on the web, run again:
```ShellSession
$ nix-build nixos/release.nix -A manual.x86_64-linux
```
And you'll see the changes to the appendix in the path `result/share/doc/nixos/options.html`.
You can also build only the `configuration.nix(5)` manual page, via:
```ShellSession
$ cd /path/to/nixpkgs
$ nix-build nixos/release.nix -A manpages.x86_64-linux
$ nix-build nixos/release.nix -A nixos-configuration-reference-manpage.x86_64-linux
```
You can then read the man page you edited by running
And observe the result via:
```ShellSession
$ man --manpath=result/share/man nixos-rebuild # Replace nixos-rebuild with the command whose manual you edited
$ man --local-file result/share/man/man5/configuration.nix.5
```
If you're on a different architecture that's supported by NixOS (check nixos/release.nix) then replace `x86_64-linux` with the architecture.
`nix-build` will complain otherwise, but should also tell you which architecture you have + the supported ones.
If you're on a different architecture that's supported by NixOS (check file `nixos/release.nix` on Nixpkgs' repository) then replace `x86_64-linux` with the architecture. `nix-build` will complain otherwise, but should also tell you which architecture you have + the supported ones.
[DocBook]: https://en.wikipedia.org/wiki/DocBook
## Contributing to `nixos-*` tools' manpages {#sec-contributing-nixos-tools}
The manual pages for the tools available in the installation image can be found in Nixpkgs by running (e.g for `nixos-rebuild`):
```ShellSession
$ git ls | grep nixos-rebuild.8
```
Man pages are written in [`mdoc(7)` format](https://mandoc.bsd.lv/man/mdoc.7.html) and should be portable between mandoc and groff for rendering (except for minor differences, notably different spacing rules.)
For a preview, run `man --local-file path/to/file.8`.
Being written in `mdoc`, these manpages use semantic markup. This following subsections provides a guideline on where to apply which semantic elements.
### Command lines and arguments {#ssec-contributing-nixos-tools-cli-and-args}
In any manpage, commands, flags and arguments to the *current* executable should be marked according to their semantics. Commands, flags and arguments passed to *other* executables should not be marked like this and should instead be considered as code examples and marked with `Ql`.
- Use `Fl` to mark flag arguments, `Ar` for their arguments.
- Repeating arguments should be marked by adding an ellipsis (spelled with periods, `...`).
- Use `Cm` to mark literal string arguments, e.g. the `boot` command argument passed to `nixos-rebuild`.
- Optional flags or arguments should be marked with `Op`. This includes optional repeating arguments.
- Required flags or arguments should not be marked.
- Mutually exclusive groups of arguments should be enclosed in curly brackets, preferably created with `Bro`/`Brc` blocks.
When an argument is used in an example it should be marked up with `Ar` again to differentiate it from a constant. For example, a command with a `--host name` option that calls ssh to retrieve the host's local time would signify this thusly:
```
This will run
.Ic ssh Ar name Ic time
to retrieve the remote time.
```
### Paths, NixOS options, environment variables {#ssec-contributing-nixos-tools-options-and-environment}
Constant paths should be marked with `Pa`, NixOS options with `Va`, and environment variables with `Ev`.
Generated paths, e.g. `result/bin/run-hostname-vm` (where `hostname` is a variable or arguments) should be marked as `Ql` inline literals with their variable components marked appropriately.
- When `hostname` refers to an argument, it becomes `.Ql result/bin/run- Ns Ar hostname Ns -vm`
- When `hostname` refers to a variable, it becomes `.Ql result/bin/run- Ns Va hostname Ns -vm`
### Code examples and other commands {#ssec-contributing-nixos-tools-code-examples}
In free text names and complete invocations of other commands (e.g. `ssh` or `tar -xvf src.tar`) should be marked with `Ic`, fragments of command lines should be marked with `Ql`.
Larger code blocks or those that cannot be shown inline should use indented literal display block markup for their contents, i.e.
```
.Bd -literal -offset indent
...
.Ed
```
Contents of code blocks may be marked up further, e.g. if they refer to arguments that will be substituted into them:
```
.Bd -literal -offset indent
{
config.networking.hostname = "\c
.Ar hostname Ns \c
";
}
.Ed
```

View File

@ -184,8 +184,8 @@ in rec {
'';
# Generate the NixOS manpages.
manpages = runCommand "nixos-manpages"
# Generate the `man configuration.nix` package
nixos-configuration-reference-manpage = runCommand "nixos-configuration-reference-manpage"
{ nativeBuildInputs = [
buildPackages.installShellFiles
buildPackages.nixos-render-docs
@ -194,8 +194,6 @@ in rec {
}
''
# Generate manpages.
mkdir -p $out/share/man/man8
installManPage ${./manpages}/*
mkdir -p $out/share/man/man5
nixos-render-docs -j $NIX_BUILD_CORES options manpage \
--revision ${lib.escapeShellArg revision} \

View File

@ -1,57 +0,0 @@
# NixOS manpages
This is the collection of NixOS manpages, excluding `configuration.nix(5)`.
Man pages are written in [`mdoc(7)` format](https://mandoc.bsd.lv/man/mdoc.7.html) and should be portable between mandoc and groff for rendering (though minor differences may occur, mandoc and groff seem to have slightly different spacing rules.)
For previewing edited files, you can just run `man -l path/to/file.8` and you will see it rendered.
Being written in `mdoc` these manpages use semantic markup. This file provides a guideline on where to apply which of the semantic elements of `mdoc`.
### Command lines and arguments
In any manpage, commands, flags and arguments to the *current* executable should be marked according to their semantics. Commands, flags and arguments passed to *other* executables should not be marked like this and should instead be considered as code examples and marked with `Ql`.
- Use `Fl` to mark flag arguments, `Ar` for their arguments.
- Repeating arguments should be marked by adding ellipses (`...`).
- Use `Cm` to mark literal string arguments, e.g. the `boot` command argument passed to `nixos-rebuild`.
- Optional flags or arguments should be marked with `Op`. This includes optional repeating arguments.
- Required flags or arguments should not be marked.
- Mutually exclusive groups of arguments should be enclosed in curly brackets, preferably created with `Bro`/`Brc` blocks.
When an argument is used in an example it should be marked up with `Ar` again to differentiate it from a constant. For example, a command with a `--host name` flag that calls ssh to retrieve the host's local time would signify this thusly:
```
This will run
.Ic ssh Ar name Ic time
to retrieve the remote time.
```
### Paths, NixOS options, environment variables
Constant paths should be marked with `Pa`, NixOS options with `Va`, and environment variables with `Ev`.
Generated paths, e.g. `result/bin/run-hostname-vm` (where `hostname` is a variable or arguments) should be marked as `Ql` inline literals with their variable components marked appropriately.
- Taking `hostname` from an argument become `.Ql result/bin/run- Ns Ar hostname Ns -vm`
- Taking `hostname` from a variable otherwise defined becomes `.Ql result/bin/run- Ns Va hostname Ns -vm`
### Code examples and other commands
In free text names and complete invocations of other commands (e.g. `ssh` or `tar -xvf src.tar`) should be marked with `Ic`, fragments of command lines should be marked with `Ql`.
Larger code blocks or those that cannot be shown inline should use indented literal display block markup for their contents, i.e.
```
.Bd -literal -offset indent
...
.Ed
```
Contents of code blocks may be marked up further, e.g. if they refer to arguments that will be substituted into them:
```
.Bd -literal -offset indent
{
options.hostname = "\c
.Ar hostname Ns \c
";
}
.Ed
```

View File

@ -9,12 +9,19 @@ let
makeProg = args: pkgs.substituteAll (args // {
dir = "bin";
isExecutable = true;
nativeBuildInputs = [
pkgs.installShellFiles
];
postInstall = ''
installManPage ${args.manPage}
'';
});
nixos-build-vms = makeProg {
name = "nixos-build-vms";
src = ./nixos-build-vms/nixos-build-vms.sh;
inherit (pkgs) runtimeShell;
manPage = ./manpages/nixos-build-vms.8;
};
nixos-install = makeProg {
@ -27,6 +34,7 @@ let
nixos-enter
pkgs.util-linuxMinimal
];
manPage = ./manpages/nixos-install.8;
};
nixos-rebuild = pkgs.nixos-rebuild.override { nix = config.nix.package.out; };
@ -40,6 +48,7 @@ let
btrfs = "${pkgs.btrfs-progs}/bin/btrfs";
inherit (config.system.nixos-generate-config) configuration desktopConfiguration;
xserverEnabled = config.services.xserver.enable;
manPage = ./manpages/nixos-generate-config.8;
};
inherit (pkgs) nixos-option;
@ -57,6 +66,7 @@ let
} // optionalAttrs (config.system.configurationRevision != null) {
configurationRevision = config.system.configurationRevision;
});
manPage = ./manpages/nixos-version.8;
};
nixos-enter = makeProg {
@ -66,6 +76,7 @@ let
path = makeBinPath [
pkgs.util-linuxMinimal
];
manPage = ./manpages/nixos-enter.8;
};
in

View File

@ -346,7 +346,7 @@ in
system.build.manual = manual;
environment.systemPackages = []
++ optional cfg.man.enable manual.manpages
++ optional cfg.man.enable manual.nixos-configuration-reference-manpage
++ optionals cfg.doc.enable [ manual.manualHTML nixos-help ];
})

View File

@ -1,8 +1,17 @@
{ config, lib, pkgs, ... }:
with lib;
let
inherit
(lib)
escapeShellArg
hasAttr
literalExpression
mkEnableOption
mkIf
mkOption
types
;
format = pkgs.formats.json { };
cfg = config.services.influxdb2;
configFile = format.generate "config.json" cfg.settings;
@ -24,14 +33,60 @@ in
description = lib.mdDoc ''configuration options for influxdb2, see <https://docs.influxdata.com/influxdb/v2.0/reference/config-options> for details.'';
type = format.type;
};
provision = {
enable = mkEnableOption "initial database setup and provisioning";
initialSetup = {
organization = mkOption {
type = types.str;
example = "main";
description = "Primary organization name";
};
bucket = mkOption {
type = types.str;
example = "example";
description = "Primary bucket name";
};
username = mkOption {
type = types.str;
default = "admin";
description = "Primary username";
};
retention = mkOption {
type = types.str;
default = "0";
description = ''
The duration for which the bucket will retain data (0 is infinite).
Accepted units are `ns` (nanoseconds), `us` or `µs` (microseconds), `ms` (milliseconds),
`s` (seconds), `m` (minutes), `h` (hours), `d` (days) and `w` (weeks).
'';
};
passwordFile = mkOption {
type = types.path;
description = "Password for primary user. Don't use a file from the nix store!";
};
tokenFile = mkOption {
type = types.path;
description = "API Token to set for the admin user. Don't use a file from the nix store!";
};
};
};
};
};
config = mkIf cfg.enable {
assertions = [{
assertion = !(builtins.hasAttr "bolt-path" cfg.settings) && !(builtins.hasAttr "engine-path" cfg.settings);
assertions = [
{
assertion = !(hasAttr "bolt-path" cfg.settings) && !(hasAttr "engine-path" cfg.settings);
message = "services.influxdb2.config: bolt-path and engine-path should not be set as they are managed by systemd";
}];
}
];
systemd.services.influxdb2 = {
description = "InfluxDB is an open-source, distributed, time series database";
@ -52,7 +107,62 @@ in
LimitNOFILE = 65536;
KillMode = "control-group";
Restart = "on-failure";
LoadCredential = [
"admin-password:${cfg.provision.initialSetup.passwordFile}"
"admin-token:${cfg.provision.initialSetup.tokenFile}"
];
};
path = [pkgs.influxdb2-cli];
# Mark if this is the first startup so postStart can do the initial setup
preStart = mkIf cfg.provision.enable ''
if ! test -e "$STATE_DIRECTORY/influxd.bolt"; then
touch "$STATE_DIRECTORY/.first_startup"
fi
'';
postStart = let
initCfg = cfg.provision.initialSetup;
in mkIf cfg.provision.enable (
''
set -euo pipefail
export INFLUX_HOST="http://"${escapeShellArg (cfg.settings.http-bind-address or "localhost:8086")}
# Wait for the influxdb server to come online
count=0
while ! influx ping &>/dev/null; do
if [ "$count" -eq 300 ]; then
echo "Tried for 30 seconds, giving up..."
exit 1
fi
if ! kill -0 "$MAINPID"; then
echo "Main server died, giving up..."
exit 1
fi
sleep 0.1
count=$((count++))
done
# Do the initial database setup. Pass /dev/null as configs-path to
# avoid saving the token as the active config.
if test -e "$STATE_DIRECTORY/.first_startup"; then
influx setup \
--configs-path /dev/null \
--org ${escapeShellArg initCfg.organization} \
--bucket ${escapeShellArg initCfg.bucket} \
--username ${escapeShellArg initCfg.username} \
--password "$(< "$CREDENTIALS_DIRECTORY/admin-password")" \
--token "$(< "$CREDENTIALS_DIRECTORY/admin-token")" \
--retention ${escapeShellArg initCfg.retention} \
--force >/dev/null
rm -f "$STATE_DIRECTORY/.first_startup"
fi
''
);
};
users.extraUsers.influxdb2 = {
@ -63,5 +173,5 @@ in
users.extraGroups.influxdb2 = {};
};
meta.maintainers = with lib.maintainers; [ nickcao ];
meta.maintainers = with lib.maintainers; [ nickcao oddlama ];
}

View File

@ -94,6 +94,16 @@ in
instance will require manual migration of data.
'';
};
global.allow_check_for_updates = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Whether to allow Conduit to automatically contact
<https://conduit.rs> hourly to check for important Conduit news.
Disabled by default because nixpkgs handles updates.
'';
};
};
};
default = {};

View File

@ -292,7 +292,7 @@ in {
};
client_secret_path = mkOption {
type = types.nullOr types.path;
type = types.nullOr types.str;
default = null;
description = lib.mdDoc ''
Path to OpenID Connect client secret file. Expands environment variables in format ''${VAR}.

View File

@ -1,79 +1,66 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.mediamtx;
package = pkgs.mediamtx;
format = pkgs.formats.yaml {};
in
{
meta.maintainers = with lib.maintainers; [ fpletz ];
options = {
services.mediamtx = {
enable = mkEnableOption (lib.mdDoc "MediaMTX");
enable = lib.mkEnableOption (lib.mdDoc "MediaMTX");
settings = mkOption {
package = lib.mkPackageOptionMD pkgs "mediamtx" { };
settings = lib.mkOption {
description = lib.mdDoc ''
Settings for MediaMTX.
Read more at <https://github.com/aler9/mediamtx/blob/main/mediamtx.yml>
Settings for MediaMTX. Refer to the defaults at
<https://github.com/bluenviron/mediamtx/blob/main/mediamtx.yml>.
'';
type = format.type;
default = {
logLevel = "info";
logDestinations = [
"stdout"
];
# we set this so when the user uses it, it just works (see LogsDirectory below). but it's not used by default.
logFile = "/var/log/mediamtx/mediamtx.log";
};
default = {};
example = {
paths = {
cam = {
runOnInit = "ffmpeg -f v4l2 -i /dev/video0 -f rtsp rtsp://localhost:$RTSP_PORT/$RTSP_PATH";
runOnInit = "\${lib.getExe pkgs.ffmpeg} -f v4l2 -i /dev/video0 -f rtsp rtsp://localhost:$RTSP_PORT/$RTSP_PATH";
runOnInitRestart = true;
};
};
};
};
env = mkOption {
type = with types; attrsOf anything;
env = lib.mkOption {
type = with lib.types; attrsOf anything;
description = lib.mdDoc "Extra environment variables for MediaMTX";
default = {};
example = {
MTX_CONFKEY = "mykey";
};
};
allowVideoAccess = lib.mkEnableOption (lib.mdDoc ''
Enable access to video devices like cameras on the system.
'');
};
};
config = mkIf (cfg.enable) {
config = lib.mkIf cfg.enable {
# NOTE: mediamtx watches this file and automatically reloads if it changes
environment.etc."mediamtx.yaml".source = format.generate "mediamtx.yaml" cfg.settings;
systemd.services.mediamtx = {
environment = cfg.env;
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = with pkgs; [
ffmpeg
];
environment = cfg.env;
serviceConfig = {
DynamicUser = true;
User = "mediamtx";
Group = "mediamtx";
LogsDirectory = "mediamtx";
# user likely may want to stream cameras, can't hurt to add video group
SupplementaryGroups = "video";
ExecStart = "${package}/bin/mediamtx /etc/mediamtx.yaml";
SupplementaryGroups = lib.mkIf cfg.allowVideoAccess "video";
ExecStart = "${cfg.package}/bin/mediamtx /etc/mediamtx.yaml";
};
};
};

View File

@ -253,16 +253,24 @@ sub parse_systemd_ini {
# If a directory with the same basename ending in .d exists next to the unit file, it will be
# assumed to contain override files which will be parsed as well and handled properly.
sub parse_unit {
my ($unit_path) = @_;
my ($unit_path, $base_unit_path) = @_;
# Parse the main unit and all overrides
my %unit_data;
# Replace \ with \\ so glob() still works with units that have a \ in them
# Valid characters in unit names are ASCII letters, digits, ":", "-", "_", ".", and "\"
$base_unit_path =~ s/\\/\\\\/gmsx;
$unit_path =~ s/\\/\\\\/gmsx;
foreach (glob("${unit_path}{,.d/*.conf}")) {
foreach (glob("${base_unit_path}{,.d/*.conf}")) {
parse_systemd_ini(\%unit_data, "$_")
}
# Handle drop-in template-unit instance overrides
if ($unit_path ne $base_unit_path) {
foreach (glob("${unit_path}.d/*.conf")) {
parse_systemd_ini(\%unit_data, "$_")
}
}
return %unit_data;
}
@ -423,7 +431,7 @@ sub compare_units { ## no critic(Subroutines::ProhibitExcessComplexity)
# Called when a unit exists in both the old systemd and the new system and the units
# differ. This figures out of what units are to be stopped, restarted, reloaded, started, and skipped.
sub handle_modified_unit { ## no critic(Subroutines::ProhibitManyArgs, Subroutines::ProhibitExcessComplexity)
my ($unit, $base_name, $new_unit_file, $new_unit_info, $active_cur, $units_to_stop, $units_to_start, $units_to_reload, $units_to_restart, $units_to_skip) = @_;
my ($unit, $base_name, $new_unit_file, $new_base_unit_file, $new_unit_info, $active_cur, $units_to_stop, $units_to_start, $units_to_reload, $units_to_restart, $units_to_skip) = @_;
if ($unit eq "sysinit.target" || $unit eq "basic.target" || $unit eq "multi-user.target" || $unit eq "graphical.target" || $unit =~ /\.path$/msx || $unit =~ /\.slice$/msx) {
# Do nothing. These cannot be restarted directly.
@ -442,7 +450,7 @@ sub handle_modified_unit { ## no critic(Subroutines::ProhibitManyArgs, Subroutin
# Revert of the attempt: https://github.com/NixOS/nixpkgs/pull/147609
# More details: https://github.com/NixOS/nixpkgs/issues/74899#issuecomment-981142430
} else {
my %new_unit_info = $new_unit_info ? %{$new_unit_info} : parse_unit($new_unit_file);
my %new_unit_info = $new_unit_info ? %{$new_unit_info} : parse_unit($new_unit_file, $new_base_unit_file);
if (parse_systemd_bool(\%new_unit_info, "Service", "X-ReloadIfChanged", 0) and not $units_to_restart->{$unit} and not $units_to_stop->{$unit}) {
$units_to_reload->{$unit} = 1;
record_unit($reload_list_file, $unit);
@ -538,31 +546,33 @@ my %units_to_filter; # units not shown
my $active_cur = get_active_units();
while (my ($unit, $state) = each(%{$active_cur})) {
my $base_unit = $unit;
my $cur_unit_file = "/etc/systemd/system/$unit";
my $new_unit_file = "$toplevel/etc/systemd/system/$unit";
my $cur_unit_file = "/etc/systemd/system/$base_unit";
my $new_unit_file = "$toplevel/etc/systemd/system/$base_unit";
my $base_unit = $unit;
my $cur_base_unit_file = $cur_unit_file;
my $new_base_unit_file = $new_unit_file;
# Detect template instances.
if (!-e $cur_unit_file && !-e $new_unit_file && $unit =~ /^(.*)@[^\.]*\.(.*)$/msx) {
$base_unit = "$1\@.$2";
$cur_unit_file = "/etc/systemd/system/$base_unit";
$new_unit_file = "$toplevel/etc/systemd/system/$base_unit";
$cur_base_unit_file = "/etc/systemd/system/$base_unit";
$new_base_unit_file = "$toplevel/etc/systemd/system/$base_unit";
}
my $base_name = $base_unit;
$base_name =~ s/\.[[:lower:]]*$//msx;
if (-e $cur_unit_file && ($state->{state} eq "active" || $state->{state} eq "activating")) {
if (! -e $new_unit_file || abs_path($new_unit_file) eq "/dev/null") {
my %cur_unit_info = parse_unit($cur_unit_file);
if (-e $cur_base_unit_file && ($state->{state} eq "active" || $state->{state} eq "activating")) {
if (! -e $new_base_unit_file || abs_path($new_base_unit_file) eq "/dev/null") {
my %cur_unit_info = parse_unit($cur_unit_file, $cur_base_unit_file);
if (parse_systemd_bool(\%cur_unit_info, "Unit", "X-StopOnRemoval", 1)) {
$units_to_stop{$unit} = 1;
}
}
elsif ($unit =~ /\.target$/msx) {
my %new_unit_info = parse_unit($new_unit_file);
my %new_unit_info = parse_unit($new_unit_file, $new_base_unit_file);
# Cause all active target units to be restarted below.
# This should start most changed units we stop here as
@ -596,11 +606,11 @@ while (my ($unit, $state) = each(%{$active_cur})) {
}
else {
my %cur_unit_info = parse_unit($cur_unit_file);
my %new_unit_info = parse_unit($new_unit_file);
my %cur_unit_info = parse_unit($cur_unit_file, $cur_base_unit_file);
my %new_unit_info = parse_unit($new_unit_file, $new_base_unit_file);
my $diff = compare_units(\%cur_unit_info, \%new_unit_info);
if ($diff == 1) {
handle_modified_unit($unit, $base_name, $new_unit_file, \%new_unit_info, $active_cur, \%units_to_stop, \%units_to_start, \%units_to_reload, \%units_to_restart, \%units_to_skip);
handle_modified_unit($unit, $base_name, $new_unit_file, $new_base_unit_file, \%new_unit_info, $active_cur, \%units_to_stop, \%units_to_start, \%units_to_reload, \%units_to_restart, \%units_to_skip);
} elsif ($diff == 2 and not $units_to_restart{$unit}) {
$units_to_reload{$unit} = 1;
record_unit($reload_list_file, $unit);
@ -710,13 +720,14 @@ if ($action eq "dry-activate") {
# Handle the activation script requesting the restart or reload of a unit.
foreach (split(/\n/msx, read_file($dry_restart_by_activation_file, err_mode => "quiet") // "")) {
my $unit = $_;
my $new_unit_file = "$toplevel/etc/systemd/system/$unit";
my $base_unit = $unit;
my $new_unit_file = "$toplevel/etc/systemd/system/$base_unit";
my $new_base_unit_file = $new_unit_file;
# Detect template instances.
if (!-e $new_unit_file && $unit =~ /^(.*)@[^\.]*\.(.*)$/msx) {
$base_unit = "$1\@.$2";
$new_unit_file = "$toplevel/etc/systemd/system/$base_unit";
$new_base_unit_file = "$toplevel/etc/systemd/system/$base_unit";
}
my $base_name = $base_unit;
@ -728,7 +739,7 @@ if ($action eq "dry-activate") {
next;
}
handle_modified_unit($unit, $base_name, $new_unit_file, undef, $active_cur, \%units_to_restart, \%units_to_restart, \%units_to_reload, \%units_to_restart, \%units_to_skip);
handle_modified_unit($unit, $base_name, $new_unit_file, $new_base_unit_file, undef, $active_cur, \%units_to_restart, \%units_to_restart, \%units_to_reload, \%units_to_restart, \%units_to_skip);
}
unlink($dry_restart_by_activation_file);
@ -782,13 +793,14 @@ system("$out/activate", "$out") == 0 or $res = 2;
# Handle the activation script requesting the restart or reload of a unit.
foreach (split(/\n/msx, read_file($restart_by_activation_file, err_mode => "quiet") // "")) {
my $unit = $_;
my $new_unit_file = "$toplevel/etc/systemd/system/$unit";
my $base_unit = $unit;
my $new_unit_file = "$toplevel/etc/systemd/system/$base_unit";
my $new_base_unit_file = $new_unit_file;
# Detect template instances.
if (!-e $new_unit_file && $unit =~ /^(.*)@[^\.]*\.(.*)$/msx) {
$base_unit = "$1\@.$2";
$new_unit_file = "$toplevel/etc/systemd/system/$base_unit";
$new_base_unit_file = "$toplevel/etc/systemd/system/$base_unit";
}
my $base_name = $base_unit;
@ -801,7 +813,7 @@ foreach (split(/\n/msx, read_file($restart_by_activation_file, err_mode => "quie
next;
}
handle_modified_unit($unit, $base_name, $new_unit_file, undef, $active_cur, \%units_to_restart, \%units_to_restart, \%units_to_reload, \%units_to_restart, \%units_to_skip);
handle_modified_unit($unit, $base_name, $new_unit_file, $new_base_unit_file, undef, $active_cur, \%units_to_restart, \%units_to_restart, \%units_to_reload, \%units_to_restart, \%units_to_skip);
}
# We can remove the file now because it has been propagated to the other restart/reload files
unlink($restart_by_activation_file);
@ -859,7 +871,7 @@ if (scalar(keys(%units_to_reload)) > 0) {
for my $unit (keys(%units_to_reload)) {
if (!unit_is_active($unit)) {
# Figure out if we need to start the unit
my %unit_info = parse_unit("$toplevel/etc/systemd/system/$unit");
my %unit_info = parse_unit("$toplevel/etc/systemd/system/$unit", "$toplevel/etc/systemd/system/$unit");
if (!(parse_systemd_bool(\%unit_info, "Unit", "RefuseManualStart", 0) || parse_systemd_bool(\%unit_info, "Unit", "X-OnlyManualStart", 0))) {
$units_to_start{$unit} = 1;
record_unit($start_list_file, $unit);

View File

@ -1,12 +1,10 @@
# This module adds Memtest86+/Memtest86 to the GRUB boot menu.
# This module adds Memtest86+ to the GRUB boot menu.
{ config, lib, pkgs, ... }:
with lib;
let
memtest86 = pkgs.memtest86plus;
efiSupport = config.boot.loader.grub.efiSupport;
cfg = config.boot.loader.grub.memtest86;
in
@ -19,11 +17,8 @@ in
default = false;
type = types.bool;
description = lib.mdDoc ''
Make Memtest86+ (or MemTest86 if EFI support is enabled),
a memory testing program, available from the
GRUB boot menu. MemTest86 is an unfree program, so
this requires `allowUnfree` to be set to
`true`.
Make Memtest86+, a memory testing program, available from the GRUB
boot menu.
'';
};
@ -63,34 +58,12 @@ in
};
};
config = mkMerge [
(mkIf (cfg.enable && efiSupport) {
assertions = [
{
assertion = cfg.params == [];
message = "Parameters are not available for MemTest86";
}
];
boot.loader.grub.extraFiles = {
"memtest86.efi" = "${pkgs.memtest86-efi}/BOOTX64.efi";
};
boot.loader.grub.extraEntries = ''
menuentry "Memtest86" {
chainloader /memtest86.efi
}
'';
})
(mkIf (cfg.enable && !efiSupport) {
config = mkIf cfg.enable {
boot.loader.grub.extraEntries = ''
menuentry "Memtest86+" {
linux16 @bootRoot@/memtest.bin ${toString cfg.params}
linux @bootRoot@/memtest.bin ${toString cfg.params}
}
'';
boot.loader.grub.extraFiles."memtest.bin" = "${memtest86}/memtest.bin";
})
];
};
}

View File

@ -32,7 +32,7 @@ let
inherit (config.system.nixos) distroName;
memtest86 = optionalString cfg.memtest86.enable pkgs.memtest86-efi;
memtest86 = optionalString cfg.memtest86.enable pkgs.memtest86plus;
netbootxyz = optionalString cfg.netbootxyz.enable pkgs.netbootxyz-efi;
@ -147,10 +147,8 @@ in {
default = false;
type = types.bool;
description = lib.mdDoc ''
Make MemTest86 available from the systemd-boot menu. MemTest86 is a
program for testing memory. MemTest86 is an unfree program, so
this requires `allowUnfree` to be set to
`true`.
Make MemTest86+ available from the systemd-boot menu. MemTest86+ is a
program for testing memory.
'';
};
@ -193,8 +191,8 @@ in {
default = {};
example = literalExpression ''
{ "memtest86.conf" = '''
title MemTest86
efi /efi/memtest86/memtest86.efi
title MemTest86+
efi /efi/memtest86/memtest.efi
'''; }
'';
description = lib.mdDoc ''
@ -213,7 +211,7 @@ in {
type = types.attrsOf types.path;
default = {};
example = literalExpression ''
{ "efi/memtest86/memtest86.efi" = "''${pkgs.memtest86-efi}/BOOTX64.efi"; }
{ "efi/memtest86/memtest.efi" = "''${pkgs.memtest86plus}/memtest.efi"; }
'';
description = lib.mdDoc ''
A set of files to be copied to {file}`/boot`.
@ -276,11 +274,8 @@ in {
boot.loader.supportsInitrdSecrets = true;
boot.loader.systemd-boot.extraFiles = mkMerge [
# TODO: This is hard-coded to use the 64-bit EFI app, but it could probably
# be updated to use the 32-bit EFI app on 32-bit systems. The 32-bit EFI
# app filename is BOOTIA32.efi.
(mkIf cfg.memtest86.enable {
"efi/memtest86/BOOTX64.efi" = "${pkgs.memtest86-efi}/BOOTX64.efi";
"efi/memtest86/memtest.efi" = "${pkgs.memtest86plus.efi}";
})
(mkIf cfg.netbootxyz.enable {
"efi/netbootxyz/netboot.xyz.efi" = "${pkgs.netbootxyz-efi}";
@ -291,7 +286,7 @@ in {
(mkIf cfg.memtest86.enable {
"${cfg.memtest86.entryFilename}" = ''
title MemTest86
efi /efi/memtest86/BOOTX64.efi
efi /efi/memtest86/memtest.efi
'';
})
(mkIf cfg.netbootxyz.enable {

View File

@ -143,7 +143,7 @@ in rec {
manualHTML = buildFromConfig ({ ... }: { }) (config: config.system.build.manual.manualHTML);
manual = manualHTML; # TODO(@oxij): remove eventually
manualEpub = (buildFromConfig ({ ... }: { }) (config: config.system.build.manual.manualEpub));
manpages = buildFromConfig ({ ... }: { }) (config: config.system.build.manual.manpages);
nixos-configuration-reference-manpage = buildFromConfig ({ ... }: { }) (config: config.system.build.manual.nixos-configuration-reference-manpage);
options = (buildFromConfig ({ ... }: { }) (config: config.system.build.manual.optionsJSON)).x86_64-linux;

View File

@ -367,6 +367,7 @@ in {
iftop = handleTest ./iftop.nix {};
incron = handleTest ./incron.nix {};
influxdb = handleTest ./influxdb.nix {};
influxdb2 = handleTest ./influxdb2.nix {};
initrd-network-openvpn = handleTest ./initrd-network-openvpn {};
initrd-network-ssh = handleTest ./initrd-network-ssh {};
initrd-luks-empty-passphrase = handleTest ./initrd-luks-empty-passphrase.nix {};
@ -463,6 +464,7 @@ in {
matrix-conduit = handleTest ./matrix/conduit.nix {};
matrix-synapse = handleTest ./matrix/synapse.nix {};
mattermost = handleTest ./mattermost.nix {};
mediamtx = handleTest ./mediamtx.nix {};
mediatomb = handleTest ./mediatomb.nix {};
mediawiki = handleTest ./mediawiki.nix {};
meilisearch = handleTest ./meilisearch.nix {};

36
nixos/tests/influxdb2.nix Normal file
View File

@ -0,0 +1,36 @@
import ./make-test-python.nix ({ pkgs, ...} : {
name = "influxdb2";
meta = with pkgs.lib.maintainers; {
maintainers = [ offline ];
};
nodes.machine = { lib, ... }: {
environment.systemPackages = [ pkgs.influxdb2-cli ];
services.influxdb2.enable = true;
services.influxdb2.provision = {
enable = true;
initialSetup = {
organization = "default";
bucket = "default";
passwordFile = pkgs.writeText "admin-pw" "ExAmPl3PA55W0rD";
tokenFile = pkgs.writeText "admin-token" "verysecureadmintoken";
};
};
};
testScript = { nodes, ... }:
let
tokenArg = "--token verysecureadmintoken";
in ''
machine.wait_for_unit("influxdb2.service")
machine.fail("curl --fail -X POST 'http://localhost:8086/api/v2/signin' -u admin:wrongpassword")
machine.succeed("curl --fail -X POST 'http://localhost:8086/api/v2/signin' -u admin:ExAmPl3PA55W0rD")
out = machine.succeed("influx org list ${tokenArg}")
assert "default" in out
out = machine.succeed("influx bucket list ${tokenArg} --org default")
assert "default" in out
'';
})

57
nixos/tests/mediamtx.nix Normal file
View File

@ -0,0 +1,57 @@
import ./make-test-python.nix ({ pkgs, lib, ...} :
{
name = "mediamtx";
meta.maintainers = with lib.maintainers; [ fpletz ];
nodes = {
machine = { config, ... }: {
services.mediamtx = {
enable = true;
settings = {
metrics = true;
paths.all.source = "publisher";
};
};
systemd.services.rtmp-publish = {
description = "Publish an RTMP stream to mediamtx";
after = [ "mediamtx.service" ];
bindsTo = [ "mediamtx.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
DynamicUser = true;
Restart = "on-failure";
RestartSec = "1s";
TimeoutStartSec = "10s";
ExecStart = "${lib.getBin pkgs.ffmpeg-headless}/bin/ffmpeg -re -f lavfi -i smptebars=size=800x600:rate=10 -c libx264 -f flv rtmp://localhost:1935/test";
};
};
systemd.services.rtmp-receive = {
description = "Receive an RTMP stream from mediamtx";
after = [ "rtmp-publish.service" ];
bindsTo = [ "rtmp-publish.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
DynamicUser = true;
Restart = "on-failure";
RestartSec = "1s";
TimeoutStartSec = "10s";
ExecStart = "${lib.getBin pkgs.ffmpeg-headless}/bin/ffmpeg -y -re -i rtmp://localhost:1935/test -f flv /dev/null";
};
};
};
};
testScript = ''
start_all()
machine.wait_for_unit("mediamtx.service")
machine.wait_for_unit("rtmp-publish.service")
machine.wait_for_unit("rtmp-receive.service")
machine.wait_for_open_port(9998)
machine.succeed("curl http://localhost:9998/metrics | grep '^rtmp_conns.*state=\"publish\".*1$'")
machine.succeed("curl http://localhost:9998/metrics | grep '^rtmp_conns.*state=\"read\".*1$'")
'';
})

View File

@ -1,6 +1,6 @@
# Test configuration switching.
import ./make-test-python.nix ({ pkgs, ...} : let
import ./make-test-python.nix ({ lib, pkgs, ...} : let
# Simple service that can either be socket-activated or that will
# listen on port 1234 if not socket-activated.
@ -279,6 +279,28 @@ in {
systemd.services.test-service.unitConfig.RefuseManualStart = true;
};
unitWithTemplate.configuration = {
systemd.services."instantiated@".serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${pkgs.coreutils}/bin/true";
ExecReload = "${pkgs.coreutils}/bin/true";
};
systemd.services."instantiated@one" = {
wantedBy = [ "multi-user.target" ];
overrideStrategy = "asDropin";
};
systemd.services."instantiated@two" = {
wantedBy = [ "multi-user.target" ];
overrideStrategy = "asDropin";
};
};
unitWithTemplateModified.configuration = {
imports = [ unitWithTemplate.configuration ];
systemd.services."instantiated@".serviceConfig.X-Test = "test";
};
restart-and-reload-by-activation-script.configuration = {
systemd.services = rec {
simple-service = {
@ -290,29 +312,50 @@ in {
ExecReload = "${pkgs.coreutils}/bin/true";
};
};
"templated-simple-service@" = simple-service;
"templated-simple-service@instance".overrideStrategy = "asDropin";
simple-restart-service = simple-service // {
stopIfChanged = false;
};
"templated-simple-restart-service@" = simple-restart-service;
"templated-simple-restart-service@instance".overrideStrategy = "asDropin";
simple-reload-service = simple-service // {
reloadIfChanged = true;
};
"templated-simple-reload-service@" = simple-reload-service;
"templated-simple-reload-service@instance".overrideStrategy = "asDropin";
no-restart-service = simple-service // {
restartIfChanged = false;
};
"templated-no-restart-service@" = no-restart-service;
"templated-no-restart-service@instance".overrideStrategy = "asDropin";
reload-triggers = simple-service // {
wantedBy = [ "multi-user.target" ];
};
"templated-reload-triggers@" = simple-service;
"templated-reload-triggers@instance" = {
overrideStrategy = "asDropin";
wantedBy = [ "multi-user.target" ];
};
reload-triggers-and-restart-by-as = simple-service;
"templated-reload-triggers-and-restart-by-as@" = reload-triggers-and-restart-by-as;
"templated-reload-triggers-and-restart-by-as@instance".overrideStrategy = "asDropin";
reload-triggers-and-restart = simple-service // {
stopIfChanged = false; # easier to check for this
wantedBy = [ "multi-user.target" ];
};
"templated-reload-triggers-and-restart@" = simple-service;
"templated-reload-triggers-and-restart@instance" = {
overrideStrategy = "asDropin";
stopIfChanged = false; # easier to check for this
wantedBy = [ "multi-user.target" ];
};
};
system.activationScripts.restart-and-reload-test = {
@ -332,12 +375,20 @@ in {
simple-reload-service.service
no-restart-service.service
reload-triggers-and-restart-by-as.service
templated-simple-service@instance.service
templated-simple-restart-service@instance.service
templated-simple-reload-service@instance.service
templated-no-restart-service@instance.service
templated-reload-triggers-and-restart-by-as@instance.service
EOF
cat <<EOF >> "$g"
reload-triggers.service
reload-triggers-and-restart-by-as.service
reload-triggers-and-restart.service
templated-reload-triggers@instance.service
templated-reload-triggers-and-restart-by-as@instance.service
templated-reload-triggers-and-restart@instance.service
EOF
'';
};
@ -346,6 +397,10 @@ in {
restart-and-reload-by-activation-script-modified.configuration = {
imports = [ restart-and-reload-by-activation-script.configuration ];
systemd.services.reload-triggers-and-restart.serviceConfig.X-Modified = "test";
systemd.services."templated-reload-triggers-and-restart@instance" = {
overrideStrategy = "asDropin";
serviceConfig.X-Modified = "test";
};
};
simple-socket.configuration = {
@ -507,6 +562,10 @@ in {
set -o pipefail
exec env -i "$@" | tee /dev/stderr
'';
# Returns a comma separated representation of the given list in sorted
# order, that matches the output format of switch-to-configuration.pl
sortedUnits = xs: lib.concatStringsSep ", " (builtins.sort builtins.lessThan xs);
in /* python */ ''
def switch_to_specialisation(system, name, action="test", fail=False):
if name == "":
@ -733,6 +792,16 @@ in {
assert_contains(out, "\nstarting the following units: required-service.service\n")
assert_lacks(out, "the following new units were started:")
# Ensure templated units are restarted when the base unit changes
switch_to_specialisation("${machine}", "unitWithTemplate")
out = switch_to_specialisation("${machine}", "unitWithTemplateModified")
assert_contains(out, "stopping the following units: instantiated@one.service, instantiated@two.service\n")
assert_lacks(out, "NOT restarting the following changed units:")
assert_lacks(out, "reloading the following units:")
assert_lacks(out, "\nrestarting the following units:")
assert_contains(out, "\nstarting the following units: instantiated@one.service, instantiated@two.service\n")
assert_lacks(out, "the following new units were started:")
with subtest("failing units"):
# Let the simple service fail
switch_to_specialisation("${machine}", "simpleServiceModified")
@ -896,15 +965,62 @@ in {
assert_lacks(out, "NOT restarting the following changed units:")
assert_lacks(out, "reloading the following units:")
assert_lacks(out, "restarting the following units:")
assert_contains(out, "\nstarting the following units: no-restart-service.service, reload-triggers-and-restart-by-as.service, simple-reload-service.service, simple-restart-service.service, simple-service.service\n")
assert_contains(out, "the following new units were started: no-restart-service.service, reload-triggers-and-restart-by-as.service, reload-triggers-and-restart.service, reload-triggers.service, simple-reload-service.service, simple-restart-service.service, simple-service.service\n")
assert_contains(out, "\nstarting the following units: ${sortedUnits [
"no-restart-service.service"
"reload-triggers-and-restart-by-as.service"
"simple-reload-service.service"
"simple-restart-service.service"
"simple-service.service"
"templated-no-restart-service@instance.service"
"templated-reload-triggers-and-restart-by-as@instance.service"
"templated-simple-reload-service@instance.service"
"templated-simple-restart-service@instance.service"
"templated-simple-service@instance.service"
]}\n")
assert_contains(out, "the following new units were started: ${sortedUnits [
"no-restart-service.service"
"reload-triggers-and-restart-by-as.service"
"reload-triggers-and-restart.service"
"reload-triggers.service"
"simple-reload-service.service"
"simple-restart-service.service"
"simple-service.service"
"system-templated\\\\x2dno\\\\x2drestart\\\\x2dservice.slice"
"system-templated\\\\x2dreload\\\\x2dtriggers.slice"
"system-templated\\\\x2dreload\\\\x2dtriggers\\\\x2dand\\\\x2drestart.slice"
"system-templated\\\\x2dreload\\\\x2dtriggers\\\\x2dand\\\\x2drestart\\\\x2dby\\\\x2das.slice"
"system-templated\\\\x2dsimple\\\\x2dreload\\\\x2dservice.slice"
"system-templated\\\\x2dsimple\\\\x2drestart\\\\x2dservice.slice"
"system-templated\\\\x2dsimple\\\\x2dservice.slice"
"templated-no-restart-service@instance.service"
"templated-reload-triggers-and-restart-by-as@instance.service"
"templated-reload-triggers-and-restart@instance.service"
"templated-reload-triggers@instance.service"
"templated-simple-reload-service@instance.service"
"templated-simple-restart-service@instance.service"
"templated-simple-service@instance.service"
]}\n")
# Switch to the same system where the example services get restarted
# and reloaded by the activation script
out = switch_to_specialisation("${machine}", "restart-and-reload-by-activation-script")
assert_lacks(out, "stopping the following units:")
assert_lacks(out, "NOT restarting the following changed units:")
assert_contains(out, "reloading the following units: reload-triggers-and-restart.service, reload-triggers.service, simple-reload-service.service\n")
assert_contains(out, "restarting the following units: reload-triggers-and-restart-by-as.service, simple-restart-service.service, simple-service.service\n")
assert_contains(out, "reloading the following units: ${sortedUnits [
"reload-triggers-and-restart.service"
"reload-triggers.service"
"simple-reload-service.service"
"templated-reload-triggers-and-restart@instance.service"
"templated-reload-triggers@instance.service"
"templated-simple-reload-service@instance.service"
]}\n")
assert_contains(out, "restarting the following units: ${sortedUnits [
"reload-triggers-and-restart-by-as.service"
"simple-restart-service.service"
"simple-service.service"
"templated-reload-triggers-and-restart-by-as@instance.service"
"templated-simple-restart-service@instance.service"
"templated-simple-service@instance.service"
]}\n")
assert_lacks(out, "\nstarting the following units:")
assert_lacks(out, "the following new units were started:")
# Switch to the same system and see if the service gets restarted when it's modified
@ -912,16 +1028,44 @@ in {
out = switch_to_specialisation("${machine}", "restart-and-reload-by-activation-script-modified")
assert_lacks(out, "stopping the following units:")
assert_lacks(out, "NOT restarting the following changed units:")
assert_contains(out, "reloading the following units: reload-triggers.service, simple-reload-service.service\n")
assert_contains(out, "restarting the following units: reload-triggers-and-restart-by-as.service, reload-triggers-and-restart.service, simple-restart-service.service, simple-service.service\n")
assert_contains(out, "reloading the following units: ${sortedUnits [
"reload-triggers.service"
"simple-reload-service.service"
"templated-reload-triggers@instance.service"
"templated-simple-reload-service@instance.service"
]}\n")
assert_contains(out, "restarting the following units: ${sortedUnits [
"reload-triggers-and-restart-by-as.service"
"reload-triggers-and-restart.service"
"simple-restart-service.service"
"simple-service.service"
"templated-reload-triggers-and-restart-by-as@instance.service"
"templated-reload-triggers-and-restart@instance.service"
"templated-simple-restart-service@instance.service"
"templated-simple-service@instance.service"
]}\n")
assert_lacks(out, "\nstarting the following units:")
assert_lacks(out, "the following new units were started:")
# The same, but in dry mode
out = switch_to_specialisation("${machine}", "restart-and-reload-by-activation-script", action="dry-activate")
assert_lacks(out, "would stop the following units:")
assert_lacks(out, "would NOT stop the following changed units:")
assert_contains(out, "would reload the following units: reload-triggers.service, simple-reload-service.service\n")
assert_contains(out, "would restart the following units: reload-triggers-and-restart-by-as.service, reload-triggers-and-restart.service, simple-restart-service.service, simple-service.service\n")
assert_contains(out, "would reload the following units: ${sortedUnits [
"reload-triggers.service"
"simple-reload-service.service"
"templated-reload-triggers@instance.service"
"templated-simple-reload-service@instance.service"
]}\n")
assert_contains(out, "would restart the following units: ${sortedUnits [
"reload-triggers-and-restart-by-as.service"
"reload-triggers-and-restart.service"
"simple-restart-service.service"
"simple-service.service"
"templated-reload-triggers-and-restart-by-as@instance.service"
"templated-reload-triggers-and-restart@instance.service"
"templated-simple-restart-service@instance.service"
"templated-simple-service@instance.service"
]}\n")
assert_lacks(out, "\nwould start the following units:")
with subtest("socket-activated services"):

View File

@ -118,14 +118,11 @@ in
nodes.machine = { pkgs, lib, ... }: {
imports = [ common ];
boot.loader.systemd-boot.memtest86.enable = true;
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"memtest86-efi"
];
};
testScript = ''
machine.succeed("test -e /boot/loader/entries/memtest86.conf")
machine.succeed("test -e /boot/efi/memtest86/BOOTX64.efi")
machine.succeed("test -e /boot/efi/memtest86/memtest.efi")
'';
};
@ -152,15 +149,12 @@ in
imports = [ common ];
boot.loader.systemd-boot.memtest86.enable = true;
boot.loader.systemd-boot.memtest86.entryFilename = "apple.conf";
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"memtest86-efi"
];
};
testScript = ''
machine.fail("test -e /boot/loader/entries/memtest86.conf")
machine.succeed("test -e /boot/loader/entries/apple.conf")
machine.succeed("test -e /boot/efi/memtest86/BOOTX64.efi")
machine.succeed("test -e /boot/efi/memtest86/memtest.efi")
'';
};

View File

@ -1,34 +1,34 @@
{ stdenv
, lib
{ copyDesktopItems
, fetchFromGitHub
, pipewire
, pulseaudio
, gst_all_1
, glibmm
, gst_all_1
, lib
, libarchive
, makeDesktopItem
, pipewire
, pkg-config
, pulseaudio
, qmake
, qtbase
, qtsvg
, wrapQtAppsHook
, makeDesktopItem
, pkg-config
, libarchive
, copyDesktopItems
, stdenv
, usePipewire ? true
, usePulseaudio ? false
, wrapQtAppsHook
}:
assert lib.asserts.assertMsg (usePipewire != usePulseaudio) "You need to enable one and only one of pulseaudio or pipewire support";
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "jamesdsp";
version = "2.6.0";
version = "2.6.1";
src = fetchFromGitHub rec {
src = fetchFromGitHub {
owner = "Audio4Linux";
repo = "JDSP4Linux";
fetchSubmodules = true;
rev = version;
hash = "sha256-pogBpmGlqQnkXMdp5HbMYISjwMJalSPvEV9MDHj8aec=";
rev = finalAttrs.version;
hash = "sha256-XYJl94/PstWG5qaBQ2rXc/nG9bDeP3Q62zDYHmZvPaw=";
};
nativeBuildInputs = [
@ -43,15 +43,16 @@ stdenv.mkDerivation rec {
libarchive
qtbase
qtsvg
] ++ lib.optional usePipewire pipewire
++ lib.optionals usePulseaudio [
] ++ lib.optionals usePipewire [
pipewire
] ++ lib.optionals usePulseaudio [
pulseaudio
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gstreamer
];
preFixup = lib.optionals usePulseaudio ''
preFixup = lib.optionalString usePulseaudio ''
qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0")
'';
@ -76,12 +77,12 @@ stdenv.mkDerivation rec {
install -D resources/icons/icon.svg $out/share/icons/hicolor/scalable/apps/jamesdsp.svg
'';
meta = with lib;{
meta = {
broken = (stdenv.isLinux && stdenv.isAarch64);
description = "An audio effect processor for PipeWire clients";
homepage = "https://github.com/Audio4Linux/JDSP4Linux";
license = licenses.gpl3Only;
maintainers = with maintainers; [ pasqui23 rewine ];
platforms = platforms.linux;
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ pasqui23 rewine ];
platforms = lib.platforms.linux;
};
}
})

View File

@ -64,6 +64,18 @@ in stdenv'.mkDerivation rec {
url = "https://github.com/doronbehar/MuseScore/commit/f48448a3ede46f5a7ef470940072fbfb6742487c.patch";
hash = "sha256-UEc7auscnW0KMfWkLKQtm+UstuTNsuFeoNJYIidIlwM=";
})
# Upstream removed the option to use system freetype library in v4.1.0,
# causing the app to crash on systems when the outdated bundled freetype
# tries to load the Noto Sans font. For more info on the crash itself,
# see #244409 and https://github.com/musescore/MuseScore/issues/18795.
# For now, re-add the option ourselves. The fix has been merged upstream,
# so we can remove this patch with the next version. In the future, we
# may replace the other bundled thirdparty libs with system libs, see
# https://github.com/musescore/MuseScore/issues/11572.
(fetchpatch {
url = "https://github.com/musescore/MuseScore/commit/9ab6b32b1c3b990cfa7bb172ee8112521dc2269c.patch";
hash = "sha256-5GA29Z+o3I/uDTTDbkauZ8/xSdCE6yY93phMSY0ea7s=";
})
];
cmakeFlags = [
@ -73,7 +85,7 @@ in stdenv'.mkDerivation rec {
# https://github.com/musescore/MuseScore/issues/15571
"-DMUE_BUILD_CRASHPAD_CLIENT=OFF"
# Use our freetype
"-DUSE_SYSTEM_FREETYPE=ON"
"-DMUE_COMPILE_USE_SYSTEM_FREETYPE=ON"
# From some reason, in $src/build/cmake/SetupBuildEnvironment.cmake,
# upstream defaults to compiling to x86_64 only, unless this cmake flag is
# set
@ -141,6 +153,9 @@ in stdenv'.mkDerivation rec {
ln -s $out/Applications/mscore.app/Contents/MacOS/mscore $out/bin/mscore.
'';
# Don't run bundled upstreams tests, as they require a running X window system.
doCheck = false;
passthru.tests = nixosTests.musescore;
meta = with lib; {

View File

@ -9,16 +9,16 @@ let
in buildGoModule rec {
pname = "go-ethereum";
version = "1.12.0";
version = "1.12.2";
src = fetchFromGitHub {
owner = "ethereum";
repo = pname;
rev = "v${version}";
sha256 = "sha256-u1p9k12tY79kA/2Hu109czQZnurHuDJQf/w7J0c8SuU=";
sha256 = "sha256-iCLOrf6/f0f7sD0YjmBtlcOcZRDIp9IZkBadTKj1Qjw=";
};
vendorHash = "sha256-k5MbOiJDvWFnaAPViNRHeqFa64XPZ3ImkkvkmTTscNA=";
vendorHash = "sha256-ChmQjhz4dQdwcY/269Hi5XAn8/+0z/AF7Kd9PJ8WqHg=";
doCheck = false;

View File

@ -2,18 +2,18 @@
rustPlatform.buildRustPackage rec {
pname = "xplr";
version = "0.21.2";
version = "0.21.3";
src = fetchFromGitHub {
owner = "sayanarijit";
repo = pname;
rev = "v${version}";
sha256 = "sha256-MCOkl95X5YZTAC0VHtSY5xWf1R3987cxepSM7na+LdA=";
sha256 = "sha256-lqFhLCOLiuSQWhbcZUEj2xFRlZ+x1ZTVc8IJw7tJjhE=";
};
buildInputs = lib.optional stdenv.isDarwin libiconv;
cargoHash = "sha256-1uAnIuxDDv3Z/fMs2Cu/aFWrnugGcEKlNjhILqDpOMI=";
cargoHash = "sha256-3hrpg2cMvIuFy6mH1/1igIpU4nbzFQLCAhiIRZbTuaI=";
checkFlags = [
# failure: path::tests::test_relative_to_parent

View File

@ -30,14 +30,14 @@ https://github.com/NixOS/nixpkgs/issues/199596#issuecomment-1310136382 */
}:
mkDerivation rec {
version = "1.4.4";
version = "1.4.5";
pname = "syncthingtray";
src = fetchFromGitHub {
owner = "Martchus";
repo = "syncthingtray";
rev = "v${version}";
sha256 = "sha256-i13Mt4xASneE4sBIt9fbdoFV1KnoVfaGRwQXX+1NgI4=";
sha256 = "sha256-EizKDw5Fv2qXxmiCx4NAvwxBZ+qhTIx4NMZedZ9OuyA=";
};
buildInputs = [

View File

@ -15,7 +15,7 @@
stdenv.mkDerivation rec {
pname = "wmenu";
version = "0.1.2";
version = "0.1.4";
strictDeps = true;
@ -23,17 +23,9 @@ stdenv.mkDerivation rec {
owner = "~adnano";
repo = "wmenu";
rev = version;
hash = "sha256-mS4qgf2sjgswasZXsmnbIWlqVv+Murvx1/ob0G3xsws=";
hash = "sha256-aB23wi8kLBKAvQv2UPsfqVMCjakdsM6AzH8LgGv3HPs=";
};
# Patch needed to remove build warning, gets merged in next release
patches = [
(fetchpatch {
url = "https://git.sr.ht/~adnano/wmenu/commit/ba10072cdec9b0d4b51bcf305ff27dcf3003ae42.patch";
hash = "sha256-XF7xmEnsKlExMJQ5iS7wQG9Ja6ocrR0YvQuWFfByKVA=";
})
];
nativeBuildInputs = [ pkg-config meson ninja ];
buildInputs = [ cairo pango wayland libxkbcommon wayland-protocols scdoc ];

View File

@ -63,21 +63,26 @@ def get_file_revision(revision, file_path):
return base64.b64decode(resp)
def get_matching_chromedriver(version):
"""Gets the matching chromedriver version for the given Chromium version."""
# See https://chromedriver.chromium.org/downloads/version-selection
build = re.sub('.[0-9]+$', '', version)
chromedriver_version_url = f'https://chromedriver.storage.googleapis.com/LATEST_RELEASE_{build}'
with urlopen(chromedriver_version_url) as http_response:
chromedriver_version = http_response.read().decode()
def get_chromedriver_url(system):
return ('https://chromedriver.storage.googleapis.com/' +
f'{chromedriver_version}/chromedriver_{system}.zip')
def get_chromedriver(channel):
"""Get the latest chromedriver builds given a channel"""
# See https://chromedriver.chromium.org/downloads/version-selection#h.4wiyvw42q63v
chromedriver_versions_url = f'https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json'
print(f'GET {chromedriver_versions_url}')
with urlopen(chromedriver_versions_url) as http_response:
chromedrivers = json.load(http_response)
channel = chromedrivers['channels'][channel]
downloads = channel['downloads']['chromedriver']
def get_chromedriver_url(platform):
for download in downloads:
if download['platform'] == platform:
return download['url']
return {
'version': chromedriver_version,
'version': channel['version'],
'sha256_linux': nix_prefetch_url(get_chromedriver_url('linux64')),
'sha256_darwin': nix_prefetch_url(get_chromedriver_url('mac64')),
'sha256_darwin_aarch64': nix_prefetch_url(get_chromedriver_url('mac_arm64'))
'sha256_darwin': nix_prefetch_url(get_chromedriver_url('mac-x64')),
'sha256_darwin_aarch64': nix_prefetch_url(get_chromedriver_url('mac-arm64'))
}
@ -212,7 +217,7 @@ with urlopen(RELEASES_URL) as resp:
channel['deps'] = get_channel_dependencies(channel['version'])
if channel_name == 'stable':
channel['chromedriver'] = get_matching_chromedriver(channel['version'])
channel['chromedriver'] = get_chromedriver('Stable')
elif channel_name == 'ungoogled-chromium':
ungoogled_repo_url = 'https://github.com/ungoogled-software/ungoogled-chromium.git'
channel['deps']['ungoogled-patches'] = {

View File

@ -3,10 +3,10 @@
{
firefox = buildMozillaMach rec {
pname = "firefox";
version = "116.0.1";
version = "116.0.2";
src = fetchurl {
url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz";
sha512 = "2f67a129ec3bcb47d66cbf29ab23c1c29bfbe752a4703cb0d95f4f3e5a48044901bb79fea94e35f8a9d4dfbfa71aa6721b2988770c1dc33b4412b993bb88da09";
sha512 = "2c0ae18672fe22c75002744831130e13da764f83726951e5b58cfe74f7f473e22634ce08ebc11a98bac5baec0a4ac099a3a350a8b756af9c5bea6d5f4432da6d";
};
meta = {

View File

@ -1,19 +1,22 @@
{ darwin, fetchFromGitHub, rustPlatform, lib, stdenv }:
{ darwin, fetchFromGitHub, rustPlatform, lib, stdenv, pkg-config, openssl }:
rustPlatform.buildRustPackage rec {
pname = "click";
version = "0.4.2";
version = "0.6.2";
src = fetchFromGitHub {
rev = "v${version}";
owner = "databricks";
repo = "click";
sha256 = "18mpzvvww2g6y2d3m8wcfajzdshagihn59k03xvcknd5d8zxagl3";
rev = "v${version}";
hash = "sha256-rwS08miRpc+Q9DRuspr21NMYpEYmmscvzarDnjyVe5c=";
};
cargoSha256 = "16r5rwdbqyb5xrjc55i30xb20crpyjc75zn10xxjkicmvrpwydp6";
cargoHash = "sha256-WNITVYTS7JWrBBwxlQuVTmLddWLbDJACizEsRiustGg=";
buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ];
buildInputs = lib.optionals stdenv.isLinux [ openssl ]
++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
meta = with lib; {
description = ''The "Command Line Interactive Controller for Kubernetes"'';
@ -21,5 +24,6 @@ rustPlatform.buildRustPackage rec {
license = [ licenses.asl20 ];
maintainers = [ maintainers.mbode ];
platforms = [ "x86_64-linux" "x86_64-darwin" ];
mainProgram = "click";
};
}

View File

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "kubergrunt";
version = "0.12.0";
version = "0.12.1";
src = fetchFromGitHub {
owner = "gruntwork-io";
repo = "kubergrunt";
rev = "v${version}";
sha256 = "sha256-C3anYYyhRT+/0jO01uEBX1LLQadovO+Z9JA6nHTNXOo=";
sha256 = "sha256-qd+7tYvRpRMg8Y83L/K8g8fWrfO4rAQj72EpunqfSsc=";
};
vendorHash = "sha256-AUw1wJNWjpNVsjw/Hr1ZCePYWQkf1SqRVnQgi8tOFG0=";

View File

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "kyverno";
version = "1.10.2";
version = "1.10.3";
src = fetchFromGitHub {
owner = "kyverno";
repo = "kyverno";
rev = "v${version}";
sha256 = "sha256-kk+NgupFLzbkh/jrbJj9E6H0v3QighKa7DQJoh/fZi8=";
sha256 = "sha256-SRDabFN0ITXwHzvE5m3pIAk42kQa2yINpT64x+k3r3g=";
};
ldflags = [

View File

@ -291,13 +291,13 @@
"vendorHash": "sha256-foS7GyRUdhF/M8uTPf2I4WQo7qEg4Z/3FXjagoeSRkU="
},
"dexidp": {
"hash": "sha256-+Nt4bX6+4VB+mtJbsP166RObFbXaNyFrF+80x2/pRco=",
"hash": "sha256-69r3m3lIKftZQ8NXBD5KEHbsNUwCGpFgn/CYO+921M4=",
"homepage": "https://registry.terraform.io/providers/marcofranssen/dexidp",
"owner": "marcofranssen",
"repo": "terraform-provider-dexidp",
"rev": "v0.2.1",
"rev": "v0.3.0",
"spdx": "MIT",
"vendorHash": "sha256-L8baV03p0V/xKi1O3YQxvoJXgP21qNhzznyvwrauVqI="
"vendorHash": "sha256-EWEc7tILolAIzT7ZOLXlrlrt3hsgJxFD89y/USLeE40="
},
"dhall": {
"hash": "sha256-K0j90YAzYqdyJD4aofyxAJF9QBYNMbhSVm/s1GvWuJ4=",
@ -454,24 +454,24 @@
"vendorHash": "sha256-AVTWTS16d8QsPLLAJeAfgcVDzUBMp+b2oAphaCBqhS0="
},
"google": {
"hash": "sha256-vhWtIJ5hKe/8a7N5Qxs8CQuSNlZEF3gdRzSqZiFqhVg=",
"hash": "sha256-11iT/zjoSScSdLGWFPxEURiIBvcz5jK8QZAHdqRwHD0=",
"homepage": "https://registry.terraform.io/providers/hashicorp/google",
"owner": "hashicorp",
"proxyVendor": true,
"repo": "terraform-provider-google",
"rev": "v4.77.0",
"rev": "v4.78.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-rlNYh42Cw2wMF/9aI8QM0x8t2jdz+V9u4uJvS6A4zx8="
"vendorHash": "sha256-lyOupw64LQvdTJZjJ1RvAn1JLDHAZ4qAaagASXHcEXA="
},
"google-beta": {
"hash": "sha256-nfgoGYBAW5VdgMm2gkI2Ff5NlY2CAwuFjckN7xgGtcI=",
"hash": "sha256-dKB9rdMZP+Ln3M9bL7MC6RGlDXZ/IydD4g5Jp1jjEh4=",
"homepage": "https://registry.terraform.io/providers/hashicorp/google-beta",
"owner": "hashicorp",
"proxyVendor": true,
"repo": "terraform-provider-google-beta",
"rev": "v4.77.0",
"rev": "v4.78.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-rlNYh42Cw2wMF/9aI8QM0x8t2jdz+V9u4uJvS6A4zx8="
"vendorHash": "sha256-lyOupw64LQvdTJZjJ1RvAn1JLDHAZ4qAaagASXHcEXA="
},
"googleworkspace": {
"hash": "sha256-dedYnsKHizxJZibuvJOMbJoux0W6zgKaK5fxIofKqCY=",
@ -556,11 +556,11 @@
"vendorHash": "sha256-hxT9mpKifb63wlCUeUzgVo4UB2TnYZy9lXF4fmGYpc4="
},
"huaweicloud": {
"hash": "sha256-Uon1nXtoILFOQp9DsOubi31v6WJqWBa3zDZKHJdboHY=",
"hash": "sha256-zfYIhROmNEXUmO52zs1u6X4WXFtE+duuiS6wlSBLygw=",
"homepage": "https://registry.terraform.io/providers/huaweicloud/huaweicloud",
"owner": "huaweicloud",
"repo": "terraform-provider-huaweicloud",
"rev": "v1.53.0",
"rev": "v1.54.0",
"spdx": "MPL-2.0",
"vendorHash": null
},

View File

@ -8,13 +8,13 @@ buildGoModule rec {
/* Do not use "dev" as a version. If you do, Tilt will consider itself
running in development environment and try to serve assets from the
source tree, which is not there once build completes. */
version = "0.33.3";
version = "0.33.4";
src = fetchFromGitHub {
owner = "tilt-dev";
repo = "tilt";
rev = "v${version}";
hash = "sha256-TNZE335tH50E96yJzD26U+JbVxjU746Wa/8YDGHFeto=";
hash = "sha256-rQ5g5QyGyuJAHmE8zGFzqtpqW2xEju5JV386y9Cn+cs=";
};
vendorHash = null;

View File

@ -6,7 +6,7 @@
python3.pkgs.buildPythonApplication rec {
pname = "flexget";
version = "3.8.6";
version = "3.8.7";
format = "pyproject";
# Fetch from GitHub in order to use `requirements.in`
@ -14,7 +14,7 @@ python3.pkgs.buildPythonApplication rec {
owner = "Flexget";
repo = "Flexget";
rev = "refs/tags/v${version}";
hash = "sha256-KF5d9SjKUkkHoYWmNWNBMe567w2StgEFsZprS+SFw7Y=";
hash = "sha256-WfOLDTwmHPfg4UkrPC7gvDNJtAorrateQ4W59NmhdHc=";
};
postPatch = ''

View File

@ -0,0 +1,53 @@
{ lib
, fetchFromGitHub
, buildNpmPackage
, nodePackages
, nix-update-script
}:
let
version = "0.9";
in
buildNpmPackage {
pname = "documenso";
inherit version;
src = fetchFromGitHub {
owner = "documenso";
repo = "documenso";
rev = "v${version}";
hash = "sha256-uKOJVZ0GRHo/CYvd/Ix/tq1WDhutRji1tSGdcITsNlo=";
};
preBuild = ''
# somehow for linux, npm is not finding the prisma package with the
# packages installed with the lockfile.
# This generates a prisma version incompatibility warning and is a kludge
# until the upstream package-lock is modified.
${nodePackages.prisma}/bin/prisma generate
'';
npmDepsHash = "sha256-+JbvFMi8xoyxkuL9k96K1Vq0neciCGkkyZUPd15ES2E=";
installPhase = ''
runHook preInstall
mkdir $out
cp -r node_modules $out/
cp package-lock.json $out
cp apps/web/package.json $out
cp -r apps/web/public $out/
cp -r apps/web/.next $out/
runHook postInstall
'';
passthru.updateScript = nix-update-script {};
meta = with lib; {
description = "The Open Source DocuSign Alternative.";
homepage = "https://github.com/documenso/documenso";
license = licenses.agpl3Only;
maintainers = with maintainers; [ happysalada ];
platforms = platforms.unix;
};
}

View File

@ -27,11 +27,11 @@ let
in
stdenv.mkDerivation rec {
pname = "PortfolioPerformance";
version = "0.65.0";
version = "0.65.1";
src = fetchurl {
url = "https://github.com/buchen/portfolio/releases/download/${version}/PortfolioPerformance-${version}-linux.gtk.x86_64.tar.gz";
hash = "sha256-a1LL8RCxItrtsyQrJSbMEBPUwxKK6t8FXdFEhxGdvxw=";
hash = "sha256-VfYuqrz9YDHwY0atKXYkzHJW/lXlVWGgo5QjMTMeB+g=";
};
nativeBuildInputs = [

View File

@ -3,23 +3,23 @@
{
"kicad" = {
kicadVersion = {
version = "7.0.6";
version = "7.0.7";
src = {
rev = "c1a1259ded090202d87d49f4eb4e42f367764622";
sha256 = "1bifg73id0grn37a4n5wpq440z9xz14q0fvkva5vajx0xfd34llv";
rev = "dc7665e950aa0d42de36e928af48be3b060ba5d1";
sha256 = "1xbzf29rhqh6kl0vggdn2dblgp927096fc1lr3y4yw63b8n0qq50";
};
};
libVersion = {
version = "7.0.6";
version = "7.0.7";
libSources = {
symbols.rev = "b591556d93f52d3394b45f3f4c7d1b89f0caacc7";
symbols.sha256 = "0p60dvig7xx8svzsgp871r0aix2m95bmzg3snz372nmgnza2nnvf";
templates.rev = "39d8fccb7400713f3f917799d8b770ad3e786963";
symbols.rev = "c7df225d1c79b3ea842c77d928ce1f9bc1a63c5b";
symbols.sha256 = "1wr754m4ykidds3i14gqhvyrj3mbkchp2hkfnr0rjsdaqf4zmqdf";
templates.rev = "1561dd81d116a661a17147c3b941a3e96335eecc";
templates.sha256 = "1qi20mrsfn4fxmr1fyphmil2i9p2nzmwk5rlfchc5aq2194nj3lq";
footprints.rev = "5fca0686ef0d6c4a9eafb307e346c7b9444e8045";
footprints.sha256 = "0fqnviaxsai0xwyq8xq5ks26j4vd390ns6h6lr0fx2ikv1ghaml5";
packages3d.rev = "6acf40ee68422ea952c3ba8078bbe4cc05d64bff";
packages3d.sha256 = "0dmssyhqd94d9wj8w7g7xjan560b2rwcs540sgl0rc77cw2jify8";
footprints.rev = "ecb85886616b7a6bb957699037f6fb680ce01d30";
footprints.sha256 = "0xnnivlqgcyaz9qay73p43jnvmvshp2b3fbh3569j7rmgi5pn8x0";
packages3d.rev = "4fb0672db1d405b661d0cde8edb5d54ac0a95fc7";
packages3d.sha256 = "141r5wd8s1bgyf77kvb9q14cpsiwwv4zmfzwbgcd42rflsk2lcbc";
};
};
};

View File

@ -2,13 +2,13 @@
mkDerivation rec {
pname = "openhantek6022";
version = "3.3.2.2";
version = "3.3.3";
src = fetchFromGitHub {
owner = "OpenHantek";
repo = "OpenHantek6022";
rev = version;
sha256 = "sha256-0k9Q60+T28m1hPYf5viSdpt0s4d828lfjVo3GjLDm7c=";
sha256 = "sha256-y2pNLAa0P/r0YEdKjQ3iP66cqtTWERG8lTOZDR64WTk=";
};
nativeBuildInputs = [ cmake makeWrapper ];

View File

@ -7,13 +7,13 @@
rustPlatform.buildRustPackage rec {
pname = "gex";
version = "0.6.1";
version = "0.6.2";
src = fetchFromGitHub {
owner = "Piturnah";
repo = pname;
rev = "v${version}";
hash = "sha256-OCC2kHPHWFwqdE0THNZbH7d3gxTBD5MUMWY6PO5GuHU";
hash = "sha256-iCK3fiVchbfQh5JPHzBN/b24dkoXKW5dJdCsyoG0Kvw=";
};
nativeBuildInputs = [ pkg-config ];
@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec {
libgit2_1_6
];
cargoHash = "sha256-28sMY47LAdaGmPNmxeu/w1Pn6AV3JlWbxFcit5pLkI0";
cargoHash = "sha256-5w8VzYoevWesMGQJe4rDbugCFQrE1LDNb69CaJ2bQ0w=";
meta = with lib; {
description = "Git Explorer: cross-platform git workflow improvement tool inspired by Magit";

View File

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "git-codereview";
version = "1.4.0";
version = "1.5.0";
src = fetchFromGitHub {
owner = "golang";
repo = "review";
rev = "v${version}";
hash = "sha256-N6L+TlPU/lStMPTFYKFH2GiwyGkEJJuKtkH7wKLuM00=";
hash = "sha256-Dy7gHT6WmZ1TjA5s+VmOUkaRvrA9v7mWQSLPscgBHgY=";
};
vendorHash = null;

View File

@ -2,16 +2,16 @@
rustPlatform.buildRustPackage rec {
pname = "git-vanity-hash";
version = "2020-02-26-unstable";
version = "1.0.0";
src = fetchFromGitHub {
owner = "prasmussen";
repo = "git-vanity-hash";
rev = "000004122124005af8d118a3f379bfc6ecc1e7c7";
sha256 = "1wf342zawbphlzvji0yba0qg4f6v67h81nhxqcsir132jv397ma7";
rev = "v${version}";
hash = "sha256-jD8cSFXf9UNBZ9d8JTnuwhs6nPHY/xGd5RyqF+mQOlo=";
};
cargoSha256 = "1frdw9bs7y6ch5rrbsgvhrs0wxw4hbwm2n3crslp12w55m7k39fc";
cargoHash = "sha256-8oW6gRtdQdmSmdwKlcU2EhHsyhk9hFhKl7RtsYwC7Ps=";
postInstall = ''
mkdir -p $out/share/doc/git-vanity-hash

View File

@ -62,13 +62,13 @@ let
in
buildGoModule rec {
pname = "podman";
version = "4.6.0";
version = "4.6.1";
src = fetchFromGitHub {
owner = "containers";
repo = "podman";
rev = "v${version}";
hash = "sha256-8cfEZBYhR5CWkHEpIZ0j011gyV6lnY7z4KgJPJr0MfQ=";
hash = "sha256-bGhLjf4GZpuWX1xOC4Hm9SkYvUJ45ZipcKAIEJF0tDQ=";
};
patches = [

View File

@ -212,6 +212,9 @@ in stdenv.mkDerivation {
''}
cp -rv out/linux.*/${buildType}/bin/src "$modsrc"
mkdir -p "$out/share/virtualbox"
cp -rv src/VBox/Main/UnattendedTemplates "$out/share/virtualbox"
'';
preFixup = optionalString (!headless) ''

View File

@ -2,8 +2,9 @@
, rustPlatform
, fetchFromGitHub
, pkg-config
, wrapGAppsHook
, gtk3
, gdk-pixbuf
, librsvg
, withWayland ? false
, gtk-layer-shell
, stdenv
@ -22,9 +23,9 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-dC7yVJdR7mO0n+sxWwigM1Q4tbDv5ZuOINHHlUIPdA0=";
nativeBuildInputs = [ pkg-config ];
nativeBuildInputs = [ pkg-config wrapGAppsHook ];
buildInputs = [ gtk3 gdk-pixbuf ] ++ lib.optional withWayland gtk-layer-shell;
buildInputs = [ gtk3 librsvg ] ++ lib.optional withWayland gtk-layer-shell;
buildNoDefaultFeatures = true;
buildFeatures = [

View File

@ -39,13 +39,13 @@ assert lib.assertMsg (!nvidiaPatches) "The option `nvidiaPatches` has been renam
assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been removed. Please refer https://wiki.hyprland.org/Configuring/XWayland";
stdenv.mkDerivation (finalAttrs: {
pname = "hyprland" + lib.optionalString debug "-debug";
version = "unstable-2023-08-08";
version = "unstable-2023-08-15";
src = fetchFromGitHub {
owner = "hyprwm";
repo = finalAttrs.pname;
rev = "8e04a80e60983f5def26bdcaea701040fea9a7ae";
hash = "sha256-5/vEdU3SzAdeIyPykjks/Zxkvh9luPTIei6oa77OY2Q=";
rev = "91e28bbe9df85e2e94fbcc0137106362aea14ab5";
hash = "sha256-1vLms49ZgDOC9y1uTjfph3WrUpatKRLnKAvFmSNre20=";
};
patches = [

View File

@ -1,5 +1,5 @@
{ lib, stdenv
, fetchFromGitHub
, coreutils
, makeWrapper
, sway-unwrapped
@ -14,13 +14,27 @@
, python3Packages
}:
let
version = "unstable-2023-06-30";
src = fetchFromGitHub {
owner = "OctopusET";
repo = "sway-contrib";
rev = "7e138bfc112872b79ac9fd766bc57c0f125b96d4";
hash = "sha256-u4sw1NeAhl4FJCG2YOeY45SHoN7tw6cSJwEL5iqr0uQ=";
};
meta = with lib; {
homepage = "https://github.com/OctopusET/sway-contrib";
license = licenses.mit;
platforms = platforms.all;
};
in
{
grimshot = stdenv.mkDerivation rec {
pname = "grimshot";
version = sway-unwrapped.version;
inherit version src;
src = sway-unwrapped.src;
pname = "grimshot";
dontBuild = true;
dontConfigure = true;
@ -31,9 +45,9 @@ grimshot = stdenv.mkDerivation rec {
nativeBuildInputs = [ makeWrapper installShellFiles ];
buildInputs = [ bash ];
installPhase = ''
installManPage contrib/grimshot.1
installManPage grimshot.1
install -Dm 0755 contrib/grimshot $out/bin/grimshot
install -Dm 0755 grimshot $out/bin/grimshot
wrapProgram $out/bin/grimshot --set PATH \
"${lib.makeBinPath [
sway-unwrapped
@ -58,21 +72,17 @@ grimshot = stdenv.mkDerivation rec {
meta = with lib; {
description = "A helper for screenshots within sway";
homepage = "https://github.com/swaywm/sway/tree/master/contrib";
license = licenses.mit;
platforms = platforms.all;
maintainers = sway-unwrapped.meta.maintainers ++ (with maintainers; [ evils ]);
maintainers = with maintainers; [ evils ];
};
};
inactive-windows-transparency = python3Packages.buildPythonApplication rec {
inherit version src;
# long name is long
lname = "inactive-windows-transparency";
pname = "sway-${lname}";
version = sway-unwrapped.version;
src = sway-unwrapped.src;
format = "other";
dontBuild = true;
@ -81,12 +91,15 @@ inactive-windows-transparency = python3Packages.buildPythonApplication rec {
propagatedBuildInputs = [ python3Packages.i3ipc ];
installPhase = ''
install -Dm 0755 $src/contrib/${lname}.py $out/bin/${lname}.py
install -Dm 0755 $src/${lname}.py $out/bin/${lname}.py
'';
meta = sway-unwrapped.meta // {
meta = with lib; {
description = "It makes inactive sway windows transparent";
homepage = "https://github.com/swaywm/sway/tree/${sway-unwrapped.version}/contrib";
mainProgram = "${lname}.py";
maintainers = with maintainers; [
evils # packaged this as a side-effect of grimshot but doesn't use it
];
};
};

View File

@ -14,18 +14,19 @@
, wrapQtAppsHook
, minizip
, libzip
, libuuid
, libarchive
}:
stdenv.mkDerivation rec {
pname = "deepin-compressor";
version = "5.12.15";
version = "5.12.17";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-6grnbv9hMKntOmpVcmU5IpAbHM7r0dQWb+SoQYtc5YY=";
hash = "sha256-eg9JcuBTKoaEuoph0rvy0VRH28sFOdYWN9sGbduUwcM=";
};
postPatch = ''
@ -51,6 +52,7 @@ stdenv.mkDerivation rec {
karchive
minizip
libzip
libuuid
libarchive
];

View File

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, nix-update-script
, pkg-config
, meson
@ -39,6 +40,15 @@ stdenv.mkDerivation rec {
sha256 = "sha256-s4Df2eLnr+RnbTwPzjt9bVA+xZ9xca2hiFdGlRUZRfU=";
};
patches = [
# Fix log spam with new GLib
# https://github.com/elementary/files/pull/2257
(fetchpatch {
url = "https://github.com/elementary/files/commit/7bd542fa0a646b5cb0972f5575c56a9ee4d9dce7.patch";
hash = "sha256-C+oSx0xn3YPuwEC0K+3ZmKeQrroKreJo1tfcpLGQ1S4=";
})
];
nativeBuildInputs = [
desktop-file-utils
meson

View File

@ -2,12 +2,12 @@
stdenv.mkDerivation (finalAttrs: {
pname = "clojure";
version = "1.11.1.1356";
version = "1.11.1.1386";
src = fetchurl {
# https://clojure.org/releases/tools
url = "https://download.clojure.org/install/clojure-tools-${finalAttrs.version}.tar.gz";
hash = "sha256-Gshzo0ill96R+15DuFEdHo2bx3ePuRIuYXJfNF9jkIM=";
# https://github.com/clojure/brew-install/releases
url = "https://github.com/clojure/brew-install/releases/download/${finalAttrs.version}/clojure-tools-${finalAttrs.version}.tar.gz";
hash = "sha256-e5RLnsydCZKRv6P/yC8FxK5AgK0Gj6YJw7E41neGYsM=";
};
nativeBuildInputs = [

View File

@ -17,13 +17,13 @@
stdenv.mkDerivation (finalAttrs: rec {
pname = "proj";
version = "9.2.0";
version = "9.2.1";
src = fetchFromGitHub {
owner = "OSGeo";
repo = "PROJ";
rev = version;
hash = "sha256-NC5H7ufIXit+PVDwNDhz5cv44fduTytsdmNOWyqDDYQ=";
hash = "sha256-cUnnJ9gOh65xBbfamfDkN7ajRdRLO5nUXRLeaBBMchg=";
};
patches = [
@ -64,7 +64,7 @@ stdenv.mkDerivation (finalAttrs: rec {
};
meta = with lib; {
changelog = "https://github.com/OSGeo/PROJ/blob/${src.rev}/docs/source/news.rst";
changelog = "https://github.com/OSGeo/PROJ/blob/${src.rev}/NEWS";
description = "Cartographic Projections Library";
homepage = "https://proj.org/";
license = licenses.mit;

View File

@ -1,55 +1,37 @@
From 831063f8206cab1ad3e90b204a1c3f8c87c3d5cc Mon Sep 17 00:00:00 2001
From 54b1dbc550b3daa2a7834a9bfd73a0c2f8aeba6a Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Tue, 5 Jul 2022 19:40:53 +0200
Subject: [PATCH] proj-config.cmake generation: only add find_dependency(CURL)
for static builds
---
cmake/project-config.cmake.in | 30 +++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)
cmake/project-config.cmake.in | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in
index 40dbaaa2..c1ecd601 100644
index 3f359668..db886396 100644
--- a/cmake/project-config.cmake.in
+++ b/cmake/project-config.cmake.in
@@ -15,20 +15,24 @@ include(CMakeFindDependencyMacro)
@@ -19,11 +19,15 @@ include(CMakeFindDependencyMacro)
# Cf https://gitlab.kitware.com/cmake/cmake/-/issues/17612
cmake_policy(PUSH)
cmake_policy(SET CMP0012 NEW)
-if("@ENABLE_TIFF@")
- find_dependency(TIFF)
- set(PROJ_CONFIG_FIND_TIFF_DEP ON)
+if(NOT "@BUILD_SHARED_LIBS@")
+ if("@ENABLE_TIFF@")
+ find_dependency(TIFF)
+ set(PROJ_CONFIG_FIND_TIFF_DEP ON)
+ endif()
endif()
-if("@CURL_ENABLED@")
- # Chainload CURL usage requirements
- find_dependency(CURL)
- # Target CURL::libcurl only defined since CMake 3.12
- if(NOT TARGET CURL::libcurl)
- add_library(CURL::libcurl INTERFACE IMPORTED)
- set_target_properties(CURL::libcurl PROPERTIES
- INTERFACE_INCLUDE_DIRECTORIES "${CURL_INCLUDE_DIRS}"
- INTERFACE_LINK_LIBRARIES "${CURL_LIBRARIES}"
- )
- endif()
- set(PROJ_CONFIG_FIND_CURL_DEP ON)
+if(NOT "@BUILD_SHARED_LIBS@")
+ if("@CURL_ENABLED@")
+ # Chainload CURL usage requirements
+ find_dependency(CURL)
+ # Target CURL::libcurl only defined since CMake 3.12
+ if(NOT TARGET CURL::libcurl)
+ add_library(CURL::libcurl INTERFACE IMPORTED)
+ set_target_properties(CURL::libcurl PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${CURL_INCLUDE_DIRS}"
+ INTERFACE_LINK_LIBRARIES "${CURL_LIBRARIES}"
+ )
+ endif()
+ set(PROJ_CONFIG_FIND_CURL_DEP ON)
+ endif()
endif()
cmake_policy(POP)
--
2.39.2
2.41.0

View File

@ -170,6 +170,7 @@ let
extraPrefix = "src/3rdparty/";
hash = "sha256-s4GsGMJTBNWw2gTJuIEP3tqT82AmTsR2mbj59m2p6rM=";
})
./qtwebengine-link-pulseaudio.patch
] ++ lib.optionals stdenv.isDarwin [
./qtwebengine-darwin-no-platform-check.patch
./qtwebengine-mac-dont-set-dsymutil-path.patch

View File

@ -0,0 +1,8 @@
--- a/src/core/config/common.pri
+++ b/src/core/config/common.pri
@@ -47,3 +47,5 @@
!qtConfig(webengine-nodejs10): gn_args += use_rollup=false
gn_args += enable_ipc_logging=false
+
+gn_args += link_pulseaudio=true

View File

@ -9,6 +9,7 @@
, zlib, minizip, libjpeg, libpng, libtiff, libwebp, libopus
, jsoncpp, protobuf, libvpx, srtp, snappy, nss, libevent
, alsa-lib
, pulseaudio
, libcap
, pciutils
, systemd
@ -145,6 +146,7 @@ qtModule {
# Audio formats
alsa-lib
pulseaudio
# Text rendering
fontconfig freetype

View File

@ -135,6 +135,7 @@ qtModule {
# environment variable, since NixOS relies on it working.
# See https://github.com/NixOS/nixpkgs/issues/226484 for more context.
../patches/qtwebengine-xkb-includes.patch
../patches/qtwebengine-link-pulseaudio.patch
];
postPatch = ''

View File

@ -0,0 +1,10 @@
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -341,6 +341,7 @@
devtools_fast_bundle=false
devtools_skip_typecheck=false
enable_jxl_decoder=false # temporarily because libjxl causes internal compiler error on armv7
+ link_pulseaudio=true
)
extend_gn_list(gnArgArg

View File

@ -16,6 +16,10 @@ stdenv.mkDerivation rec {
})
];
postPatch = ''
substituteInPlace inifiles.ml --replace 'String.lowercase ' 'String.lowercase_ascii '
'';
nativeBuildInputs = [ ocaml findlib ];
propagatedBuildInputs = [ ocaml_pcre ];

View File

@ -16,7 +16,10 @@ rec {
sha256 = "sha256-51k+Eo3buzby9cWtbl+/0wbAxa2QSS+Oq0aEao0VBCM=";
};
propagatedBuildInputs = [ yojson logs lsp ppx_yojson_conv_lib ];
lsp_v = lsp.override {
version = "1.14.2";
};
propagatedBuildInputs = [ yojson logs lsp_v ppx_yojson_conv_lib ];
meta = with lib; {
description = "LSP server library";

View File

@ -1,4 +1,16 @@
{ lib, buildDunePackage, lsp, xdg, re, fiber, makeWrapper, dot-merlin-reader, spawn, ocamlc-loc }:
{ lib
, buildDunePackage
, lsp
, xdg
, re
, fiber
, makeWrapper
, dot-merlin-reader
, spawn
, ocamlc-loc
, odoc-parser
, merlin-lib
}:
buildDunePackage rec {
pname = "ocaml-lsp-server";
@ -8,7 +20,8 @@ buildDunePackage rec {
buildInputs = lsp.buildInputs ++ [ lsp re ]
++ lib.optional (lib.versionAtLeast version "1.9") spawn
++ lib.optionals (lib.versionAtLeast version "1.10") [ fiber xdg ]
++ lib.optional (lib.versionAtLeast version "1.14.2") ocamlc-loc;
++ lib.optional (lib.versionAtLeast version "1.14.2") ocamlc-loc
++ lib.optional (lib.versionAtLeast version "1.16.2") [ odoc-parser merlin-lib ];
nativeBuildInputs = [ makeWrapper ];

View File

@ -7,41 +7,55 @@
, fetchurl
, lib
, ocaml
, version ?
if lib.versionAtLeast ocaml.version "4.14" then
"1.16.2"
else if lib.versionAtLeast ocaml.version "4.13" then
"1.10.5"
else if lib.versionAtLeast ocaml.version "4.12" then
"1.9.0"
else
"1.4.1"
}:
let params =
if lib.versionAtLeast ocaml.version "4.14"
then {
let params = {
"1.16.2" = {
name = "lsp";
version = "1.14.2";
minimalOCamlVersion = "4.14";
sha256 = "sha256-FIfVpOLy1PAjNBBYVRvbi6hsIzZ7fFtP3aOqfcAqrsQ=";
};
"1.14.2" = {
name = "lsp";
minimalOCamlVersion = "4.14";
sha256 = "sha256-1R+HYaGbPLGDs5DMN3jmnrZFMhMmPUHgF+s+yNzIVJQ=";
} else if lib.versionAtLeast ocaml.version "4.13"
then {
};
"1.10.5" = {
name = "jsonrpc";
version = "1.10.5";
minimalOCamlVersion = "4.13";
sha256 = "sha256-TeJS6t1ruWhWPvWNatrnSUWI6T17XKiosHLYizBDDcw=";
} else if lib.versionAtLeast ocaml.version "4.12"
then {
};
"1.9.0" = {
name = "jsonrpc";
version = "1.9.0";
minimalOCamlVersion = "4.12";
sha256 = "sha256:1ac44n6g3rf84gvhcca545avgf9vpkwkkkm0s8ipshfhp4g4jikh";
} else {
};
"1.4.1" = {
name = "jsonrpc";
version = "1.4.1";
minimalOCamlVersion = "4.06";
sha256 = "1ssyazc0yrdng98cypwa9m3nzfisdzpp7hqnx684rqj8f0g3gs6f";
}
; in
};
}."${version}"; in
buildDunePackage rec {
pname = "jsonrpc";
inherit (params) version;
inherit version;
src = fetchurl {
url = "https://github.com/ocaml/ocaml-lsp/releases/download/${version}/${params.name}-${version}.tbz";
inherit (params) sha256;
};
duneVersion = "3";
minimalOCamlVersion = "4.06";
inherit (params) minimalOCamlVersion;
buildInputs =
if lib.versionAtLeast version "1.7.0" then

View File

@ -21,11 +21,24 @@
, cmdliner
, ordering
, ocamlformat-rpc-lib
, ocaml
, version ?
if lib.versionAtLeast ocaml.version "4.14" then
"1.16.2"
else if lib.versionAtLeast ocaml.version "4.13" then
"1.10.5"
else if lib.versionAtLeast ocaml.version "4.12" then
"1.9.0"
else
"1.4.1"
}:
let jsonrpc_v = jsonrpc.override {
inherit version;
}; in
buildDunePackage rec {
pname = "lsp";
inherit (jsonrpc) version src;
inherit (jsonrpc_v) version src;
duneVersion = "3";
minimalOCamlVersion =
if lib.versionAtLeast version "1.7.0" then

View File

@ -20,7 +20,6 @@ buildDunePackage rec {
pname = "torch";
version = "0.17";
duneVersion = "3";
minimalOCamlVersion = "4.08";
src = fetchFromGitHub {
@ -57,7 +56,6 @@ buildDunePackage rec {
preBuild = "export LIBTORCH=${torch.dev}/";
doCheck = !stdenv.isAarch64;
checkPhase = "dune runtest";
meta = with lib; {
inherit (src.meta) homepage;

View File

@ -0,0 +1,30 @@
{ lib
, buildPecl
, fetchFromGitHub
}:
let
version = "0.18.0";
in buildPecl {
inherit version;
pname = "vld";
src = fetchFromGitHub {
owner = "derickr";
repo = "vld";
rev = version;
hash = "sha256-1xMStPM3Z5qIkrRGfCKcYT6UdF1j150nt7IleirjdBM=";
};
# Tests relies on PHP 7.0
doCheck = false;
meta = {
changelog = "https://github.com/derickr/vld/releases/tag/${version}";
description = "The Vulcan Logic Dumper hooks into the Zend Engine and dumps all the opcodes (execution units) of a script.";
homepage = "https://github.com/derickr/vld";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ gaelreyrol ];
};
}

View File

@ -8,7 +8,7 @@
buildPythonPackage rec {
pname = "ailment";
version = "9.2.63";
version = "9.2.64";
format = "pyproject";
disabled = pythonOlder "3.8";
@ -17,7 +17,7 @@ buildPythonPackage rec {
owner = "angr";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-Hg8KSReRHOmdoN8CZiX8i8Xdrn5/Gnqmx1QE6elV6qA=";
hash = "sha256-KUJpcP7bf8BjmB/QojTQHSwkmzW0bN4nJaD8GcNbcyE=";
};
nativeBuildInputs = [

View File

@ -19,7 +19,7 @@
buildPythonPackage rec {
pname = "aiohomekit";
version = "2.6.15";
version = "2.6.16";
format = "pyproject";
disabled = pythonOlder "3.9";
@ -28,7 +28,7 @@ buildPythonPackage rec {
owner = "Jc2k";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-PX2OIgfVOlCEudObJrz/WRQXW7c6Gq9PQqD52D3lmmo=";
hash = "sha256-2QnM5WJ0UyuRyL6NiXz22SLUMvyNfbdNIutJSNjS+G8=";
};
nativeBuildInputs = [

View File

@ -11,9 +11,10 @@
, typing-extensions
, pandas
, jinja2
, importlib-metadata
, packaging
# Build, dev and test dependencies
, anywidget
, ipython
, pytestCheckHook
, vega_datasets
@ -22,15 +23,17 @@
buildPythonPackage rec {
pname = "altair";
version = "5.0.1";
# current version, 5.0.1, is broken with jsonschema>=4.18
# we use unstable version instead of patch due to many changes
version = "unstable-2023-08-12";
format = "pyproject";
disabled = pythonOlder "3.7";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "altair-viz";
repo = "altair";
rev = "refs/tags/v${version}";
hash = "sha256-7bTrfryu4oaodVGNFNlVk9vXmDA5/9ahvCmvUGzZ5OQ=";
rev = "56b3b66daae7160c8d82777d2646131afcc3dab4";
hash = "sha256-uVE3Bth1D1mIhaULB4IxEtOzhQd51Pscqyfdys65F6A=";
};
nativeBuildInputs = [
@ -41,12 +44,13 @@ buildPythonPackage rec {
jinja2
jsonschema
numpy
packaging
pandas
toolz
] ++ lib.optional (pythonOlder "3.8") importlib-metadata
++ lib.optional (pythonOlder "3.11") typing-extensions;
] ++ lib.optional (pythonOlder "3.11") typing-extensions;
nativeCheckInputs = [
anywidget
ipython
sphinx
vega_datasets
@ -62,6 +66,8 @@ buildPythonPackage rec {
"tests/vegalite/v5/test_api.py"
# avoid updating files and dependency on black
"tests/test_toplevel.py"
# require vl-convert package
"tests/utils/test_compiler.py"
];
meta = with lib; {

View File

@ -32,7 +32,7 @@
buildPythonPackage rec {
pname = "angr";
version = "9.2.63";
version = "9.2.64";
format = "pyproject";
disabled = pythonOlder "3.8";
@ -41,7 +41,7 @@ buildPythonPackage rec {
owner = pname;
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-vrcziVoH+P0cqnzalwZOyu7awidQ0Lv6vT6Uq9Pu4I0=";
hash = "sha256-NQopPg7ZAKkbq6T/1U8VYT/9oRz9ssg5yqTBpInNHNk=";
};
propagatedBuildInputs = [

View File

@ -0,0 +1,54 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytestCheckHook
, pythonOlder
, hatch-jupyter-builder
, hatchling
, importlib-metadata
, ipywidgets
, jupyterlab
, psygnal
, typing-extensions
, watchfiles
}:
buildPythonPackage rec {
pname = "anywidget";
version = "0.6.3";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-OUKxmYceEKURJeQTVI7oLT4SdZM90V7BoZf0UykkEV4=";
};
nativeBuildInputs = [
hatch-jupyter-builder
hatchling
jupyterlab
];
propagatedBuildInputs = [
ipywidgets
psygnal
typing-extensions
] ++ lib.optional (pythonOlder "3.8") importlib-metadata;
nativeCheckInputs = [
pytestCheckHook
watchfiles
];
pythonImportsCheck = [ "anywidget" ];
meta = with lib; {
description = "Custom jupyter widgets made easy";
homepage = "https://github.com/manzt/anywidget";
changelog = "https://github.com/manzt/anywidget/releases/tag/anywidget%40${version}";
license = licenses.mit;
maintainers = with maintainers; [ natsukium ];
};
}

View File

@ -8,7 +8,7 @@
buildPythonPackage rec {
pname = "archinfo";
version = "9.2.63";
version = "9.2.64";
format = "pyproject";
disabled = pythonOlder "3.8";
@ -17,7 +17,7 @@ buildPythonPackage rec {
owner = "angr";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-10ocfA1JFHyZA8Uv5b209rOjY5OeBtKITnoiRaw/w7k=";
hash = "sha256-/3dc0p6xDFvv8VwFi5hxiXveiWYr9w3s0PwMv3uV2yw=";
};
nativeBuildInputs = [

View File

@ -5,7 +5,7 @@
, poetry-core
, jsonschema
, peewee
, appdirs
, platformdirs
, iso8601
, rfc3339-validator
, strict-rfc3339
@ -18,7 +18,7 @@
buildPythonPackage rec {
pname = "aw-core";
version = "0.5.14";
version = "0.5.15";
format = "pyproject";
@ -27,7 +27,7 @@ buildPythonPackage rec {
owner = "ActivityWatch";
repo = "aw-core";
rev = "v${version}";
sha256 = "sha256-+XmFh4/wPUpuoRVi8OdzFs/3dwoI1Mjx1hnTiGj+12I=";
sha256 = "sha256-3cz79gSkmbGtCKnLGA4HGG5dLu7QB4ZtMnNGrSYB17U=";
};
disabled = pythonOlder "3.8";
@ -39,7 +39,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [
jsonschema
peewee
appdirs
platformdirs
iso8601
rfc3339-validator
strict-rfc3339

View File

@ -9,7 +9,7 @@
buildPythonPackage rec {
pname = "azure-eventhub";
version = "5.11.3";
version = "5.11.4";
format = "setuptools";
disabled = pythonOlder "3.6";
@ -17,7 +17,7 @@ buildPythonPackage rec {
src = fetchPypi {
inherit pname version;
extension = "zip";
hash = "sha256-mXXMvKHk+U+VtBG5zPbKJcXrRMDssnU/18wGXT5xSK8=";
hash = "sha256-aLiaNRUEDxF2+bSWxMdtOBwQd3mu13V8u7mj2r4wqCM=";
};
propagatedBuildInputs = [

View File

@ -1,29 +1,39 @@
{ lib, buildPythonPackage, fetchPypi
{ lib
, buildPythonPackage
, fetchPypi
, azure-common
, azure-core
, azure-mgmt-core
, msrest
, pythonOlder
}:
buildPythonPackage rec {
pname = "azure-synapse-artifacts";
version = "0.16.0";
version = "0.17.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
extension = "zip";
hash = "sha256-J96cBqCCajK34M7v+2h6t2ptm7QwmfQt25674Q4Nr94=";
hash = "sha256-58k8F/aUBBNJwGBiPZojkSzEXZ3Kd6uEwr0cZbFaM9k=";
};
propagatedBuildInputs = [
azure-common
azure-core
azure-mgmt-core
msrest
];
# zero tests run
doCheck = false;
pythonImportsCheck = [ "azure.synapse.artifacts" ];
pythonImportsCheck = [
"azure.synapse.artifacts"
];
meta = with lib; {
description = "Microsoft Azure Synapse Artifacts Client Library for Python";

View File

@ -14,7 +14,7 @@
buildPythonPackage rec {
pname = "bimmer-connected";
version = "0.13.9";
version = "0.13.10";
format = "setuptools";
disabled = pythonOlder "3.6";
@ -23,7 +23,7 @@ buildPythonPackage rec {
owner = "bimmerconnected";
repo = "bimmer_connected";
rev = "refs/tags/${version}";
hash = "sha256-iAfP8idJXhAsCnhlGUyMHK723kEER5bCYJNLsvaCrTA=";
hash = "sha256-IylA73N3bZOs5HjQGbT6xqokb73iO3bdg5M2KCTX3p4=";
};
nativeBuildInputs = [

View File

@ -23,7 +23,7 @@
buildPythonPackage rec {
pname = "cartopy";
version = "0.21.1";
version = "0.22.0";
disabled = pythonOlder "3.8";
@ -32,22 +32,9 @@ buildPythonPackage rec {
src = fetchPypi {
inherit version;
pname = "Cartopy";
hash = "sha256-idVklxLIWCIxxuEYJaBMhfbwzulNu4nk2yPqvKHMJQo=";
hash = "sha256-swD5ASCTHUPxHvh8Bk6h2s7BtZpJQKp26/gs8JVIu0k=";
};
patches = [
# https://github.com/SciTools/cartopy/pull/2163
(fetchpatch {
url = "https://github.com/SciTools/cartopy/commit/7fb57e294914dbda0ebe8caaeac4deffe5e71639.patch";
hash = "sha256-qc14q+v2IMC+1NQ+OqLjUfJA3Sr5txniqS7CTQ6c7LI=";
})
# https://github.com/SciTools/cartopy/pull/2130
(fetchpatch {
url = "https://github.com/SciTools/cartopy/commit/6b4572ba1a8a877f28e25dfe9559c14b7a565958.patch";
hash = "sha256-0u6VJMrvoD9bRLHiQV4HQCKDyWEb9dDS2A3rjm6uqYw=";
})
];
nativeBuildInputs = [
cython
geos # for geos-config
@ -56,7 +43,8 @@ buildPythonPackage rec {
];
buildInputs = [
geos proj
geos
proj
];
propagatedBuildInputs = [
@ -83,8 +71,10 @@ buildPythonPackage rec {
'';
pytestFlagsArray = [
"--pyargs" "cartopy"
"-m" "'not network and not natural_earth'"
"--pyargs"
"cartopy"
"-m"
"'not network and not natural_earth'"
];
disabledTests = [

View File

@ -12,6 +12,8 @@ buildPythonPackage rec {
inherit (certbot) src version;
disabled = pythonOlder "3.6";
sourceRoot = "${src.name}/certbot-dns-cloudflare";
propagatedBuildInputs = [
acme
certbot
@ -22,9 +24,12 @@ buildPythonPackage rec {
pytestCheckHook
];
pytestFlagsArray = [ "-o cache_dir=$(mktemp -d)" ];
pytestFlagsArray = [
"-o cache_dir=$(mktemp -d)"
sourceRoot = "${src.name}/certbot-dns-cloudflare";
# Monitor https://github.com/certbot/certbot/issues/9606 for a solution
"-W 'ignore:pkg_resources is deprecated as an API:DeprecationWarning'"
];
meta = certbot.meta // {
description = "Cloudflare DNS Authenticator plugin for Certbot";

View File

@ -13,6 +13,8 @@ buildPythonPackage rec {
inherit (certbot) src version;
disabled = pythonOlder "3.6";
sourceRoot = "${src.name}/certbot-dns-google";
propagatedBuildInputs = [
acme
certbot
@ -24,9 +26,12 @@ buildPythonPackage rec {
pytestCheckHook
];
pytestFlagsArray = [ "-o cache_dir=$(mktemp -d)" ];
pytestFlagsArray = [
"-o cache_dir=$(mktemp -d)"
sourceRoot = "${src.name}/certbot-dns-google";
# Monitor https://github.com/certbot/certbot/issues/9606 for a solution
"-W 'ignore:pkg_resources is deprecated as an API:DeprecationWarning'"
];
meta = certbot.meta // {
description = "Google Cloud DNS Authenticator plugin for Certbot";

View File

@ -12,6 +12,8 @@ buildPythonPackage rec {
inherit (certbot) src version;
disabled = pythonOlder "3.6";
sourceRoot = "${src.name}/certbot-dns-rfc2136";
propagatedBuildInputs = [
acme
certbot
@ -22,9 +24,12 @@ buildPythonPackage rec {
pytestCheckHook
];
pytestFlagsArray = [ "-o cache_dir=$(mktemp -d)" ];
pytestFlagsArray = [
"-o cache_dir=$(mktemp -d)"
sourceRoot = "${src.name}/certbot-dns-rfc2136";
# Monitor https://github.com/certbot/certbot/issues/9606 for a solution
"-W 'ignore:pkg_resources is deprecated as an API:DeprecationWarning'"
];
meta = certbot.meta // {
description = "RFC 2136 DNS Authenticator plugin for Certbot";

View File

@ -22,7 +22,12 @@ buildPythonPackage rec {
pytestCheckHook
];
pytestFlagsArray = [ "-o cache_dir=$(mktemp -d)" ];
pytestFlagsArray = [
"-o cache_dir=$(mktemp -d)"
# Monitor https://github.com/certbot/certbot/issues/9606 for a solution
"-W 'ignore:pkg_resources is deprecated as an API:DeprecationWarning'"
];
sourceRoot = "${src.name}/certbot-dns-route53";

View File

@ -13,7 +13,7 @@
buildPythonPackage rec {
pname = "claripy";
version = "9.2.63";
version = "9.2.64";
format = "pyproject";
disabled = pythonOlder "3.8";
@ -22,7 +22,7 @@ buildPythonPackage rec {
owner = "angr";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-p5fJ5+YFQIs397eVFxtMMJj/FwfH97CY1HjFJqPVVc0=";
hash = "sha256-vx4wFZdycXow/t2LT4t1kO81JPvsB1mQF1GWgYRZiWs=";
};
nativeBuildInputs = [

View File

@ -16,7 +16,7 @@
let
# The binaries are following the argr projects release cycle
version = "9.2.63";
version = "9.2.64";
# Binary files from https://github.com/angr/binaries (only used for testing and only here)
binaries = fetchFromGitHub {
@ -38,7 +38,7 @@ buildPythonPackage rec {
owner = "angr";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-rCopCv7CPx04MYW1HkP0RP4NRZZlKtD4D8854FqIu10=";
hash = "sha256-wF3T8Kr09jqe4b/qctKXzFAnaTTtOkceHEoEN8J0mTs=";
};
nativeBuildInputs = [

View File

@ -38,7 +38,7 @@
buildPythonPackage rec {
pname = "dask";
version = "2023.7.1";
version = "2023.8.0";
format = "pyproject";
disabled = pythonOlder "3.8";
@ -47,7 +47,7 @@ buildPythonPackage rec {
owner = "dask";
repo = "dask";
rev = "refs/tags/${version}";
hash = "sha256-1KnvIMEWT1MwlvkdgH10xk+lGSsGWJMLBonTtWwKjog=";
hash = "sha256-ZKjfxTJCu3EUOKz16+VP8+cPqQliFNc7AU1FPC1gOXw=";
};
nativeBuildInputs = [

View File

@ -11,7 +11,7 @@
buildPythonPackage rec {
pname = "dbus-fast";
version = "1.90.1";
version = "1.91.2";
format = "pyproject";
disabled = pythonOlder "3.7";
@ -20,7 +20,7 @@ buildPythonPackage rec {
owner = "Bluetooth-Devices";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-B+NW7ORKIBtjxeR0W0tX7V1MgBtNoyGFX35TXUl7rVE=";
hash = "sha256-5f9mnNdUgPTk30V2mrYpSvYMqss40DiLEVGzYevlrag=";
};
nativeBuildInputs = [

View File

@ -39,16 +39,16 @@
buildPythonPackage rec {
pname = "dissect-target";
version = "3.11";
version = "3.11.1";
format = "pyproject";
disabled = pythonOlder "3.11";
disabled = pythonOlder "3.11.1";
src = fetchFromGitHub {
owner = "fox-it";
repo = "dissect.target";
rev = "refs/tags/${version}";
hash = "sha256-WnF0Z/1jIUKSDAToQzKpiYQgn58KvQJfxk6r8oXANvU=";
hash = "sha256-xT0PXah+sYzSDRoBU4OWBp+zhlinKRuQUDBLvos4zKk=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;

View File

@ -32,16 +32,16 @@
buildPythonPackage rec {
pname = "dissect";
version = "3.8";
version = "3.8.1";
format = "pyproject";
disabled = pythonOlder "3.8";
disabled = pythonOlder "3.8.1";
src = fetchFromGitHub {
owner = "fox-it";
repo = "dissect";
rev = "refs/tags/${version}";
hash = "sha256-TEzIKEGAp+1QHJtnPp5JhopuVVBNo9/Cwj0z3YcBCcg=";
hash = "sha256-WbKzmLeGsvzFA/bTTCqBEj/unbnzKQFzHFPRG411Cos=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;

View File

@ -25,7 +25,7 @@
buildPythonPackage rec {
pname = "distributed";
version = "2023.4.1";
version = "2023.8.0";
format = "pyproject";
disabled = pythonOlder "3.8";
@ -34,7 +34,7 @@ buildPythonPackage rec {
owner = "dask";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-KCgftu3i8N0WSelHiqWqa1vLN5gUtleftSUx1Zu4nZg=";
hash = "sha256-FvNh7gfxUR1iIUY3kMolhzcbWupQL39E9JXWip8bdrQ=";
};
postPatch = ''

View File

@ -5,6 +5,7 @@
, django
, factory_boy
, mock
, pip
, pygments
, pytest-django
, pytestCheckHook
@ -46,6 +47,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
factory_boy
mock
pip
pygments # not explicitly declared in setup.py, but some tests require it
pytest-django
pytestCheckHook

View File

@ -2,6 +2,7 @@
, buildPythonPackage
, chardet
, docutils
, fetchpatch
, fetchPypi
, pbr
, pygments
@ -10,6 +11,7 @@
, restructuredtext_lint
, setuptools-scm
, stevedore
, wheel
}:
buildPythonPackage rec {
@ -24,8 +26,18 @@ buildPythonPackage rec {
hash = "sha256-2XqT6PWi78RxOggEZX3trYN0XMpM0diN6Rhvd/l3YAQ=";
};
patches = [
# https://github.com/PyCQA/doc8/pull/146
(fetchpatch {
name = "remove-setuptools-scm-git-archive.patch";
url = "https://github.com/PyCQA/doc8/commit/06416e95041db92e4295b13ab596351618f6b32e.patch";
hash = "sha256-IIE3cDNOx+6RLjidGrokyazaX7MOVbMKUb7yQIM5sI0=";
})
];
nativeBuildInputs = [
setuptools-scm
wheel
];
buildInputs = [

View File

@ -14,7 +14,7 @@
buildPythonPackage rec {
pname = "dvc-data";
version = "2.13.1";
version = "2.14.0";
format = "pyproject";
disabled = pythonOlder "3.8";
@ -23,7 +23,7 @@ buildPythonPackage rec {
owner = "iterative";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-RmUwo7NcbDjRf+sVgthno+ZvxXhMDwmoTfiN7cJM/5s=";
hash = "sha256-tXUGQI3TwBEHW+wxNn14zUx6PhzAwe5NX+78JIdTI5c=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;

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