Merge remote-tracking branch 'origin/staging-next' into staging
This commit is contained in:
@@ -58,6 +58,12 @@
|
||||
- [testers.shellcheck](https://nixos.org/manual/nixpkgs/unstable/#tester-shellcheck) now warns when `name` is not provided.
|
||||
The `name` argument will become mandatory in a future release.
|
||||
|
||||
- `grafana-agent` and `services.grafana-agent` have been removed in favor of
|
||||
Grafana Alloy (`grafana-alloy` and `services.alloy`), as they depend on an EOL compiler version
|
||||
and will become EOL during the 25.05 lifecycle.
|
||||
Grafana recommends migrating to `grafana-alloy` (`services.alloy`).
|
||||
See https://grafana.com/docs/alloy/latest/set-up/migrate/ for details.
|
||||
|
||||
- `xdragon` package has been renamed to `dragon-drop`.
|
||||
`xdragon` is an alias to `dragon-drop` and the package still provides `bin/xdragon`.
|
||||
`bin/dragon` is no longer supplied.
|
||||
@@ -68,9 +74,12 @@
|
||||
|
||||
- `postgresql`'s `pythonSupport` argument has been changed. It is now enabled by default, but to use PL/Python the extension needs to be added explicitly with `postgresql.withPackages`. If you were using `postgresql.override { pythonSupport = true; }` before, change it to `postgresql.withPackages (ps: [ ps.plpython3 ])`. The same applies to `perlSupport`/`plperl` and `tclSupport`/`pltcl` respectively.
|
||||
|
||||
- The `rustPlatform.fetchCargoTarball` function is deprecated, because it relied on `cargo vendor` not changing its output format to keep fixed-output derivation hashes the same, which is a Nix invariant, and Cargo 1.84.0 changed `cargo vendor`'s output format.
|
||||
It should generally be replaced with `rustPlatform.fetchCargoVendor`, but `rustPlatform.importCargoLock` may also be appropriate in some circumstances.
|
||||
`rustPlatform.buildRustPackage` users must set `useFetchCargoVendor` to `true` and regenerate the `cargoHash`.
|
||||
- Rust packages will need to regenerate their `cargoHash`.
|
||||
Cargo 1.84.0 changed the format of `cargo vendor` output, which invalidated all existing `rustPlatform.fetchCargoTarball` hashes.
|
||||
To preserve Nix’s invariants, it has been replaced with `rustPlatform.fetchCargoVendor`, an independent implementation prioritizing format stability.
|
||||
`rustPlatform.buildRustPackage` now uses `rustPlatform.fetchCargoVendor` by default; a hash mismatch error is expected in third‐party Rust packages when updating to Nixpkgs 25.05.
|
||||
Packages wishing to maintain compatibility with Nixpkgs 24.11 must set `useFetchCargoVendor` to `true` explicitly.
|
||||
`rustPlatform.importCargoLock` may also be appropriate in some circumstances.
|
||||
|
||||
- NetBox was updated to `>= 4.2.0`. Have a look at the breaking changes
|
||||
of the [4.1 release](https://github.com/netbox-community/netbox/releases/tag/v4.1.0)
|
||||
@@ -83,6 +92,8 @@
|
||||
|
||||
- `i3status-rust`-package no longer enables `notmuch` by default. It can be enabled via `withNotmuch`.
|
||||
|
||||
- `ocis-bin` has been renamed to `ocis_5-bin`. Future versions will have the major version suffix.
|
||||
|
||||
- All support for 32‐bit Darwin systems has been dropped.
|
||||
|
||||
- Default ICU version updated from 74 to 76
|
||||
|
||||
@@ -10799,6 +10799,13 @@
|
||||
github = "james-atkins";
|
||||
githubId = 9221409;
|
||||
};
|
||||
jamesward = {
|
||||
email = "james@jamesward.com";
|
||||
name = "James Ward";
|
||||
github = "jamesward";
|
||||
githubId = 65043;
|
||||
keys = [ { fingerprint = "82F9 4BBD F95C 247B BD21 396B 9A0B 94DE C0FF A7EE"; } ];
|
||||
};
|
||||
jamiemagee = {
|
||||
email = "jamie.magee@gmail.com";
|
||||
github = "JamieMagee";
|
||||
|
||||
@@ -949,7 +949,6 @@
|
||||
./services/monitoring/glances.nix
|
||||
./services/monitoring/glpi-agent.nix
|
||||
./services/monitoring/goss.nix
|
||||
./services/monitoring/grafana-agent.nix
|
||||
./services/monitoring/grafana-image-renderer.nix
|
||||
./services/monitoring/grafana-reporter.nix
|
||||
./services/monitoring/grafana-to-ntfy.nix
|
||||
|
||||
@@ -143,6 +143,13 @@ in
|
||||
] "The fourStoreEndpoint module has been removed")
|
||||
(mkRemovedOptionModule [ "services" "fprot" ] "The corresponding package was removed from nixpkgs.")
|
||||
(mkRemovedOptionModule [ "services" "frab" ] "The frab module has been removed")
|
||||
(mkRemovedOptionModule
|
||||
[
|
||||
"services"
|
||||
"grafana-agent"
|
||||
]
|
||||
"The grafana-agent module has been removed. Consider migrating to `grafana-alloy` (`services.alloy.enable`). See <https://grafana.com/docs/alloy/latest/set-up/migrate/>"
|
||||
)
|
||||
(mkRemovedOptionModule [ "services" "homeassistant-satellite" ]
|
||||
"The `services.homeassistant-satellite` module has been replaced by `services.wyoming-satellite`."
|
||||
)
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
utils,
|
||||
...
|
||||
}:
|
||||
|
||||
@@ -97,14 +96,11 @@ in
|
||||
systemd = {
|
||||
packages = [ pkgs.cosmic-session ];
|
||||
user.targets = {
|
||||
# TODO: remove when upstream has XDG autostart support
|
||||
cosmic-session = {
|
||||
wants = [ "xdg-desktop-autostart.target" ];
|
||||
before = [ "xdg-desktop-autostart.target" ];
|
||||
};
|
||||
tray = {
|
||||
description = "Cosmic Tray Target";
|
||||
requires = [ "graphical-session-pre.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -125,7 +121,7 @@ in
|
||||
services.displayManager.sessionPackages = [ pkgs.cosmic-session ];
|
||||
services.libinput.enable = true;
|
||||
services.upower.enable = true;
|
||||
# Setup PAM authentication for the `cosmic-greeter` user
|
||||
# Required for screen locker
|
||||
security.pam.services.cosmic-greeter = { };
|
||||
|
||||
# Good to have defaults
|
||||
|
||||
@@ -59,7 +59,7 @@ in
|
||||
createHome = true;
|
||||
group = "cosmic-greeter";
|
||||
};
|
||||
# Setup PAM authentication for the `cosmic-greeter` user
|
||||
# Required for authentication
|
||||
security.pam.services.cosmic-greeter = { };
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
@@ -1,180 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
generators,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.grafana-agent;
|
||||
settingsFormat = pkgs.formats.yaml { };
|
||||
configFile = settingsFormat.generate "grafana-agent.yaml" cfg.settings;
|
||||
in
|
||||
{
|
||||
meta = {
|
||||
maintainers = with lib.maintainers; [
|
||||
flokli
|
||||
zimbatm
|
||||
];
|
||||
};
|
||||
|
||||
options.services.grafana-agent = {
|
||||
enable = lib.mkEnableOption "grafana-agent";
|
||||
|
||||
package = lib.mkPackageOption pkgs "grafana-agent" { };
|
||||
|
||||
credentials = lib.mkOption {
|
||||
description = ''
|
||||
Credentials to load at service startup. Keys that are UPPER_SNAKE will be loaded as env vars. Values are absolute paths to the credentials.
|
||||
'';
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
default = { };
|
||||
|
||||
example = {
|
||||
logs_remote_write_password = "/run/keys/grafana_agent_logs_remote_write_password";
|
||||
LOGS_REMOTE_WRITE_URL = "/run/keys/grafana_agent_logs_remote_write_url";
|
||||
LOGS_REMOTE_WRITE_USERNAME = "/run/keys/grafana_agent_logs_remote_write_username";
|
||||
metrics_remote_write_password = "/run/keys/grafana_agent_metrics_remote_write_password";
|
||||
METRICS_REMOTE_WRITE_URL = "/run/keys/grafana_agent_metrics_remote_write_url";
|
||||
METRICS_REMOTE_WRITE_USERNAME = "/run/keys/grafana_agent_metrics_remote_write_username";
|
||||
};
|
||||
};
|
||||
|
||||
extraFlags = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
default = [ ];
|
||||
example = [
|
||||
"-enable-features=integrations-next"
|
||||
"-disable-reporting"
|
||||
];
|
||||
description = ''
|
||||
Extra command-line flags passed to {command}`grafana-agent`.
|
||||
|
||||
See <https://grafana.com/docs/agent/latest/static/configuration/flags/>
|
||||
'';
|
||||
};
|
||||
|
||||
settings = lib.mkOption {
|
||||
description = ''
|
||||
Configuration for {command}`grafana-agent`.
|
||||
|
||||
See <https://grafana.com/docs/agent/latest/configuration/>
|
||||
'';
|
||||
|
||||
type = lib.types.submodule {
|
||||
freeformType = settingsFormat.type;
|
||||
};
|
||||
|
||||
default = { };
|
||||
defaultText = lib.literalExpression ''
|
||||
{
|
||||
metrics = {
|
||||
wal_directory = "\''${STATE_DIRECTORY}";
|
||||
global.scrape_interval = "5s";
|
||||
};
|
||||
integrations = {
|
||||
agent.enabled = true;
|
||||
agent.scrape_integration = true;
|
||||
node_exporter.enabled = true;
|
||||
};
|
||||
}
|
||||
'';
|
||||
example = {
|
||||
metrics.global.remote_write = [
|
||||
{
|
||||
url = "\${METRICS_REMOTE_WRITE_URL}";
|
||||
basic_auth.username = "\${METRICS_REMOTE_WRITE_USERNAME}";
|
||||
basic_auth.password_file = "\${CREDENTIALS_DIRECTORY}/metrics_remote_write_password";
|
||||
}
|
||||
];
|
||||
logs.configs = [
|
||||
{
|
||||
name = "default";
|
||||
scrape_configs = [
|
||||
{
|
||||
job_name = "journal";
|
||||
journal = {
|
||||
max_age = "12h";
|
||||
labels.job = "systemd-journal";
|
||||
};
|
||||
relabel_configs = [
|
||||
{
|
||||
source_labels = [ "__journal__systemd_unit" ];
|
||||
target_label = "systemd_unit";
|
||||
}
|
||||
{
|
||||
source_labels = [ "__journal__hostname" ];
|
||||
target_label = "nodename";
|
||||
}
|
||||
{
|
||||
source_labels = [ "__journal_syslog_identifier" ];
|
||||
target_label = "syslog_identifier";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
positions.filename = "\${STATE_DIRECTORY}/loki_positions.yaml";
|
||||
clients = [
|
||||
{
|
||||
url = "\${LOGS_REMOTE_WRITE_URL}";
|
||||
basic_auth.username = "\${LOGS_REMOTE_WRITE_USERNAME}";
|
||||
basic_auth.password_file = "\${CREDENTIALS_DIRECTORY}/logs_remote_write_password";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.grafana-agent.settings = {
|
||||
# keep this in sync with config.services.grafana-agent.settings.defaultText.
|
||||
metrics = {
|
||||
wal_directory = lib.mkDefault "\${STATE_DIRECTORY}";
|
||||
global.scrape_interval = lib.mkDefault "5s";
|
||||
};
|
||||
integrations = {
|
||||
agent.enabled = lib.mkDefault true;
|
||||
agent.scrape_integration = lib.mkDefault true;
|
||||
node_exporter.enabled = lib.mkDefault true;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.grafana-agent = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
script = ''
|
||||
set -euo pipefail
|
||||
shopt -u nullglob
|
||||
|
||||
# Load all credentials into env if they are in UPPER_SNAKE form.
|
||||
if [[ -n "''${CREDENTIALS_DIRECTORY:-}" ]]; then
|
||||
for file in "$CREDENTIALS_DIRECTORY"/*; do
|
||||
key=$(basename "$file")
|
||||
if [[ $key =~ ^[A-Z0-9_]+$ ]]; then
|
||||
echo "Environ $key"
|
||||
export "$key=$(< "$file")"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# We can't use Environment=HOSTNAME=%H, as it doesn't include the domain part.
|
||||
export HOSTNAME=$(< /proc/sys/kernel/hostname)
|
||||
|
||||
exec ${lib.getExe cfg.package} -config.expand-env -config.file ${configFile} ${lib.escapeShellArgs cfg.extraFlags}
|
||||
'';
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
DynamicUser = true;
|
||||
RestartSec = 2;
|
||||
SupplementaryGroups = [
|
||||
# allow to read the systemd journal for loki log forwarding
|
||||
"systemd-journal"
|
||||
];
|
||||
StateDirectory = "grafana-agent";
|
||||
LoadCredential = lib.mapAttrsToList (key: value: "${key}:${value}") cfg.credentials;
|
||||
Type = "simple";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -37,7 +37,7 @@ However to make this configuration work you will need generate a configuration.
|
||||
You can do this with:
|
||||
|
||||
```console
|
||||
$ nix-shell -p ocis-bin
|
||||
$ nix-shell -p ocis_5-bin
|
||||
$ mkdir scratch/
|
||||
$ cd scratch/
|
||||
$ ocis init --config-path . --admin-password "changeme"
|
||||
|
||||
@@ -16,7 +16,11 @@ in
|
||||
services.ocis = {
|
||||
enable = lib.mkEnableOption "ownCloud Infinite Scale";
|
||||
|
||||
package = lib.mkPackageOption pkgs "ocis-bin" { };
|
||||
package = lib.mkOption {
|
||||
type = types.package;
|
||||
description = "Which package to use for the ownCloud Infinite Scale instance.";
|
||||
relatedPackages = [ "ocis_5-bin" ];
|
||||
};
|
||||
|
||||
configDir = lib.mkOption {
|
||||
type = types.nullOr types.path;
|
||||
@@ -137,6 +141,8 @@ in
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.ocis.package = lib.mkDefault pkgs.ocis_5-bin;
|
||||
|
||||
users.users.${defaultUser} = lib.mkIf (cfg.user == defaultUser) {
|
||||
group = cfg.group;
|
||||
home = cfg.stateDir;
|
||||
|
||||
@@ -369,13 +369,13 @@ in
|
||||
dnscrypt-proxy2 = handleTestOn [ "x86_64-linux" ] ./dnscrypt-proxy2.nix { };
|
||||
dnsdist = import ./dnsdist.nix { inherit pkgs runTest; };
|
||||
doas = runTest ./doas.nix;
|
||||
docker = handleTestOn [ "aarch64-linux" "x86_64-linux" ] ./docker.nix { };
|
||||
docker-rootless = handleTestOn [ "aarch64-linux" "x86_64-linux" ] ./docker-rootless.nix { };
|
||||
docker-registry = handleTest ./docker-registry.nix { };
|
||||
docker = runTestOn [ "aarch64-linux" "x86_64-linux" ] ./docker.nix;
|
||||
docker-rootless = runTestOn [ "aarch64-linux" "x86_64-linux" ] ./docker-rootless.nix;
|
||||
docker-registry = runTest ./docker-registry.nix;
|
||||
docker-tools = handleTestOn [ "x86_64-linux" ] ./docker-tools.nix { };
|
||||
docker-tools-nix-shell = runTest ./docker-tools-nix-shell.nix;
|
||||
docker-tools-cross = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./docker-tools-cross.nix { };
|
||||
docker-tools-overlay = handleTestOn [ "x86_64-linux" ] ./docker-tools-overlay.nix { };
|
||||
docker-tools-cross = runTestOn [ "x86_64-linux" "aarch64-linux" ] ./docker-tools-cross.nix;
|
||||
docker-tools-overlay = runTestOn [ "x86_64-linux" ] ./docker-tools-overlay.nix;
|
||||
docling-serve = runTest ./docling-serve.nix;
|
||||
documize = handleTest ./documize.nix { };
|
||||
documentation = pkgs.callPackage ../modules/misc/documentation/test.nix { inherit nixosLib; };
|
||||
@@ -546,12 +546,11 @@ in
|
||||
gotify-server = handleTest ./gotify-server.nix { };
|
||||
gotosocial = runTest ./web-apps/gotosocial.nix;
|
||||
grafana = handleTest ./grafana { };
|
||||
grafana-agent = handleTest ./grafana-agent.nix { };
|
||||
graphite = handleTest ./graphite.nix { };
|
||||
grav = runTest ./web-apps/grav.nix;
|
||||
graylog = handleTest ./graylog.nix { };
|
||||
greetd-no-shadow = handleTest ./greetd-no-shadow.nix { };
|
||||
grocy = handleTest ./grocy.nix { };
|
||||
grocy = runTest ./grocy.nix;
|
||||
grow-partition = runTest ./grow-partition.nix;
|
||||
grub = handleTest ./grub.nix { };
|
||||
guacamole-server = handleTest ./guacamole-server.nix { };
|
||||
@@ -612,7 +611,7 @@ in
|
||||
hostname = handleTest ./hostname.nix { };
|
||||
hound = handleTest ./hound.nix { };
|
||||
hub = handleTest ./git/hub.nix { };
|
||||
hydra = handleTest ./hydra { };
|
||||
hydra = runTest ./hydra;
|
||||
i3wm = handleTest ./i3wm.nix { };
|
||||
icingaweb2 = runTest ./icingaweb2.nix;
|
||||
ifm = handleTest ./ifm.nix { };
|
||||
|
||||
@@ -1,74 +1,71 @@
|
||||
# This test runs docker-registry and check if it works
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
name = "docker-registry";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [
|
||||
globin
|
||||
ironpinguin
|
||||
cafkafk
|
||||
];
|
||||
};
|
||||
|
||||
import ./make-test-python.nix (
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
name = "docker-registry";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [
|
||||
globin
|
||||
ironpinguin
|
||||
cafkafk
|
||||
];
|
||||
};
|
||||
nodes = {
|
||||
registry =
|
||||
{ ... }:
|
||||
{
|
||||
services.dockerRegistry.enable = true;
|
||||
services.dockerRegistry.enableDelete = true;
|
||||
services.dockerRegistry.port = 8080;
|
||||
services.dockerRegistry.listenAddress = "0.0.0.0";
|
||||
services.dockerRegistry.enableGarbageCollect = true;
|
||||
services.dockerRegistry.openFirewall = true;
|
||||
};
|
||||
|
||||
nodes = {
|
||||
registry =
|
||||
{ ... }:
|
||||
{
|
||||
services.dockerRegistry.enable = true;
|
||||
services.dockerRegistry.enableDelete = true;
|
||||
services.dockerRegistry.port = 8080;
|
||||
services.dockerRegistry.listenAddress = "0.0.0.0";
|
||||
services.dockerRegistry.enableGarbageCollect = true;
|
||||
services.dockerRegistry.openFirewall = true;
|
||||
};
|
||||
client1 =
|
||||
{ ... }:
|
||||
{
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.extraOptions = "--insecure-registry registry:8080";
|
||||
};
|
||||
|
||||
client1 =
|
||||
{ ... }:
|
||||
{
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.extraOptions = "--insecure-registry registry:8080";
|
||||
};
|
||||
client2 =
|
||||
{ ... }:
|
||||
{
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.extraOptions = "--insecure-registry registry:8080";
|
||||
};
|
||||
};
|
||||
|
||||
client2 =
|
||||
{ ... }:
|
||||
{
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.extraOptions = "--insecure-registry registry:8080";
|
||||
};
|
||||
};
|
||||
testScript = ''
|
||||
client1.start()
|
||||
client1.wait_for_unit("docker.service")
|
||||
client1.succeed("tar cv --files-from /dev/null | docker import - scratch")
|
||||
client1.succeed("docker tag scratch registry:8080/scratch")
|
||||
|
||||
testScript = ''
|
||||
client1.start()
|
||||
client1.wait_for_unit("docker.service")
|
||||
client1.succeed("tar cv --files-from /dev/null | docker import - scratch")
|
||||
client1.succeed("docker tag scratch registry:8080/scratch")
|
||||
registry.start()
|
||||
registry.wait_for_unit("docker-registry.service")
|
||||
registry.wait_for_open_port(8080)
|
||||
client1.succeed("docker push registry:8080/scratch")
|
||||
|
||||
registry.start()
|
||||
registry.wait_for_unit("docker-registry.service")
|
||||
registry.wait_for_open_port(8080)
|
||||
client1.succeed("docker push registry:8080/scratch")
|
||||
client2.start()
|
||||
client2.wait_for_unit("docker.service")
|
||||
client2.succeed("docker pull registry:8080/scratch")
|
||||
client2.succeed("docker images | grep scratch")
|
||||
|
||||
client2.start()
|
||||
client2.wait_for_unit("docker.service")
|
||||
client2.succeed("docker pull registry:8080/scratch")
|
||||
client2.succeed("docker images | grep scratch")
|
||||
client2.succeed(
|
||||
"curl -fsS -X DELETE registry:8080/v2/scratch/manifests/$(curl -fsS -I -H\"Accept: application/vnd.docker.distribution.manifest.v2+json\" registry:8080/v2/scratch/manifests/latest | grep Docker-Content-Digest | sed -e 's/Docker-Content-Digest: //' | tr -d '\\r')"
|
||||
)
|
||||
|
||||
client2.succeed(
|
||||
"curl -fsS -X DELETE registry:8080/v2/scratch/manifests/$(curl -fsS -I -H\"Accept: application/vnd.docker.distribution.manifest.v2+json\" registry:8080/v2/scratch/manifests/latest | grep Docker-Content-Digest | sed -e 's/Docker-Content-Digest: //' | tr -d '\\r')"
|
||||
)
|
||||
registry.systemctl("start docker-registry-garbage-collect.service")
|
||||
registry.wait_until_fails("systemctl status docker-registry-garbage-collect.service")
|
||||
registry.wait_for_unit("docker-registry.service")
|
||||
|
||||
registry.systemctl("start docker-registry-garbage-collect.service")
|
||||
registry.wait_until_fails("systemctl status docker-registry-garbage-collect.service")
|
||||
registry.wait_for_unit("docker-registry.service")
|
||||
registry.fail("ls -l /var/lib/docker-registry/docker/registry/v2/blobs/sha256/*/*/data")
|
||||
|
||||
registry.fail("ls -l /var/lib/docker-registry/docker/registry/v2/blobs/sha256/*/*/data")
|
||||
|
||||
client1.succeed("docker push registry:8080/scratch")
|
||||
registry.succeed(
|
||||
"ls -l /var/lib/docker-registry/docker/registry/v2/blobs/sha256/*/*/data"
|
||||
)
|
||||
'';
|
||||
}
|
||||
)
|
||||
client1.succeed("docker push registry:8080/scratch")
|
||||
registry.succeed(
|
||||
"ls -l /var/lib/docker-registry/docker/registry/v2/blobs/sha256/*/*/data"
|
||||
)
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -1,51 +1,48 @@
|
||||
# This test runs docker and checks if simple container starts
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
name = "docker-rootless";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ abbradar ];
|
||||
};
|
||||
|
||||
import ./make-test-python.nix (
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
name = "docker-rootless";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ abbradar ];
|
||||
};
|
||||
nodes = {
|
||||
machine =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
virtualisation.docker.rootless.enable = true;
|
||||
|
||||
nodes = {
|
||||
machine =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
virtualisation.docker.rootless.enable = true;
|
||||
|
||||
users.users.alice = {
|
||||
uid = 1000;
|
||||
isNormalUser = true;
|
||||
};
|
||||
users.users.alice = {
|
||||
uid = 1000;
|
||||
isNormalUser = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript =
|
||||
{ nodes, ... }:
|
||||
let
|
||||
user = nodes.machine.config.users.users.alice;
|
||||
sudo = lib.concatStringsSep " " [
|
||||
"XDG_RUNTIME_DIR=/run/user/${toString user.uid}"
|
||||
"DOCKER_HOST=unix:///run/user/${toString user.uid}/docker.sock"
|
||||
"sudo"
|
||||
"--preserve-env=XDG_RUNTIME_DIR,DOCKER_HOST"
|
||||
"-u"
|
||||
"alice"
|
||||
];
|
||||
in
|
||||
''
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
testScript =
|
||||
{ nodes, ... }:
|
||||
let
|
||||
user = nodes.machine.config.users.users.alice;
|
||||
sudo = lib.concatStringsSep " " [
|
||||
"XDG_RUNTIME_DIR=/run/user/${toString user.uid}"
|
||||
"DOCKER_HOST=unix:///run/user/${toString user.uid}/docker.sock"
|
||||
"sudo"
|
||||
"--preserve-env=XDG_RUNTIME_DIR,DOCKER_HOST"
|
||||
"-u"
|
||||
"alice"
|
||||
];
|
||||
in
|
||||
''
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
|
||||
machine.succeed("loginctl enable-linger alice")
|
||||
machine.wait_until_succeeds("${sudo} systemctl --user is-active docker.service")
|
||||
machine.succeed("loginctl enable-linger alice")
|
||||
machine.wait_until_succeeds("${sudo} systemctl --user is-active docker.service")
|
||||
|
||||
machine.succeed("tar cv --files-from /dev/null | ${sudo} docker import - scratchimg")
|
||||
machine.succeed(
|
||||
"${sudo} docker run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
|
||||
)
|
||||
machine.succeed("${sudo} docker ps | grep sleeping")
|
||||
machine.succeed("${sudo} docker stop sleeping")
|
||||
'';
|
||||
}
|
||||
)
|
||||
machine.succeed("tar cv --files-from /dev/null | ${sudo} docker import - scratchimg")
|
||||
machine.succeed(
|
||||
"${sudo} docker run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
|
||||
)
|
||||
machine.succeed("${sudo} docker ps | grep sleeping")
|
||||
machine.succeed("${sudo} docker stop sleeping")
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -2,83 +2,81 @@
|
||||
# tests that _include_ running the result are separate. That way, most people
|
||||
# can run the majority of the test suite without the extra setup.
|
||||
|
||||
import ./make-test-python.nix (
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
|
||||
remoteSystem =
|
||||
if pkgs.stdenv.hostPlatform.system == "aarch64-linux" then "x86_64-linux" else "aarch64-linux";
|
||||
remoteSystem =
|
||||
if pkgs.stdenv.hostPlatform.system == "aarch64-linux" then "x86_64-linux" else "aarch64-linux";
|
||||
|
||||
remoteCrossPkgs =
|
||||
import ../.. # nixpkgs
|
||||
{
|
||||
# NOTE: This is the machine that runs the build - local from the
|
||||
# 'perspective' of the build script.
|
||||
localSystem = remoteSystem;
|
||||
remoteCrossPkgs =
|
||||
import ../.. # nixpkgs
|
||||
{
|
||||
# NOTE: This is the machine that runs the build - local from the
|
||||
# 'perspective' of the build script.
|
||||
localSystem = remoteSystem;
|
||||
|
||||
# NOTE: Since this file can't control where the test will be _run_ we don't
|
||||
# cross-compile _to_ a different system but _from_ a different system
|
||||
crossSystem = pkgs.stdenv.hostPlatform.system;
|
||||
};
|
||||
|
||||
hello1 = remoteCrossPkgs.dockerTools.buildImage {
|
||||
name = "hello1";
|
||||
tag = "latest";
|
||||
copyToRoot = remoteCrossPkgs.buildEnv {
|
||||
name = "image-root";
|
||||
pathsToLink = [ "/bin" ];
|
||||
paths = [ remoteCrossPkgs.hello ];
|
||||
# NOTE: Since this file can't control where the test will be _run_ we don't
|
||||
# cross-compile _to_ a different system but _from_ a different system
|
||||
crossSystem = pkgs.stdenv.hostPlatform.system;
|
||||
};
|
||||
};
|
||||
|
||||
hello2 = remoteCrossPkgs.dockerTools.buildLayeredImage {
|
||||
name = "hello2";
|
||||
tag = "latest";
|
||||
contents = remoteCrossPkgs.hello;
|
||||
hello1 = remoteCrossPkgs.dockerTools.buildImage {
|
||||
name = "hello1";
|
||||
tag = "latest";
|
||||
copyToRoot = remoteCrossPkgs.buildEnv {
|
||||
name = "image-root";
|
||||
pathsToLink = [ "/bin" ];
|
||||
paths = [ remoteCrossPkgs.hello ];
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
name = "docker-tools";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ roberth ];
|
||||
};
|
||||
hello2 = remoteCrossPkgs.dockerTools.buildLayeredImage {
|
||||
name = "hello2";
|
||||
tag = "latest";
|
||||
contents = remoteCrossPkgs.hello;
|
||||
};
|
||||
|
||||
nodes = {
|
||||
docker =
|
||||
{ ... }:
|
||||
{
|
||||
virtualisation = {
|
||||
diskSize = 2048;
|
||||
docker.enable = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
name = "docker-tools";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ roberth ];
|
||||
};
|
||||
|
||||
nodes = {
|
||||
docker =
|
||||
{ ... }:
|
||||
{
|
||||
virtualisation = {
|
||||
diskSize = 2048;
|
||||
docker.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
docker.wait_for_unit("sockets.target")
|
||||
testScript = ''
|
||||
docker.wait_for_unit("sockets.target")
|
||||
|
||||
with subtest("Ensure cross compiled buildImage image can run."):
|
||||
docker.succeed(
|
||||
"docker load --input='${hello1}'"
|
||||
)
|
||||
assert "Hello, world!" in docker.succeed(
|
||||
"docker run --rm ${hello1.imageName} hello",
|
||||
)
|
||||
docker.succeed(
|
||||
"docker rmi ${hello1.imageName}",
|
||||
)
|
||||
with subtest("Ensure cross compiled buildImage image can run."):
|
||||
docker.succeed(
|
||||
"docker load --input='${hello1}'"
|
||||
)
|
||||
assert "Hello, world!" in docker.succeed(
|
||||
"docker run --rm ${hello1.imageName} hello",
|
||||
)
|
||||
docker.succeed(
|
||||
"docker rmi ${hello1.imageName}",
|
||||
)
|
||||
|
||||
with subtest("Ensure cross compiled buildLayeredImage image can run."):
|
||||
docker.succeed(
|
||||
"docker load --input='${hello2}'"
|
||||
)
|
||||
assert "Hello, world!" in docker.succeed(
|
||||
"docker run --rm ${hello2.imageName} hello",
|
||||
)
|
||||
docker.succeed(
|
||||
"docker rmi ${hello2.imageName}",
|
||||
)
|
||||
'';
|
||||
}
|
||||
)
|
||||
with subtest("Ensure cross compiled buildLayeredImage image can run."):
|
||||
docker.succeed(
|
||||
"docker load --input='${hello2}'"
|
||||
)
|
||||
assert "Hello, world!" in docker.succeed(
|
||||
"docker run --rm ${hello2.imageName} hello",
|
||||
)
|
||||
docker.succeed(
|
||||
"docker rmi ${hello2.imageName}",
|
||||
)
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -1,38 +1,35 @@
|
||||
# this test creates a simple GNU image with docker tools and sees if it executes
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
name = "docker-tools-overlay";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [
|
||||
lnl7
|
||||
roberth
|
||||
];
|
||||
};
|
||||
|
||||
import ./make-test-python.nix (
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
name = "docker-tools-overlay";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [
|
||||
lnl7
|
||||
roberth
|
||||
];
|
||||
};
|
||||
nodes = {
|
||||
docker =
|
||||
{ ... }:
|
||||
{
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.storageDriver = "overlay2";
|
||||
};
|
||||
};
|
||||
|
||||
nodes = {
|
||||
docker =
|
||||
{ ... }:
|
||||
{
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.storageDriver = "overlay2";
|
||||
};
|
||||
};
|
||||
testScript = ''
|
||||
docker.wait_for_unit("sockets.target")
|
||||
|
||||
testScript = ''
|
||||
docker.wait_for_unit("sockets.target")
|
||||
docker.succeed(
|
||||
"docker load --input='${pkgs.dockerTools.examples.bash}'",
|
||||
"docker run --rm ${pkgs.dockerTools.examples.bash.imageName} bash --version",
|
||||
)
|
||||
|
||||
docker.succeed(
|
||||
"docker load --input='${pkgs.dockerTools.examples.bash}'",
|
||||
"docker run --rm ${pkgs.dockerTools.examples.bash.imageName} bash --version",
|
||||
)
|
||||
|
||||
# Check if the nix store has correct user permissions depending on what
|
||||
# storage driver is used, incorrectly built images can show up as readonly.
|
||||
# drw------- 3 0 0 3 Apr 14 11:36 /nix
|
||||
# drw------- 99 0 0 100 Apr 14 11:36 /nix/store
|
||||
docker.succeed("docker run --rm -u 1000:1000 ${pkgs.dockerTools.examples.bash.imageName} bash --version")
|
||||
'';
|
||||
}
|
||||
)
|
||||
# Check if the nix store has correct user permissions depending on what
|
||||
# storage driver is used, incorrectly built images can show up as readonly.
|
||||
# drw------- 3 0 0 3 Apr 14 11:36 /nix
|
||||
# drw------- 99 0 0 100 Apr 14 11:36 /nix/store
|
||||
docker.succeed("docker run --rm -u 1000:1000 ${pkgs.dockerTools.examples.bash.imageName} bash --version")
|
||||
'';
|
||||
}
|
||||
|
||||
+47
-50
@@ -1,59 +1,56 @@
|
||||
# This test runs docker and checks if simple container starts
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
name = "docker";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [
|
||||
nequissimus
|
||||
offline
|
||||
];
|
||||
};
|
||||
|
||||
import ./make-test-python.nix (
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
name = "docker";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [
|
||||
nequissimus
|
||||
offline
|
||||
];
|
||||
};
|
||||
nodes = {
|
||||
docker =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.autoPrune.enable = true;
|
||||
virtualisation.docker.package = pkgs.docker;
|
||||
|
||||
nodes = {
|
||||
docker =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.autoPrune.enable = true;
|
||||
virtualisation.docker.package = pkgs.docker;
|
||||
users.users = {
|
||||
noprivs = {
|
||||
isNormalUser = true;
|
||||
description = "Can't access the docker daemon";
|
||||
password = "foobar";
|
||||
};
|
||||
|
||||
users.users = {
|
||||
noprivs = {
|
||||
isNormalUser = true;
|
||||
description = "Can't access the docker daemon";
|
||||
password = "foobar";
|
||||
};
|
||||
|
||||
hasprivs = {
|
||||
isNormalUser = true;
|
||||
description = "Can access the docker daemon";
|
||||
password = "foobar";
|
||||
extraGroups = [ "docker" ];
|
||||
};
|
||||
hasprivs = {
|
||||
isNormalUser = true;
|
||||
description = "Can access the docker daemon";
|
||||
password = "foobar";
|
||||
extraGroups = [ "docker" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
testScript = ''
|
||||
start_all()
|
||||
|
||||
docker.wait_for_unit("sockets.target")
|
||||
docker.succeed("tar cv --files-from /dev/null | docker import - scratchimg")
|
||||
docker.succeed(
|
||||
"docker run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
|
||||
)
|
||||
docker.succeed("docker ps | grep sleeping")
|
||||
docker.succeed("sudo -u hasprivs docker ps")
|
||||
docker.fail("sudo -u noprivs docker ps")
|
||||
docker.succeed("docker stop sleeping")
|
||||
docker.wait_for_unit("sockets.target")
|
||||
docker.succeed("tar cv --files-from /dev/null | docker import - scratchimg")
|
||||
docker.succeed(
|
||||
"docker run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
|
||||
)
|
||||
docker.succeed("docker ps | grep sleeping")
|
||||
docker.succeed("sudo -u hasprivs docker ps")
|
||||
docker.fail("sudo -u noprivs docker ps")
|
||||
docker.succeed("docker stop sleeping")
|
||||
|
||||
# Must match version 4 times to ensure client and server git commits and versions are correct
|
||||
docker.succeed('[ $(docker version | grep ${pkgs.docker.version} | wc -l) = "4" ]')
|
||||
docker.succeed("systemctl restart systemd-sysctl")
|
||||
docker.succeed("grep 1 /proc/sys/net/ipv4/conf/all/forwarding")
|
||||
docker.succeed("grep 1 /proc/sys/net/ipv4/conf/default/forwarding")
|
||||
'';
|
||||
}
|
||||
)
|
||||
# Must match version 4 times to ensure client and server git commits and versions are correct
|
||||
docker.succeed('[ $(docker version | grep ${pkgs.docker.version} | wc -l) = "4" ]')
|
||||
docker.succeed("systemctl restart systemd-sysctl")
|
||||
docker.succeed("grep 1 /proc/sys/net/ipv4/conf/all/forwarding")
|
||||
docker.succeed("grep 1 /proc/sys/net/ipv4/conf/default/forwarding")
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
import ./make-test-python.nix (
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
nodes = {
|
||||
machine = {
|
||||
services.grafana-agent = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
name = "grafana-agent";
|
||||
|
||||
meta = with lib.maintainers; {
|
||||
maintainers = [ zimbatm ];
|
||||
};
|
||||
|
||||
inherit nodes;
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
|
||||
with subtest("Grafana-agent is running"):
|
||||
machine.wait_for_unit("grafana-agent.service")
|
||||
machine.wait_for_open_port(12345)
|
||||
machine.succeed(
|
||||
"curl -sSfN http://127.0.0.1:12345/-/healthy"
|
||||
)
|
||||
machine.shutdown()
|
||||
'';
|
||||
}
|
||||
)
|
||||
+64
-66
@@ -1,81 +1,79 @@
|
||||
import ./make-test-python.nix (
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
name = "grocy";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ ma27 ];
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
name = "grocy";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ ma27 ];
|
||||
};
|
||||
|
||||
nodes.machine =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.grocy = {
|
||||
enable = true;
|
||||
hostName = "localhost";
|
||||
nginx.enableSSL = false;
|
||||
};
|
||||
environment.systemPackages = [ pkgs.jq ];
|
||||
};
|
||||
|
||||
nodes.machine =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.grocy = {
|
||||
enable = true;
|
||||
hostName = "localhost";
|
||||
nginx.enableSSL = false;
|
||||
};
|
||||
environment.systemPackages = [ pkgs.jq ];
|
||||
};
|
||||
testScript = ''
|
||||
from base64 import b64encode
|
||||
from urllib.parse import quote
|
||||
|
||||
testScript = ''
|
||||
from base64 import b64encode
|
||||
from urllib.parse import quote
|
||||
machine.start()
|
||||
machine.wait_for_open_port(80)
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
|
||||
machine.start()
|
||||
machine.wait_for_open_port(80)
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
# This establishes _something_
|
||||
machine.succeed("curl -sSf http://localhost")
|
||||
# The second request creates the database, unsure why both are required
|
||||
machine.succeed("curl -sSf http://localhost/")
|
||||
|
||||
# This establishes _something_
|
||||
machine.succeed("curl -sSf http://localhost")
|
||||
# The second request creates the database, unsure why both are required
|
||||
machine.succeed("curl -sSf http://localhost/")
|
||||
machine.succeed(
|
||||
"curl -c cookies -sSf -X POST http://localhost/login -d 'username=admin&password=admin'"
|
||||
)
|
||||
|
||||
machine.succeed(
|
||||
"curl -c cookies -sSf -X POST http://localhost/login -d 'username=admin&password=admin'"
|
||||
)
|
||||
cookie = machine.succeed(
|
||||
"grep -v '^#' cookies | awk '{ print $7 }' | sed -e '/^$/d' | perl -pe 'chomp'"
|
||||
)
|
||||
|
||||
cookie = machine.succeed(
|
||||
"grep -v '^#' cookies | awk '{ print $7 }' | sed -e '/^$/d' | perl -pe 'chomp'"
|
||||
)
|
||||
machine.succeed(
|
||||
f"curl -sSf -X POST http://localhost/api/objects/tasks -b 'grocy_session={cookie}' "
|
||||
+ '-d \'{"assigned_to_user_id":1,"name":"Test Task","due_date":"1970-01-01"}\'''
|
||||
+ " --header 'Content-Type: application/json'"
|
||||
)
|
||||
|
||||
machine.succeed(
|
||||
f"curl -sSf -X POST http://localhost/api/objects/tasks -b 'grocy_session={cookie}' "
|
||||
+ '-d \'{"assigned_to_user_id":1,"name":"Test Task","due_date":"1970-01-01"}\'''
|
||||
+ " --header 'Content-Type: application/json'"
|
||||
)
|
||||
task_name = machine.succeed(
|
||||
f"curl -sSf http://localhost/api/tasks -b 'grocy_session={cookie}' --header 'Accept: application/json' | jq '.[].name' | xargs echo | perl -pe 'chomp'"
|
||||
)
|
||||
|
||||
task_name = machine.succeed(
|
||||
f"curl -sSf http://localhost/api/tasks -b 'grocy_session={cookie}' --header 'Accept: application/json' | jq '.[].name' | xargs echo | perl -pe 'chomp'"
|
||||
)
|
||||
assert task_name == "Test Task"
|
||||
|
||||
assert task_name == "Test Task"
|
||||
machine.succeed("curl -sSI http://localhost/api/tasks 2>&1 | grep '401 Unauthorized'")
|
||||
|
||||
machine.succeed("curl -sSI http://localhost/api/tasks 2>&1 | grep '401 Unauthorized'")
|
||||
file_name = "test.txt"
|
||||
file_name_base64 = b64encode(file_name.encode('ascii')).decode('ascii')
|
||||
file_name_base64_urlencode = quote(file_name_base64)
|
||||
|
||||
file_name = "test.txt"
|
||||
file_name_base64 = b64encode(file_name.encode('ascii')).decode('ascii')
|
||||
file_name_base64_urlencode = quote(file_name_base64)
|
||||
machine.succeed(
|
||||
f"echo Sample equipment manual > /tmp/{file_name}"
|
||||
)
|
||||
|
||||
machine.succeed(
|
||||
f"echo Sample equipment manual > /tmp/{file_name}"
|
||||
)
|
||||
machine.succeed(
|
||||
f"curl -sSf -X 'PUT' -b 'grocy_session={cookie}' "
|
||||
+ f" 'http://localhost/api/files/equipmentmanuals/{file_name_base64_urlencode}' "
|
||||
+ " --header 'Accept: */*' "
|
||||
+ " --header 'Content-Type: application/octet-stream' "
|
||||
+ f" --data-binary '@/tmp/{file_name}' "
|
||||
)
|
||||
|
||||
machine.succeed(
|
||||
f"curl -sSf -X 'PUT' -b 'grocy_session={cookie}' "
|
||||
+ f" 'http://localhost/api/files/equipmentmanuals/{file_name_base64_urlencode}' "
|
||||
+ " --header 'Accept: */*' "
|
||||
+ " --header 'Content-Type: application/octet-stream' "
|
||||
+ f" --data-binary '@/tmp/{file_name}' "
|
||||
)
|
||||
machine.succeed(
|
||||
f"curl -sSf -X 'GET' -b 'grocy_session={cookie}' "
|
||||
+ f" 'http://localhost/api/files/equipmentmanuals/{file_name_base64_urlencode}' "
|
||||
+ " --header 'Accept: application/octet-stream' "
|
||||
+ f" | cmp /tmp/{file_name}"
|
||||
)
|
||||
|
||||
machine.succeed(
|
||||
f"curl -sSf -X 'GET' -b 'grocy_session={cookie}' "
|
||||
+ f" 'http://localhost/api/files/equipmentmanuals/{file_name_base64_urlencode}' "
|
||||
+ " --header 'Accept: application/octet-stream' "
|
||||
+ f" | cmp /tmp/{file_name}"
|
||||
)
|
||||
|
||||
machine.shutdown()
|
||||
'';
|
||||
}
|
||||
)
|
||||
machine.shutdown()
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{ system, ... }:
|
||||
{
|
||||
baseConfig =
|
||||
{ pkgs, ... }:
|
||||
@@ -6,7 +5,7 @@
|
||||
trivialJob = pkgs.writeTextDir "trivial.nix" ''
|
||||
{ trivial = builtins.derivation {
|
||||
name = "trivial";
|
||||
system = "${system}";
|
||||
system = "${pkgs.stdenv.hostPlatform.system}";
|
||||
builder = "/bin/sh";
|
||||
allowSubstitutes = false;
|
||||
preferLocalBuild = true;
|
||||
|
||||
@@ -1,65 +1,44 @@
|
||||
{
|
||||
system ? builtins.currentSystem,
|
||||
config ? { },
|
||||
pkgs ? import ../../.. { inherit system config; },
|
||||
}:
|
||||
|
||||
with import ../../lib/testing-python.nix { inherit system pkgs; };
|
||||
with pkgs.lib;
|
||||
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
|
||||
inherit (import ./common.nix { inherit system; }) baseConfig;
|
||||
|
||||
hydraPkgs = {
|
||||
inherit (pkgs) hydra;
|
||||
inherit (import ./common.nix) baseConfig;
|
||||
in
|
||||
{
|
||||
name = "hydra";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ lewo ];
|
||||
};
|
||||
|
||||
makeHydraTest =
|
||||
with pkgs.lib;
|
||||
name: package:
|
||||
makeTest {
|
||||
name = "hydra-${name}";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ lewo ];
|
||||
};
|
||||
|
||||
nodes.machine =
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
imports = [ baseConfig ];
|
||||
services.hydra = { inherit package; };
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
# let the system boot up
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
# test whether the database is running
|
||||
machine.wait_for_unit("postgresql.service")
|
||||
# test whether the actual hydra daemons are running
|
||||
machine.wait_for_unit("hydra-init.service")
|
||||
machine.require_unit_state("hydra-queue-runner.service")
|
||||
machine.require_unit_state("hydra-evaluator.service")
|
||||
machine.require_unit_state("hydra-notify.service")
|
||||
|
||||
machine.succeed("hydra-create-user admin --role admin --password admin")
|
||||
|
||||
# create a project with a trivial job
|
||||
machine.wait_for_open_port(3000)
|
||||
|
||||
# make sure the build as been successfully built
|
||||
machine.succeed("create-trivial-project.sh")
|
||||
|
||||
machine.wait_until_succeeds(
|
||||
'curl -L -s http://localhost:3000/build/1 -H "Accept: application/json" | jq .buildstatus | xargs test 0 -eq'
|
||||
)
|
||||
|
||||
machine.wait_until_succeeds(
|
||||
'journalctl -eu hydra-notify.service -o cat | grep -q "sending mail notification to hydra@localhost"'
|
||||
)
|
||||
'';
|
||||
nodes.machine =
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
imports = [ baseConfig ];
|
||||
};
|
||||
|
||||
in
|
||||
testScript = ''
|
||||
# let the system boot up
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
# test whether the database is running
|
||||
machine.wait_for_unit("postgresql.service")
|
||||
# test whether the actual hydra daemons are running
|
||||
machine.wait_for_unit("hydra-init.service")
|
||||
machine.require_unit_state("hydra-queue-runner.service")
|
||||
machine.require_unit_state("hydra-evaluator.service")
|
||||
machine.require_unit_state("hydra-notify.service")
|
||||
|
||||
mapAttrs makeHydraTest hydraPkgs
|
||||
machine.succeed("hydra-create-user admin --role admin --password admin")
|
||||
|
||||
# create a project with a trivial job
|
||||
machine.wait_for_open_port(3000)
|
||||
|
||||
# make sure the build as been successfully built
|
||||
machine.succeed("create-trivial-project.sh")
|
||||
|
||||
machine.wait_until_succeeds(
|
||||
'curl -L -s http://localhost:3000/build/1 -H "Accept: application/json" | jq .buildstatus | xargs test 0 -eq'
|
||||
)
|
||||
|
||||
machine.wait_until_succeeds(
|
||||
'journalctl -eu hydra-notify.service -o cat | grep -q "sending mail notification to hydra@localhost"'
|
||||
)
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ import ./make-test-python.nix (
|
||||
machine.sleep(5)
|
||||
|
||||
with subtest("ocis bin works"):
|
||||
machine.succeed("${lib.getExe pkgs.ocis-bin} version")
|
||||
machine.succeed("${lib.getExe pkgs.ocis_5-bin} version")
|
||||
|
||||
with subtest("use the web interface to log in with a demo user"):
|
||||
machine.succeed("PYTHONUNBUFFERED=1 systemd-cat -t test-runner test-runner ${demoUser} ${demoPassword}")
|
||||
|
||||
@@ -8,8 +8,8 @@ vscode-utils.buildVscodeMarketplaceExtension {
|
||||
mktplcRef = {
|
||||
name = "vscode-pylance";
|
||||
publisher = "MS-python";
|
||||
version = "2025.3.2";
|
||||
hash = "sha256-Lv4HiFsYszThuGp6YyTWUqgi2o0+aiMGnsiBxu3vQWk=";
|
||||
version = "2025.4.1";
|
||||
hash = "sha256-XZ00HOH+7onP1li6nBwjBIRc1Zy5SNvrT1JhnzJTr1E=";
|
||||
};
|
||||
|
||||
buildInputs = [ pyright ];
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
{
|
||||
"stable": {
|
||||
"x86_64-linux": {
|
||||
"url": "https://downloads.1password.com/linux/tar/stable/x86_64/1password-8.10.68.x64.tar.gz",
|
||||
"hash": "sha256-6MekdtKnjvrP0dai6VfBEFJ+oKf2WvPp+sU/kVIzCTw="
|
||||
"url": "https://downloads.1password.com/linux/tar/stable/x86_64/1password-8.10.70.x64.tar.gz",
|
||||
"hash": "sha256-QGKeKX7qxu7heJ6T0I8aayI1P2M3KOmU9faS929BCjI="
|
||||
},
|
||||
"aarch64-linux": {
|
||||
"url": "https://downloads.1password.com/linux/tar/stable/aarch64/1password-8.10.68.arm64.tar.gz",
|
||||
"hash": "sha256-2SpfkLu/4K1t2ILwOBMVAXeW7rbEzsjofn8naM1Szfc="
|
||||
"url": "https://downloads.1password.com/linux/tar/stable/aarch64/1password-8.10.70.arm64.tar.gz",
|
||||
"hash": "sha256-Uz8YKlIa6zibRv3ObnVVlyEk3sZP5wX+0E/nX02m6SA="
|
||||
},
|
||||
"x86_64-darwin": {
|
||||
"url": "https://downloads.1password.com/mac/1Password-8.10.68-x86_64.zip",
|
||||
"hash": "sha256-t/glPvEGJH+IcYyrnW0fMSEeLB8mKqGqmZ8wnVFCJpo="
|
||||
"url": "https://downloads.1password.com/mac/1Password-8.10.70-x86_64.zip",
|
||||
"hash": "sha256-s6+LUSHZwCH5PgREt2bkCCR3JeGBj9llQ6rGrOhEPlQ="
|
||||
},
|
||||
"aarch64-darwin": {
|
||||
"url": "https://downloads.1password.com/mac/1Password-8.10.68-aarch64.zip",
|
||||
"hash": "sha256-bhmuy8gUVCv+hYSIpYXgm8a0f1+JtyKb4g5cUIJCb28="
|
||||
"url": "https://downloads.1password.com/mac/1Password-8.10.70-aarch64.zip",
|
||||
"hash": "sha256-f9b8L4S6CToMukeqrW3EKXAov0rqEMsIpZEGrvDQmg8="
|
||||
}
|
||||
},
|
||||
"beta": {
|
||||
"x86_64-linux": {
|
||||
"url": "https://downloads.1password.com/linux/tar/beta/x86_64/1password-8.10.68-12.BETA.x64.tar.gz",
|
||||
"hash": "sha256-/0Y1qnCI/gXGKTHk9EIaUVbHTwRkOvwOOiMif6sRkqw="
|
||||
"url": "https://downloads.1password.com/linux/tar/beta/x86_64/1password-8.10.70-24.BETA.x64.tar.gz",
|
||||
"hash": "sha256-XNub6kGh2QH2WQKh0Hj6IBVQENfe5YIaOtRV+pkuioc="
|
||||
},
|
||||
"aarch64-linux": {
|
||||
"url": "https://downloads.1password.com/linux/tar/beta/aarch64/1password-8.10.68-12.BETA.arm64.tar.gz",
|
||||
"hash": "sha256-4J6a10r5n8ffqC5Y2pjO/GJLXY5AQDkQWmFNLYeK/Xw="
|
||||
"url": "https://downloads.1password.com/linux/tar/beta/aarch64/1password-8.10.70-24.BETA.arm64.tar.gz",
|
||||
"hash": "sha256-wqpSPCGFiDioIzhUyVCEBfRval13mu0dMSs4oIt+RIU="
|
||||
},
|
||||
"x86_64-darwin": {
|
||||
"url": "https://downloads.1password.com/mac/1Password-8.10.68-12.BETA-x86_64.zip",
|
||||
"hash": "sha256-XvflRqqUI59ekuSiQXyACzS94VIrl8wJjemi0xAznZU="
|
||||
"url": "https://downloads.1password.com/mac/1Password-8.10.70-24.BETA-x86_64.zip",
|
||||
"hash": "sha256-jzjXVh9iTua0/0N3lP4xIPVd1hDlsWssbTtDvvzoTZk="
|
||||
},
|
||||
"aarch64-darwin": {
|
||||
"url": "https://downloads.1password.com/mac/1Password-8.10.68-12.BETA-aarch64.zip",
|
||||
"hash": "sha256-UErp3pcSXz/C5s3JraLoBN89tL8ghgJ3XLpg7KtU8Sc="
|
||||
"url": "https://downloads.1password.com/mac/1Password-8.10.70-24.BETA-aarch64.zip",
|
||||
"hash": "sha256-qb1j9VMhI+tf643HCOz+5dhTuFAgd1ICv8lvRC+um+I="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"stable-linux": "8.10.68",
|
||||
"stable-darwin": "8.10.68",
|
||||
"beta-linux":"8.10.68-12.BETA",
|
||||
"beta-darwin": "8.10.68-12.BETA"
|
||||
"stable-linux": "8.10.70",
|
||||
"stable-darwin": "8.10.70",
|
||||
"beta-linux":"8.10.70-24.BETA",
|
||||
"beta-darwin": "8.10.70-24.BETA"
|
||||
}
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
buildMozillaMach rec {
|
||||
pname = "firefox-devedition";
|
||||
binaryName = pname;
|
||||
version = "137.0b8";
|
||||
version = "137.0b10";
|
||||
applicationName = "Firefox Developer Edition";
|
||||
requireSigning = false;
|
||||
branding = "browser/branding/aurora";
|
||||
src = fetchurl {
|
||||
url = "mirror://mozilla/devedition/releases/${version}/source/firefox-${version}.source.tar.xz";
|
||||
sha512 = "d978dbbe5215fe0787ca571d9676c9572917e88f347ea46e4656d8e0a849e11d3e8c7c918e159a0eaea41bf480897e91fd26776e1dd28c5bfbb37934c44511a1";
|
||||
sha512 = "ece2e76830b7f3fa0ea3b077948a874315c225da03f9043a5e63900f251aa7f568278aeae5c9b5be89bf07c2d783fbdfd1f2acf37e6dd7db3d82cb7e925e33d6";
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"packageVersion": "137.0-1",
|
||||
"packageVersion": "136.0.4-1",
|
||||
"source": {
|
||||
"rev": "137.0-1",
|
||||
"hash": "sha256-xynkPKn4JDLVdDEYjmBvEKIHoW83Xackpx/+rnXci5g="
|
||||
"rev": "136.0.4-1",
|
||||
"hash": "sha256-ymW9vj4CariMaswrMQRKYEvTofFRjc50gF9EmTuhsRA="
|
||||
},
|
||||
"firefox": {
|
||||
"version": "137.0",
|
||||
"hash": "sha512-gaLAzBT/wuSeSTeebCq1bPtuE7ZmZqZPOr/0SkO7Ln3BcnTTJdHCCvBi1Av/gGPXiNSy+TGnpkbbiwcgTKa0gQ=="
|
||||
"version": "136.0.4",
|
||||
"hash": "sha512-wiUqpi0BXO1lNMsqwHH2gImZe0ZpAIPMHv9LrTBq5shlQ3Ge0tNfb5c790Rn1qBKukYNMJwG3qQl52xyDjROKA=="
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,16 +9,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "roxctl";
|
||||
version = "4.7.0";
|
||||
version = "4.7.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "stackrox";
|
||||
repo = "stackrox";
|
||||
rev = version;
|
||||
sha256 = "sha256-hi9K1FIMxDJKEyabPNWTwLkZJTm+iAuMfoH3cywVTkI=";
|
||||
sha256 = "sha256-AQaMWpI7kFFotEQa536dqKxuP/mHuzNm75RPqUWw1VY=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-T3A0Sm2eKIO3UcyReFRfpKUgLM15AhSgcGpJbYgmnHA=";
|
||||
vendorHash = "sha256-v2aLKU6FBkJqenWzftKmngeXvQBPR03RPR0WcmOiYD0=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "cri-o";
|
||||
version = "1.32.2";
|
||||
version = "1.32.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cri-o";
|
||||
repo = "cri-o";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-oB3X59+v4VosY5Db0BUfKt/WTMCWhhJX+mWwp/6ifVI=";
|
||||
hash = "sha256-EIJT/LwxRZUYvbH0EFYSeZpGgFOywI6jpfmFO3g8cps=";
|
||||
};
|
||||
vendorHash = null;
|
||||
|
||||
|
||||
@@ -63,7 +63,6 @@ lib.extendMkDerivation {
|
||||
patches
|
||||
postPatch
|
||||
patchFlags
|
||||
nativeBuildInputs
|
||||
;
|
||||
name = "${name}-npm-deps";
|
||||
hash = npmDepsHash;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
lib,
|
||||
importCargoLock,
|
||||
fetchCargoTarball,
|
||||
fetchCargoVendor,
|
||||
stdenv,
|
||||
cargoBuildHook,
|
||||
@@ -50,7 +49,7 @@ lib.extendMkDerivation {
|
||||
cargoDepsHook ? "",
|
||||
buildType ? "release",
|
||||
meta ? { },
|
||||
useFetchCargoVendor ? false,
|
||||
useFetchCargoVendor ? true,
|
||||
cargoDeps ? null,
|
||||
cargoLock ? null,
|
||||
cargoVendorDir ? null,
|
||||
@@ -72,6 +71,9 @@ lib.extendMkDerivation {
|
||||
...
|
||||
}@args:
|
||||
|
||||
assert lib.assertMsg useFetchCargoVendor
|
||||
"buildRustPackage: `useFetchCargoVendor` is non‐optional and enabled by default as of 25.05";
|
||||
|
||||
lib.optionalAttrs (stdenv.hostPlatform.isDarwin && buildType == "debug") {
|
||||
RUSTFLAGS = "-C split-debuginfo=packed " + (args.RUSTFLAGS or "");
|
||||
}
|
||||
@@ -85,7 +87,7 @@ lib.extendMkDerivation {
|
||||
importCargoLock cargoLock
|
||||
else if args.cargoHash or null == null then
|
||||
throw "cargoHash, cargoVendorDir, cargoDeps, or cargoLock must be set"
|
||||
else if useFetchCargoVendor then
|
||||
else
|
||||
fetchCargoVendor (
|
||||
{
|
||||
inherit
|
||||
@@ -102,25 +104,6 @@ lib.extendMkDerivation {
|
||||
hash = args.cargoHash;
|
||||
}
|
||||
// depsExtraArgs
|
||||
)
|
||||
else
|
||||
fetchCargoTarball (
|
||||
{
|
||||
inherit
|
||||
src
|
||||
srcs
|
||||
sourceRoot
|
||||
cargoRoot
|
||||
preUnpack
|
||||
unpackPhase
|
||||
postUnpack
|
||||
cargoUpdateHook
|
||||
;
|
||||
hash = args.cargoHash;
|
||||
name = cargoDepsName;
|
||||
patches = cargoPatches;
|
||||
}
|
||||
// depsExtraArgs
|
||||
);
|
||||
inherit buildAndTestSubdir;
|
||||
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
|
||||
import toml
|
||||
|
||||
|
||||
def quote(s: str) -> str:
|
||||
escaped = s.replace('"', r"\"").replace("\n", r"\n").replace("\\", "\\\\")
|
||||
return '"{}"'.format(escaped)
|
||||
|
||||
|
||||
def main() -> None:
|
||||
data = toml.load(sys.stdin)
|
||||
|
||||
# There is no dependency to vendor in this project.
|
||||
if not list(data.keys()) == ["source"]:
|
||||
return
|
||||
|
||||
# this value is non deterministic
|
||||
data["source"]["vendored-sources"]["directory"] = "@vendor@"
|
||||
|
||||
lines = []
|
||||
inner = data["source"]
|
||||
for source, attrs in sorted(inner.items()):
|
||||
lines.append("[source.{}]".format(quote(source)))
|
||||
if source == "vendored-sources":
|
||||
lines.append('"directory" = "@vendor@"\n')
|
||||
else:
|
||||
for key, value in sorted(attrs.items()):
|
||||
attr = "{} = {}".format(quote(key), quote(value))
|
||||
lines.append(attr)
|
||||
lines.append("")
|
||||
|
||||
result = "\n".join(lines)
|
||||
real = toml.loads(result)
|
||||
assert real == data, "output = {} while input = {}".format(real, data)
|
||||
|
||||
print(result)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -1,170 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
cacert,
|
||||
git,
|
||||
cargo,
|
||||
python3,
|
||||
}:
|
||||
let
|
||||
cargo-vendor-normalise = stdenv.mkDerivation {
|
||||
name = "cargo-vendor-normalise";
|
||||
src = ./cargo-vendor-normalise.py;
|
||||
nativeBuildInputs = [ python3.pkgs.wrapPython ];
|
||||
dontUnpack = true;
|
||||
installPhase = "install -D $src $out/bin/cargo-vendor-normalise";
|
||||
pythonPath = [ python3.pkgs.toml ];
|
||||
postFixup = "wrapPythonPrograms";
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
# check that ../fetchcargo-default-config.toml is a fix point
|
||||
reference=${../fetchcargo-default-config.toml}
|
||||
< $reference $out/bin/cargo-vendor-normalise > test;
|
||||
cmp test $reference
|
||||
'';
|
||||
preferLocalBuild = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
pname ? null,
|
||||
version ? null,
|
||||
name ? if args ? pname && args ? version then "${pname}-${version}" else "cargo-deps",
|
||||
src ? null,
|
||||
srcs ? [ ],
|
||||
patches ? [ ],
|
||||
sourceRoot ? "",
|
||||
cargoUpdateHook ? "",
|
||||
nativeBuildInputs ? [ ],
|
||||
...
|
||||
}@args:
|
||||
|
||||
assert lib.assertMsg (
|
||||
(args ? pname || args ? version) -> !(args ? name)
|
||||
) "Either specify `pname` with `version`, or specify `name` only, not a mix of both.";
|
||||
assert lib.assertMsg (
|
||||
args ? pname == args ? version
|
||||
) "If `pname` is specified, `version` must be also, and vice versa.";
|
||||
let
|
||||
# args to remove from the final call to stdenv.mkDerivation, as we've already handled them
|
||||
removedArgs = [
|
||||
"name"
|
||||
"pname"
|
||||
"version"
|
||||
"sha256"
|
||||
"cargoUpdateHook"
|
||||
"nativeBuildInputs"
|
||||
];
|
||||
|
||||
hash_ =
|
||||
if args ? hash then
|
||||
{
|
||||
outputHashAlgo = if args.hash == "" then "sha256" else null;
|
||||
outputHash = args.hash;
|
||||
}
|
||||
else if args ? sha256 then
|
||||
{
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = args.sha256;
|
||||
}
|
||||
else
|
||||
throw "fetchCargoTarball requires a hash for ${name}";
|
||||
in
|
||||
lib.warn
|
||||
''
|
||||
rustPlatform.fetchCargoTarball is deprecated in favor of rustPlatform.fetchCargoVendor.
|
||||
If you are using buildRustPackage, try setting useFetchCargoVendor = true and regenerating cargoHash.
|
||||
See the 25.05 release notes for more information.
|
||||
''
|
||||
(
|
||||
stdenv.mkDerivation (
|
||||
{
|
||||
name = "${name}-vendor.tar.gz";
|
||||
nativeBuildInputs = [
|
||||
cacert
|
||||
git
|
||||
cargo-vendor-normalise
|
||||
cargo
|
||||
] ++ nativeBuildInputs;
|
||||
|
||||
dontConfigure = true;
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
# Ensure deterministic Cargo vendor builds
|
||||
export SOURCE_DATE_EPOCH=1
|
||||
|
||||
if [ -n "''${cargoRoot-}" ]; then
|
||||
cd "$cargoRoot"
|
||||
fi
|
||||
|
||||
if [[ ! -f Cargo.lock ]]; then
|
||||
echo
|
||||
echo "ERROR: The Cargo.lock file doesn't exist"
|
||||
echo
|
||||
echo "Cargo.lock is needed to make sure that cargoHash/cargoSha256 doesn't change"
|
||||
echo "when the registry is updated."
|
||||
echo
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Keep the original around for copyLockfile
|
||||
cp Cargo.lock Cargo.lock.orig
|
||||
|
||||
export CARGO_HOME=$(mktemp -d cargo-home.XXX)
|
||||
CARGO_CONFIG=$(mktemp cargo-config.XXXX)
|
||||
|
||||
if [[ -n "$NIX_CRATES_INDEX" ]]; then
|
||||
cat >$CARGO_HOME/config.toml <<EOF
|
||||
[source.crates-io]
|
||||
replace-with = 'mirror'
|
||||
[source.mirror]
|
||||
registry = "$NIX_CRATES_INDEX"
|
||||
EOF
|
||||
fi
|
||||
|
||||
${cargoUpdateHook}
|
||||
|
||||
# Override the `http.cainfo` option usually specified in `.cargo/config`.
|
||||
export CARGO_HTTP_CAINFO=${cacert}/etc/ssl/certs/ca-bundle.crt
|
||||
|
||||
if grep '^source = "git' Cargo.lock; then
|
||||
echo
|
||||
echo "ERROR: The Cargo.lock contains git dependencies"
|
||||
echo
|
||||
echo "This is not supported in the default fixed-output derivation fetcher."
|
||||
echo "Set \`useFetchCargoVendor = true\` / use fetchCargoVendor"
|
||||
echo "or use cargoLock.lockFile / importCargoLock instead."
|
||||
echo
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cargo vendor $name --respect-source-config | cargo-vendor-normalise > $CARGO_CONFIG
|
||||
|
||||
# Create an empty vendor directory when there is no dependency to vendor
|
||||
mkdir -p $name
|
||||
# Add the Cargo.lock to allow hash invalidation
|
||||
cp Cargo.lock.orig $name/Cargo.lock
|
||||
|
||||
# Packages with git dependencies generate non-default cargo configs, so
|
||||
# always install it rather than trying to write a standard default template.
|
||||
install -D $CARGO_CONFIG $name/.cargo/config
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
# Build a reproducible tar, per instructions at https://reproducible-builds.org/docs/archives/
|
||||
installPhase = ''
|
||||
tar --owner=0 --group=0 --numeric-owner --format=gnu \
|
||||
--sort=name --mtime="@$SOURCE_DATE_EPOCH" \
|
||||
-czf $out $name
|
||||
'';
|
||||
|
||||
inherit (hash_) outputHashAlgo outputHash;
|
||||
|
||||
impureEnvVars = lib.fetchers.proxyImpureEnvVars ++ [ "NIX_CRATES_INDEX" ];
|
||||
}
|
||||
// (removeAttrs args removedArgs)
|
||||
)
|
||||
)
|
||||
@@ -10,17 +10,17 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "aiken";
|
||||
version = "1.1.14";
|
||||
version = "1.1.15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aiken-lang";
|
||||
repo = "aiken";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-aydujI8yPfUEEonasOT0uFCpLKOXSh/c9iw12kACLuw=";
|
||||
hash = "sha256-zbtsSEWgzhMeRMLb/ocsbz28lYXbSgucnPLVB9z7iwo=";
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-D7N9liDcthV4YLH+XzG4E1PAcLg9PQlTeGBmUcGOYes=";
|
||||
cargoHash = "sha256-k4gjgeQTZQw0OU1bHJPWskeZ974pTJGaKaIpM5+lZeU=";
|
||||
|
||||
buildInputs =
|
||||
[ openssl ]
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
rustPlatform,
|
||||
protobuf_26,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "amazon-q-cli";
|
||||
version = "1.7.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aws";
|
||||
repo = "amazon-q-developer-cli";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-uKsj7QBKomkO1xP5VgOGI5W8CHIgPQx4QsS2voghrVc=";
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
|
||||
cargoHash = "sha256-G99vb+7eomxDy9xFJjKA+KpCH2NUzitAKHZE5b62Db8=";
|
||||
|
||||
cargoBuildFlags = [
|
||||
"-p"
|
||||
"q_cli"
|
||||
];
|
||||
cargoTestFlags = [
|
||||
"-p"
|
||||
"q_cli"
|
||||
];
|
||||
|
||||
# skip integration tests that have external dependencies
|
||||
checkFlags = [
|
||||
"--skip=cli::chat::tests::test_flow"
|
||||
"--skip=cli::init::tests::test_prompts"
|
||||
"--skip=debug_get_index"
|
||||
"--skip=debug_list_intellij_variants"
|
||||
"--skip=debug_refresh_auth_token"
|
||||
"--skip=local_state_all"
|
||||
"--skip=local_state_get"
|
||||
"--skip=settings_all"
|
||||
"--skip=settings_get"
|
||||
"--skip=user_whoami"
|
||||
"--skip=init_lint_bash_post_bash_profile"
|
||||
"--skip=init_lint_bash_post_bashrc"
|
||||
"--skip=init_lint_bash_pre_bash_profile"
|
||||
"--skip=init_lint_bash_pre_bashrc"
|
||||
"--skip=init_lint_fish_pre_00_fig_pre"
|
||||
"--skip=init_lint_zsh_post_zprofile"
|
||||
"--skip=init_lint_zsh_post_zshrc"
|
||||
"--skip=init_lint_zsh_pre_zprofile"
|
||||
"--skip=init_lint_zsh_pre_zshrc"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
protobuf_26
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
mv $out/bin/q_cli $out/bin/amazon-q
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Amazon Q Developer AI coding agent CLI";
|
||||
homepage = "https://github.com/aws/amazon-q-developer-cli";
|
||||
license = with lib.licenses; [
|
||||
mit
|
||||
asl20
|
||||
];
|
||||
maintainers = [ lib.maintainers.jamesward ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -8,13 +8,13 @@
|
||||
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "android-studio-tools";
|
||||
version = "11076708";
|
||||
version = "13114758";
|
||||
|
||||
src = fetchzip {
|
||||
# The only difference between the Linux and Mac versions is a single comment at the top of all the scripts
|
||||
# Therefore, we will use the Linux version and just patch the comment
|
||||
url = "https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip";
|
||||
hash = "sha256-NjxJzHRT2/zZ9YzzjqaMVxpOELkDneQgc1/y1GUnZow=";
|
||||
url = "https://dl.google.com/android/repository/commandlinetools-linux-13114758_latest.zip";
|
||||
hash = "sha256-dt8nwjL8wyRfBZOedCPYXh7zyeMUeH0gOPpTcpxCegU=";
|
||||
};
|
||||
|
||||
postPatch =
|
||||
|
||||
@@ -82,7 +82,10 @@ buildGoModule {
|
||||
description = "Shared library for Anytype clients";
|
||||
homepage = "https://anytype.io/";
|
||||
license = lib.licenses.unfreeRedistributable;
|
||||
maintainers = with lib.maintainers; [ autrimpo ];
|
||||
maintainers = with lib.maintainers; [
|
||||
autrimpo
|
||||
adda
|
||||
];
|
||||
platforms = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
|
||||
@@ -138,6 +138,7 @@ buildNpmPackage {
|
||||
maintainers = with lib.maintainers; [
|
||||
running-grass
|
||||
autrimpo
|
||||
adda
|
||||
];
|
||||
platforms = [
|
||||
"x86_64-linux"
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchurl,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
gtest,
|
||||
lz4,
|
||||
protobuf,
|
||||
snappy,
|
||||
zlib,
|
||||
zstd,
|
||||
}:
|
||||
|
||||
let
|
||||
orc-format = fetchurl {
|
||||
name = "orc-format-1.0.0.tar.gz";
|
||||
url = "https://www.apache.org/dyn/closer.lua/orc/orc-format-1.0.0/orc-format-1.0.0.tar.gz?action=download";
|
||||
hash = "sha256-c5+uX/lLH4ErQTB3KANhBFv5LlEO8Es0phDiOpRdjNU=";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "apache-orc";
|
||||
version = "2.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "apache";
|
||||
repo = "orc";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-Ib02mIUQaLEVwIBv5xdKDyX+FeI8vhh9+5hM7miKwHo=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Patch that adds 2 missing imports in source files
|
||||
# To be removed this PR land: https://github.com/apache/orc/pull/2175
|
||||
(fetchpatch {
|
||||
url = "https://github.com/apache/orc/commit/fb20db2440226da6b92d38ce260e5b850d2f0092.patch";
|
||||
hash = "sha256-rHGECXJoBPgZ62yZciYdSMq4pGnVt75lxkHyO46IiyQ=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gtest
|
||||
lz4
|
||||
protobuf
|
||||
snappy
|
||||
zlib
|
||||
zstd
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeFeature "CMAKE_BUILD_TYPE" "Release")
|
||||
(lib.cmakeBool "BUILD_JAVA" false)
|
||||
(lib.cmakeBool "STOP_BUILD_ON_WARNING" true)
|
||||
(lib.cmakeBool "INSTALL_VENDORED_LIBS" false)
|
||||
];
|
||||
|
||||
env = {
|
||||
GTEST_HOME = gtest.dev;
|
||||
LZ4_ROOT = lz4;
|
||||
ORC_FORMAT_URL = orc-format;
|
||||
PROTOBUF_HOME = protobuf;
|
||||
SNAPPY_ROOT = snappy.dev;
|
||||
ZLIB_ROOT = zlib.dev;
|
||||
ZSTD_ROOT = zstd.dev;
|
||||
};
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/apache/orc/releases/tag/v${finalAttrs.version}";
|
||||
description = "The smallest, fastest columnar storage for Hadoop workloads";
|
||||
homepage = "https://github.com/apache/orc/";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ drupol ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
})
|
||||
@@ -10,11 +10,11 @@
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "arc-browser";
|
||||
version = "1.83.0-59042";
|
||||
version = "1.87.1-60573";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://releases.arc.net/release/Arc-${finalAttrs.version}.dmg";
|
||||
hash = "sha256-GJuWBbzp9XuzxCu/dr/28mkrAclwTAAHB9n87Daw0HE=";
|
||||
hash = "sha256-UiB5MQl7hRl6nPu4xiwOdhC40bHYIcpPNtWg98HqCJc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ undmg ];
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "boost-sml";
|
||||
version = "1.1.11";
|
||||
version = "1.1.12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "boost-ext";
|
||||
repo = "sml";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-/eR/B8rE+mh5zDPjx1kS9nVJf1rCeHP04QDavh6z6fM=";
|
||||
hash = "sha256-IvZwkhZe9pcyJhZdn4VkWMRUN6Ow8qs3zB6JtWb5pKk=";
|
||||
};
|
||||
|
||||
buildInputs = [ boost ];
|
||||
|
||||
@@ -13,17 +13,17 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-duplicates";
|
||||
version = "0.7.0";
|
||||
version = "0.8.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Keruspe";
|
||||
repo = "cargo-duplicates";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-VGxBmzMtev+lXGhV9pMefpgX6nPlzMaPbXq5LMdIvrE=";
|
||||
hash = "sha256-JzS1+BHSCEcZM5MokbQsck/AGJ7EeSwbzjNz0uLQsgE=";
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-F6ZQrK4pKpljIQEei3cvxPPnOSBu9cyoaUzz/aS+yQU=";
|
||||
cargoHash = "sha256-58H6wFToCgW+J7QYXb6W6BiCFUVIG8MmxgZtWnPNkrI=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
curl
|
||||
|
||||
@@ -8,15 +8,15 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "cloudfoundry-cli";
|
||||
version = "8.11.0";
|
||||
version = "8.12.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cloudfoundry";
|
||||
repo = "cli";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-1OJWkhXw/VYerQgaYFgX6mPIAtD3GKDhI+/a8TJS5Yg=";
|
||||
sha256 = "sha256-W9hshsq02AiDVNFYMoIWCei04b7pPTmIP2+fMyLgcDY=";
|
||||
};
|
||||
vendorHash = "sha256-c0RThHxnT/OU+sFZlACKoFYmFM1P3XItvF0XiGKBVZ8=";
|
||||
vendorHash = "sha256-6pAcDdCCp64o6VuSSLyLtnLPD5OxSt4o3eUpRhJzXTI=";
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ stdenvNoCC.mkDerivation {
|
||||
rsync -a -q ${appimageContents}/usr/share $out/ --exclude "*.so"
|
||||
|
||||
# Fix the desktop file to point to the correct location
|
||||
substituteInPlace $out/share/applications/cursor.desktop --replace-fail "/usr/share/cursor/cursor" "$out/share/cursor/cursor"
|
||||
substituteInPlace $out/share/applications/cursor.desktop --replace-fail "/usr/share/cursor/cursor" "$out/bin/cursor"
|
||||
|
||||
wrapProgram $out/bin/cursor \
|
||||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}} --no-update"
|
||||
@@ -196,13 +196,7 @@ stdenvNoCC.mkDerivation {
|
||||
sarahec
|
||||
aspauldingcode
|
||||
];
|
||||
platforms = [
|
||||
"x86_64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
# Temporary: Cursor doesn't supply a 0.47.8 build for aarch64-linux
|
||||
badPlatforms = [ "aarch64-linux" ];
|
||||
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
||||
mainProgram = "cursor";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
libpaper,
|
||||
libnl,
|
||||
libcap,
|
||||
libuuid,
|
||||
libnet,
|
||||
pkg-config,
|
||||
iproute2,
|
||||
@@ -28,13 +29,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "criu";
|
||||
version = "4.0";
|
||||
version = "4.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "checkpoint-restore";
|
||||
repo = "criu";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-D16s6pGWHWRLvub7foG3Vbzw2hoU4p1VeHt7ymL5hlw=";
|
||||
hash = "sha256-Z4prbaPYRdN/fPdBwDz7D3/gKybh2ulA3UM1LZGeAK0=";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
@@ -47,6 +48,7 @@ stdenv.mkDerivation rec {
|
||||
asciidoc
|
||||
xmlto
|
||||
libpaper
|
||||
libuuid
|
||||
docbook_xsl
|
||||
which
|
||||
makeWrapper
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "displaycal";
|
||||
version = "3.9.14";
|
||||
version = "3.9.15";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "DisplayCAL";
|
||||
inherit version;
|
||||
hash = "sha256-2I5fiWgS9n7IY/ZayWBvEaP0uNIAXfvkyqQe2vLFPJw=";
|
||||
hash = "sha256-VX3xQQn8FKcrqyx1RpGste2QmATgTh6cCowAmtnpbeM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -6,11 +6,13 @@
|
||||
writeTextFile {
|
||||
name = "dri-pkgconfig-stub";
|
||||
|
||||
# Version intentionally hardcoded to avoid rebuilds on Mesa updates.
|
||||
# If anything ever requires a newer version, this can simply be bumped manually.
|
||||
text = ''
|
||||
dridriverdir=${mesa.driverLink}/lib/dri
|
||||
|
||||
Name: dri
|
||||
Version: ${mesa.version}
|
||||
Version: 25.0
|
||||
Description: Nixpkgs graphics driver path stub
|
||||
'';
|
||||
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "etterna";
|
||||
version = "0.74.3";
|
||||
version = "0.74.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "etternagame";
|
||||
repo = "etterna";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-zzCk6axISswfTAk7rRha5HFzIHQ0AjpAZyAWzH+Cn1s=";
|
||||
hash = "sha256-ZCQt99Qcov/7jGfrSmX9WftaP2U2B1d1APK1mxrUDBs=";
|
||||
};
|
||||
|
||||
patches = [ ./fix-download-manager.patch ];
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
appimageTools,
|
||||
}:
|
||||
let
|
||||
version = "5.5.226";
|
||||
version = "5.5.228";
|
||||
pname = "gdevelop";
|
||||
|
||||
src =
|
||||
if stdenv.hostPlatform.system == "x86_64-linux" then
|
||||
fetchurl {
|
||||
url = "https://github.com/4ian/GDevelop/releases/download/v${version}/GDevelop-5-${version}.AppImage";
|
||||
sha256 = "sha256-58P/9QZOpk327gPM/gDLSchmuXpOR5kBf7U8xksFWUQ=";
|
||||
sha256 = "sha256-f6WCyCcMg+QhpFy9Xu4ac7pZ0aLwEe1GVJfsiVOLW0g=";
|
||||
}
|
||||
else
|
||||
throw "${pname}-${version} is not supported on ${stdenv.hostPlatform.system}";
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
let
|
||||
pname = "gfold";
|
||||
version = "2025.2.1";
|
||||
version = "2025.4.0";
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
inherit pname version;
|
||||
@@ -17,11 +17,11 @@ rustPlatform.buildRustPackage {
|
||||
owner = "nickgerace";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-WgSFLAhPJe7U4ovanqqxYArmPHmN+JRcVHjXYATV+wQ=";
|
||||
hash = "sha256-7PnqhS80Ozh5ZQNQ8iYgCiFT0JDLzhA09NV1HgrCOww=";
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-zU6ixAlac5TKTVm4vc1qVDYtHVoNDildJpi+RrBwV9Y=";
|
||||
cargoHash = "sha256-nGHJ96jFqG1pe3WUILPzm52HxrZYde2Z1p8N4DTaxlw=";
|
||||
|
||||
passthru.tests.version = testers.testVersion {
|
||||
package = gfold;
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
}:
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "gpt-cli";
|
||||
version = "0.4.0";
|
||||
version = "0.4.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kharvd";
|
||||
repo = "gpt-cli";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-VUDkY0r1/2kSJ0afEIsuWg6JSZpKPVuRgUcmoucWBps=";
|
||||
hash = "sha256-G8iepcjZFMTwsMhtGYmVOK9NkHXLqLet5SJWDAx1usg=";
|
||||
};
|
||||
|
||||
build-system = with python3Packages; [
|
||||
@@ -52,7 +52,7 @@ python3Packages.buildPythonApplication rec {
|
||||
meta = {
|
||||
description = "Command-line interface for ChatGPT, Claude and Bard";
|
||||
homepage = "https://github.com/kharvd/gpt-cli";
|
||||
changelog = "https://github.com/kharvd/gpt-cli/releases/tag/v${version}";
|
||||
changelog = "https://github.com/kharvd/gpt-cli/releases/tag/${src.tag}";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ _404wolf ];
|
||||
mainProgram = "gpt";
|
||||
|
||||
@@ -1,136 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
fetchYarnDeps,
|
||||
fixup-yarn-lock,
|
||||
grafana-agent,
|
||||
nix-update-script,
|
||||
nixosTests,
|
||||
nodejs,
|
||||
stdenv,
|
||||
systemd,
|
||||
testers,
|
||||
yarn,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "grafana-agent";
|
||||
version = "0.44.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "grafana";
|
||||
repo = "agent";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-dAfiTJ0DlChriYOl/bPCEHj/UpbZ2a8BZBCQ82H+O9I=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-6nXUeRpaezzfRykqMCtwP0FQZchRdxLmtupVAMNAjmY=";
|
||||
proxyVendor = true; # darwin/linux hash mismatch
|
||||
|
||||
frontendYarnOfflineCache = fetchYarnDeps {
|
||||
yarnLock = src + "/internal/web/ui/yarn.lock";
|
||||
hash = "sha256-uqKOGSEnR9CU4vlahldrLxDb3z7Yt1DebyRB91NQMRc=";
|
||||
};
|
||||
|
||||
ldflags =
|
||||
let
|
||||
prefix = "github.com/grafana/agent/internal/build";
|
||||
in
|
||||
[
|
||||
"-s"
|
||||
"-w"
|
||||
# https://github.com/grafana/agent/blob/v0.44.2/Makefile#L132-L137
|
||||
"-X ${prefix}.Version=${version}"
|
||||
"-X ${prefix}.Branch=v${version}"
|
||||
"-X ${prefix}.Revision=v${version}"
|
||||
"-X ${prefix}.BuildUser=nix"
|
||||
"-X ${prefix}.BuildDate=1980-01-01T00:00:00Z"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
fixup-yarn-lock
|
||||
nodejs
|
||||
yarn
|
||||
];
|
||||
|
||||
tags = [
|
||||
"builtinassets"
|
||||
"nonetwork"
|
||||
"nodocker"
|
||||
"promtail_journal_enabled"
|
||||
];
|
||||
|
||||
subPackages = [
|
||||
"cmd/grafana-agent"
|
||||
"cmd/grafana-agentctl"
|
||||
"internal/web/ui"
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
export HOME="$TMPDIR"
|
||||
|
||||
pushd internal/web/ui
|
||||
fixup-yarn-lock yarn.lock
|
||||
yarn config --offline set yarn-offline-mirror $frontendYarnOfflineCache
|
||||
yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive
|
||||
patchShebangs node_modules
|
||||
yarn --offline run build
|
||||
popd
|
||||
'';
|
||||
|
||||
# do not pass preBuild to go-modules.drv, as it would otherwise fail to build.
|
||||
# but even if it would work, it simply isn't needed in that scope.
|
||||
overrideModAttrs = (
|
||||
_: {
|
||||
preBuild = null;
|
||||
}
|
||||
);
|
||||
|
||||
# uses go-systemd, which uses libsystemd headers
|
||||
# https://github.com/coreos/go-systemd/issues/351
|
||||
env.NIX_CFLAGS_COMPILE = toString (
|
||||
lib.optionals stdenv.hostPlatform.isLinux [ "-I${lib.getDev systemd}/include" ]
|
||||
);
|
||||
|
||||
# go-systemd uses libsystemd under the hood, which does dlopen(libsystemd) at
|
||||
# runtime.
|
||||
# Add to RUNPATH so it can be found.
|
||||
postFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
patchelf \
|
||||
--set-rpath "${
|
||||
lib.makeLibraryPath [ (lib.getLib systemd) ]
|
||||
}:$(patchelf --print-rpath $out/bin/grafana-agent)" \
|
||||
$out/bin/grafana-agent
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
tests = {
|
||||
inherit (nixosTests) grafana-agent;
|
||||
version = testers.testVersion {
|
||||
inherit version;
|
||||
command = "${lib.getExe grafana-agent} --version";
|
||||
package = grafana-agent;
|
||||
};
|
||||
};
|
||||
updateScript = nix-update-script { };
|
||||
# alias for nix-update to be able to find and update this attribute
|
||||
offlineCache = frontendYarnOfflineCache;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Lightweight subset of Prometheus and more, optimized for Grafana Cloud";
|
||||
license = lib.licenses.asl20;
|
||||
homepage = "https://grafana.com/products/cloud";
|
||||
changelog = "https://github.com/grafana/agent/blob/${src.rev}/CHANGELOG.md";
|
||||
maintainers = with lib.maintainers; [
|
||||
flokli
|
||||
emilylange
|
||||
];
|
||||
mainProgram = "grafana-agent";
|
||||
# Breaks with Go 1.23: https://github.com/grafana/agent/issues/6972
|
||||
# Binary panics at runtime with:
|
||||
# 'panic: pattern "GET /debug/pprof/" (registered at net/http/pprof/pprof.go:100) conflicts with pattern "/debug/pprof/delta_heap"'
|
||||
broken = true;
|
||||
};
|
||||
}
|
||||
@@ -18,13 +18,13 @@
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "grimblast";
|
||||
version = "0.1-unstable-2025-03-17";
|
||||
version = "0.1-unstable-2025-03-31";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hyprwm";
|
||||
repo = "contrib";
|
||||
rev = "bd81329944be53b0ffb99e05864804b95f1d7c65";
|
||||
hash = "sha256-I8JVdQRu8eWvY5W8XWYZkdd5pojDHkxeqQV7mMIsbhs=";
|
||||
rev = "bc2ad24e0b2e66c3e164994c4897cd94a933fd10";
|
||||
hash = "sha256-YItzk1pj8Kz+b7VlC9zN1pSZ6CuX35asYy3HuMQ3lBQ=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "halo";
|
||||
version = "2.20.17";
|
||||
version = "2.20.18";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/halo-dev/halo/releases/download/v${version}/halo-${version}.jar";
|
||||
hash = "sha256-DBXtSA06MzhVySHZstRgML/CU8SSry9vVIbg30/Jo9g=";
|
||||
hash = "sha256-N3hbiK/pmZ30wJA8VJI9ft6o7VKQEM2+evakk0EObx4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -265,7 +265,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
passthru = {
|
||||
inherit nix perlDeps;
|
||||
tests.basic = nixosTests.hydra.hydra;
|
||||
tests = { inherit (nixosTests) hydra; };
|
||||
updateScript = unstableGitUpdater { };
|
||||
};
|
||||
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
{
|
||||
"version": "1.131.2",
|
||||
"hash": "sha256-E7D6tTA2XJLfKg1qTGG/v5vJsHh2dY5ihhiA0xcf0sA=",
|
||||
"version": "1.131.3",
|
||||
"hash": "sha256-ZSi9DfyGzkEOiCVEdLu16xzjbmwuMIodD9zMwW72Ppo=",
|
||||
"components": {
|
||||
"cli": {
|
||||
"npmDepsHash": "sha256-bubJQlsumazercr5W4oUwjEjLrC/odU8r4kcT0BZhcw=",
|
||||
"version": "2.2.60"
|
||||
"npmDepsHash": "sha256-FNIrVdEvibIWq7yeHU76PNoolwJPPuCtcL3X6OeZ67U=",
|
||||
"version": "2.2.61"
|
||||
},
|
||||
"server": {
|
||||
"npmDepsHash": "sha256-nYicKhgbsDyLiWfUGelJ6ZbH1oGeWIPCG/UBmTv5H7A=",
|
||||
"version": "1.131.2"
|
||||
"npmDepsHash": "sha256-3557g6XH/FLXwZQ27IxgM55bzKrF+TLUBLI26PNjKec=",
|
||||
"version": "1.131.3"
|
||||
},
|
||||
"web": {
|
||||
"npmDepsHash": "sha256-3Dc7U6kq9hUDNfK41hCpUu/al8WJ7p4oaLwyGqu2m2I=",
|
||||
"version": "1.131.2"
|
||||
"npmDepsHash": "sha256-DIsWAfkEhIYnomC1AFpl2vLFxREhe0ofWs6ntFk9qXA=",
|
||||
"version": "1.131.3"
|
||||
},
|
||||
"open-api/typescript-sdk": {
|
||||
"npmDepsHash": "sha256-fsFWhRnwzTwMTrC5WPR2yJ2t8plWb98GO2P5Sm/NwaQ=",
|
||||
"version": "1.131.2"
|
||||
"npmDepsHash": "sha256-q0cg1yCZVM6DmvGYrI5fyGcA1fOyDhYZYvBsIPV05A8=",
|
||||
"version": "1.131.3"
|
||||
},
|
||||
"geonames": {
|
||||
"timestamp": "20250331194635",
|
||||
|
||||
@@ -25,13 +25,13 @@ let
|
||||
in
|
||||
buildNpmPackage rec {
|
||||
pname = "jitsi-meet-electron";
|
||||
version = "2025.1.0";
|
||||
version = "2025.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jitsi";
|
||||
repo = "jitsi-meet-electron";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-o65UPPyGgmFe8+HANmnyVgPITk8gY7uvIzx7QZUluBU=";
|
||||
hash = "sha256-Pk62BpfXblRph3ktxy8eF9umRmPRZbZGjRWduy+3z+s=";
|
||||
};
|
||||
|
||||
nativeBuildInputs =
|
||||
@@ -58,7 +58,7 @@ buildNpmPackage rec {
|
||||
OpenGL
|
||||
];
|
||||
|
||||
npmDepsHash = "sha256-16yWCI408tkkzvrx2fBPSNSUa9dRej9LrnNpqobwfl8=";
|
||||
npmDepsHash = "sha256-TckV91RJo06OKb8nIvxBCxu28qyHtA/ACDshOlaCQxA=";
|
||||
|
||||
makeCacheWritable = true;
|
||||
|
||||
|
||||
@@ -7,17 +7,17 @@
|
||||
}:
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "jnv";
|
||||
version = "0.5.0";
|
||||
version = "0.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ynqa";
|
||||
repo = "jnv";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-ouWtMos4g9uIFEFeukgq8VgcxlSCzJnSYFNdNmOD5C8=";
|
||||
hash = "sha256-HKZ+hF5Y7vTA4EODSAd9xYJHaipv5YukTl470ejPLtM=";
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-83xZy8LAe1IE58WAsM6loIxV7pO9n9pgMpjCHrWkHwc=";
|
||||
cargoHash = "sha256-VLVoURqmUhhekNZ0a75bwjvSiLfaQ79IlltbmWVyBrI=";
|
||||
|
||||
buildInputs = lib.optional stdenv.hostPlatform.isDarwin (
|
||||
with darwin.apple_sdk.frameworks;
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "kitex";
|
||||
version = "0.12.3";
|
||||
version = "0.13.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cloudwego";
|
||||
repo = "kitex";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-YJq/aE8M/yRed2ZH7zf6i5wRl9KKXxAncD0lNAmJXUM=";
|
||||
hash = "sha256-1dgQgc9XljawyH+MIDPNqcwHMH0yW2BMY8TZnc+P13I=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-yIPcH1arDSYfCqSbBTvbnp4UORx11bbuT//fy89bzF0=";
|
||||
vendorHash = "sha256-31OgNcAL2NJq5b96UmQnVecdusY4AtUP/O2MVCmPk+8=";
|
||||
|
||||
subPackages = [ "tool/cmd/kitex" ];
|
||||
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "lean4";
|
||||
version = "4.17.0";
|
||||
version = "4.18.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "leanprover";
|
||||
repo = "lean4";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-6oteAbCKhel0pRyFGqSDG03oDPQU5Y9dsPcujSG6sjo=";
|
||||
hash = "sha256-1hVcRO9RbVUgoKTUTFXBqJZwt50/aw/P9dxUdI7RpCc=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -9,9 +9,7 @@
|
||||
pcsclite,
|
||||
opensc,
|
||||
openssl,
|
||||
xercesc,
|
||||
pkg-config,
|
||||
xsd,
|
||||
zlib,
|
||||
xmlsec,
|
||||
xxd,
|
||||
@@ -38,8 +36,6 @@ stdenv.mkDerivation rec {
|
||||
pcsclite
|
||||
opensc
|
||||
openssl
|
||||
xercesc
|
||||
xsd
|
||||
zlib
|
||||
xmlsec
|
||||
];
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
lib,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
versionCheckHook,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "monocle";
|
||||
version = "0.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bgpkit";
|
||||
repo = "monocle";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-vpGCYU/vW4cQFuAWxa+ZkuKLB4NSs5tPW2iWVE8iPAk=";
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-1wouA1REbPHm/v4ZB76gfgDPweNV3nztf6XxKdu42GQ=";
|
||||
|
||||
# require internet access
|
||||
checkFlags = [
|
||||
"--skip=datasets::as2org::tests::test_crawling"
|
||||
"--skip=datasets::ip::tests::test_fetch_ip_info"
|
||||
"--skip=datasets::rpki::validator::tests::test_bgp"
|
||||
"--skip=datasets::rpki::validator::tests::test_list_asn"
|
||||
"--skip=datasets::rpki::validator::tests::test_list_prefix"
|
||||
"--skip=datasets::rpki::validator::tests::test_validation"
|
||||
];
|
||||
|
||||
doInstallCheck = true;
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
description = "See through all BGP data with a monocle";
|
||||
homepage = "https://github.com/bgpkit/monocle";
|
||||
changelog = "https://github.com/bgpkit/monocle/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ stepbrobd ];
|
||||
mainProgram = "monocle";
|
||||
};
|
||||
})
|
||||
+372
-344
File diff suppressed because it is too large
Load Diff
@@ -7,13 +7,13 @@
|
||||
|
||||
buildNpmPackage rec {
|
||||
pname = "nezha-theme-admin";
|
||||
version = "1.10.0";
|
||||
version = "1.10.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nezhahq";
|
||||
repo = "admin-frontend";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-WA7NkXIJEtXRp+Nky5PjCl6afmnpj8p7TNrOuTNyQ/E=";
|
||||
hash = "sha256-TT/WCeHYi/Q5zpB8DCdJdAv8sJsm4J7q596qOqbCH4E=";
|
||||
};
|
||||
|
||||
# TODO: Switch to the bun build function once available in nixpkgs
|
||||
@@ -21,7 +21,7 @@ buildNpmPackage rec {
|
||||
cp ${./package-lock.json} package-lock.json
|
||||
'';
|
||||
|
||||
npmDepsHash = "sha256-6lt2Z4RvVHaQ9MZs0D4BT7Rmwf9G79pdnp6l0ItFXeY=";
|
||||
npmDepsHash = "sha256-vkToSpCqsXrbjMxmnlyBGeiWTQaQC04XBnCRtn9lEQU=";
|
||||
|
||||
npmPackFlags = [ "--ignore-scripts" ];
|
||||
|
||||
|
||||
@@ -1,215 +0,0 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
##!nix-shell -I nixpkgs=./. -i python3 -p common-updater-scripts gnused nix coreutils python312
|
||||
"""
|
||||
Updater script for the ocis-bin package.
|
||||
|
||||
This script fetches an HTML table from a specified URL and parses it to determine the release type
|
||||
(either "Rolling" or "Production") of a given software version. It uses the built-in urllib.request
|
||||
for fetching the HTML content and the built-in html.parser for parsing the HTML. By relying only on
|
||||
standard library modules, we avoid dependencies on third-party libraries, which simplifies deployment
|
||||
and improves portability.
|
||||
"""
|
||||
import urllib.request
|
||||
import os
|
||||
import subprocess
|
||||
import json
|
||||
import sys
|
||||
from datetime import datetime
|
||||
from html.parser import HTMLParser
|
||||
|
||||
TRACKING_CHANNEL = "Production" # Either Rolling or Production
|
||||
|
||||
GITHUB_TOKEN = os.getenv("GITHUB_TOKEN", None)
|
||||
|
||||
|
||||
class TableParser(HTMLParser):
|
||||
def __init__(self, version):
|
||||
super().__init__()
|
||||
self.version = version
|
||||
self.in_td = False
|
||||
self.current_row = []
|
||||
self.release_type = None
|
||||
self.in_target_row = False
|
||||
|
||||
def handle_starttag(self, tag, attrs):
|
||||
if tag == "td":
|
||||
self.in_td = True
|
||||
|
||||
if tag == "a":
|
||||
href = dict(attrs).get("href", "")
|
||||
if self.version in href:
|
||||
self.in_target_row = True
|
||||
|
||||
def handle_endtag(self, tag):
|
||||
if tag == "td":
|
||||
self.in_td = False
|
||||
|
||||
if tag == "tr" and self.in_target_row:
|
||||
self.release_type = self.current_row[1]
|
||||
self.in_target_row = False
|
||||
|
||||
if tag == "tr":
|
||||
self.current_row = []
|
||||
|
||||
def handle_data(self, data):
|
||||
if self.in_td:
|
||||
self.current_row.append(data.strip())
|
||||
|
||||
|
||||
def get_release_type(content, version):
|
||||
parser = TableParser(version)
|
||||
parser.feed(content)
|
||||
return parser.release_type
|
||||
|
||||
|
||||
def get_latest_version():
|
||||
url = "https://api.github.com/repos/owncloud/ocis/releases?per_page=1"
|
||||
req = urllib.request.Request(url)
|
||||
|
||||
if GITHUB_TOKEN:
|
||||
req.add_header("Authorization", f"Bearer {GITHUB_TOKEN}")
|
||||
|
||||
with urllib.request.urlopen(req) as response:
|
||||
if response.status != 200:
|
||||
raise Exception(f"HTTP request failed with status {response.status}")
|
||||
|
||||
data = response.read()
|
||||
releases = json.loads(data)
|
||||
latest_version = releases[0]["tag_name"].lstrip("v")
|
||||
|
||||
return latest_version
|
||||
|
||||
|
||||
def get_all_versions():
|
||||
url = "https://api.github.com/repos/owncloud/ocis/releases"
|
||||
req = urllib.request.Request(url)
|
||||
|
||||
if GITHUB_TOKEN:
|
||||
req.add_header("Authorization", f"Bearer {GITHUB_TOKEN}")
|
||||
|
||||
with urllib.request.urlopen(req) as response:
|
||||
if response.status != 200:
|
||||
raise Exception(f"HTTP request failed with status {response.status}")
|
||||
|
||||
data = response.read()
|
||||
releases = json.loads(data)
|
||||
|
||||
versions = []
|
||||
for release in releases:
|
||||
version = release["tag_name"].lstrip("v")
|
||||
published_date = datetime.strptime(
|
||||
release["published_at"], "%Y-%m-%dT%H:%M:%SZ"
|
||||
)
|
||||
versions.append({"version": version, "published_date": published_date})
|
||||
|
||||
return versions
|
||||
|
||||
|
||||
def get_current_version():
|
||||
result = subprocess.run(
|
||||
[
|
||||
"nix-instantiate",
|
||||
"--eval",
|
||||
"-E",
|
||||
"with import ./. {}; ocis-bin.version or (lib.getVersion ocis-bin)",
|
||||
],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
)
|
||||
result.check_returncode()
|
||||
return result.stdout.strip().strip('"')
|
||||
|
||||
|
||||
def get_hash(os_name, arch, version):
|
||||
url = f"https://github.com/owncloud/ocis/releases/download/v{version}/ocis-{version}-{os_name}-{arch}"
|
||||
result = subprocess.run(
|
||||
["nix-prefetch-url", "--type", "sha256", url], capture_output=True, text=True
|
||||
)
|
||||
result.check_returncode()
|
||||
pkg_hash = result.stdout.strip()
|
||||
result = subprocess.run(
|
||||
["nix", "hash", "to-sri", f"sha256:{pkg_hash}"], capture_output=True, text=True
|
||||
)
|
||||
result.check_returncode()
|
||||
return result.stdout.strip()
|
||||
|
||||
|
||||
def update_source_version(pkg_name, version, hash_value, system):
|
||||
subprocess.run(
|
||||
[
|
||||
"update-source-version",
|
||||
pkg_name,
|
||||
version,
|
||||
hash_value,
|
||||
f"--system={system}",
|
||||
"--ignore-same-version",
|
||||
],
|
||||
check=True,
|
||||
)
|
||||
|
||||
|
||||
def main():
|
||||
all_versions = get_all_versions()
|
||||
latest_version = all_versions[0]
|
||||
nix_current_version = get_current_version()
|
||||
|
||||
current_version = None
|
||||
for version in all_versions:
|
||||
if nix_current_version == version["version"]:
|
||||
current_version = version
|
||||
break
|
||||
|
||||
if not current_version:
|
||||
print(
|
||||
f"error: cannot find github release for current nix version of ocis-bin {nix_current_version}"
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
if current_version == latest_version:
|
||||
print(f"ocis-bin is up-to-date: {current_version}")
|
||||
return
|
||||
|
||||
roadmap_url = "https://owncloud.dev/ocis/release_roadmap/"
|
||||
response = urllib.request.urlopen(roadmap_url)
|
||||
content = response.read().decode("utf-8")
|
||||
latest_version_channel = get_release_type(content, latest_version["version"])
|
||||
current_version_channel = get_release_type(content, current_version["version"])
|
||||
|
||||
target_version = None
|
||||
if latest_version_channel == TRACKING_CHANNEL:
|
||||
target_version = latest_version
|
||||
elif latest_version_channel != TRACKING_CHANNEL:
|
||||
for version in all_versions:
|
||||
channel = get_release_type(content, version["version"])
|
||||
if (
|
||||
channel == TRACKING_CHANNEL
|
||||
and version["published_date"] > current_version["published_date"]
|
||||
):
|
||||
target_version = version
|
||||
print(
|
||||
f"ocis-bin found newer version {version['version']} in channel {TRACKING_CHANNEL}"
|
||||
)
|
||||
break
|
||||
|
||||
if not target_version:
|
||||
print(
|
||||
f"ocis-bin could not find newer version in {TRACKING_CHANNEL} than the current {current_version['version']}"
|
||||
)
|
||||
return
|
||||
|
||||
systems = [
|
||||
("darwin", "arm64", "aarch64-darwin"),
|
||||
("darwin", "amd64", "x86_64-darwin"),
|
||||
("linux", "arm64", "aarch64-linux"),
|
||||
("linux", "arm", "armv7l-linux"),
|
||||
("linux", "amd64", "x86_64-linux"),
|
||||
("linux", "386", "i686-linux"),
|
||||
]
|
||||
|
||||
for os_name, arch, system in systems:
|
||||
hash_value = get_hash(os_name, arch, target_version["version"])
|
||||
update_source_version("ocis-bin", target_version["version"], hash_value, system)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -27,18 +27,18 @@ let
|
||||
|
||||
hash =
|
||||
{
|
||||
hash_386-linux = "sha256-4yEgg0Ve8tjNn2weH9d91tfRaU1TE569VvZLxzuzXsw=";
|
||||
hash_amd64-linux = "sha256-YAIhtHv/cO4yFpkWoRNMf6t4+ifMtGPTcYu84ZMvfD4=";
|
||||
hash_arm64-linux = "sha256-OdtT9NOhh0Fkk+8CDic0NWWbGflk3FcuKB60OycJU5E=";
|
||||
hash_arm-linux = "sha256-foMsZ8Nq+Q5lqt2XZCDvQ+/sFM8/1/rPfogzsyrQHqs=";
|
||||
hash_amd64-darwin = "sha256-6jaX9iqyqztykeXZX3YqwRV/silFiyfeB9gJyreAfF8=";
|
||||
hash_arm64-darwin = "sha256-KJqMJct7YWocE4eVjMF36adqTIf7WcutZlG3QEoMhCI=";
|
||||
hash_386-linux = "sha256-2RtkxtVk7YN7CfsIBpMP85g84MNTzrnEgk10eFdfyyw=";
|
||||
hash_amd64-linux = "sha256-tmUfDKLO35qCs1hauJQKhJhcnMhqOpcqDFtAggMFhLE=";
|
||||
hash_arm64-linux = "sha256-ggRDW1cnTHMQKvOvCDH3eptH3O3PgYaondlzOGHTjio=";
|
||||
hash_arm-linux = "sha256-uMLRow1NeHufSI5B4k5qSIfH3lTxg+WxzLxgdedAz40=";
|
||||
hash_amd64-darwin = "sha256-LZ6n/f2MdbFaPnBCoJqZZ7HQiLG3Z6ZoatgFsxaFvMc=";
|
||||
hash_arm64-darwin = "sha256-k5X2ZInFS/HlToOZPX23TRJqlx/XM1ZG++Xr4BHn8SY=";
|
||||
}
|
||||
."hash_${arch}-${os}";
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ocis-bin";
|
||||
version = "5.0.5";
|
||||
pname = "ocis_5-bin";
|
||||
version = "5.0.9";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/owncloud/ocis/releases/download/v${finalAttrs.version}/ocis-${finalAttrs.version}-${os}-${arch}";
|
||||
Executable
+271
@@ -0,0 +1,271 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -I nixpkgs=./. -i python3 -p common-updater-scripts gnused nix coreutils python312
|
||||
"""
|
||||
Updater script for the ocis_5-bin package.
|
||||
|
||||
This script fetches an HTML table from a specified URL and parses it to determine the release type
|
||||
(either "Rolling" or "Production") of a given software version. It uses the built-in urllib.request
|
||||
for fetching the HTML content and the built-in html.parser for parsing the HTML. By relying only on
|
||||
standard library modules, we avoid dependencies on third-party libraries, which simplifies deployment
|
||||
and improves portability.
|
||||
"""
|
||||
import urllib.request
|
||||
import os
|
||||
import subprocess
|
||||
import json
|
||||
import sys
|
||||
from datetime import datetime
|
||||
from html.parser import HTMLParser
|
||||
|
||||
TRACKING_CHANNEL = "Production" # Either Rolling or Production
|
||||
|
||||
GITHUB_TOKEN = os.getenv("GITHUB_TOKEN", None)
|
||||
|
||||
MAJOR_VERSION = 5
|
||||
PKG_NAME = f"ocis_{MAJOR_VERSION}-5"
|
||||
|
||||
class TableParser(HTMLParser):
|
||||
def __init__(self, version):
|
||||
super().__init__()
|
||||
self.version = version
|
||||
self.in_td = False
|
||||
self.current_row = []
|
||||
self.release_type = None
|
||||
self.in_target_row = False
|
||||
|
||||
def handle_starttag(self, tag, attrs):
|
||||
if tag == "td":
|
||||
self.in_td = True
|
||||
|
||||
if tag == "a":
|
||||
href = dict(attrs).get("href", "")
|
||||
if self.version in href:
|
||||
self.in_target_row = True
|
||||
|
||||
def handle_endtag(self, tag):
|
||||
if tag == "td":
|
||||
self.in_td = False
|
||||
|
||||
if tag == "tr" and self.in_target_row:
|
||||
self.release_type = self.current_row[1]
|
||||
self.in_target_row = False
|
||||
|
||||
if tag == "tr":
|
||||
self.current_row = []
|
||||
|
||||
def handle_data(self, data):
|
||||
if self.in_td:
|
||||
self.current_row.append(data.strip())
|
||||
|
||||
|
||||
def get_release_type(content, version):
|
||||
parser = TableParser(version)
|
||||
parser.feed(content)
|
||||
return parser.release_type
|
||||
|
||||
|
||||
def get_all_versions():
|
||||
"""Get versions from GitHub releases with pagination (up to 10 pages)."""
|
||||
versions = []
|
||||
page = 1
|
||||
max_pages = 10
|
||||
per_page = 30
|
||||
|
||||
while page <= max_pages:
|
||||
url = f"https://api.github.com/repos/owncloud/ocis/releases?page={page}&per_page={per_page}"
|
||||
req = urllib.request.Request(url)
|
||||
|
||||
if GITHUB_TOKEN:
|
||||
req.add_header("Authorization", f"Bearer {GITHUB_TOKEN}")
|
||||
|
||||
req.add_header("Accept", "application/vnd.github.v3+json")
|
||||
req.add_header("User-Agent", "ocis-bin-updater-script")
|
||||
|
||||
with urllib.request.urlopen(req) as response:
|
||||
if response.status != 200:
|
||||
raise Exception(f"HTTP request failed with status {response.status}")
|
||||
|
||||
data = response.read()
|
||||
releases = json.loads(data)
|
||||
|
||||
if not releases:
|
||||
break
|
||||
|
||||
for release in releases:
|
||||
version = release["tag_name"].lstrip("v")
|
||||
published_date = datetime.strptime(
|
||||
release["published_at"], "%Y-%m-%dT%H:%M:%SZ"
|
||||
)
|
||||
versions.append({"version": version, "published_date": published_date})
|
||||
|
||||
page += 1
|
||||
|
||||
if len(releases) < per_page:
|
||||
break
|
||||
|
||||
if not versions:
|
||||
raise Exception("No releases found in GitHub API response")
|
||||
|
||||
return versions
|
||||
|
||||
|
||||
def get_current_version():
|
||||
result = subprocess.run(
|
||||
[
|
||||
"nix-instantiate",
|
||||
"--eval",
|
||||
"-E",
|
||||
f"with import ./. {{}}; {PKG_NAME}.version or (lib.getVersion {PKG_NAME})",
|
||||
],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
)
|
||||
result.check_returncode()
|
||||
return result.stdout.strip().strip('"')
|
||||
|
||||
|
||||
def get_hash(os_name, arch, version):
|
||||
url = f"https://github.com/owncloud/ocis/releases/download/v{version}/ocis-{version}-{os_name}-{arch}"
|
||||
result = subprocess.run(
|
||||
["nix-prefetch-url", "--type", "sha256", url], capture_output=True, text=True
|
||||
)
|
||||
result.check_returncode()
|
||||
pkg_hash = result.stdout.strip()
|
||||
result = subprocess.run(
|
||||
["nix", "hash", "to-sri", f"sha256:{pkg_hash}"], capture_output=True, text=True
|
||||
)
|
||||
result.check_returncode()
|
||||
return result.stdout.strip()
|
||||
|
||||
|
||||
def update_source_version(pkg_name, version, hash_value, system):
|
||||
subprocess.run(
|
||||
[
|
||||
"update-source-version",
|
||||
pkg_name,
|
||||
version,
|
||||
hash_value,
|
||||
f"--system={system}",
|
||||
"--ignore-same-version",
|
||||
],
|
||||
check=True,
|
||||
)
|
||||
|
||||
|
||||
def main():
|
||||
print("Fetching all versions from GitHub API (with pagination)...")
|
||||
all_versions = get_all_versions()
|
||||
print(f"Found {len(all_versions)} versions across multiple pages")
|
||||
|
||||
if not all_versions:
|
||||
print("Error: No versions fetched from GitHub API")
|
||||
sys.exit(1)
|
||||
|
||||
# We depend on the fact that versions are sorted reverse chronologically
|
||||
for version in all_versions:
|
||||
if version["version"].startswith(str(MAJOR_VERSION)):
|
||||
latest_version = version
|
||||
break
|
||||
print(f"Latest version from GitHub: {latest_version['version']}")
|
||||
|
||||
nix_current_version = get_current_version()
|
||||
print(f"Current nix version: {nix_current_version}")
|
||||
|
||||
current_version = None
|
||||
for version in all_versions:
|
||||
if nix_current_version == version["version"]:
|
||||
current_version = version
|
||||
break
|
||||
|
||||
if not current_version:
|
||||
available_versions = [v["version"] for v in all_versions]
|
||||
print(
|
||||
f"Error: Cannot find GitHub release for current nix version {nix_current_version}"
|
||||
)
|
||||
print(
|
||||
f"Available versions (searched {len(available_versions)} across multiple pages): {', '.join(available_versions[:10])}..."
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
print(f"Found current version {current_version['version']} in GitHub releases")
|
||||
|
||||
if current_version == latest_version:
|
||||
print(f"{PKG_NAME} is already up-to-date: {current_version['version']}")
|
||||
return
|
||||
|
||||
print("Fetching release roadmap information...")
|
||||
roadmap_url = "https://owncloud.dev/ocis/release_roadmap/"
|
||||
try:
|
||||
response = urllib.request.urlopen(roadmap_url)
|
||||
content = response.read().decode("utf-8")
|
||||
|
||||
latest_version_channel = get_release_type(content, latest_version["version"])
|
||||
current_version_channel = get_release_type(content, current_version["version"])
|
||||
|
||||
print(
|
||||
f"Latest version {latest_version['version']} is in channel: {latest_version_channel}"
|
||||
)
|
||||
print(
|
||||
f"Current version {current_version['version']} is in channel: {current_version_channel}"
|
||||
)
|
||||
except Exception as e:
|
||||
print(f"Warning: Failed to fetch release roadmap information: {e}")
|
||||
print("Proceeding with update using latest version")
|
||||
latest_version_channel = TRACKING_CHANNEL
|
||||
current_version_channel = TRACKING_CHANNEL
|
||||
|
||||
target_version = None
|
||||
if latest_version_channel == TRACKING_CHANNEL:
|
||||
target_version = latest_version
|
||||
print(
|
||||
f"Using latest version {latest_version['version']} as it is in the {TRACKING_CHANNEL} channel"
|
||||
)
|
||||
elif latest_version_channel != TRACKING_CHANNEL:
|
||||
print(f"Looking for a newer version in the {TRACKING_CHANNEL} channel...")
|
||||
for version in all_versions:
|
||||
try:
|
||||
channel = get_release_type(content, version["version"])
|
||||
if (
|
||||
channel == TRACKING_CHANNEL
|
||||
and version["published_date"] > current_version["published_date"]
|
||||
):
|
||||
target_version = version
|
||||
print(
|
||||
f"{PKG_NAME} found newer version {version['version']} in channel {TRACKING_CHANNEL}"
|
||||
)
|
||||
break
|
||||
except Exception as e:
|
||||
print(
|
||||
f"Warning: Failed to determine channel for version {version['version']}: {e}"
|
||||
)
|
||||
|
||||
if not target_version:
|
||||
print(
|
||||
f"{PKG_NAME} could not find newer version in {TRACKING_CHANNEL} than the current {current_version['version']}"
|
||||
)
|
||||
return
|
||||
|
||||
print(
|
||||
f"Updating {PKG_NAME} from {current_version['version']} to {target_version['version']}"
|
||||
)
|
||||
|
||||
systems = [
|
||||
("darwin", "arm64", "aarch64-darwin"),
|
||||
("darwin", "amd64", "x86_64-darwin"),
|
||||
("linux", "arm64", "aarch64-linux"),
|
||||
("linux", "arm", "armv7l-linux"),
|
||||
("linux", "amd64", "x86_64-linux"),
|
||||
("linux", "386", "i686-linux"),
|
||||
]
|
||||
|
||||
for os_name, arch, system in systems:
|
||||
print(f"Calculating hash for {os_name}-{arch}...")
|
||||
hash_value = get_hash(os_name, arch, target_version["version"])
|
||||
print(f"Updating package for {system}...")
|
||||
update_source_version(PKG_NAME, target_version["version"], hash_value, system)
|
||||
|
||||
print(f"Successfully updated {PKG_NAME} to version {target_version['version']}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -21,13 +21,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "pinocchio";
|
||||
version = "3.4.0";
|
||||
version = "3.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "stack-of-tasks";
|
||||
repo = "pinocchio";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-myhMisXzYd2WGIBQ7SIQmQkjUmxRfVuxTPPGvBzkt8I=";
|
||||
hash = "sha256-oSxeFt84IB3KR12knm2vBAHYyevVNjCjnp9mS3e0Zls=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "play";
|
||||
version = "0.3.5";
|
||||
version = "0.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "paololazzari";
|
||||
repo = "play";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-31naTjYwCytytKXg9tQo2qx0hVoBwBwL7nVeoAV+/go=";
|
||||
hash = "sha256-0ew8iYpNzSsE4fhAIB7NZYDIJitmpS5npJ74Hp6l0E0=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-9eP0rhsgpTttYrBG/BNk/ICtaM+zKNBz2H2cHuTSt30=";
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "plemoljp-nf";
|
||||
version = "2.0.3";
|
||||
version = "2.0.4";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/yuru7/PlemolJP/releases/download/v${version}/PlemolJP_NF_v${version}.zip";
|
||||
hash = "sha256-FPWA85z0IjVk1Pa/pwsj510sKAZa8i8vgEvrKRu9GGI=";
|
||||
hash = "sha256-6CMeo6YtWbEH/6xDD1yERhlMiCcOafAsQzcHeWQxuo4=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
|
||||
@@ -12,17 +12,17 @@ let
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "railway";
|
||||
version = "3.23.0";
|
||||
version = "4.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "railwayapp";
|
||||
repo = "cli";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-WxL5mETs7PVGhJcg1wVobYo/ETYFg3/1Fs/wJCJgKXg=";
|
||||
hash = "sha256-o3AWcUKeOBiNsDSDV0XFzQ0rWpj7el4qX6iQKnqMPgg=";
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-cMi3raSQgCSu6ZbiTgU2ABCy+NWJjY5IcWPJMMcmqyI=";
|
||||
cargoHash = "sha256-F+1ELwvtjnaQlvkfdKk7hnuEEde4NL/sUjPBExU+zds=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "readest";
|
||||
version = "0.9.28";
|
||||
version = "0.9.29";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "readest";
|
||||
repo = "readest";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-jIAvpppOB50KA+4jmx8QN/4e1Dkn6V9Oo3lHUWb5cyI=";
|
||||
hash = "sha256-2L5Wyl3xWjiJCjwUq9mcKe/hnDeHjNnhHgFPISNqfk0=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
@@ -45,7 +45,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
|
||||
cargoHash = "sha256-guUe2liie2x87VXNo8UeJhVLgvfPViKJKQol1XWA3fw=";
|
||||
cargoHash = "sha256-bRIZcR8UNE78k5cbOt6GQM+PlFVHR2qV7eB82Y+abZw=";
|
||||
|
||||
cargoRoot = "../..";
|
||||
|
||||
|
||||
@@ -6,17 +6,17 @@
|
||||
}:
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "srgn";
|
||||
version = "0.13.5";
|
||||
version = "0.13.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "alexpovel";
|
||||
repo = "srgn";
|
||||
rev = "srgn-v${version}";
|
||||
hash = "sha256-S6Wc79LY6WKtjDw/Ob3v4ETRI8Zxjrx9BDNKn79M1j4=";
|
||||
hash = "sha256-q6LFNymfCkKhmQXsJvKOya9WPchURI1SBdk64bpmsts=";
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-4BravWJRtZxC34JjbH26HY7mDdDFPryQZC4e4jOZ1fQ=";
|
||||
cargoHash = "sha256-qS1I4+pL3K4HIXNFID/ajldxIJJJXhpi0hxivHWk9Vg=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
writeShellApplication,
|
||||
withSwhPythonPackages ? [
|
||||
python3Packages.swh-auth
|
||||
python3Packages.swh-export
|
||||
python3Packages.swh-model
|
||||
python3Packages.swh-objstorage
|
||||
python3Packages.swh-scanner
|
||||
|
||||
@@ -29,6 +29,9 @@ rustPlatform.buildRustPackage rec {
|
||||
description = "Tantivy go bindings";
|
||||
homepage = "https://github.com/anyproto/tantivy-go";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ autrimpo ];
|
||||
maintainers = with lib.maintainers; [
|
||||
autrimpo
|
||||
adda
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "templ";
|
||||
version = "0.3.850";
|
||||
version = "0.3.857";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "a-h";
|
||||
repo = "templ";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-kH7nVXL6pINqOBPK5E5j9scw38lvnhyiQqMOe0MwUy8=";
|
||||
hash = "sha256-c3x7v5PeMJFADRfImMyEasvlC9WSjqHQxNDg1sgPBfQ=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-JVOsjBn1LV8p6HHelfAO1Qcqi/tPg1S3xBffo+0aplE=";
|
||||
|
||||
@@ -19,11 +19,11 @@ let
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ugs";
|
||||
version = "2.1.12";
|
||||
version = "2.1.13";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/winder/Universal-G-Code-Sender/releases/download/v${version}/UniversalGcodeSender.zip";
|
||||
hash = "sha256-HJMJ9bPo7YGQOrI5eM0MRPDoPawyWcr0YY2CBBkijpA=";
|
||||
hash = "sha256-LgbZds747/ll9kwIlDR62c9GcnxTcz1TNbAAVXwg3wY=";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "vals";
|
||||
version = "0.39.4";
|
||||
version = "0.40.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
rev = "v${version}";
|
||||
owner = "helmfile";
|
||||
repo = pname;
|
||||
sha256 = "sha256-UHiVAT7EE+rH+fcTDtTrTTVYktsePUojfAQgPWRNui0=";
|
||||
sha256 = "sha256-1mN8JbFgzHjzuuSoagDo9f4zFrrZc2iNk8AoSrBsyBs=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-5Wg5cRr470GikN1cuot4HkErK0VPHYPfQiC4d/frSsc=";
|
||||
vendorHash = "sha256-LI0NEjkE22ljSWd3qbZX7fTdwEriQJBSuKyX3hv1yFk=";
|
||||
|
||||
proxyVendor = true;
|
||||
|
||||
|
||||
@@ -8,17 +8,17 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "wasm-language-tools";
|
||||
version = "0.3.2";
|
||||
version = "0.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "g-plane";
|
||||
repo = "wasm-language-tools";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-f1Mq+1gZZelN12rFTLJHOvdzDAbqufzT9+I6pkJdJMU=";
|
||||
hash = "sha256-LkBeMZ4WEc8sZ6Gx31jdfdkEkjNfE3LFsz4B3hngT8U=";
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-P3sxAFZjAlgPrGrw3W+7ufflUz3/Xe7lTXygnSX5Q+4=";
|
||||
cargoHash = "sha256-PwyWqaJCfSh7l0OCalNfHIe9dA1BMOI8F7m4szOgVrs=";
|
||||
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
versionCheckProgram = "${placeholder "out"}/bin/wat_server";
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "yew-fmt";
|
||||
version = "0.6";
|
||||
version = "0.6.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "its-the-shrimp";
|
||||
repo = "yew-fmt";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-KhZezkR9VhdfGkNe1hSF90pe9K4VGDlBltasb7xnmRI=";
|
||||
hash = "sha256-kUelvhWUj9+nEHNWolhTJa8emdBInKV9cK2dF/H7dNQ=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-Y6OicST0GbUL4RpvdvtBLFlLwryQMKlaut5x9+cNiM8=";
|
||||
cargoHash = "sha256-oIliRYc6HU8KFmlTTIlV+nmeRUx1gJhy93QjPnGxiK8=";
|
||||
nativeCheckInputs = [ rustfmt ];
|
||||
passthru.updateScript = nix-update-script { };
|
||||
useFetchCargoVendor = true;
|
||||
|
||||
@@ -28,18 +28,18 @@ in
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "zipline";
|
||||
version = "4.0.1";
|
||||
version = "4.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "diced";
|
||||
repo = "zipline";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-HKd6OXnr9Xcxdaas0Pfvnq3nozFbOTcQsUxiIqDmvXI=";
|
||||
hash = "sha256-waUc2DzD7oQ/ZuPKvUwu3Yj6uxrZauR4phcQwh7YfKw=";
|
||||
};
|
||||
|
||||
pnpmDeps = pnpm_9.fetchDeps {
|
||||
inherit (finalAttrs) pname version src;
|
||||
hash = "sha256-4dVhCv06ze7kmHhwejiMTleojzl//S0yabW7tPyeuT8=";
|
||||
hash = "sha256-Q1PHXoiqUorAGcpIvM5iBvPINLRv+dAo0awhG4gvsrI=";
|
||||
};
|
||||
|
||||
buildInputs = [ vips ];
|
||||
|
||||
@@ -26,11 +26,6 @@
|
||||
inherit (self) callPackage;
|
||||
in
|
||||
{
|
||||
fetchCargoTarball = buildPackages.callPackage ../../../build-support/rust/fetch-cargo-tarball {
|
||||
git = buildPackages.gitMinimal;
|
||||
inherit cargo;
|
||||
};
|
||||
|
||||
fetchCargoVendor = buildPackages.callPackage ../../../build-support/rust/fetch-cargo-vendor.nix {
|
||||
inherit cargo;
|
||||
};
|
||||
@@ -81,4 +76,7 @@
|
||||
rustc = lib.warn "rustPlatform.rust.rustc is deprecated. Use rustc instead." rustc;
|
||||
cargo = lib.warn "rustPlatform.rust.cargo is deprecated. Use cargo instead." cargo;
|
||||
};
|
||||
|
||||
# Added in 25.05.
|
||||
fetchCargoTarball = throw "`rustPlatform.fetchCargoTarball` has been removed in 25.05, use `rustPlatform.fetchCargoVendor` instead";
|
||||
}
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
parallelBuild ? false,
|
||||
systemd,
|
||||
wxSupport ? true,
|
||||
systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, # systemd support in epmd
|
||||
# systemd support for epmd
|
||||
systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd,
|
||||
# updateScript deps
|
||||
writeScript,
|
||||
common-updater-scripts,
|
||||
@@ -50,6 +51,7 @@
|
||||
odbcSupport ? false,
|
||||
odbcPackages ? [ unixODBC ],
|
||||
opensslPackage ? openssl,
|
||||
systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd,
|
||||
wxPackages ? [
|
||||
libGL
|
||||
libGLU
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "KDDockWidgets";
|
||||
version = "2.2.1";
|
||||
version = "2.2.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "KDAB";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-DxRySKhQ15OpstjCO6FJ9edV7z8/rECN2+o5T63vFzQ=";
|
||||
sha256 = "sha256-VDLHED/QKxccZ18WEPV7GPdr3v7VaizDa5sZq7ei5+g=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
# nix build .#legacyPackages.x86_64-darwin.mesa .#legacyPackages.aarch64-darwin.mesa
|
||||
rec {
|
||||
pname = "mesa";
|
||||
version = "25.0.2";
|
||||
version = "25.0.3";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.freedesktop.org";
|
||||
owner = "mesa";
|
||||
repo = "mesa";
|
||||
rev = "mesa-${version}";
|
||||
hash = "sha256-NW2Xntdpt4Iec3z0E8j+omNRH/46IMYNuyD2MIFMs2M=";
|
||||
hash = "sha256-OM/T6pkq4vgEYZ7TlLRVsyMknLxQC9L+iOPF20ToZi8=";
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
xercesc,
|
||||
}:
|
||||
|
||||
let
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xsd";
|
||||
version = "4.0.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://codesynthesis.com/download/xsd/4.0/xsd-4.0.0+dep.tar.bz2";
|
||||
sha256 = "05wqhmd5cd4pdky8i8qysnh96d2h16ly8r73whmbxkajiyf2m9gc";
|
||||
};
|
||||
|
||||
patches = [ ./xsdcxx.patch ];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs .
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
buildFlags = [
|
||||
"LDFLAGS=-L${xercesc}/lib"
|
||||
"CPPFLAGS=-I${xercesc}/include"
|
||||
];
|
||||
installFlags = buildFlags ++ [
|
||||
"install_prefix=${placeholder "out"}"
|
||||
];
|
||||
|
||||
buildInputs = [ xercesc ];
|
||||
|
||||
meta = {
|
||||
homepage = "http://www.codesynthesis.com/products/xsd";
|
||||
description = "Open-source, cross-platform W3C XML Schema to C++ data binding compiler";
|
||||
mainProgram = "xsd";
|
||||
license = lib.licenses.gpl2;
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = [ lib.maintainers.jagajaga ];
|
||||
};
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
--- xsd-4.0.0+dep/xsd/doc/xsd.1~ 2014-09-14 12:25:36.862267587 +0000
|
||||
+++ xsd-4.0.0+dep/xsd/doc/xsd.1 2014-09-14 12:28:25.728229892 +0000
|
||||
@@ -1,16 +1,16 @@
|
||||
.\" Process this file with
|
||||
-.\" groff -man -Tascii xsd.1
|
||||
+.\" groff -man -Tascii xsdcxx.1
|
||||
.\"
|
||||
.TH XSD 1 "July 2014" "XSD 4.0.0"
|
||||
.SH NAME
|
||||
-xsd \- W3C XML Schema to C++ Compiler
|
||||
+xsdcxx \- W3C XML Schema to C++ Compiler
|
||||
.\"
|
||||
.\"
|
||||
.\"
|
||||
.\"--------------------------------------------------------------------
|
||||
.SH SYNOPSIS
|
||||
.\"--------------------------------------------------------------------
|
||||
-.B xsd
|
||||
+.B xsdcxx
|
||||
.I command
|
||||
.B [
|
||||
.I options
|
||||
@@ -20,19 +20,19 @@
|
||||
.I file
|
||||
.B ...]
|
||||
.in
|
||||
-.B xsd help
|
||||
+.B xsdcxx help
|
||||
.B [
|
||||
.I command
|
||||
.B ]
|
||||
.in
|
||||
-.B xsd version
|
||||
+.B xsdcxx version
|
||||
.\"
|
||||
.\"
|
||||
.\"
|
||||
.\"--------------------------------------------------------------------
|
||||
.SH DESCRIPTION
|
||||
.\"--------------------------------------------------------------------
|
||||
-.B xsd
|
||||
+.B xsdcxx
|
||||
generates vocabulary-specific, statically-typed C++ mapping from W3C XML
|
||||
Schema definitions. Particular mapping to produce is selected by a
|
||||
.IR command .
|
||||
@@ -96,7 +96,7 @@
|
||||
.PP
|
||||
.RS
|
||||
.RS 3
|
||||
-.B xsd help
|
||||
+.B xsdcxx help
|
||||
.I command
|
||||
.RE
|
||||
.PP
|
||||
@@ -206,7 +206,7 @@
|
||||
\fIfilename\fP \fInamespace\fP
|
||||
|
||||
For example, if you have file \fBhello\.xsd\fP with namespace
|
||||
-\fBhttp://example\.com/hello\fP and you run \fBxsd\fP on this file, then the
|
||||
+\fBhttp://example\.com/hello\fP and you run \fBxsdcxx\fP on this file, then the
|
||||
string in question will be:
|
||||
|
||||
\fBhello\.xsd\. http://example\.com/hello\fP
|
||||
@@ -1632,7 +1632,7 @@
|
||||
.\"
|
||||
.SH DIAGNOSTICS
|
||||
If the input file is not a valid W3C XML Schema definition,
|
||||
-.B xsd
|
||||
+.B xsdcxx
|
||||
will issue diagnostic messages to
|
||||
.B STDERR
|
||||
and exit with non-zero exit code.
|
||||
--- xsd-4.0.0+dep/xsd/doc/xsd.xhtml~ 2014-09-14 12:28:37.731513138 +0000
|
||||
+++ xsd-4.0.0+dep/xsd/doc/xsd.xhtml 2014-09-14 12:30:11.277789610 +0000
|
||||
@@ -50,19 +50,19 @@
|
||||
|
||||
<h1>NAME</h1>
|
||||
|
||||
- <p>xsd - W3C XML Schema to C++ Compiler</p>
|
||||
+ <p>xsdcxx - W3C XML Schema to C++ Compiler</p>
|
||||
|
||||
<h1>SYNOPSIS</h1>
|
||||
|
||||
<dl id="synopsis">
|
||||
- <dt><code><b>xsd</b> <i>command</i> [<i>options</i>] <i>file</i> [<i>file</i> ...]</code></dt>
|
||||
- <dt><code><b>xsd help</b> [<i>command</i>]</code></dt>
|
||||
- <dt><code><b>xsd version</b></code></dt>
|
||||
+ <dt><code><b>xsdcxx</b> <i>command</i> [<i>options</i>] <i>file</i> [<i>file</i> ...]</code></dt>
|
||||
+ <dt><code><b>xsdcxx help</b> [<i>command</i>]</code></dt>
|
||||
+ <dt><code><b>xsdcxx version</b></code></dt>
|
||||
</dl>
|
||||
|
||||
<h1>DESCRIPTION</h1>
|
||||
|
||||
- <p><code><b>xsd</b></code> generates vocabulary-specific, statically-typed
|
||||
+ <p><code><b>xsdcxx</b></code> generates vocabulary-specific, statically-typed
|
||||
C++ mapping from W3C XML Schema definitions. Particular mapping to
|
||||
produce is selected by a <code><i>command</i></code>. Each mapping has
|
||||
a number of mapping-specific <code><i>options</i></code> that should
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
<dt><code><b>help</b></code></dt>
|
||||
<dd>Print usage information and exit. Use
|
||||
- <p><code><b>xsd help</b> <i>command</i></code></p>
|
||||
+ <p><code><b>xsdcxx help</b> <i>command</i></code></p>
|
||||
for command-specific help.
|
||||
</dd>
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
|
||||
<p>For example, if you have file <code><b>hello.xsd</b></code> with
|
||||
namespace <code><b>http://example.com/hello</b></code> and you run
|
||||
- <code><b>xsd</b></code> on this file, then the string in question will
|
||||
+ <code><b>xsdcxx</b></code> on this file, then the string in question will
|
||||
be:</p>
|
||||
|
||||
<p><code><b>hello.xsd. http://example.com/hello</b></code></p>
|
||||
@@ -1530,7 +1530,7 @@
|
||||
<h1>DIAGNOSTICS</h1>
|
||||
|
||||
<p>If the input file is not a valid W3C XML Schema definition,
|
||||
- <code><b>xsd</b></code> will issue diagnostic messages to STDERR
|
||||
+ <code><b>xsdcxx</b></code> will issue diagnostic messages to STDERR
|
||||
and exit with non-zero exit code.</p>
|
||||
|
||||
<h1>BUGS</h1>
|
||||
@@ -3,6 +3,7 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
pythonAtLeast,
|
||||
|
||||
# buildInputs
|
||||
@@ -43,6 +44,14 @@ buildPythonPackage rec {
|
||||
hash = "sha256-J4eDm/PcyKK3256l6CAWUj4AWTB6neTKgxbBmul0BPE=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix tests on darwin: https://github.com/huggingface/accelerate/pull/3464
|
||||
(fetchpatch {
|
||||
url = "https://github.com/huggingface/accelerate/commit/8b31a2fe2c6d0246fff9885fb1f8456fb560abc7.patch";
|
||||
hash = "sha256-Ek9Ou4Y/H1jt3qanf2g3HowBoTsN/bn4yV9O3ogcXMo=";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [ llvmPackages.openmp ];
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "anyqt";
|
||||
version = "0.2.0";
|
||||
version = "0.2.1";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ales-erjavec";
|
||||
repo = "anyqt";
|
||||
rev = version;
|
||||
hash = "sha256-dL2EUAMzWKq/oN3rXiEC6emDJddmg4KclT5ONKA0jfk=";
|
||||
hash = "sha256-iDUgu+x9rnpxpHzO7Rf2rJFXsheivrK7HI3FUbomkTU=";
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "banks";
|
||||
version = "2.1.0";
|
||||
version = "2.1.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "masci";
|
||||
repo = "banks";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-RaUDmJfSn8lSBNY/iOPCynRYW2KINgf4K/0O+0niIqk=";
|
||||
hash = "sha256-bDOPWq941UGcRXlUO8CVewjmEDFHJH7OZaRTo1Iqbjw=";
|
||||
};
|
||||
|
||||
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||
|
||||
@@ -74,10 +74,5 @@ buildPythonPackage rec {
|
||||
maintainers = with lib.maintainers; [
|
||||
bachp
|
||||
];
|
||||
badPlatforms = [
|
||||
# `import torch.distributed.tensor` fails on darwin:
|
||||
# ModuleNotFoundError: No module named 'torch._C._distributed_c10d'; 'torch._C' is not a packag
|
||||
lib.systems.inspect.patterns.isDarwin
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
babelfont,
|
||||
kurbopy,
|
||||
fonttools,
|
||||
@@ -9,19 +10,26 @@
|
||||
tqdm,
|
||||
uharfbuzz,
|
||||
unittestCheckHook,
|
||||
pytestCheckHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "collidoscope";
|
||||
version = "0.6.5";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-D7MzJ8FZjA/NSXCqCJQ9a02FPPi3t4W0q65wRIDcfSA=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "googlefonts";
|
||||
repo = "collidoscope";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-1tKbv+i2gbUFJa94xSEj5BrEpZ0+ULgglkYvGMP4NXw=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
build-system = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
babelfont
|
||||
kurbopy
|
||||
fonttools
|
||||
@@ -37,10 +45,12 @@ buildPythonPackage rec {
|
||||
"-v"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
meta = {
|
||||
description = "Python library to detect glyph collisions in fonts";
|
||||
homepage = "https://github.com/googlefonts/collidoscope";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ danc86 ];
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ danc86 ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -43,21 +43,15 @@ buildPythonPackage rec {
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
disabledTests =
|
||||
[
|
||||
# these try to download models from HF Hub
|
||||
"test_get_observer_token_count"
|
||||
"test_kv_cache_quantization"
|
||||
"test_target_prioritization"
|
||||
"test_load_compressed_sharded"
|
||||
"test_save_compressed_model"
|
||||
"test_apply_tinyllama_dynamic_activations"
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# No module named 'torch._C._distributed_c10d'; 'torch._C' is not a package
|
||||
"test_composability"
|
||||
"test_missing_and_unexpected_keys_on_compression"
|
||||
];
|
||||
disabledTests = [
|
||||
# these try to download models from HF Hub
|
||||
"test_get_observer_token_count"
|
||||
"test_kv_cache_quantization"
|
||||
"test_target_prioritization"
|
||||
"test_load_compressed_sharded"
|
||||
"test_save_compressed_model"
|
||||
"test_apply_tinyllama_dynamic_activations"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# these try to download models from HF Hub
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "django";
|
||||
version = "5.1.7";
|
||||
version = "5.1.8";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.10";
|
||||
@@ -53,7 +53,7 @@ buildPythonPackage rec {
|
||||
owner = "django";
|
||||
repo = "django";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-BxhHqWpTZLcx46RofnXzZ5nj4xDPcj7hNng9ppUN5Hw=";
|
||||
hash = "sha256-TZjqB9khEHnkkxYvAC/RzAvOIwdemh0uT4UVdosMq6M=";
|
||||
};
|
||||
|
||||
patches =
|
||||
@@ -72,12 +72,6 @@ buildPythonPackage rec {
|
||||
url = "https://github.com/django/django/commit/12f4f95405c7857cbf2f4bf4d0261154aac31676.patch";
|
||||
hash = "sha256-+K20/V8sh036Ox9U7CSPgfxue7f28Sdhr3MsB7erVOk=";
|
||||
})
|
||||
|
||||
# fix regression which breaks django-import-export
|
||||
# https://github.com/django-import-export/django-import-export/pull/2045
|
||||
# https://github.com/django/django/pull/19233
|
||||
# manual backport because commit doesn't apply on stable cleanly
|
||||
./Restored-single_object-rgument-to-LogEntry-objects-log_actions.diff
|
||||
]
|
||||
++ lib.optionals withGdal [
|
||||
(replaceVars ./django_5_set_geos_gdal_lib.patch {
|
||||
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
diff --git a/django/contrib/admin/models.py b/django/contrib/admin/models.py
|
||||
index 345b8cf341..2ed78d775b 100644
|
||||
--- a/django/contrib/admin/models.py
|
||||
+++ b/django/contrib/admin/models.py
|
||||
@@ -51,7 +51,9 @@ def log_action(
|
||||
change_message=change_message,
|
||||
)
|
||||
|
||||
- def log_actions(self, user_id, queryset, action_flag, change_message=""):
|
||||
+ def log_actions(
|
||||
+ self, user_id, queryset, action_flag, change_message="", *, single_object=False
|
||||
+ ):
|
||||
# RemovedInDjango60Warning.
|
||||
if type(self).log_action != LogEntryManager.log_action:
|
||||
warnings.warn(
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "dllogger";
|
||||
version = "1.0.0";
|
||||
version = "1.1.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.5";
|
||||
@@ -18,7 +18,7 @@ buildPythonPackage rec {
|
||||
owner = "NVIDIA";
|
||||
repo = "dllogger";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-Hpr4yeRl+Dyaz6lRyH/5P6UQT184JEHPqgVlf4qHvOg=";
|
||||
hash = "sha256-kT6FhAl4JZlFPdzKYopAJBurYVMaU5umn/qZADfPjkE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -41,7 +41,7 @@ buildPythonPackage rec {
|
||||
meta = with lib; {
|
||||
description = "Logging tool for deep learning";
|
||||
homepage = "https://github.com/NVIDIA/dllogger";
|
||||
changelog = "https://github.com/NVIDIA/dllogger/releases/tag/v${version}";
|
||||
changelog = "https://github.com/NVIDIA/dllogger/releases/tag/${src.tag}";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ natsukium ];
|
||||
};
|
||||
|
||||
@@ -83,12 +83,6 @@ buildPythonPackage rec {
|
||||
"test_tf_predictor"
|
||||
];
|
||||
|
||||
disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# No module named 'torch._C._distributed_c10d'; 'torch._C' is not a package
|
||||
"tests/test_code_formula_predictor.py"
|
||||
"tests/test_layout_predictor.py"
|
||||
];
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/DS4SD/docling-ibm-models/blob/${src.tag}/CHANGELOG.md";
|
||||
description = "Docling IBM models";
|
||||
|
||||
@@ -164,26 +164,6 @@ buildPythonPackage rec {
|
||||
"test_e2e_valid_csv_conversions"
|
||||
];
|
||||
|
||||
disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# No module named 'torch._C._distributed_c10d'; 'torch._C' is not a package
|
||||
"tests/test_backend_csv.py"
|
||||
"tests/test_backend_html.py"
|
||||
"tests/test_backend_jats.py"
|
||||
"tests/test_backend_msexcel.py"
|
||||
"tests/test_backend_msword.py"
|
||||
"tests/test_backend_pptx.py"
|
||||
"tests/test_cli.py"
|
||||
"tests/test_code_formula.py"
|
||||
"tests/test_document_picture_classifier.py"
|
||||
"tests/test_e2e_conversion.py"
|
||||
"tests/test_e2e_ocr_conversion.py"
|
||||
"tests/test_input_doc.py"
|
||||
"tests/test_interfaces.py"
|
||||
"tests/test_invalid_input.py"
|
||||
"tests/test_legacy_format_transform.py"
|
||||
"tests/test_options.py"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Get your documents ready for gen AI";
|
||||
homepage = "https://github.com/DS4SD/docling";
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "duo-client";
|
||||
version = "5.4.0";
|
||||
version = "5.5.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@@ -22,7 +22,7 @@ buildPythonPackage rec {
|
||||
owner = "duosecurity";
|
||||
repo = "duo_client_python";
|
||||
tag = version;
|
||||
hash = "sha256-CZfB40TMTNhs2sGPVobcs3poSsYJ03qDjVoADlvLi88=";
|
||||
hash = "sha256-5ZPs2099G9oBbDpComNDP3c4B0NjWirBMZY4orO9YfA=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -120,5 +120,6 @@ buildPythonPackage rec {
|
||||
platforms = platforms.linux;
|
||||
hydraPlatforms = [ ];
|
||||
maintainers = with maintainers; [ happysalada ];
|
||||
broken = true; # requires numpy1 which is incompatible with sacrebleu depending on numpy2
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
stdenv,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
|
||||
# build-system
|
||||
setuptools,
|
||||
@@ -29,6 +30,13 @@ buildPythonPackage rec {
|
||||
hash = "sha256-+jt+if9aAbEd2XDMC7RpZmJpm4VUEZMt5xoLOP/esMg=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/speediedan/finetuning-scheduler/commit/78e6e225f353d1ba95db05d7fc6ff541859ed6a2.patch";
|
||||
hash = "sha256-7mbtsaHrnHph8lvuwhBGqxPQimbZcbGeyBYXzApFPn4=";
|
||||
})
|
||||
];
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
@@ -71,9 +79,5 @@ buildPythonPackage rec {
|
||||
changelog = "https://github.com/speediedan/finetuning-scheduler/blob/v${version}/CHANGELOG.md";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ bcdarwin ];
|
||||
badPlatforms = [
|
||||
# "No module named 'torch._C._distributed_c10d'; 'torch._C' is not a package" at import time:
|
||||
lib.systems.inspect.patterns.isDarwin
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "flowmc";
|
||||
version = "0.4.0";
|
||||
version = "0.4.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kazewong";
|
||||
repo = "flowMC";
|
||||
tag = "flowMC-${version}";
|
||||
hash = "sha256-ambi2BMFjWAggeJ3PdlRpdKVmZeePe5LbvuKzCgNV/k=";
|
||||
hash = "sha256-ehmKXR01tT3H564ndjSwUoUuu2KmQCC6RwkB2nsk42E=";
|
||||
};
|
||||
|
||||
build-system = [ hatchling ];
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user