Merge staging-next into staging

This commit is contained in:
nixpkgs-ci[bot]
2025-06-30 12:08:05 +00:00
committed by GitHub
157 changed files with 3198 additions and 6171 deletions
+3 -1
View File
@@ -18,7 +18,9 @@ let
pkgs = import nixpkgs' {
inherit system;
config = { };
config = {
permittedInsecurePackages = [ "nix-2.3.18" ];
};
overlays = [ ];
};
+2
View File
@@ -26,6 +26,8 @@
- `gnome-keyring` no longer ships with an SSH agent anymore because it has been deprecated upstream. You should use `gcr_4` instead, which provides the same features. More information on why this was done can be found on [the relevant GCR upstream PR](https://gitlab.gnome.org/GNOME/gcr/-/merge_requests/67).
- `tooling-language-server` has been renamed to `deputy` (both the package and binary), following the rename of the upstream project.
- `lima` package now only includes the guest agent for the host's architecture by default. If your guest VM's architecture differs from your Lima host's, you'll need to enable the `lima-additional-guestagents` package by setting `withAdditionalGuestAgents = true` when overriding lima with this input.
- `telegram-desktop` packages now uses `Telegram` for its binary. The previous name was `telegram-desktop`. This is due to [an upstream decision](https://github.com/telegramdesktop/tdesktop/commit/56ff5808a3d766f892bc3c3305afb106b629ef6f) to make the name consistent with other platforms.
+10 -3
View File
@@ -2,9 +2,16 @@
# The pkgs used for dependencies for the testing itself
# Don't test properties of pkgs.lib, but rather the lib in the parent directory
system ? builtins.currentSystem,
pkgs ? import ../.. { inherit system; } // {
lib = throw "pkgs.lib accessed, but the lib tests should use nixpkgs' lib path directly!";
},
pkgs ?
import ../.. {
inherit system;
config = {
permittedInsecurePackages = [ "nix-2.3.18" ];
};
}
// {
lib = throw "pkgs.lib accessed, but the lib tests should use nixpkgs' lib path directly!";
},
# For testing someone may edit impure.nix to return cross pkgs, use `pkgsBuildBuild` directly so everything here works.
pkgsBB ? pkgs.pkgsBuildBuild,
nix ? pkgs-nixVersions.stable,
+10 -1
View File
@@ -9314,6 +9314,12 @@
githubId = 1447245;
name = "Robin Gloster";
};
globule655 = {
email = "globule655@gmail.com";
github = "globule655";
githubId = 47015416;
name = "globule655";
};
gm6k = {
email = "nix@quidecco.pl";
name = "Isidor Zeuner";
@@ -22917,7 +22923,10 @@
github = "ShadowRZ";
githubId = 23130178;
name = "";
keys = [ { fingerprint = "3237 D49E 8F81 5A45 2133 64EA 4FF3 5790 F405 53A9"; } ];
keys = [
{ fingerprint = "3237 D49E 8F81 5A45 2133 64EA 4FF3 5790 F405 53A9"; }
{ fingerprint = "AC59 7AD3 89D1 CC56 18AD 1ED9 B712 3A2B 6B0A E434"; }
];
};
shadows_withal = {
email = "shadows@with.al";
+7 -12
View File
@@ -1085,18 +1085,6 @@
"module-services-taskserver-manual-ca-management": [
"index.html#module-services-taskserver-manual-ca-management"
],
"module-services-sourcehut": [
"index.html#module-services-sourcehut"
],
"module-services-sourcehut-basic-usage": [
"index.html#module-services-sourcehut-basic-usage"
],
"module-services-sourcehut-configuration": [
"index.html#module-services-sourcehut-configuration"
],
"module-services-sourcehut-httpd": [
"index.html#module-services-sourcehut-httpd"
],
"module-services-gitlab": [
"index.html#module-services-gitlab"
],
@@ -2049,6 +2037,13 @@
"sec-release-25.11-incompatibilities": [
"release-notes.html#sec-release-25.11-incompatibilities"
],
"sec-release-25.11-incompatibilities-sourcehut-removed": [
"release-notes.html#sec-release-25.11-incompatibilities-sourcehut-removed",
"index.html#module-services-sourcehut",
"index.html#module-services-sourcehut-basic-usage",
"index.html#module-services-sourcehut-configuration",
"index.html#module-services-sourcehut-httpd"
],
"sec-release-25.11-notable-changes": [
"release-notes.html#sec-release-25.11-notable-changes"
],
@@ -88,6 +88,8 @@ Alongside many enhancements to NixOS modules and general system improvements, th
- [Readeck](https://readeck.org/), a read-it later web-application. Available as [services.readeck](#opt-services.readeck.enable).
- [EasyTier](https://github.com/EasyTier/EasyTier), a decentralized VPN solution. Available as [services.easytier](#opt-services.easytier.enable).
- [Traccar](https://www.traccar.org/), a modern GPS Tracking Platform. Available as [services.traccar](#opt-services.traccar.enable).
- [Schroot](https://codeberg.org/shelter/reschroot), a lightweight virtualisation tool. Securely enter a chroot and run a command or login shell. Available as [programs.schroot](#opt-programs.schroot.enable).
@@ -64,6 +64,8 @@
- The Pocket ID module ([`services.pocket-id`][#opt-services.pocket-id.enable]) and package (`pocket-id`) has been updated to 1.0.0. Some environment variables have been changed or removed, see the [migration guide](https://pocket-id.org/docs/setup/migrate-to-v1/).
- []{#sec-release-25.11-incompatibilities-sourcehut-removed} The `services.sourcehut` module and corresponding `sourcehut` packages were removed due to being broken and unmaintained.
- The `yeahwm` package and `services.xserver.windowManager.yeahwm` module were removed due to the package being broken and unmaintained upstream.
- The `services.postgresql` module now sets up a systemd unit `postgresql.target`. Depending on `postgresql.target` guarantees that postgres is in read-write mode and initial/ensure scripts were executed. Depending on `postgresql.service` only guarantees a read-only connection.
+1 -1
View File
@@ -915,7 +915,6 @@
./services/misc/sickbeard.nix
./services/misc/snapper.nix
./services/misc/soft-serve.nix
./services/misc/sourcehut
./services/misc/spice-autorandr.nix
./services/misc/spice-vdagentd.nix
./services/misc/spice-webdavd.nix
@@ -1116,6 +1115,7 @@
./services/networking/dnsproxy.nix
./services/networking/doh-proxy-rust.nix
./services/networking/doh-server.nix
./services/networking/easytier.nix
./services/networking/ejabberd.nix
./services/networking/envoy.nix
./services/networking/epmd.nix
+3
View File
@@ -236,6 +236,9 @@ in
the program being unmaintained. The options `programs.msmtp.*` can be
used instead.
'')
(mkRemovedOptionModule [ "services" "sourcehut" ] ''
The sourcehut packages and the corresponding module have been removed due to being broken and unmaintained.
'')
(mkRemovedOptionModule [ "services" "tvheadend" ]
"The tvheadend package and the corresponding module have been removed as nobody was willing to maintain them and they were stuck on an unmaintained version that required FFmpeg 4; please see https://github.com/NixOS/nixpkgs/pull/332259 if you are interested in maintaining a newer version."
)
+43 -1
View File
@@ -6,6 +6,12 @@
}:
let
cfg = config.services.duplicati;
parametersFile =
if cfg.parametersFile != null then
cfg.parametersFile
else
pkgs.writeText "duplicati-parameters" cfg.parameters;
in
{
options = {
@@ -53,12 +59,48 @@ in
Run as root with special care.
'';
};
parameters = lib.mkOption {
default = "";
type = lib.types.lines;
example = ''
--webservice-allowedhostnames=*
'';
description = ''
This option can be used to store some or all of the options given to the
commandline client.
Each line in this option should be of the format --option=value.
The options in this file take precedence over the options provided
through command line arguments.
<link xlink:href="https://duplicati.readthedocs.io/en/latest/06-advanced-options/#parameters-file">Duplicati docs: parameters-file</link>
'';
};
parametersFile = lib.mkOption {
default = null;
type = lib.types.nullOr lib.types.path;
description = ''
This file can be used to store some or all of the options given to the
commandline client.
Each line in the file option should be of the format --option=value.
The options in this file take precedence over the options provided
through command line arguments.
<link xlink:href="https://duplicati.readthedocs.io/en/latest/06-advanced-options/#parameters-file">Duplicati docs: parameters-file</link>
'';
};
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
assertions = [
{
assertion = !(cfg.parametersFile != null && cfg.parameters != "");
message = "cannot set both services.duplicati.parameters and services.duplicati.parametersFile at the same time";
}
];
systemd.services.duplicati = {
description = "Duplicati backup";
after = [ "network.target" ];
@@ -67,7 +109,7 @@ in
{
User = cfg.user;
Group = "duplicati";
ExecStart = "${cfg.package}/bin/duplicati-server --webservice-interface=${cfg.interface} --webservice-port=${toString cfg.port} --server-datafolder=${cfg.dataDir}";
ExecStart = "${cfg.package}/bin/duplicati-server --webservice-interface=${cfg.interface} --webservice-port=${toString cfg.port} --server-datafolder=${cfg.dataDir} --parameters-file=${parametersFile}";
Restart = "on-failure";
}
(lib.mkIf (cfg.dataDir == "/var/lib/duplicati") {
@@ -1,93 +0,0 @@
# Sourcehut {#module-services-sourcehut}
[Sourcehut](https://sr.ht.com/) is an open-source,
self-hostable software development platform. The server setup can be automated using
[services.sourcehut](#opt-services.sourcehut.enable).
## Basic usage {#module-services-sourcehut-basic-usage}
Sourcehut is a Python and Go based set of applications.
This NixOS module also provides basic configuration integrating Sourcehut into locally running
`services.nginx`, `services.redis.servers.sourcehut`, `services.postfix`
and `services.postgresql` services.
A very basic configuration may look like this:
```nix
{ pkgs, ... }:
let
fqdn =
let
join = hostName: domain: hostName + optionalString (domain != null) ".${domain}";
in join config.networking.hostName config.networking.domain;
in {
networking = {
hostName = "srht";
domain = "tld";
firewall.allowedTCPPorts = [ 22 80 443 ];
};
services.sourcehut = {
enable = true;
git.enable = true;
man.enable = true;
meta.enable = true;
nginx.enable = true;
postfix.enable = true;
postgresql.enable = true;
redis.enable = true;
settings = {
"sr.ht" = {
environment = "production";
global-domain = fqdn;
origin = "https://${fqdn}";
# Produce keys with srht-keygen from sourcehut.coresrht.
network-key = "/run/keys/path/to/network-key";
service-key = "/run/keys/path/to/service-key";
};
webhooks.private-key= "/run/keys/path/to/webhook-key";
};
};
security.acme.certs."${fqdn}".extraDomainNames = [
"meta.${fqdn}"
"man.${fqdn}"
"git.${fqdn}"
];
services.nginx = {
enable = true;
# only recommendedProxySettings are strictly required, but the rest make sense as well.
recommendedTlsSettings = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;
# Settings to setup what certificates are used for which endpoint.
virtualHosts = {
"${fqdn}".enableACME = true;
"meta.${fqdn}".useACMEHost = fqdn;
"man.${fqdn}".useACMEHost = fqdn;
"git.${fqdn}".useACMEHost = fqdn;
};
};
}
```
The `hostName` option is used internally to configure the nginx
reverse-proxy. The `settings` attribute set is
used by the configuration generator and the result is placed in `/etc/sr.ht/config.ini`.
## Configuration {#module-services-sourcehut-configuration}
All configuration parameters are also stored in
`/etc/sr.ht/config.ini` which is generated by
the module and linked from the store to ensure that all values from `config.ini`
can be modified by the module.
## Using an alternative webserver as reverse-proxy (e.g. `httpd`) {#module-services-sourcehut-httpd}
By default, `nginx` is used as reverse-proxy for `sourcehut`.
However, it's possible to use e.g. `httpd` by explicitly disabling
`nginx` using [](#opt-services.nginx.enable) and fixing the
`settings`.
File diff suppressed because it is too large Load Diff
@@ -1,499 +0,0 @@
srv:
{
configIniOfService,
pkgname ? "${srv}srht", # Because "buildsrht" does not follow that pattern (missing an "s").
srvsrht ? "${srv}.sr.ht",
iniKey ? "${srv}.sr.ht",
webhooks ? false,
extraTimers ? { },
mainService ? { },
extraServices ? { },
extraConfig ? { },
port,
}:
{
config,
lib,
pkgs,
...
}:
let
inherit (lib) types;
inherit (lib.attrsets) mapAttrs optionalAttrs;
inherit (lib.lists) optional;
inherit (lib.modules)
mkBefore
mkDefault
mkForce
mkIf
mkMerge
;
inherit (lib.options) mkEnableOption mkOption mkPackageOption;
inherit (lib.strings) concatStringsSep hasSuffix optionalString;
inherit (config.services) postgresql;
redis = config.services.redis.servers."sourcehut-${srvsrht}";
inherit (config.users) users;
cfg = config.services.sourcehut;
configIni = configIniOfService srv;
srvCfg = cfg.${srv};
baseService =
serviceName:
{
allowStripe ? false,
}:
extraService:
let
runDir = "/run/sourcehut/${serviceName}";
rootDir = "/run/sourcehut/chroots/${serviceName}";
in
mkMerge [
extraService
{
after =
[ "network.target" ]
++ optional cfg.postgresql.enable "postgresql.target"
++ optional cfg.redis.enable "redis-sourcehut-${srvsrht}.service";
requires =
optional cfg.postgresql.enable "postgresql.target"
++ optional cfg.redis.enable "redis-sourcehut-${srvsrht}.service";
path = [ pkgs.gawk ];
environment.HOME = runDir;
serviceConfig = {
User = mkDefault srvCfg.user;
Group = mkDefault srvCfg.group;
RuntimeDirectory = [
"sourcehut/${serviceName}"
# Used by *srht-keys which reads ../config.ini
"sourcehut/${serviceName}/subdir"
"sourcehut/chroots/${serviceName}"
];
RuntimeDirectoryMode = "2750";
# No need for the chroot path once inside the chroot
InaccessiblePaths = [ "-+${rootDir}" ];
# g+rx is for group members (eg. fcgiwrap or nginx)
# to read Git/Mercurial repositories, buildlogs, etc.
# o+x is for intermediate directories created by BindPaths= and like,
# as they're owned by root:root.
UMask = "0026";
RootDirectory = rootDir;
RootDirectoryStartOnly = true;
PrivateTmp = true;
MountAPIVFS = true;
# config.ini is looked up in there, before /etc/srht/config.ini
# Note that it fails to be set in ExecStartPre=
WorkingDirectory = mkDefault ("-" + runDir);
BindReadOnlyPaths =
[
builtins.storeDir
"/etc"
"/run/booted-system"
"/run/current-system"
"/run/systemd"
]
++ optional cfg.postgresql.enable "/run/postgresql"
++ optional cfg.redis.enable "/run/redis-sourcehut-${srvsrht}";
# LoadCredential= are unfortunately not available in ExecStartPre=
# Hence this one is run as root (the +) with RootDirectoryStartOnly=
# to reach credentials wherever they are.
# Note that each systemd service gets its own ${runDir}/config.ini file.
ExecStartPre = mkBefore [
(
"+"
+ pkgs.writeShellScript "${serviceName}-credentials" ''
set -x
# Replace values beginning with a '<' by the content of the file whose name is after.
gawk '{ if (match($0,/^([^=]+=)<(.+)/,m)) { getline f < m[2]; print m[1] f } else print $0 }' ${configIni} |
${optionalString (!allowStripe) "gawk '!/^stripe-secret-key=/' |"}
install -o ${srvCfg.user} -g root -m 400 /dev/stdin ${runDir}/config.ini
''
)
];
# The following options are only for optimizing:
# systemd-analyze security
AmbientCapabilities = "";
CapabilityBoundingSet = "";
# ProtectClock= adds DeviceAllow=char-rtc r
DeviceAllow = "";
LockPersonality = true;
MemoryDenyWriteExecute = true;
NoNewPrivileges = true;
PrivateDevices = true;
PrivateMounts = true;
PrivateNetwork = mkDefault false;
PrivateUsers = true;
ProcSubset = "pid";
ProtectClock = true;
ProtectControlGroups = true;
ProtectHome = true;
ProtectHostname = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectProc = "invisible";
ProtectSystem = "strict";
RemoveIPC = true;
RestrictAddressFamilies = [
"AF_UNIX"
"AF_INET"
"AF_INET6"
];
RestrictNamespaces = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
#SocketBindAllow = [ "tcp:${toString srvCfg.port}" "tcp:${toString srvCfg.prometheusPort}" ];
#SocketBindDeny = "any";
SystemCallFilter = [
"@system-service"
"~@aio"
"~@keyring"
"~@memlock"
"~@privileged"
"~@timer"
"@chown"
"@setuid"
];
SystemCallArchitectures = "native";
};
}
];
in
{
options.services.sourcehut.${srv} =
{
enable = mkEnableOption "${srv} service";
package = mkPackageOption pkgs [ "sourcehut" pkgname ] { };
user = mkOption {
type = types.str;
default = srvsrht;
description = ''
User for ${srv}.sr.ht.
'';
};
group = mkOption {
type = types.str;
default = srvsrht;
description = ''
Group for ${srv}.sr.ht.
Membership grants access to the Git/Mercurial repositories by default,
but not to the config.ini file (where secrets are).
'';
};
port = mkOption {
type = types.port;
default = port;
description = ''
Port on which the "${srv}" backend should listen.
'';
};
redis = {
host = mkOption {
type = types.str;
default = "unix:///run/redis-sourcehut-${srvsrht}/redis.sock?db=0";
example = "redis://shared.wireguard:6379/0";
description = ''
The redis host URL. This is used for caching and temporary storage, and must
be shared between nodes (e.g. git1.sr.ht and git2.sr.ht), but need not be
shared between services. It may be shared between services, however, with no
ill effect, if this better suits your infrastructure.
'';
};
};
postgresql = {
database = mkOption {
type = types.str;
default = "${srv}.sr.ht";
description = ''
PostgreSQL database name for the ${srv}.sr.ht service,
used if [](#opt-services.sourcehut.postgresql.enable) is `true`.
'';
};
};
gunicorn = {
extraArgs = mkOption {
type = with types; listOf str;
default = [
"--timeout 120"
"--workers 1"
"--log-level=info"
];
description = "Extra arguments passed to Gunicorn.";
};
};
}
// optionalAttrs webhooks {
webhooks = {
extraArgs = mkOption {
type = with types; listOf str;
default = [
"--loglevel DEBUG"
"--pool eventlet"
"--without-heartbeat"
];
description = "Extra arguments passed to the Celery responsible for webhooks.";
};
celeryConfig = mkOption {
type = types.lines;
default = "";
description = "Content of the `celeryconfig.py` used by the Celery responsible for webhooks.";
};
};
};
config = lib.mkIf (cfg.enable && srvCfg.enable) (mkMerge [
extraConfig
{
users = {
users = {
"${srvCfg.user}" = {
isSystemUser = true;
group = mkDefault srvCfg.group;
description = mkDefault "sourcehut user for ${srv}.sr.ht";
};
};
groups =
{
"${srvCfg.group}" = { };
}
//
optionalAttrs
(cfg.postgresql.enable && hasSuffix "0" (postgresql.settings.unix_socket_permissions or ""))
{
"postgres".members = [ srvCfg.user ];
}
// optionalAttrs (cfg.redis.enable && hasSuffix "0" (redis.settings.unixsocketperm or "")) {
"redis-sourcehut-${srvsrht}".members = [ srvCfg.user ];
};
};
services.nginx = mkIf cfg.nginx.enable {
virtualHosts."${srv}.${cfg.settings."sr.ht".global-domain}" = mkMerge [
{
forceSSL = mkDefault true;
locations."/".proxyPass = "http://${cfg.listenAddress}:${toString srvCfg.port}";
locations."/static" = {
root = "${srvCfg.package}/${pkgs.sourcehut.python.sitePackages}/${srvsrht}";
extraConfig = mkDefault ''
expires 30d;
'';
};
locations."/query" = mkIf (cfg.settings.${iniKey} ? api-origin) {
proxyPass = cfg.settings.${iniKey}.api-origin;
extraConfig = ''
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain; charset=utf-8';
add_header 'Content-Length' 0;
return 204;
}
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
'';
};
}
cfg.nginx.virtualHost
];
};
services.postgresql = mkIf cfg.postgresql.enable {
authentication = ''
local ${srvCfg.postgresql.database} ${srvCfg.user} trust
'';
ensureDatabases = [ srvCfg.postgresql.database ];
ensureUsers = map (name: {
inherit name;
# We don't use it because we have a special default database name with dots.
# TODO(for maintainers of sourcehut): migrate away from custom preStart script.
ensureDBOwnership = false;
}) [ srvCfg.user ];
};
services.sourcehut.settings = mkMerge [
{
"${srv}.sr.ht".origin = mkDefault "https://${srv}.${cfg.settings."sr.ht".global-domain}";
}
(mkIf cfg.postgresql.enable {
"${srv}.sr.ht".connection-string =
mkDefault "postgresql:///${srvCfg.postgresql.database}?user=${srvCfg.user}&host=/run/postgresql";
})
];
services.redis.servers."sourcehut-${srvsrht}" = mkIf cfg.redis.enable {
enable = true;
databases = 3;
syslog = true;
# TODO: set a more informed value
save = mkDefault [
[
1800
10
]
[
300
100
]
];
settings = {
# TODO: set a more informed value
maxmemory = "128MB";
maxmemory-policy = "volatile-ttl";
};
};
systemd.services = mkMerge [
{
"${srvsrht}" = baseService srvsrht { allowStripe = srv == "meta"; } (mkMerge [
{
description = "sourcehut ${srv}.sr.ht website service";
before = optional cfg.nginx.enable "nginx.service";
wants = optional cfg.nginx.enable "nginx.service";
wantedBy = [ "multi-user.target" ];
path = optional cfg.postgresql.enable postgresql.package;
# Beware: change in credentials' content will not trigger restart.
restartTriggers = [ configIni ];
serviceConfig = {
Type = "simple";
Restart = mkDefault "always";
#RestartSec = mkDefault "2min";
StateDirectory = [ "sourcehut/${srvsrht}" ];
StateDirectoryMode = "2750";
ExecStart =
"${cfg.python}/bin/gunicorn ${pkgname}.app:app --name ${srvsrht} --bind ${cfg.listenAddress}:${toString srvCfg.port} "
+ concatStringsSep " " srvCfg.gunicorn.extraArgs;
};
preStart =
let
package = srvCfg.package;
version = package.version;
stateDir = "/var/lib/sourcehut/${srvsrht}";
in
mkBefore ''
set -x
# Use the /run/sourcehut/${srvsrht}/config.ini
# installed by a previous ExecStartPre= in baseService
cd /run/sourcehut/${srvsrht}
if test ! -e ${stateDir}/db; then
# Setup the initial database.
# Note that it stamps the alembic head afterward
${postgresql.package}/bin/psql -d ${srvsrht} -f ${package}/share/sourcehut/${srvsrht}-schema.sql
echo ${version} >${stateDir}/db
fi
${optionalString cfg.settings.${iniKey}.migrate-on-upgrade ''
if [ "$(cat ${stateDir}/db)" != "${version}" ]; then
# Manage schema migrations using alembic
${package}/bin/${srvsrht}-migrate -a upgrade head
echo ${version} >${stateDir}/db
fi
''}
# Update copy of each users' profile to the latest
# See https://lists.sr.ht/~sircmpwn/sr.ht-admins/<20190302181207.GA13778%40cirno.my.domain>
if test ! -e ${stateDir}/webhook; then
# Update ${iniKey}'s users' profile copy to the latest
${cfg.python}/bin/sr.ht-update-profiles ${iniKey}
touch ${stateDir}/webhook
fi
'';
}
mainService
]);
}
(mkIf webhooks {
"${srvsrht}-webhooks" = baseService "${srvsrht}-webhooks" { } {
description = "sourcehut ${srv}.sr.ht webhooks service";
after = [ "${srvsrht}.service" ];
wantedBy = [ "${srvsrht}.service" ];
partOf = [ "${srvsrht}.service" ];
preStart = ''
cp ${pkgs.writeText "${srvsrht}-webhooks-celeryconfig.py" srvCfg.webhooks.celeryConfig} \
/run/sourcehut/${srvsrht}-webhooks/celeryconfig.py
'';
serviceConfig = {
Type = "simple";
Restart = "always";
ExecStart =
"${cfg.python}/bin/celery --app ${pkgname}.webhooks worker --hostname ${srvsrht}-webhooks@%%h "
+ concatStringsSep " " srvCfg.webhooks.extraArgs;
# Avoid crashing: os.getloadavg()
ProcSubset = mkForce "all";
};
};
})
(mapAttrs (
timerName: timer:
(baseService timerName { } (mkMerge [
{
description = "sourcehut ${timerName} service";
after = [
"network.target"
"${srvsrht}.service"
];
serviceConfig = {
Type = "oneshot";
ExecStart = "${srvCfg.package}/bin/${timerName}";
};
}
(timer.service or { })
]))
) extraTimers)
(mapAttrs (
serviceName: extraService:
baseService serviceName { } (mkMerge [
{
description = "sourcehut ${serviceName} service";
# So that extraServices have the PostgreSQL database initialized.
after = [ "${srvsrht}.service" ];
wantedBy = [ "${srvsrht}.service" ];
partOf = [ "${srvsrht}.service" ];
serviceConfig = {
Type = "simple";
Restart = mkDefault "always";
};
}
extraService
])
) extraServices)
# Work around 'pq: permission denied for schema public' with postgres v15.
# See https://github.com/NixOS/nixpkgs/issues/216989
# Workaround taken from nixos/forgejo: https://github.com/NixOS/nixpkgs/pull/262741
# TODO(to maintainers of sourcehut): please migrate away from this workaround
# by migrating away from database name defaults with dots.
(lib.mkIf
(
cfg.postgresql.enable
&& lib.strings.versionAtLeast config.services.postgresql.package.version "15.0"
)
{
postgresql-setup.postStart = ''
psql -tAc 'ALTER DATABASE "${srvCfg.postgresql.database}" OWNER TO "${srvCfg.user}";'
'';
}
)
];
systemd.timers = mapAttrs (timerName: timer: {
description = "sourcehut timer for ${timerName}";
wantedBy = [ "timers.target" ];
inherit (timer) timerConfig;
}) extraTimers;
}
]);
}
@@ -58,6 +58,7 @@ in
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
serviceConfig = {
ExecStart = ''
@@ -62,6 +62,14 @@ in
Whether or not the remote IP of a WireGuard peer should be exposed via prometheus.
'';
};
latestHandshakeDelay = mkOption {
type = types.bool;
default = false;
description = ''
Adds the `wireguard_latest_handshake_delay_seconds` metric that automatically calculates the seconds passed since the last handshake.
'';
};
};
serviceOpts = {
path = [ pkgs.wireguard-tools ];
@@ -76,6 +84,7 @@ in
${optionalString cfg.verbose "-v true"} \
${optionalString cfg.singleSubnetPerField "-s true"} \
${optionalString cfg.withRemoteIp "-r true"} \
${optionalString cfg.latestHandshakeDelay "-d true"} \
${optionalString (cfg.wireguardConfig != null) "-n ${escapeShellArg cfg.wireguardConfig}"}
'';
RestrictAddressFamilies = [
@@ -0,0 +1,292 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.services.easytier;
settingsFormat = pkgs.formats.toml { };
genFinalSettings =
inst:
attrsets.filterAttrsRecursive (_: v: v != { }) (
attrsets.filterAttrsRecursive (_: v: v != null) (
{
inherit (inst.settings)
instance_name
hostname
ipv4
dhcp
listeners
;
network_identity = {
inherit (inst.settings) network_name network_secret;
};
peer = map (p: { uri = p; }) inst.settings.peers;
}
// inst.extraSettings
)
);
genConfigFile =
name: inst:
if inst.configFile == null then
settingsFormat.generate "easytier-${name}.toml" (genFinalSettings inst)
else
inst.configFile;
activeInsts = filterAttrs (_: inst: inst.enable) cfg.instances;
settingsModule = name: {
options = {
instance_name = mkOption {
type = types.str;
default = name;
description = "Identify different instances on same host";
};
hostname = mkOption {
type = with types; nullOr str;
default = null;
description = "Hostname shown in peer list and web console.";
};
network_name = mkOption {
type = with types; nullOr str;
default = null;
description = "EasyTier network name.";
};
network_secret = mkOption {
type = with types; nullOr str;
default = null;
description = ''
EasyTier network credential used for verification and
encryption. It can also be set in environmentFile.
'';
};
ipv4 = mkOption {
type = with types; nullOr str;
default = null;
description = ''
IPv4 cidr address of this peer in the virtual network. If
empty, this peer will only forward packets and no TUN device
will be created.
'';
example = "10.144.144.1/24";
};
dhcp = mkOption {
type = types.bool;
default = false;
description = ''
Automatically determine the IPv4 address of this peer based on
existing peers on network.
'';
};
listeners = mkOption {
type = with types; listOf str;
default = [
"tcp://0.0.0.0:11010"
"udp://0.0.0.0:11010"
];
description = ''
Listener addresses to accept connections from other peers.
Valid format is: `<proto>://<addr>:<port>`, where the protocol
can be `tcp`, `udp`, `ring`, `wg`, `ws`, `wss`.
'';
};
peers = mkOption {
type = with types; listOf str;
default = [ ];
description = ''
Peers to connect initially. Valid format is: `<proto>://<addr>:<port>`.
'';
example = [
"tcp://example.com:11010"
];
};
};
};
instanceModule =
{ name, ... }:
{
options = {
enable = mkOption {
type = types.bool;
default = true;
description = "Enable the instance.";
};
configServer = mkOption {
type = with types; nullOr str;
default = null;
description = ''
Configure the instance from config server. When this option
set, any other settings for configuring the instance manually
except `hostname` will be ignored. Valid formats are:
- full uri for custom server: `udp://example.com:22020/<token>`
- username only for official server: `<token>`
'';
example = "udp://example.com:22020/myusername";
};
configFile = mkOption {
type = with types; nullOr path;
default = null;
description = ''
Path to easytier config file. Setting this option will
override `settings` and `extraSettings` of this instance.
'';
};
environmentFiles = mkOption {
type = with types; listOf path;
default = [ ];
description = ''
Environment files for this instance. All command-line args
have corresponding environment variables.
'';
example = literalExpression ''
[
/path/to/.env
/path/to/.env.secret
]
'';
};
settings = mkOption {
type = types.submodule (settingsModule name);
default = { };
description = ''
Settings to generate {file}`easytier-${name}.toml`
'';
};
extraSettings = mkOption {
type = settingsFormat.type;
default = { };
description = ''
Extra settings to add to {file}`easytier-${name}.toml`.
'';
};
extraArgs = mkOption {
type = with types; listOf str;
default = [ ];
description = ''
Extra args append to the easytier command-line.
'';
};
};
};
in
{
options.services.easytier = {
enable = mkEnableOption "EasyTier daemon";
package = mkPackageOption pkgs "easytier" { };
allowSystemForward = mkEnableOption ''
Allow the system to forward packets from easytier. Useful when
`proxy_forward_by_system` enabled.
'';
instances = mkOption {
description = ''
EasyTier instances.
'';
type = types.attrsOf (types.submodule instanceModule);
default = { };
example = {
settings = {
network_name = "easytier";
network_secret = "easytier";
ipv4 = "10.144.144.1/24";
peers = [
"tcp://public.easytier.cn:11010"
"wss://example.com:443"
];
};
extraSettings = {
flags.dev_name = "tun1";
};
};
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
systemd.services = mapAttrs' (
name: inst:
let
configFile = genConfigFile name inst;
in
nameValuePair "easytier-${name}" {
description = "EasyTier Daemon - ${name}";
wants = [
"network-online.target"
"nss-lookup.target"
];
after = [
"network-online.target"
"nss-lookup.target"
];
wantedBy = [ "multi-user.target" ];
path = with pkgs; [
cfg.package
iproute2
bash
];
restartTriggers = inst.environmentFiles ++ (optionals (inst.configServer == null) [ configFile ]);
serviceConfig = {
Type = "simple";
Restart = "on-failure";
EnvironmentFile = inst.environmentFiles;
StateDirectory = "easytier/easytier-${name}";
StateDirectoryMode = "0700";
WorkingDirectory = "/var/lib/easytier/easytier-${name}";
ExecStart = escapeShellArgs (
[
"${cfg.package}/bin/easytier-core"
]
++ optionals (inst.configServer != null) (
[
"-w"
"${inst.configServer}"
]
++ (optionals (inst.settings.hostname != null) [
"--hostname"
"${inst.settings.hostname}"
])
)
++ optionals (inst.configServer == null) [
"-c"
"${configFile}"
]
++ inst.extraArgs
);
};
}
) activeInsts;
boot.kernel.sysctl = mkIf cfg.allowSystemForward {
"net.ipv4.conf.all.forwarding" = mkOverride 97 true;
"net.ipv6.conf.all.forwarding" = mkOverride 97 true;
};
};
meta.maintainers = with maintainers; [
ltrump
];
}
+1 -1
View File
@@ -433,6 +433,7 @@ in
fscrypt = runTest ./fscrypt.nix;
fastnetmon-advanced = runTest ./fastnetmon-advanced.nix;
lauti = runTest ./lauti.nix;
easytier = handleTest ./easytier.nix { };
ejabberd = runTest ./xmpp/ejabberd.nix;
elk = handleTestOn [ "x86_64-linux" ] ./elk.nix { };
emacs-daemon = runTest ./emacs-daemon.nix;
@@ -1272,7 +1273,6 @@ in
solanum = runTest ./solanum.nix;
sonarr = runTest ./sonarr.nix;
sonic-server = runTest ./sonic-server.nix;
sourcehut = handleTest ./sourcehut { };
spacecookie = runTest ./spacecookie.nix;
spark = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./spark { };
spiped = runTest ./spiped.nix;
+121
View File
@@ -0,0 +1,121 @@
import ./make-test-python.nix (
{ lib, ... }:
{
name = "easytier";
meta.maintainers = with lib.maintainers; [ ltrump ];
nodes =
let
genPeer =
hostConfig: settings:
lib.mkMerge [
{
services.easytier = {
enable = true;
instances.default = {
settings = {
network_name = "easytier_test";
network_secret = "easytier_test_secret";
} // settings;
};
};
networking.useDHCP = false;
networking.firewall.allowedTCPPorts = [
11010
11011
];
networking.firewall.allowedUDPPorts = [
11010
11011
];
}
hostConfig
];
in
{
relay =
genPeer
{
virtualisation.vlans = [
1
2
];
networking.interfaces.eth1.ipv4.addresses = [
{
address = "192.168.1.11";
prefixLength = 24;
}
];
networking.interfaces.eth2.ipv4.addresses = [
{
address = "192.168.2.11";
prefixLength = 24;
}
];
}
{
ipv4 = "10.144.144.1";
listeners = [
"tcp://0.0.0.0:11010"
"wss://0.0.0.0:11011"
];
};
peer1 =
genPeer
{
virtualisation.vlans = [ 1 ];
}
{
ipv4 = "10.144.144.2";
peers = [ "tcp://192.168.1.11:11010" ];
};
peer2 =
genPeer
{
virtualisation.vlans = [ 2 ];
}
{
ipv4 = "10.144.144.3";
peers = [ "wss://192.168.2.11:11011" ];
};
};
testScript = ''
start_all()
relay.wait_for_unit("easytier-default.service")
peer1.wait_for_unit("easytier-default.service")
peer2.wait_for_unit("easytier-default.service")
# relay is accessible by the other hosts
peer1.succeed("ping -c5 192.168.1.11")
peer2.succeed("ping -c5 192.168.2.11")
# The other hosts are in separate vlans
peer1.fail("ping -c5 192.168.2.11")
peer2.fail("ping -c5 192.168.1.11")
# Each host can ping themselves through EasyTier
relay.succeed("ping -c5 10.144.144.1")
peer1.succeed("ping -c5 10.144.144.2")
peer2.succeed("ping -c5 10.144.144.3")
# Relay is accessible by the other hosts through EasyTier
peer1.succeed("ping -c5 10.144.144.1")
peer2.succeed("ping -c5 10.144.144.1")
# Relay can access the other hosts through EasyTier
relay.succeed("ping -c5 10.144.144.2")
relay.succeed("ping -c5 10.144.144.3")
# The other hosts in separate vlans can access each other through EasyTier
peer1.succeed("ping -c5 10.144.144.3")
peer2.succeed("ping -c5 10.144.144.2")
'';
}
)
-66
View File
@@ -1,66 +0,0 @@
import ../make-test-python.nix (
{ pkgs, lib, ... }:
let
domain = "sourcehut.localdomain";
in
{
name = "sourcehut";
meta.maintainers = with pkgs.lib.maintainers; [
tomberek
nessdoor
];
nodes.machine =
{
config,
pkgs,
nodes,
...
}:
{
imports = [
./nodes/common.nix
];
networking.domain = domain;
networking.extraHosts = ''
${config.networking.primaryIPAddress} builds.${domain}
${config.networking.primaryIPAddress} meta.${domain}
'';
services.sourcehut = {
builds = {
enable = true;
# FIXME: see why it does not seem to activate fully.
#enableWorker = true;
images = { };
};
settings."builds.sr.ht" = {
oauth-client-secret = pkgs.writeText "buildsrht-oauth-client-secret" "2260e9c4d9b8dcedcef642860e0504bc";
oauth-client-id = "299db9f9c2013170";
};
};
};
testScript = ''
start_all()
machine.wait_for_unit("multi-user.target")
with subtest("Check whether meta comes up"):
machine.wait_for_unit("meta.sr.ht-api.service")
machine.wait_for_unit("meta.sr.ht.service")
machine.wait_for_unit("meta.sr.ht-webhooks.service")
machine.wait_for_open_port(5000)
machine.succeed("curl -sL http://localhost:5000 | grep meta.${domain}")
machine.succeed("curl -sL http://meta.${domain} | grep meta.${domain}")
with subtest("Check whether builds comes up"):
machine.wait_for_unit("builds.sr.ht.service")
machine.wait_for_open_port(5002)
machine.succeed("curl -sL http://localhost:5002 | grep builds.${domain}")
#machine.wait_for_unit("buildsrht-worker.service")
'';
}
)
-6
View File
@@ -1,6 +0,0 @@
{ system, pkgs, ... }:
{
git = import ./git.nix { inherit system pkgs; };
builds = import ./builds.nix { inherit system pkgs; };
}
-109
View File
@@ -1,109 +0,0 @@
import ../make-test-python.nix (
{ pkgs, lib, ... }:
let
domain = "sourcehut.localdomain";
in
{
name = "sourcehut";
meta.maintainers = with pkgs.lib.maintainers; [
tomberek
nessdoor
];
nodes.machine =
{
config,
pkgs,
nodes,
...
}:
{
imports = [
./nodes/common.nix
];
networking.domain = domain;
networking.extraHosts = ''
${config.networking.primaryIPAddress} git.${domain}
${config.networking.primaryIPAddress} meta.${domain}
'';
services.sourcehut = {
git.enable = true;
settings."git.sr.ht" = {
oauth-client-secret = pkgs.writeText "gitsrht-oauth-client-secret" "3597288dc2c716e567db5384f493b09d";
oauth-client-id = "d07cb713d920702e";
};
};
environment.systemPackages = with pkgs; [
git
];
};
testScript =
let
userName = "nixos-test";
userPass = "AutoNixosTestPwd";
hutConfig = pkgs.writeText "hut-config" ''
instance "${domain}" {
# Will be replaced at runtime with the generated token
access-token "OAUTH-TOKEN"
}
'';
sshConfig = pkgs.writeText "ssh-config" ''
Host git.${domain}
IdentityFile = ~/.ssh/id_rsa
'';
in
''
start_all()
machine.wait_for_unit("multi-user.target")
machine.wait_for_unit("sshd.service")
with subtest("Check whether meta comes up"):
machine.wait_for_unit("meta.sr.ht-api.service")
machine.wait_for_unit("meta.sr.ht.service")
machine.wait_for_unit("meta.sr.ht-webhooks.service")
machine.wait_for_open_port(5000)
machine.succeed("curl -sL http://localhost:5000 | grep meta.${domain}")
machine.succeed("curl -sL http://meta.${domain} | grep meta.${domain}")
with subtest("Create a new user account and OAuth access key"):
machine.succeed("echo ${userPass} | meta.sr.ht-manageuser -ps -e ${userName}@${domain}\
-t USER ${userName}");
cmd = "srht-gen-oauth-tok -i ${domain} -q ${userName} ${userPass}"
(_, token) = machine.execute("srht-gen-oauth-tok -i ${domain} -q ${userName} ${userPass}")
token = token.strip().replace("/", r"\\/") # Escape slashes in token before passing it to sed
machine.execute("mkdir -p ~/.config/hut/")
machine.execute("sed s/OAUTH-TOKEN/" + token + "/ ${hutConfig} > ~/.config/hut/config")
with subtest("Check whether git comes up"):
machine.wait_for_unit("git.sr.ht-api.service")
machine.wait_for_unit("git.sr.ht.service")
machine.wait_for_unit("git.sr.ht-webhooks.service")
machine.succeed("curl -sL http://git.${domain} | grep git.${domain}")
with subtest("Add an SSH key for Git access"):
machine.execute("ssh-keygen -q -N \"\" -t rsa -f ~/.ssh/id_rsa")
machine.execute("cat ${sshConfig} > ~/.ssh/config")
machine.succeed("hut meta ssh-key create ~/.ssh/id_rsa.pub")
with subtest("Create a new repo and push contents to it"):
machine.execute("git init test")
machine.execute("echo \"Hello world!\" > test/hello.txt")
machine.execute("cd test && git add .")
machine.execute("cd test && git commit -m \"Initial commit\"")
machine.execute("cd test && git tag v0.1")
machine.succeed("cd test && git remote add origin git.sr.ht@git.${domain}:~${userName}/test")
machine.execute("( echo -n 'git.${domain} '; cat /etc/ssh/ssh_host_ed25519_key.pub ) > ~/.ssh/known_hosts")
machine.succeed("hut git create test")
machine.succeed("cd test && git push --tags --set-upstream origin master")
with subtest("Verify that the repo is downloadable and its contents match the original"):
machine.succeed("curl https://git.${domain}/~${userName}/test/archive/v0.1.tar.gz | tar -xz")
machine.succeed("diff test-v0.1/hello.txt test/hello.txt")
'';
}
)
-117
View File
@@ -1,117 +0,0 @@
{
config,
pkgs,
nodes,
...
}:
let
domain = config.networking.domain;
# Note that wildcard certificates just under the TLD (eg. *.com)
# would be rejected by clients like curl.
tls-cert = pkgs.runCommand "selfSignedCerts" { buildInputs = [ pkgs.openssl ]; } ''
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -nodes -days 36500 \
-subj '/CN=${domain}' -extensions v3_req \
-addext 'subjectAltName = DNS:*.${domain}'
install -D -t $out key.pem cert.pem
'';
in
{
# buildsrht needs space
virtualisation.diskSize = 4 * 1024;
virtualisation.memorySize = 2 * 1024;
networking.enableIPv6 = false;
services.sourcehut = {
enable = true;
nginx.enable = true;
nginx.virtualHost = {
forceSSL = true;
sslCertificate = "${tls-cert}/cert.pem";
sslCertificateKey = "${tls-cert}/key.pem";
};
postgresql.enable = true;
redis.enable = true;
meta.enable = true;
settings."sr.ht" = {
environment = "production";
global-domain = config.networking.domain;
service-key = pkgs.writeText "service-key" "8b327279b77e32a3620e2fc9aabce491cc46e7d821fd6713b2a2e650ce114d01";
network-key = pkgs.writeText "network-key" "cEEmc30BRBGkgQZcHFksiG7hjc6_dK1XR2Oo5Jb9_nQ=";
};
settings.webhooks.private-key = pkgs.writeText "webhook-key" "Ra3IjxgFiwG9jxgp4WALQIZw/BMYt30xWiOsqD0J7EA=";
settings.mail = {
smtp-from = "root+hut@${domain}";
# WARNING: take care to keep pgp-privkey outside the Nix store in production,
# or use LoadCredentialEncrypted=
pgp-privkey = toString (
pkgs.writeText "sourcehut.pgp-privkey" ''
-----BEGIN PGP PRIVATE KEY BLOCK-----
lFgEZrFBKRYJKwYBBAHaRw8BAQdAS1Ffiytk0h0z0jfaT3qyiDUV/plVIUwOg1Yr
AXP2YmsAAP0W6QMC3G2G41rzCGLeSHeGibor1+XuxvcwUpVdW7ge+BH/tDZuaXhv
cy90ZXN0cy9zb3VyY2VodXQgPHJvb3QraHV0QHNvdXJjZWh1dC5sb2NhbGRvbWFp
bj6IkwQTFgoAOxYhBMISh2Z08FCi969cq9R2wSP9QF2bBQJmsUEpAhsDBQsJCAcC
AiICBhUKCQgLAgQWAgMBAh4HAheAAAoJENR2wSP9QF2b4JMA+wQLdxVcod/ppyvH
QguGqqhkpk8KquCddOuFnQVAfHFWAQCK5putVk4mGzsoLTbOJCSGRC4pjEktZawQ
MTqJmnOuC5xdBGaxQSkSCisGAQQBl1UBBQEBB0Aed6UYJyighTY+KuPNQ439st3x
x04T1j58sx3AnKgYewMBCAcAAP9WLB79HO1zFRqTCnk7GIEWWogMFKVpazeBUNu9
h9rzCA2+iHgEGBYKACAWIQTCEodmdPBQovevXKvUdsEj/UBdmwUCZrFBKQIbDAAK
CRDUdsEj/UBdmwgJAQDVk/px/pSzqreSeDLzxlb6dOo+N1KcicsJ0akhSJUcvwD9
EPhpEDZu/UBKchAutOhWwz+y6pyoF4Vt7XG+jbJQtA4=
=KaQc
-----END PGP PRIVATE KEY BLOCK-----
''
);
pgp-pubkey = pkgs.writeText "sourcehut.pgp-pubkey" ''
-----BEGIN PGP PUBLIC KEY BLOCK-----
mDMEZrFBKRYJKwYBBAHaRw8BAQdAS1Ffiytk0h0z0jfaT3qyiDUV/plVIUwOg1Yr
AXP2Ymu0Nm5peG9zL3Rlc3RzL3NvdXJjZWh1dCA8cm9vdCtodXRAc291cmNlaHV0
LmxvY2FsZG9tYWluPoiTBBMWCgA7FiEEwhKHZnTwUKL3r1yr1HbBI/1AXZsFAmax
QSkCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQ1HbBI/1AXZvgkwD7
BAt3FVyh3+mnK8dCC4aqqGSmTwqq4J1064WdBUB8cVYBAIrmm61WTiYbOygtNs4k
JIZELimMSS1lrBAxOomac64LuDgEZrFBKRIKKwYBBAGXVQEFAQEHQB53pRgnKKCF
Nj4q481Djf2y3fHHThPWPnyzHcCcqBh7AwEIB4h4BBgWCgAgFiEEwhKHZnTwUKL3
r1yr1HbBI/1AXZsFAmaxQSkCGwwACgkQ1HbBI/1AXZsICQEA1ZP6cf6Us6q3kngy
88ZW+nTqPjdSnInLCdGpIUiVHL8A/RD4aRA2bv1ASnIQLrToVsM/suqcqBeFbe1x
vo2yULQO
=luxZ
-----END PGP PUBLIC KEY BLOCK-----
'';
pgp-key-id = "0xC212876674F050A2F7AF5CABD476C123FD405D9B";
};
};
networking.firewall.allowedTCPPorts = [
80
443
];
security.pki.certificateFiles = [ "${tls-cert}/cert.pem" ];
services.nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedTlsSettings = true;
recommendedProxySettings = true;
};
services.postgresql = {
enable = true;
enableTCPIP = false;
settings.unix_socket_permissions = "0770";
};
services.openssh = {
enable = true;
settings.PasswordAuthentication = false;
settings.PermitRootLogin = "no";
};
environment.systemPackages = with pkgs; [
hut # For interacting with the Sourcehut APIs via CLI
srht-gen-oauth-tok # To automatically generate user OAuth tokens
];
}
@@ -5,13 +5,13 @@
}:
mkLibretroCore {
core = "puae";
version = "0-unstable-2025-05-24";
version = "0-unstable-2025-06-14";
src = fetchFromGitHub {
owner = "libretro";
repo = "libretro-uae";
rev = "f1c248602abb58e7c570feec3f59f4677407b252";
hash = "sha256-CmdMeAntu+uFp1HowBz3UgMiqFbRrNuMyevTlKxga/M=";
rev = "3eece7a5447fde5ddf12be11bb5cb421d8fd8f97";
hash = "sha256-NpCbeHcziBMw5IQ/8hD9cYq9zIAMd4H0OCpK8TydieA=";
};
makefile = "Makefile";
@@ -21,7 +21,7 @@ stdenv.mkDerivation (finalAttrs: {
homepage = "https://www.netsurf-browser.org/";
description = "NetSurf browser shared build system";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ];
maintainers = with lib.maintainers; [ fgaz ];
platforms = lib.platforms.unix;
};
})
@@ -14,16 +14,16 @@ builtins.mapAttrs
}:
buildGoModule rec {
inherit pname;
version = "3.30.1";
version = "3.30.2";
src = fetchFromGitHub {
owner = "projectcalico";
repo = "calico";
rev = "v${version}";
hash = "sha256-MtUoVLF46Z+wnxahZqTAfZwbLOC9gfHAUtIAwAJGUn0=";
hash = "sha256-UvHrCA/1n9dklcMY1AfNNW5/TtxVdmwmQb2DHEBFZhA=";
};
vendorHash = "sha256-5VFjiKFBZIXorc0yd9Vafyaj5ZInkhAD1GIdAw4yaEs=";
vendorHash = "sha256-Cp1Eo8Xa4c0o5l6/p+pyHa/t3jMUpgUDDXEAKwS6aCE=";
inherit doCheck subPackages;
@@ -1,111 +0,0 @@
{
lib,
fetchFromSourcehut,
buildGoModule,
buildPythonPackage,
srht,
redis,
celery,
pyyaml,
markdown,
ansi2html,
lxml,
python,
unzip,
pip,
pythonOlder,
setuptools-scm,
}:
let
version = "0.95.1";
gqlgen = import ./fix-gqlgen-trimpath.nix {
inherit unzip;
gqlgenVersion = "0.17.64";
};
patches = [ ./patches/core-go-update/builds/patch-deps.patch ];
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "builds.sr.ht";
rev = version;
hash = "sha256-On/dKqIuqsCLAgYkJQOeYL7Ne983JzEYKhuLpD5vNu4=";
};
buildsrht-api = buildGoModule (
{
inherit src version patches;
pname = "buildsrht-api";
modRoot = "api";
vendorHash = "sha256-GOM7fmJvfPJW3+XzvlwQZ9hBknlXwBKjGSmtIiapleY=";
}
// gqlgen
);
buildsrht-worker = buildGoModule (
{
inherit src version patches;
pname = "buildsrht-worker";
modRoot = "worker";
vendorHash = "sha256-nEXnCeUxlUMNUqhe82MKREXcaC9pvqZqyqhyQW+jQjQ=";
}
// gqlgen
);
in
buildPythonPackage rec {
inherit src version patches;
pname = "buildsrht";
pyproject = true;
disabled = pythonOlder "3.7";
nativeBuildInputs = [
pip
setuptools-scm
];
propagatedBuildInputs = [
srht
redis
celery
pyyaml
markdown
# Unofficial dependencies
ansi2html
lxml
];
env = {
PKGVER = version;
SRHT_PATH = "${srht}/${python.sitePackages}/srht";
PREFIX = placeholder "out";
};
postBuild = ''
make SASSC_INCLUDE=-I${srht}/share/sourcehut/scss/ all-share
'';
postInstall = ''
mkdir -p $out/lib
mkdir -p $out/bin/builds.sr.ht
cp -r images $out/lib
cp contrib/submit_image_build $out/bin/builds.sr.ht
ln -s ${buildsrht-api}/bin/api $out/bin/builds.sr.ht-api
ln -s ${buildsrht-worker}/bin/worker $out/bin/builds.sr.ht-worker
install -Dm644 schema.sql $out/share/sourcehut/builds.sr.ht-schema.sql
make install-share
'';
pythonImportsCheck = [ "buildsrht" ];
meta = with lib; {
homepage = "https://git.sr.ht/~sircmpwn/builds.sr.ht";
description = "Continuous integration service for the sr.ht network";
license = licenses.agpl3Only;
maintainers = with maintainers; [
eadwu
christoph-heiss
];
};
}
@@ -1,104 +0,0 @@
{
lib,
fetchFromSourcehut,
buildPythonPackage,
flask,
humanize,
sqlalchemy,
sqlalchemy-utils,
psycopg2,
markdown,
mistletoe,
bleach,
requests,
beautifulsoup4,
pygments,
cryptography,
prometheus-client,
alembic,
redis,
celery,
html5lib,
importlib-metadata,
tinycss2,
sassc,
pythonOlder,
minify,
setuptools-scm,
}:
buildPythonPackage rec {
pname = "srht";
version = "0.76.1";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "core.sr.ht";
rev = version;
hash = "sha256-lAN1JZXQuN2zxi/BdBtbNj52LPj9iYn0WB2OpyQcyuU=";
fetchSubmodules = true;
};
patches = [
# Fix Unix socket support in RedisQueueCollector
patches/redis-socket/core/0001-Fix-Unix-socket-support-in-RedisQueueCollector.patch
];
nativeBuildInputs = [
setuptools-scm
];
propagatedNativeBuildInputs = [
sassc
minify
];
propagatedBuildInputs = [
flask
humanize
sqlalchemy
sqlalchemy-utils
psycopg2
markdown
mistletoe
bleach
requests
beautifulsoup4
pygments
cryptography
prometheus-client
alembic
redis
celery
# Used transitively through beautifulsoup4
html5lib
# Used transitively trough bleach.css_sanitizer
tinycss2
# Used by srht.debug
importlib-metadata
];
env = {
PREFIX = placeholder "out";
PKGVER = version;
};
postInstall = ''
make install
'';
pythonImportsCheck = [ "srht" ];
meta = with lib; {
homepage = "https://git.sr.ht/~sircmpwn/core.sr.ht";
description = "Core modules for sr.ht";
license = licenses.bsd3;
maintainers = with maintainers; [
eadwu
christoph-heiss
];
};
}
@@ -1,56 +0,0 @@
{
lib,
python3,
callPackage,
recurseIntoAttrs,
nixosTests,
config,
}:
# To expose the *srht modules, they have to be a python module so we use `buildPythonModule`
# Then we expose them through all-packages.nix as an application through `toPythonApplication`
# https://github.com/NixOS/nixpkgs/pull/54425#discussion_r250688781
let
python = python3.override {
self = python;
packageOverrides = self: super: {
srht = self.callPackage ./core.nix { };
buildsrht = self.callPackage ./builds.nix { };
gitsrht = self.callPackage ./git.nix { };
hgsrht = self.callPackage ./hg.nix { };
hubsrht = self.callPackage ./hub.nix { };
listssrht = self.callPackage ./lists.nix { };
mansrht = self.callPackage ./man.nix { };
metasrht = self.callPackage ./meta.nix { };
pastesrht = self.callPackage ./paste.nix { };
todosrht = self.callPackage ./todo.nix { };
scmsrht = self.callPackage ./scm.nix { };
};
};
in
with python.pkgs;
recurseIntoAttrs (
{
inherit python;
coresrht = toPythonApplication srht;
buildsrht = toPythonApplication buildsrht;
gitsrht = toPythonApplication gitsrht;
hgsrht = toPythonApplication hgsrht;
hubsrht = toPythonApplication hubsrht;
listssrht = toPythonApplication listssrht;
mansrht = toPythonApplication mansrht;
metasrht = toPythonApplication metasrht;
pagessrht = callPackage ./pages.nix { };
pastesrht = toPythonApplication pastesrht;
todosrht = toPythonApplication todosrht;
passthru.tests = {
nixos-sourcehut = nixosTests.sourcehut;
};
}
// lib.optionalAttrs config.allowAliases {
# Added 2022-10-29
dispatchsrht = throw "dispatch is deprecated. See https://sourcehut.org/blog/2022-08-01-dispatch-deprecation-plans/ for more information.";
}
)
@@ -1,35 +0,0 @@
{
unzip,
gqlgenVersion,
}:
{
overrideModAttrs = (
_: {
# No need to workaround -trimpath: it's not used in goModules,
# but do download `go generate`'s dependencies nonetheless.
preBuild = ''
if [ -d ./loaders ]; then go generate ./loaders; fi
if [ -d ./graph ]; then go generate ./graph; fi
'';
}
);
# Workaround this error:
# go: git.sr.ht/~emersion/go-emailthreads@v0.0.0-20220412093310-4fd792e343ba: module lookup disabled by GOPROXY=off
# tidy failed: go mod tidy failed: exit status 1
# graph/generate.go:10: running "go": exit status 1
proxyVendor = true;
nativeBuildInputs = [ unzip ];
# Workaround -trimpath in the package derivation:
# https://github.com/99designs/gqlgen/issues/1537
# This is to give `go generate ./graph` access to gqlgen's *.gotpl files
# If it fails, the gqlgenVersion may have to be updated.
preBuild = ''
unzip ''${GOPROXY#"file://"}/github.com/99designs/gqlgen/@v/v${gqlgenVersion}.zip
if [ -d ./loaders ]; then go generate ./loaders; fi
if [ -d ./graph ]; then go generate ./graph; fi
rm -rf github.com
'';
}
@@ -1,153 +0,0 @@
{
lib,
fetchFromSourcehut,
buildGoModule,
buildPythonPackage,
python,
srht,
scmsrht,
pygit2,
minio,
pythonOlder,
unzip,
pip,
setuptools-scm,
}:
let
version = "0.88.10";
gqlgen = import ./fix-gqlgen-trimpath.nix {
inherit unzip;
gqlgenVersion = "0.17.64";
};
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "git.sr.ht";
rev = version;
hash = "sha256-o7d2EIx9oJAQSIrMMG/TYjAo7PJwT6rE8kcVMKoYenY=";
};
patches = [ ./patches/core-go-update/git/patch-deps.patch ];
gitApi = buildGoModule (
{
inherit src version patches;
pname = "gitsrht-api";
modRoot = "api";
vendorHash = "sha256-20SxOZrvj41L8A5nuOro9DYiK6FyhwJK5cNAvxPB7qw=";
}
// gqlgen
);
gitDispatch = buildGoModule (
{
inherit src version patches;
pname = "gitsrht-dispatch";
modRoot = "dispatch";
vendorHash = "sha256-MXLF7vO8SmUkU1nOxhObuzjT2ZRQQluIX7TRrxL7/3Y=";
postPatch = ''
substituteInPlace dispatch/main.go \
--replace-fail /var/log/git.sr.ht-dispatch /var/log/sourcehut/git.sr.ht-dispatch
'';
}
// gqlgen
);
gitKeys = buildGoModule (
{
inherit src version patches;
pname = "gitsrht-keys";
modRoot = "keys";
vendorHash = "sha256-MXLF7vO8SmUkU1nOxhObuzjT2ZRQQluIX7TRrxL7/3Y=";
postPatch = ''
substituteInPlace keys/main.go \
--replace-fail /var/log/git.sr.ht-keys /var/log/sourcehut/git.sr.ht-keys
'';
}
// gqlgen
);
gitShell = buildGoModule (
{
inherit src version patches;
pname = "gitsrht-shell";
modRoot = "shell";
vendorHash = "sha256-MXLF7vO8SmUkU1nOxhObuzjT2ZRQQluIX7TRrxL7/3Y=";
postPatch = ''
substituteInPlace shell/main.go \
--replace-fail /var/log/git.sr.ht-shell /var/log/sourcehut/git.sr.ht-shell
'';
}
// gqlgen
);
gitUpdateHook = buildGoModule (
{
inherit src version patches;
pname = "gitsrht-update-hook";
modRoot = "update-hook";
vendorHash = "sha256-MXLF7vO8SmUkU1nOxhObuzjT2ZRQQluIX7TRrxL7/3Y=";
postPatch = ''
substituteInPlace update-hook/main.go \
--replace-fail /var/log/git.sr.ht-update-hook /var/log/sourcehut/git.sr.ht-update-hook
'';
}
// gqlgen
);
in
buildPythonPackage rec {
inherit src version patches;
pname = "gitsrht";
pyproject = true;
disabled = pythonOlder "3.7";
nativeBuildInputs = [
pip
setuptools-scm
];
propagatedBuildInputs = [
srht
scmsrht
pygit2
minio
];
env = {
PKGVER = version;
SRHT_PATH = "${srht}/${python.sitePackages}/srht";
PREFIX = placeholder "out";
};
postBuild = ''
make SASSC_INCLUDE=-I${srht}/share/sourcehut/scss/ all-share
'';
postInstall = ''
mkdir -p $out/bin
ln -s ${gitApi}/bin/api $out/bin/git.sr.ht-api
ln -s ${gitDispatch}/bin/dispatch $out/bin/git.sr.ht-dispatch
ln -s ${gitKeys}/bin/keys $out/bin/git.sr.ht-keys
ln -s ${gitShell}/bin/shell $out/bin/git.sr.ht-shell
ln -s ${gitUpdateHook}/bin/update-hook $out/bin/git.sr.ht-update-hook
install -Dm644 schema.sql $out/share/sourcehut/git.sr.ht-schema.sql
make PREFIX=$out install-share
'';
pythonImportsCheck = [ "gitsrht" ];
meta = with lib; {
homepage = "https://git.sr.ht/~sircmpwn/git.sr.ht";
description = "Git repository hosting service for the sr.ht network";
license = licenses.agpl3Only;
maintainers = with maintainers; [
eadwu
christoph-heiss
];
};
}
@@ -1,117 +0,0 @@
{
lib,
fetchFromSourcehut,
fetchpatch,
buildGoModule,
buildPythonPackage,
srht,
python-hglib,
scmsrht,
unidiff,
python,
unzip,
pip,
pythonOlder,
setuptools-scm,
}:
let
version = "0.36.1";
gqlgen = import ./fix-gqlgen-trimpath.nix {
inherit unzip;
gqlgenVersion = "0.17.64";
};
patches = [
(fetchpatch {
name = "update-core-go-and-gqlgen.patch";
url = "https://hg.sr.ht/~sircmpwn/hg.sr.ht/rev/2765f086c3a67e00219cabe9a1dd01b2012c5c12.patch";
hash = "sha256-MLZG07tD7vrfvx2GDRUvFd/7VxxZLrAa/C3bB/IvQpI=";
})
./patches/core-go-update/hg/patch-deps.patch
];
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "hg.sr.ht";
rev = version;
hash = "sha256-EeWRUb/BZ+KJXNqmzCFYHkvWUaPvF/F7ZaOYM0IEYwk=";
vc = "hg";
};
hgsrht-api = buildGoModule (
{
inherit src version patches;
pname = "hgsrht-api";
modRoot = "api";
vendorHash = "sha256-elaVmyaO5IbzsnBYRjJvmoOFR8gx1xCfzd3z01KNXVA=";
}
// gqlgen
);
hgsrht-keys = buildGoModule {
inherit src version patches;
pname = "hgsrht-keys";
modRoot = "keys";
vendorHash = "sha256-U5NtgyUgVqI25XBg51U7glNRpR5MZBCcsuuR6f+gZc8=";
postPatch = ''
substituteInPlace keys/main.go \
--replace-fail /var/log/hg.sr.ht-keys /var/log/sourcehut/hg.sr.ht-keys
'';
};
in
buildPythonPackage rec {
inherit src version patches;
pname = "hgsrht";
pyproject = true;
disabled = pythonOlder "3.7";
postPatch = ''
substituteInPlace hg.sr.ht-shell \
--replace-fail /var/log/hg.sr.ht-shell /var/log/sourcehut/hg.sr.ht-shell
'';
nativeBuildInputs = [
pip
setuptools-scm
];
propagatedBuildInputs = [
python-hglib
scmsrht
srht
unidiff
];
env = {
PKGVER = version;
SRHT_PATH = "${srht}/${python.sitePackages}/srht";
PREFIX = placeholder "out";
};
postBuild = ''
make SASSC_INCLUDE=-I${srht}/share/sourcehut/scss/ all-share
'';
postInstall = ''
ln -s ${hgsrht-api}/bin/api $out/bin/hg.sr.ht-api
ln -s ${hgsrht-keys}/bin/hgsrht-keys $out/bin/hg.sr.ht-keys
install -Dm644 schema.sql $out/share/sourcehut/hg.sr.ht-schema.sql
make install-share
'';
pythonImportsCheck = [ "hgsrht" ];
meta = with lib; {
homepage = "https://hg.sr.ht/~sircmpwn/hg.sr.ht";
description = "Mercurial repository hosting service for the sr.ht network";
license = licenses.agpl3Only;
maintainers = with maintainers; [
eadwu
christoph-heiss
];
};
}
@@ -1,90 +0,0 @@
{
lib,
fetchFromSourcehut,
buildGoModule,
buildPythonPackage,
python,
srht,
setuptools-scm,
pip,
pyyaml,
pythonOlder,
unzip,
}:
let
version = "0.20.2";
gqlgen = import ./fix-gqlgen-trimpath.nix {
inherit unzip;
gqlgenVersion = "0.17.64";
};
patches = [ ./patches/core-go-update/hub/patch-deps.patch ];
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "hub.sr.ht";
rev = version;
hash = "sha256-blaaJ7kQBkswmSpEVEsDm6vaxuMuCcW2wmeN+fbwzjg=";
};
hubsrht-api = buildGoModule (
{
inherit src version patches;
pname = "hubsrht-api";
modRoot = "api";
vendorHash = "sha256-jKNHZrFydp3+cD8MR2izzE8bi4H2uT/7+x/wmPkEIIc=";
}
// gqlgen
);
in
buildPythonPackage rec {
inherit src version patches;
pname = "hubsrht";
pyproject = true;
disabled = pythonOlder "3.7";
nativeBuildInputs = [
pip
setuptools-scm
];
propagatedBuildInputs = [
srht
pyyaml
];
env = {
PKGVER = version;
SRHT_PATH = "${srht}/${python.sitePackages}/srht";
PREFIX = placeholder "out";
};
postBuild = ''
make SASSC_INCLUDE=-I${srht}/share/sourcehut/scss/ all-share
'';
postInstall = ''
ln -s ${hubsrht-api}/bin/api $out/bin/hub.sr.ht-api
install -Dm644 schema.sql $out/share/sourcehut/hub.sr.ht-schema.sql
make install-share
'';
# Module has no tests
doCheck = false;
pythonImportsCheck = [
"hubsrht"
];
meta = with lib; {
homepage = "https://git.sr.ht/~sircmpwn/hub.sr.ht";
description = "Project hub service for the sr.ht network";
license = licenses.agpl3Only;
maintainers = with maintainers; [
eadwu
christoph-heiss
];
};
}
@@ -1,92 +0,0 @@
{
lib,
fetchFromSourcehut,
buildGoModule,
buildPythonPackage,
srht,
aiosmtpd,
asyncpg,
pygit2,
emailthreads,
python,
unzip,
pip,
pythonOlder,
setuptools-scm,
}:
let
version = "0.62.3";
gqlgen = import ./fix-gqlgen-trimpath.nix {
inherit unzip;
gqlgenVersion = "0.17.64";
};
patches = [ ./patches/core-go-update/lists/patch-deps.patch ];
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "lists.sr.ht";
rev = version;
hash = "sha256-HU3hnKdIoseCo1/lt3GIOQ5d3joykN11/Bzvk4xvH4Y=";
};
listssrht-api = buildGoModule (
{
inherit src version patches;
pname = "listssrht-api";
modRoot = "api";
vendorHash = "sha256-XKDEr8ESs9oBh7DKu2jgPEMDY99nN25inkNwU/rrza8=";
}
// gqlgen
);
in
buildPythonPackage rec {
inherit src version patches;
pname = "listssrht";
pyproject = true;
disabled = pythonOlder "3.7";
nativeBuildInputs = [
pip
setuptools-scm
];
propagatedBuildInputs = [
srht
aiosmtpd
asyncpg
pygit2
# Unofficial dependency
emailthreads
];
env = {
PKGVER = version;
SRHT_PATH = "${srht}/${python.sitePackages}/srht";
PREFIX = placeholder "out";
};
postBuild = ''
make SASSC_INCLUDE=-I${srht}/share/sourcehut/scss/ all-share
'';
postInstall = ''
ln -s ${listssrht-api}/bin/api $out/bin/lists.sr.ht-api
install -Dm644 schema.sql $out/share/sourcehut/lists.sr.ht-schema.sql
make install-share
'';
pythonImportsCheck = [ "listssrht" ];
meta = with lib; {
homepage = "https://git.sr.ht/~sircmpwn/lists.sr.ht";
description = "Mailing list service for the sr.ht network";
license = licenses.agpl3Only;
maintainers = with maintainers; [
eadwu
christoph-heiss
];
};
}
@@ -1,85 +0,0 @@
{
lib,
fetchFromSourcehut,
buildGoModule,
buildPythonPackage,
srht,
pygit2,
python,
unzip,
pip,
pythonOlder,
setuptools-scm,
}:
let
version = "0.18.1";
gqlgen = import ./fix-gqlgen-trimpath.nix {
inherit unzip;
gqlgenVersion = "0.17.64";
};
patches = [ ./patches/core-go-update/man/patch-deps.patch ];
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "man.sr.ht";
rev = version;
hash = "sha256-c2xFC1pmOSGGMP4RVOmgFogj7CY2kHrADsWsm7M5ZK4=";
};
mansrht-api = buildGoModule (
{
inherit src version patches;
pname = "mansrht-api";
modRoot = "api";
vendorHash = "sha256-jKNHZrFydp3+cD8MR2izzE8bi4H2uT/7+x/wmPkEIIc=";
}
// gqlgen
);
in
buildPythonPackage rec {
inherit src version patches;
pname = "mansrht";
pyproject = true;
disabled = pythonOlder "3.7";
nativeBuildInputs = [
pip
setuptools-scm
];
propagatedBuildInputs = [
srht
pygit2
];
env = {
PKGVER = version;
SRHT_PATH = "${srht}/${python.sitePackages}/srht";
PREFIX = placeholder "out";
};
postBuild = ''
make SASSC_INCLUDE=-I${srht}/share/sourcehut/scss/ all-share
'';
postInstall = ''
ln -s ${mansrht-api}/bin/api $out/bin/man.sr.ht-api
install -Dm644 schema.sql $out/share/sourcehut/man.sr.ht-schema.sql
make install-share
'';
pythonImportsCheck = [ "mansrht" ];
meta = with lib; {
homepage = "https://git.sr.ht/~sircmpwn/man.sr.ht";
description = "Wiki service for the sr.ht network";
license = licenses.agpl3Only;
maintainers = with maintainers; [
eadwu
christoph-heiss
];
};
}
@@ -1,99 +0,0 @@
{
lib,
fetchFromSourcehut,
buildPythonPackage,
buildGoModule,
alembic,
bcrypt,
dnspython,
qrcode,
redis,
srht,
stripe,
prometheus-client,
zxcvbn,
python,
unzip,
pip,
pythonOlder,
setuptools-scm,
}:
let
version = "0.72.11";
gqlgen = import ./fix-gqlgen-trimpath.nix {
inherit unzip;
gqlgenVersion = "0.17.64";
};
patches = [ ./patches/core-go-update/meta/patch-deps.patch ];
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "meta.sr.ht";
rev = version;
hash = "sha256-dh+9wSQLL69xZ2Elmkyb9vEwpE7U7szz62VVS/0IM7Q=";
};
metasrht-api = buildGoModule (
{
inherit src version patches;
pname = "metasrht-api";
modRoot = "api";
vendorHash = "sha256-z4gRqI05t3m7ANyDJHmBcOCW476IG/eTfLetPRPbqtg=";
}
// gqlgen
);
in
buildPythonPackage rec {
pname = "metasrht";
inherit version src patches;
pyproject = true;
disabled = pythonOlder "3.7";
nativeBuildInputs = [
pip
setuptools-scm
];
propagatedBuildInputs = [
alembic
bcrypt
dnspython
qrcode
redis
srht
stripe
prometheus-client
zxcvbn
];
env = {
PKGVER = version;
SRHT_PATH = "${srht}/${python.sitePackages}/srht";
PREFIX = placeholder "out";
};
postBuild = ''
make SASSC_INCLUDE=-I${srht}/share/sourcehut/scss/ all-share
'';
postInstall = ''
mkdir -p $out/bin
ln -s ${metasrht-api}/bin/api $out/bin/meta.sr.ht-api
install -Dm644 schema.sql $out/share/sourcehut/meta.sr.ht-schema.sql
make install-share
'';
pythonImportsCheck = [ "metasrht" ];
meta = with lib; {
homepage = "https://git.sr.ht/~sircmpwn/meta.sr.ht";
description = "Account management service for the sr.ht network";
license = licenses.agpl3Only;
maintainers = with maintainers; [
eadwu
christoph-heiss
];
};
}
@@ -1,51 +0,0 @@
{
lib,
fetchFromSourcehut,
buildGoModule,
unzip,
}:
buildGoModule (
rec {
pname = "pagessrht";
version = "0.16.0";
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "pages.sr.ht";
rev = version;
hash = "sha256-XnKNXYzg9wuL4U2twkAspaQJZy2HWLQQQl9AITtipVU=";
};
patches = ./patches/core-go-update/pages/patch-deps.patch;
postPatch = ''
substituteInPlace Makefile \
--replace-fail "all: server daily" ""
'';
vendorHash = "sha256-klDROxNvR7lk79ptckulImVVwsAfcnKtJJAaevlZSWU=";
postInstall = ''
mkdir -p $out/share/sql/
cp -r -t $out/share/sql/ schema.sql migrations
'';
meta = with lib; {
homepage = "https://git.sr.ht/~sircmpwn/pages.sr.ht";
description = "Web hosting service for the sr.ht network";
mainProgram = "pages.sr.ht";
license = licenses.agpl3Only;
maintainers = with maintainers; [
eadwu
christoph-heiss
];
};
# There is no ./loaders but this does not cause troubles
# to go generate
}
// import ./fix-gqlgen-trimpath.nix {
inherit unzip;
gqlgenVersion = "0.17.64";
}
)
@@ -1,86 +0,0 @@
{
lib,
fetchFromSourcehut,
buildGoModule,
buildPythonPackage,
srht,
pip,
pyyaml,
python,
pythonOlder,
setuptools-scm,
unzip,
}:
let
version = "0.16.1";
gqlgen = import ./fix-gqlgen-trimpath.nix {
inherit unzip;
gqlgenVersion = "0.17.64";
};
patches = [ ./patches/core-go-update/paste/patch-deps.patch ];
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "paste.sr.ht";
rev = version;
hash = "sha256-SWtkE2/sTTJo0zAVFRfsA7fVF359OvgiHOT+yRaiads=";
};
pastesrht-api = buildGoModule (
{
inherit src version patches;
pname = "pastesrht-api";
modRoot = "api";
vendorHash = "sha256-uVqxPa1YggPgdSzGzXxVNdf4dM2DPGDXajkSXz4NhFM=";
}
// gqlgen
);
in
buildPythonPackage rec {
inherit src version patches;
pname = "pastesrht";
pyproject = true;
disabled = pythonOlder "3.7";
nativeBuildInputs = [
pip
setuptools-scm
];
propagatedBuildInputs = [
srht
pyyaml
];
env = {
PKGVER = version;
SRHT_PATH = "${srht}/${python.sitePackages}/srht";
PREFIX = placeholder "out";
};
postBuild = ''
make SASSC_INCLUDE=-I${srht}/share/sourcehut/scss/ all-share
'';
postInstall = ''
mkdir -p $out/bin
ln -s ${pastesrht-api}/bin/api $out/bin/paste.sr.ht-api
make install-share
'';
pythonImportsCheck = [ "pastesrht" ];
meta = with lib; {
homepage = "https://git.sr.ht/~sircmpwn/paste.sr.ht";
description = "Ad-hoc text file hosting service for the sr.ht network";
license = licenses.agpl3Only;
maintainers = with maintainers; [
eadwu
nessdoor
christoph-heiss
];
};
}
@@ -1,25 +0,0 @@
diff --git a/go.mod b/go.mod
index 07f7c64..972b258 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.22.5
toolchain go1.24.0
require (
- git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b
+ git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c
github.com/99designs/gqlgen v0.17.64
github.com/Masterminds/squirrel v1.5.4
diff --git a/go.sum b/go.sum
index aaccf89..73bfe7c 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,7 @@
git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b h1:d76irAQODAtl5G1zmKfwf60544fyGz74YT9k+7yYVxc=
git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b h1:UuQxEJrh/NNdmaVcK34opEz7ypXnPyxeRcT7Aigz+7E=
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c h1:v2opuaN0C5ZpuCifRNR9ZQ8V9IG+Ja80otK1MFj5RnI=
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c/go.mod h1:8neHEO3503w/rNtttnR0JFpQgM/GFhaafVwvkPsFIDw=
git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw=
@@ -1,26 +0,0 @@
diff --git a/go.mod b/go.mod
index b1e0834..8299f9b 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.22.5
toolchain go1.24.0
require (
- git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b
+ git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c
git.sr.ht/~sircmpwn/scm.sr.ht/srht-keys v0.0.0-20241202093706-8da5ec7e6b94
git.sr.ht/~turminal/go-fnmatch v0.0.0-20211021204744-1a55764af6de
diff --git a/go.sum b/go.sum
index 193cce9..9b0bda4 100644
--- a/go.sum
+++ b/go.sum
@@ -35,6 +35,8 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7
git.sr.ht/~sircmpwn/core-go v0.0.0-20240124105042-864816cfbc0c/go.mod h1:OovCpg5LsbYJjmDTpk5wUgHM4tUor736Pmxekm9BUcQ=
git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b h1:d76irAQODAtl5G1zmKfwf60544fyGz74YT9k+7yYVxc=
git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b h1:UuQxEJrh/NNdmaVcK34opEz7ypXnPyxeRcT7Aigz+7E=
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
git.sr.ht/~sircmpwn/dowork v0.0.0-20221010085743-46c4299d76a1/go.mod h1:8neHEO3503w/rNtttnR0JFpQgM/GFhaafVwvkPsFIDw=
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c h1:v2opuaN0C5ZpuCifRNR9ZQ8V9IG+Ja80otK1MFj5RnI=
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c/go.mod h1:8neHEO3503w/rNtttnR0JFpQgM/GFhaafVwvkPsFIDw=
@@ -1,25 +0,0 @@
diff --git a/go.mod b/go.mod
index ba49458..3a31083 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.22.5
toolchain go1.24.0
require (
- git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b
+ git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c
github.com/99designs/gqlgen v0.17.64
github.com/Masterminds/squirrel v1.5.4
diff --git a/go.sum b/go.sum
index 61766aa..e01c045 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,7 @@
git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b h1:d76irAQODAtl5G1zmKfwf60544fyGz74YT9k+7yYVxc=
git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b h1:UuQxEJrh/NNdmaVcK34opEz7ypXnPyxeRcT7Aigz+7E=
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c h1:v2opuaN0C5ZpuCifRNR9ZQ8V9IG+Ja80otK1MFj5RnI=
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c/go.mod h1:8neHEO3503w/rNtttnR0JFpQgM/GFhaafVwvkPsFIDw=
git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw=
@@ -1,25 +0,0 @@
diff --git a/go.mod b/go.mod
index ea624d5..3674152 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.22.5
toolchain go1.24.0
require (
- git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b
+ git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c
github.com/99designs/gqlgen v0.17.64
github.com/vektah/gqlparser/v2 v2.5.23
diff --git a/go.sum b/go.sum
index f67a555..a366a60 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,7 @@
git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b h1:d76irAQODAtl5G1zmKfwf60544fyGz74YT9k+7yYVxc=
git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b h1:UuQxEJrh/NNdmaVcK34opEz7ypXnPyxeRcT7Aigz+7E=
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c h1:v2opuaN0C5ZpuCifRNR9ZQ8V9IG+Ja80otK1MFj5RnI=
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c/go.mod h1:8neHEO3503w/rNtttnR0JFpQgM/GFhaafVwvkPsFIDw=
git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw=
@@ -1,26 +0,0 @@
diff --git a/go.mod b/go.mod
index da34484..24757a0 100644
--- a/go.mod
+++ b/go.mod
@@ -6,7 +6,7 @@ toolchain go1.24.0
require (
git.sr.ht/~emersion/go-emailthreads v0.0.0-20230220165133-75c43015b6c2
- git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b
+ git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c
github.com/99designs/gqlgen v0.17.64
github.com/Masterminds/squirrel v1.5.4
diff --git a/go.sum b/go.sum
index 4590dd5..0c49985 100644
--- a/go.sum
+++ b/go.sum
@@ -2,6 +2,8 @@ git.sr.ht/~emersion/go-emailthreads v0.0.0-20230220165133-75c43015b6c2 h1:5CkkRD
git.sr.ht/~emersion/go-emailthreads v0.0.0-20230220165133-75c43015b6c2/go.mod h1:CQUF7XpyupxjwxlNX3PHRCYL+N2COXTRRRS4MgM49R4=
git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b h1:d76irAQODAtl5G1zmKfwf60544fyGz74YT9k+7yYVxc=
git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b h1:UuQxEJrh/NNdmaVcK34opEz7ypXnPyxeRcT7Aigz+7E=
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c h1:v2opuaN0C5ZpuCifRNR9ZQ8V9IG+Ja80otK1MFj5RnI=
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c/go.mod h1:8neHEO3503w/rNtttnR0JFpQgM/GFhaafVwvkPsFIDw=
git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw=
@@ -1,25 +0,0 @@
diff --git a/go.mod b/go.mod
index 21c7713..8f158a2 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.22.5
toolchain go1.24.0
require (
- git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b
+ git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c
github.com/99designs/gqlgen v0.17.64
github.com/vektah/gqlparser/v2 v2.5.23
diff --git a/go.sum b/go.sum
index f67a555..a366a60 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,7 @@
git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b h1:d76irAQODAtl5G1zmKfwf60544fyGz74YT9k+7yYVxc=
git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b h1:UuQxEJrh/NNdmaVcK34opEz7ypXnPyxeRcT7Aigz+7E=
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c h1:v2opuaN0C5ZpuCifRNR9ZQ8V9IG+Ja80otK1MFj5RnI=
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c/go.mod h1:8neHEO3503w/rNtttnR0JFpQgM/GFhaafVwvkPsFIDw=
git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw=
@@ -1,26 +0,0 @@
diff --git a/go.mod b/go.mod
index 463f022..a7dc400 100644
--- a/go.mod
+++ b/go.mod
@@ -8,7 +8,7 @@ require (
git.sr.ht/~emersion/go-oauth2 v0.0.0-20240217160856-2e0d6e20b088
git.sr.ht/~emersion/gqlclient v0.0.0-20230820050442-8873fe0204b9
git.sr.ht/~sircmpwn/abused v0.0.0-20240216134550-21e8606c6f89
- git.sr.ht/~sircmpwn/core-go v0.0.0-20250311090327-1e3cd785af1e
+ git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c
github.com/99designs/gqlgen v0.17.64
github.com/Masterminds/squirrel v1.5.4
diff --git a/go.sum b/go.sum
index 9c08b1a..abf1a58 100644
--- a/go.sum
+++ b/go.sum
@@ -6,6 +6,8 @@ git.sr.ht/~sircmpwn/abused v0.0.0-20240216134550-21e8606c6f89 h1:usW1i77LjfTfNzX
git.sr.ht/~sircmpwn/abused v0.0.0-20240216134550-21e8606c6f89/go.mod h1:A+FTCDOSRA0naGMcM9OenO7kMhBxj+Kbd+4nBpg6NO4=
git.sr.ht/~sircmpwn/core-go v0.0.0-20250311090327-1e3cd785af1e h1:epi/OdTKtazVbHHn1Qunx+nSHt96+xBBiNgs+SgRGwo=
git.sr.ht/~sircmpwn/core-go v0.0.0-20250311090327-1e3cd785af1e/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b h1:UuQxEJrh/NNdmaVcK34opEz7ypXnPyxeRcT7Aigz+7E=
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c h1:v2opuaN0C5ZpuCifRNR9ZQ8V9IG+Ja80otK1MFj5RnI=
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c/go.mod h1:8neHEO3503w/rNtttnR0JFpQgM/GFhaafVwvkPsFIDw=
git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw=
@@ -1,25 +0,0 @@
diff --git a/go.mod b/go.mod
index 67aa15c..baffe8e 100644
--- a/go.mod
+++ b/go.mod
@@ -6,7 +6,7 @@ toolchain go1.24.0
require (
git.sr.ht/~adnano/go-gemini v0.2.3
- git.sr.ht/~sircmpwn/core-go v0.0.0-20250326085317-29a3ebfee9d0
+ git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c
github.com/99designs/gqlgen v0.17.64
github.com/CAFxX/httpcompression v0.0.9
diff --git a/go.sum b/go.sum
index ccd1f94..0945505 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,7 @@
git.sr.ht/~adnano/go-gemini v0.2.3 h1:oJ+Y0/mheZ4Vg0ABjtf5dlmvq1yoONStiaQvmWWkofc=
git.sr.ht/~adnano/go-gemini v0.2.3/go.mod h1:hQ75Y0i5jSFL+FQ7AzWVAYr5LQsaFC7v3ZviNyj46dY=
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b h1:UuQxEJrh/NNdmaVcK34opEz7ypXnPyxeRcT7Aigz+7E=
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
git.sr.ht/~sircmpwn/core-go v0.0.0-20250326085317-29a3ebfee9d0 h1:jFSTrW57GbcDoW850vw95zg0pLS1pe+cD5JtAQJ54ho=
git.sr.ht/~sircmpwn/core-go v0.0.0-20250326085317-29a3ebfee9d0/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c h1:v2opuaN0C5ZpuCifRNR9ZQ8V9IG+Ja80otK1MFj5RnI=
@@ -1,25 +0,0 @@
diff --git a/go.mod b/go.mod
index bc39fc4..bd01e53 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.22.5
toolchain go1.24.0
require (
- git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b
+ git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c
github.com/99designs/gqlgen v0.17.64
github.com/Masterminds/squirrel v1.5.4
diff --git a/go.sum b/go.sum
index 61766aa..e01c045 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,7 @@
git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b h1:d76irAQODAtl5G1zmKfwf60544fyGz74YT9k+7yYVxc=
git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b h1:UuQxEJrh/NNdmaVcK34opEz7ypXnPyxeRcT7Aigz+7E=
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c h1:v2opuaN0C5ZpuCifRNR9ZQ8V9IG+Ja80otK1MFj5RnI=
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c/go.mod h1:8neHEO3503w/rNtttnR0JFpQgM/GFhaafVwvkPsFIDw=
git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw=
@@ -1,25 +0,0 @@
diff --git a/go.mod b/go.mod
index a352cfd..ab4beae 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.22.5
toolchain go1.24.0
require (
- git.sr.ht/~sircmpwn/core-go v0.0.0-20250306104433-8e729e7539f4
+ git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c
github.com/99designs/gqlgen v0.17.64
github.com/Masterminds/squirrel v1.5.4
diff --git a/go.sum b/go.sum
index 5342a85..50c87f1 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,7 @@
git.sr.ht/~sircmpwn/core-go v0.0.0-20250306104433-8e729e7539f4 h1:LvEcAyN0YDwqsa7QkFXne0bQEWAod6jAI2VIc+kk5sk=
git.sr.ht/~sircmpwn/core-go v0.0.0-20250306104433-8e729e7539f4/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b h1:UuQxEJrh/NNdmaVcK34opEz7ypXnPyxeRcT7Aigz+7E=
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c h1:v2opuaN0C5ZpuCifRNR9ZQ8V9IG+Ja80otK1MFj5RnI=
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c/go.mod h1:8neHEO3503w/rNtttnR0JFpQgM/GFhaafVwvkPsFIDw=
git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw=
@@ -1,43 +0,0 @@
From 76dd636151735671be74ba9d55f773e190e22827 Mon Sep 17 00:00:00 2001
From: Julien Moutinho <julm+srht@sourcephile.fr>
Date: Fri, 13 May 2022 22:40:46 +0200
Subject: [PATCH core.sr.ht] Fix Unix socket support in RedisQueueCollector
The broker URL is not necessarily in the format expected by Redis.from_url
Especially, Redis.from_url supports this format for Unix sockets:
unix:///run/redis-sourcehut-metasrht/redis.sock?db=0
See https://redis-py.readthedocs.io/en/stable/#redis.ConnectionPool.from_url
Whereas Celery+Kombu support Redis but also other transports
and thus expect another scheme:
redis+socket:///run/redis-sourcehut-metasrht/redis.sock?virtual_host=1
See https://docs.celeryproject.org/en/stable/userguide/configuration.html#redis-backend-settings
and https://github.com/celery/celery/blob/e5d99801e4b56a02af4a2e183879c767228d2817/celery/backends/redis.py#L299-L352
and https://github.com/celery/kombu/blob/master/kombu/utils/url.py
---
srht/metrics.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/srht/metrics.py b/srht/metrics.py
index 68caf8e..2df5777 100644
--- a/srht/metrics.py
+++ b/srht/metrics.py
@@ -1,12 +1,12 @@
import time
+from celery import Celery
from prometheus_client.metrics_core import GaugeMetricFamily
from redis import ResponseError
-from srht.redis import from_url
class RedisQueueCollector:
def __init__(self, broker, name, documentation, queue_name="celery"):
- self.redis = from_url(broker)
+ self.redis = Celery("collector", broker=broker).connection_for_read().channel().client
self.queue_name = queue_name
self.name = name
self.documentation = documentation
--
2.35.1
@@ -1,49 +0,0 @@
{
lib,
fetchFromSourcehut,
buildPythonPackage,
srht,
pyyaml,
buildsrht,
pythonOlder,
setuptools-scm,
}:
buildPythonPackage rec {
pname = "scmsrht";
version = "0.22.28";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "scm.sr.ht";
rev = version;
hash = "sha256-+zxqiz5yPpgTwAw7w8GqJFb3OCcJEH/UhS5u2Xs7pzo=";
};
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
srht
pyyaml
buildsrht
];
env.PKGVER = version;
pythonImportsCheck = [ "scmsrht" ];
meta = with lib; {
homepage = "https://git.sr.ht/~sircmpwn/scm.sr.ht";
description = "Shared support code for sr.ht source control services";
license = licenses.agpl3Only;
maintainers = with maintainers; [
eadwu
christoph-heiss
];
};
}
@@ -1,90 +0,0 @@
{
lib,
fetchFromSourcehut,
buildGoModule,
buildPythonPackage,
srht,
alembic,
pytest,
factory-boy,
python,
unzip,
pythonOlder,
setuptools-scm,
}:
let
version = "0.77.5";
gqlgen = import ./fix-gqlgen-trimpath.nix {
inherit unzip;
gqlgenVersion = "0.17.64";
};
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "todo.sr.ht";
rev = version;
hash = "sha256-P+ypiW3GHoMClBmW5lUNAG6/sydHHnFGyGajmC3WARg=";
};
patches = [ ./patches/core-go-update/todo/patch-deps.patch ];
todosrht-api = buildGoModule (
{
inherit src version patches;
pname = "todosrht-api";
modRoot = "api";
vendorHash = "sha256-ny6cyUIgmupeU8SFP8+RSQU7DD3Lk+j+mZQBoXKv63I=";
}
// gqlgen
);
in
buildPythonPackage rec {
inherit src version patches;
pname = "todosrht";
pyproject = true;
disabled = pythonOlder "3.7";
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
srht
alembic
];
env = {
PKGVER = version;
SRHT_PATH = "${srht}/${python.sitePackages}/srht";
PREFIX = placeholder "out";
};
postBuild = ''
make SASSC_INCLUDE=-I${srht}/share/sourcehut/scss/ all-share
'';
postInstall = ''
ln -s ${todosrht-api}/bin/api $out/bin/todo.sr.ht-api
install -Dm644 schema.sql $out/share/sourcehut/todo.sr.ht-schema.sql
make install-share
'';
# pytest tests fail
nativeCheckInputs = [
pytest
factory-boy
];
pythonImportsCheck = [ "todosrht" ];
meta = with lib; {
homepage = "https://todo.sr.ht/~sircmpwn/todo.sr.ht";
description = "Ticket tracking service for the sr.ht network";
license = licenses.agpl3Only;
maintainers = with maintainers; [
eadwu
christoph-heiss
];
};
}
@@ -1,95 +0,0 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p gnused git mercurial common-updater-scripts
set -eux -o pipefail
cd "$(dirname "${BASH_SOURCE[0]}")" || exit 1
root=../../../..
tmp=$(mktemp -d)
trap 'rm -rf "$tmp"' EXIT
attr_path() {
case "$1" in
pagessrht) printf "sourcehut.$1";;
*) printf "sourcehut.python.pkgs.$1";;
esac
}
default() {
local p="$(attr_path "$1")"
(cd "$root" && nix-instantiate --eval --strict -A $p.meta.position | sed -re 's/^"(.*):[0-9]+"$/\1/')
}
version() {
local p="$(attr_path "$1")"
(cd "$root" && nix-instantiate --eval --strict -A $p.version | tr -d '"')
}
src_url() {
local p="$(attr_path "$1")"
nix-instantiate --eval --strict --expr " with import $root {}; let src = $p.drvAttrs.src; in src.meta.homepage" | tr -d '"'
}
get_latest_version() {
src="$(src_url "$1")"
rm -rf "$tmp"
if [ "$1" = "hgsrht" ]; then
hg clone "$src" "$tmp" >/dev/null
printf "%s %s\n" \
"$(cd "$tmp" && hg log --limit 1 --template '{latesttag}')" \
"$(cd "$tmp" && sed -ne 's/^\s*github\.com\/99designs\/gqlgen v\(.*\)$/\1/p' go.mod)"
else
git clone "$src" "$tmp" >/dev/null
printf "%s %s\n" \
"$(cd "$tmp" && git describe "$(git rev-list --tags --max-count=1)")" \
"$(cd "$tmp" && sed -ne 's/^\s*github\.com\/99designs\/gqlgen v\(.*\)$/\1/p' go.mod)"
fi
}
update_version() {
default_nix="$(default "$1")"
oldVersion="$(version "$1")"
read -r version gqlgen_ver < <(get_latest_version "$1")
local p="$(attr_path "$1")"
(cd "$root" && update-source-version "$p" "$version")
# update `gqlgenVersion` if necessary
old_gqlgen_ver="$(sed -ne 's/^.*gqlgenVersion = "\(.*\)".*$/\1/p' "$default_nix")"
sed -ri "s|gqlgenVersion = \"$old_gqlgen_ver\";|gqlgenVersion = \"$gqlgen_ver\";|w /dev/stdout" "$default_nix"
# Update vendorHash of Go modules
retry=true
while "$retry"; do
retry=false;
exec < <(exec nix -L build -f "$root" sourcehut.python.pkgs."$1" 2>&1)
while IFS=' :' read -r origin hash; do
case "$origin" in
(expected|specified) oldHash="$hash";;
(got) sed -i "s|$oldHash|$hash|" "$default_nix"; retry=true; break;;
(*) printf >&2 "%s\n" "$origin${hash:+:$hash}"
esac
done
done
if [ "$oldVersion" != "$version" ] || [ "$old_gqlgen_ver" != "$gqlgen_ver" ]; then
git add "$default_nix"
git commit -m "sourcehut.$1: $oldVersion -> $version"
fi
}
if [ $# -gt 0 ]; then
services=("$@")
else
# Beware that some packages must be updated before others,
# eg. buildsrht must be updated before gitsrht,
# otherwise this script would enter an infinite loop
# because the reported $oldHash to be changed
# may not actually be in $default_nix
# but in the file of one of its dependencies.
services=( "srht" "scmsrht" "buildsrht" "gitsrht" "hgsrht" "hubsrht" "listssrht" "mansrht"
"metasrht" "pagessrht" "pastesrht" "todosrht" )
fi
for service in "${services[@]}"; do
update_version "$service"
done
@@ -81,13 +81,13 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "obs-studio";
version = "31.0.3";
version = "31.0.4";
src = fetchFromGitHub {
owner = "obsproject";
repo = "obs-studio";
rev = finalAttrs.version;
hash = "sha256-i1wkGlafPvfMTsQr5Ww5iwmUu+23cr0YmN10llJfohA=";
hash = "sha256-YxBPVXin8oJlo++oJogY1WMamIJmRqtSmKZDBsIZPU4=";
fetchSubmodules = true;
};
@@ -14,6 +14,8 @@
droidcam-obs = callPackage ./droidcam-obs { };
distroav = qt6Packages.callPackage ./distroav { };
input-overlay = qt6Packages.callPackage ./input-overlay.nix { };
looking-glass-obs = callPackage ./looking-glass-obs.nix { };
@@ -26,6 +28,8 @@
obs-backgroundremoval = callPackage ./obs-backgroundremoval { };
obs-browser-transition = callPackage ./obs-browser-transition.nix { };
obs-color-monitor = qt6Packages.callPackage ./obs-color-monitor.nix { };
obs-command-source = callPackage ./obs-command-source.nix { };
@@ -106,6 +110,8 @@
obs-vkcapture32 = pkgsi686Linux.obs-studio-plugins.obs-vkcapture;
};
obs-vnc = callPackage ./obs-vnc.nix { };
obs-websocket = qt6Packages.callPackage ./obs-websocket.nix { }; # Websocket 4.x compatibility for OBS Studio 28+
obs-webkitgtk = callPackage ./obs-webkitgtk.nix { };
@@ -0,0 +1,61 @@
{
lib,
stdenv,
fetchFromGitHub,
obs-studio,
cmake,
qtbase,
ndi-6,
curl,
}:
stdenv.mkDerivation rec {
pname = "distroav";
version = "6.0.0";
nativeBuildInputs = [
cmake
qtbase
];
buildInputs = [
obs-studio
qtbase
ndi-6
curl
];
src = fetchFromGitHub {
owner = "DistroAV";
repo = "DistroAV";
tag = version;
hash = "sha256-pr/5XCLo5fzergIQrYFC9o9K+KuP4leDk5/oRe5ct9Q=";
};
# Modify plugin-main.cpp file to fix ndi libs path
patches = [ ./hardcode-ndi-path.patch ];
postPatch = ''
# Add path (variable added in hardcode-ndi-path.patch
substituteInPlace src/plugin-main.cpp --replace-fail "@NDI@" "${ndi-6}"
# Replace bundled NDI SDK with the upstream version
# (This fixes soname issues)
rm -rf lib/ndi
ln -s ${ndi-6}/include lib/ndi
'';
cmakeFlags = [ "-DENABLE_QT=ON" ];
env.NIX_CFLAGS_COMPILE = "-Wno-deprecated-declarations";
dontWrapQtApps = true;
meta = {
description = "Network A/V plugin for OBS Studio (formerly obs-ndi)";
homepage = "https://github.com/DistroAV/DistroAV";
license = with lib.licenses; [ gpl2 ];
maintainers = with lib.maintainers; [ globule655 ];
platforms = lib.platforms.linux;
};
}
@@ -0,0 +1,18 @@
diff --git a/src/plugin-main.cpp b/src/plugin-main.cpp
index 0d94add..617af73 100644
--- a/src/plugin-main.cpp
+++ b/src/plugin-main.cpp
@@ -369,14 +369,7 @@ const NDIlib_v5 *load_ndilib()
if (!temp_path.isEmpty()) {
locations << temp_path;
}
-#if defined(Q_OS_LINUX) || defined(Q_OS_MACOS)
- // Linux, MacOS
- // https://github.com/DistroAV/DistroAV/blob/master/lib/ndi/NDI%20SDK%20Documentation.pdf
- // "6.1 LOCATING THE LIBRARY
- // ... the redistributable on MacOS is installed within `/usr/local/lib` ..."
- locations << "/usr/lib";
- locations << "/usr/local/lib";
-#endif
+ locations << "@NDI@/lib";
auto lib_path = QString();
@@ -0,0 +1,37 @@
{
lib,
stdenv,
fetchFromGitHub,
nix-update-script,
cmake,
obs-studio,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "obs-browser-transition";
version = "0.1.3";
src = fetchFromGitHub {
owner = "exeldro";
repo = "obs-browser-transition";
tag = finalAttrs.version;
hash = "sha256-m5UDqnqipkybXAZqS7c2Sj/mJKrDBkXElyc0I+c1BmE=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ obs-studio ];
postInstall = ''
rm -rf $out/obs-plugins $out/data
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Plugin for OBS Studio to show a browser source during scene transition";
homepage = "https://github.com/exeldro/obs-browser-transition";
maintainers = with lib.maintainers; [ flexiondotorg ];
license = lib.licenses.gpl2Only;
platforms = lib.platforms.linux;
};
})
@@ -0,0 +1,45 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
obs-studio,
pkg-config,
libvncserver,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "obs-vnc";
version = "0.6.1";
src = fetchFromGitHub {
owner = "norihiro";
repo = "obs-vnc";
tag = "${finalAttrs.version}";
hash = "sha256-eTvKACeVFFw6DOFAiWaG/m14jYyzZc61e79S8oVWrCs=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
libvncserver
obs-studio
];
postInstall = ''
mkdir $out/lib $out/share
mv $out/obs-plugins/64bit $out/lib/obs-plugins
rm -rf $out/obs-plugins
mv $out/data $out/share/obs
'';
meta = {
description = "VNC viewer integrated into OBS Studio as a source plugin";
homepage = "https://github.com/norihiro/obs-vnc";
maintainers = with lib.maintainers; [ flexiondotorg ];
license = lib.licenses.gpl2Only;
platforms = lib.platforms.linux;
};
})
@@ -38,6 +38,6 @@ stdenv.mkDerivation {
homepage = "https://hg.sr.ht/~scoopta/wlrobs";
maintainers = with maintainers; [ grahamc ];
license = licenses.gpl3Plus;
platforms = [ "x86_64-linux" ];
platforms = platforms.linux;
};
}
+2 -2
View File
@@ -2,7 +2,7 @@
lib,
buildNpmPackage,
copyDesktopItems,
electron_34,
electron_36,
fetchFromGitHub,
makeDesktopItem,
makeWrapper,
@@ -10,7 +10,7 @@
}:
let
electron = electron_34;
electron = electron_36;
version = "2025.3.1";
in
+3 -3
View File
@@ -8,18 +8,18 @@
rustPlatform.buildRustPackage rec {
pname = "bibiman";
version = "0.12.3";
version = "0.12.4";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "lukeflo";
repo = "bibiman";
tag = "v${version}";
hash = "sha256-gjVfJyedZZhSavarBXmpG3jj7mb3706NPKB9oEVhol0=";
hash = "sha256-6duqLBPm6GlBHm3Kr4foHF1MKodYOYKKDITk/BiX6mA=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-YtpnKgTIAsDXK6pl/TvU54euOdkbUcyCH4RADYWXkls=";
cargoHash = "sha256-tbgzjTsK88+G4Wxex4Tl0K5Ii99tPNud3UEDzAHaI0M=";
nativeInstallCheckInputs = [
versionCheckHook
@@ -6,19 +6,19 @@
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "tooling-language-server";
version = "0.5.0";
rustPlatform.buildRustPackage (finalAttrs: {
pname = "deputy";
version = "0.6.0";
src = fetchFromGitHub {
owner = "filiptibell";
repo = "tooling-language-server";
tag = "v${version}";
hash = "sha256-0FF9p3Z8C3C/fcTvu66ozCs/G3UAJ/Kf2v+4IZU4eCA=";
repo = "deputy";
tag = "v${finalAttrs.version}";
hash = "sha256-dTCikfHqfSVb1F6LYrLqFAEufD6dPgAi6F65yPlCO18=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-DxQMAnlE8oWtigU1gUEdTdBIvEtbL8xhaPLx6kt8T2c=";
cargoHash = "sha256-nGheg/HnkYsvfrsd/dPNbFQEHXFtjB5so436nrbKRqo=";
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
@@ -28,10 +28,10 @@ rustPlatform.buildRustPackage rec {
meta = {
description = "Language server for tools and package managers";
homepage = "https://github.com/filiptibell/tooling-language-server";
changelog = "https://github.com/filiptibell/tooling-language-server/blob/${src.tag}/CHANGELOG.md";
homepage = "https://github.com/filiptibell/deputy";
changelog = "https://github.com/filiptibell/deputy/blob/${finalAttrs.src.tag}/CHANGELOG.md";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [ niklaskorz ];
mainProgram = "tooling-language-server";
mainProgram = "deputy";
};
}
})
+1 -1
View File
@@ -78,7 +78,7 @@ stdenv.mkDerivation (finalAttrs: {
- Helps authors to comply with web standards by using the bug meter.
'';
mainProgram = "dillo";
maintainers = with lib.maintainers; [ ];
maintainers = with lib.maintainers; [ fgaz ];
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.all;
};
+49 -23
View File
@@ -2,44 +2,70 @@
lib,
stdenv,
fetchzip,
mono,
sqlite,
makeWrapper,
autoPatchelfHook,
gcc-unwrapped,
zlib,
lttng-ust_2_12,
icu,
openssl,
makeBinaryWrapper,
}:
let
_supportedPlatforms = {
"armv7l-linux" = "linux-arm7";
"x86_64-linux" = "linux-x64";
"aarch64-linux" = "linux-arm64";
};
_platform = _supportedPlatforms."${stdenv.hostPlatform.system}";
# nix hash convert --to sri "sha256:`nix-prefetch-url --unpack https://updates.duplicati.com/stable/duplicati-2.1.0.5_stable_2025-03-04-linux-arm64-cli.zip`"
_fileHashForSystem = {
"armv7l-linux" = "sha256-FQQ07M0rwvxNkHPW6iK5WBTKgFrZ4LOP4vgINfmtq4k=";
"x86_64-linux" = "sha256-1QspF/A3hOtqd8bVbSqClJIHUN9gBrd18J5qvZJLkQE=";
"aarch64-linux" = "sha256-mSNInaCkNf1MBZK2M42SjJnYRtB5SyGMvSGSn5oH1Cs=";
};
in
stdenv.mkDerivation (finalAttrs: {
# TODO build duplicati from source https://github.com/duplicati/duplicati/blob/master/.github/workflows/build-packages.yml
pname = "duplicati";
version = "2.1.0.2";
channel = "beta";
build_date = "2024-11-29";
version = "2.1.0.5";
channel = "stable";
buildDate = "2025-03-04";
src = fetchzip {
url =
with finalAttrs;
"https://github.com/duplicati/duplicati/releases/download/v${version}-${version}_${channel}_${build_date}/duplicati-${version}_${channel}_${build_date}.zip";
hash = "sha256-LmW6yGutxP33ghFqyOLKrGDNCQdr8DDFn/IHigsLpzA=";
stripRoot = false;
"https://updates.duplicati.com/stable/duplicati-${version}_${channel}_${buildDate}-${_platform}-cli.zip";
hash = _fileHashForSystem."${stdenv.hostPlatform.system}";
stripRoot = true;
};
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [
autoPatchelfHook
makeBinaryWrapper
];
buildInputs = [
gcc-unwrapped
zlib
lttng-ust_2_12
];
installPhase = ''
mkdir -p $out/{bin,share/duplicati-${finalAttrs.version}}
cp -r * $out/share/duplicati-${finalAttrs.version}
makeWrapper "${lib.getExe mono}" $out/bin/duplicati-cli \
--add-flags "$out/share/duplicati-${finalAttrs.version}/Duplicati.CommandLine.exe" \
runHook preInstall
mkdir -p $out/{bin,share}
cp -r * "$out/share/"
for file in $out/share/duplicati-*; do
makeBinaryWrapper "$file" "$out/bin/$(basename $file)" \
--prefix LD_LIBRARY_PATH : ${
lib.makeLibraryPath [
sqlite
]
}
makeWrapper "${lib.getExe mono}" $out/bin/duplicati-server \
--add-flags "$out/share/duplicati-${finalAttrs.version}/Duplicati.Server.exe" \
--prefix LD_LIBRARY_PATH : ${
lib.makeLibraryPath [
sqlite
icu
openssl
]
}
done
runHook postInstall
'';
meta = {
@@ -51,6 +77,6 @@ stdenv.mkDerivation (finalAttrs: {
bot-wxt1221
];
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
platforms = lib.platforms.all;
platforms = builtins.attrNames _supportedPlatforms;
};
})
+5 -1
View File
@@ -4,6 +4,7 @@
fetchFromGitHub,
rustPlatform,
protobuf,
nixosTests,
nix-update-script,
withQuic ? false, # with QUIC protocol support
}:
@@ -33,7 +34,10 @@ rustPlatform.buildRustPackage rec {
doCheck = false; # tests failed due to heavy rely on network
passthru.updateScript = nix-update-script { };
passthru = {
tests = { inherit (nixosTests) easytier; };
updateScript = nix-update-script { };
};
meta = {
homepage = "https://github.com/EasyTier/EasyTier";
+3 -3
View File
@@ -17,17 +17,17 @@
buildGoModule rec {
pname = "grafana-alloy";
version = "1.9.1";
version = "1.9.2";
src = fetchFromGitHub {
owner = "grafana";
repo = "alloy";
tag = "v${version}";
hash = "sha256-j3zuV+a3hLgHrb1jcPav9AhQpT8WT/cP4KSZ9gJY0p4=";
hash = "sha256-ciM5DbP5OTvAPUNgBTuwb+hbVtKGgQzafLLOjDftPZQ=";
};
proxyVendor = true;
vendorHash = "sha256-bePkYhKL8yNzVgX3Can9jyC1WKFQzHoX+L3qapZ0fjQ=";
vendorHash = "sha256-zmNrnCaUrsYJ0S5MQrj07sV+ZCnXbGQmH8Z0pMpJZk4=";
nativeBuildInputs = [
fixup-yarn-lock
+3 -3
View File
@@ -11,17 +11,17 @@
rustPlatform.buildRustPackage (finalAttrs: {
pname = "hyprshell";
version = "4.2.13";
version = "4.5.0";
src = fetchFromGitHub {
owner = "H3rmt";
repo = "hyprshell";
tag = "v${finalAttrs.version}";
hash = "sha256-OgIeNlD2YcW5lWAQvqMvOphIxbIpGOL2WNQmtAGCsbQ=";
hash = "sha256-AfOG2MCHRp/p894mJhCRRGTLd+DpWKAp3Epf5dR7S/E=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-/f1AzpuzhVLeSbemgpXkh/ag33bsRMg3lrRPKVGOcK8=";
cargoHash = "sha256-+yjqbTPmfqXGJ85J2+Muhe2/mL1UyBi2XdafY9Mp+Os=";
nativeBuildInputs = [
wrapGAppsHook4
+86
View File
@@ -0,0 +1,86 @@
{
lib,
stdenv,
fetchurl,
avahi,
obs-studio-plugins,
}:
let
versionJSON = lib.importJSON ./version.json;
ndiPlatform =
if stdenv.hostPlatform.isAarch64 then
"aarch64-rpi4-linux-gnueabi"
else if stdenv.hostPlatform.isAarch32 then
"arm-rpi2-linux-gnueabihf"
else if stdenv.hostPlatform.isx86_64 then
"x86_64-linux-gnu"
else
throw "unsupported platform for NDI SDK";
in
stdenv.mkDerivation rec {
pname = "ndi-6";
version = versionJSON.version;
majorVersion = lib.versions.major version;
installerName = "Install_NDI_SDK_v${majorVersion}_Linux";
src = fetchurl {
url = "https://downloads.ndi.tv/SDK/NDI_SDK_Linux/${installerName}.tar.gz";
hash = versionJSON.hash;
};
buildInputs = [ avahi ];
unpackPhase = ''
unpackFile $src
echo y | ./${installerName}.sh
sourceRoot="NDI SDK for Linux";
'';
installPhase = ''
mkdir $out
mv bin/${ndiPlatform} $out/bin
for i in $out/bin/*; do
if [ -L "$i" ]; then continue; fi
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$i"
done
patchelf --set-rpath "${avahi}/lib:${stdenv.cc.libc}/lib" $out/bin/ndi-record
patchelf --set-rpath "${avahi}/lib:${stdenv.cc.libc}/lib" $out/bin/ndi-free-audio
mv lib/${ndiPlatform} $out/lib
for i in $out/lib/*; do
if [ -L "$i" ]; then continue; fi
patchelf --set-rpath "${avahi}/lib:${stdenv.cc.libc}/lib" "$i"
done
rm $out/bin/libndi.so.${majorVersion}
ln -s $out/lib/libndi.so.${version} $out/bin/libndi.so.${majorVersion}
# Fake ndi version 5 for compatibility with DistroAV (obs plugin using NDI)
ln -s $out/lib/libndi.so.${version} $out/bin/libndi.so.5
mv include examples $out/
mkdir -p $out/share/doc/ndi-6
mv licenses $out/share/doc/ndi-6/licenses
mv documentation/* $out/share/doc/ndi-6/
'';
# Stripping breaks ndi-record.
dontStrip = true;
passthru.tests = {
inherit (obs-studio-plugins) distroav;
};
passthru.updateScript = ./update.py;
meta = {
homepage = "https://ndi.video/ndi-sdk/";
description = "NDI Software Developer Kit";
platforms = [
"x86_64-linux"
"i686-linux"
"aarch64-linux"
"armv7l-linux"
];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ globule655 ];
};
}
+77
View File
@@ -0,0 +1,77 @@
#!/usr/bin/env nix-shell
#! nix-shell -i python -p "python3.withPackages (ps: with ps; [ ps.absl-py ps.requests ])"
import hashlib
import io
import json
import os.path
import tarfile
import requests
from absl import app, flags
BASE_NAME = "Install_NDI_SDK_v6_Linux"
NDI_SDK_URL = f"https://downloads.ndi.tv/SDK/NDI_SDK_Linux/{BASE_NAME}.tar.gz"
NDI_EXEC = f"{BASE_NAME}.sh"
NDI_ARCHIVE_MAGIC = b"__NDI_ARCHIVE_BEGIN__\n"
FLAG_out = flags.DEFINE_string("out", None, "Path to read/write version.json from/to.")
def find_version_json() -> str:
if FLAG_out.value:
return FLAG_out.value
try_paths = ["pkgs/by-name/nd/ndi-6/version.json", "version.json"]
for path in try_paths:
if os.path.exists(path):
return path
raise Exception(
"Couldn't figure out where to write version.json; try specifying --out"
)
def fetch_tarball() -> bytes:
r = requests.get(NDI_SDK_URL)
r.raise_for_status()
return r.content
def read_version(tarball: bytes) -> str:
# Find the inner script.
outer_tarfile = tarfile.open(fileobj=io.BytesIO(tarball), mode="r:gz")
eula_script = outer_tarfile.extractfile(NDI_EXEC).read()
# Now find the archive embedded within the script.
archive_start = eula_script.find(NDI_ARCHIVE_MAGIC) + len(NDI_ARCHIVE_MAGIC)
inner_tarfile = tarfile.open(
fileobj=io.BytesIO(eula_script[archive_start:]), mode="r:gz"
)
# Now find Version.txt...
version_txt = (
inner_tarfile.extractfile("NDI SDK for Linux/Version.txt")
.read()
.decode("utf-8")
)
_, _, version = version_txt.strip().partition(" v")
return version
def main(argv):
tarball = fetch_tarball()
sha256 = hashlib.sha256(tarball).hexdigest()
version = {
"hash": f"sha256:{sha256}",
"version": read_version(tarball),
}
out_path = find_version_json()
with open(out_path, "w") as f:
json.dump(version, f)
f.write("\n")
if __name__ == "__main__":
app.run(main)
+1
View File
@@ -0,0 +1 @@
{"hash": "sha256-6iqjexwILth2muLpXWQjDVTvOuMq4jM8KBYnpPmViU8=", "version": "6.1.1"}
@@ -5,17 +5,17 @@
}:
rustPlatform.buildRustPackage rec {
pname = "parallel-disk-usage";
version = "0.11.1";
version = "0.12.0";
src = fetchFromGitHub {
owner = "KSXGitHub";
repo = "parallel-disk-usage";
rev = version;
hash = "sha256-yjNz51L/r1jqgeO0qhe8uR4Pn52acle+EmurZqVpWfI=";
hash = "sha256-Wj19lWepCrZe36njX+NMdpwXeRRh3ml9jKbbi7irrpg=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-v+cJ1Hw4cae/8A1MpHbIfGRVamI58byqfBLNCKKAHWk=";
cargoHash = "sha256-UK+jonM/ZBGoCKFcQlCo5OqYtKeU0VIWtx83oBh3lJQ=";
meta = with lib; {
description = "Highly parallelized, blazing fast directory tree analyzer";
+2 -2
View File
@@ -17,13 +17,13 @@ buildGoModule (finalAttrs: {
webkitgtk_4_1
];
pname = "paretosecurity";
version = "0.2.34";
version = "0.2.36";
src = fetchFromGitHub {
owner = "ParetoSecurity";
repo = "agent";
rev = finalAttrs.version;
hash = "sha256-tTFdgLpu7RRWx2B2VMROqs1HgG0qMbfUOS5KNLQFHQw=";
hash = "sha256-PAH5aswkN8MxK+sZNucXgw50Fc2CkhBLM7+wwxkgAvs=";
};
vendorHash = "sha256-RAKYaNi+MXUfNnEJmZF5g9jFBDOPIVBOZWtqZp2FwWY=";
+3 -3
View File
@@ -25,13 +25,13 @@ let
in
buildGoModule (finalAttrs: {
pname = "perses";
version = "0.51.0";
version = "0.51.1";
src = fetchFromGitHub {
owner = "perses";
repo = "perses";
tag = "v${finalAttrs.version}";
hash = "sha256-frCSuGEnYab4CTQoAuN876dG7Mwn/RJEnWouUuo7aJQ=";
hash = "sha256-ZijrDYG/HFPBOLEFqMDzoWhRoo/GiHr0dpjhKBJRAH8=";
};
outputs = [
@@ -49,7 +49,7 @@ buildGoModule (finalAttrs: {
inherit (finalAttrs) version src;
pname = "${finalAttrs.pname}-ui";
sourceRoot = "${finalAttrs.src.name}/${finalAttrs.npmRoot}";
hash = "sha256-nRE4IV8+wCuYXNAxrl7RfBFdY/ZyAIpXs3pDfCeIh74=";
hash = "sha256-yBkdqOLAopEHcS4rbOUL3bLxy27l/gm60nICsL9zigk=";
};
npmRoot = "ui";
+3 -3
View File
@@ -57,9 +57,9 @@
hash = "sha256-61k3G+8bCsUErBCwvFxgnYCPLAqpCIcuF3GEZHacMB0=";
};
"Table" = {
version = "0.7.0";
url = "https://github.com/perses/plugins/releases/download/table/v0.7.0/Table-0.7.0.tar.gz";
hash = "sha256-MemCUd/9RhodqMzDuYCNPYDMaSy7LpVPCTP4IUFE3lM=";
version = "0.7.1";
url = "https://github.com/perses/plugins/releases/download/table/v0.7.1/Table-0.7.1.tar.gz";
hash = "sha256-X/W2vSBddGHbEXzBW2MDxMwSMfVweSi5MtztXTURne8=";
};
"Tempo" = {
version = "0.51.0-rc.3";
+3 -3
View File
@@ -8,17 +8,17 @@
rustPlatform.buildRustPackage rec {
pname = "pik";
version = "0.24.0";
version = "0.25.0";
src = fetchFromGitHub {
owner = "jacek-kurlit";
repo = "pik";
rev = version;
hash = "sha256-LA60IQtR3IYVDdww79XFsTViGeVKi1MzRBB8ibhITK0=";
hash = "sha256-3ZYABdrODJJ9RUlhL7mIu/py3GCIFG3AUXQuol7o1Zs=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-j/BWTCsdAZF3NDj07DY5Mdf6MRGyBe3xpowZZQHSwTU=";
cargoHash = "sha256-333MHDuHYKlTUXSm2C19ZRPXeEGDxbQEImdsleUt1QU=";
passthru.tests.version = testers.testVersion { package = pik; };
+2 -2
View File
@@ -33,13 +33,13 @@
stdenv.mkDerivation rec {
pname = "rspamd";
version = "3.12.0";
version = "3.12.1";
src = fetchFromGitHub {
owner = "rspamd";
repo = "rspamd";
rev = version;
hash = "sha256-4C+bhUkqdn9RelHf6LfcfxVCIiBUCt4BxuI9TGdlIMc=";
hash = "sha256-bAkT0msUkgGkjAIlF7lnJbimBKW1NSn2zjkCj3ErJ1I=";
};
hardeningEnable = [ "pie" ];
+2 -2
View File
@@ -12,11 +12,11 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rundeck";
version = "5.12.0-20250512";
version = "5.13.0-20250625";
src = fetchurl {
url = "https://packagecloud.io/pagerduty/rundeck/packages/java/org.rundeck/rundeck-${finalAttrs.version}.war/artifacts/rundeck-${finalAttrs.version}.war/download?distro_version_id=167";
hash = "sha256-LsKxMj+XCKTAMC3aIRnJcJkc2jytfTfu/gi0omGkMEk=";
hash = "sha256-RqyJ0/gZQ1gIYSPoYfGGN5VB5ubUMl00pHPlw6v6tBQ=";
};
nativeBuildInputs = [ makeWrapper ];
+41 -24
View File
@@ -2,23 +2,29 @@
stdenv,
lib,
rustPlatform,
fetchCrate,
fetchFromGitHub,
pkg-config,
alsa-lib,
rust,
udevCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "speakersafetyd";
version = "1.0.2";
version = "1.1.2";
src = fetchCrate {
inherit pname version;
hash = "sha256-3DzBNebg1y/+psD2zOpDsnRJmabQLeO1UMxPq9M0CsU=";
src = fetchFromGitHub {
owner = "AsahiLinux";
repo = "speakersafetyd";
tag = finalAttrs.version;
hash = "sha256-sSGoF2c5HfPM2FBrBJwJ9NvExYijGx6JH1bJp3epfe0=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-DnOnqi60JsRX8yqEM/5zZ3yX/rk85/ruwL3aW1FRXKg=";
cargoHash = "sha256-9XbrIY1VwnHtqi/ZfS952SyjNjA/TJRdOqCsPReZI8o=";
patches = [
./remove-install-paths.patch
];
nativeBuildInputs = [
pkg-config
@@ -27,32 +33,43 @@ rustPlatform.buildRustPackage rec {
buildInputs = [ alsa-lib ];
postPatch = ''
substituteInPlace speakersafetyd.service --replace "/usr" "$out"
substituteInPlace Makefile --replace "target/release" "target/${stdenv.hostPlatform.rust.cargoShortTarget}/$cargoBuildType"
# creating files in /var does not make sense in a nix package
substituteInPlace Makefile --replace 'install -dDm0755 $(DESTDIR)/$(VARDIR)/lib/speakersafetyd/blackbox' ""
substituteInPlace speakersafetyd.service \
--replace-fail "User=speakersafetyd" \
"" \
--replace-fail "/usr" \
"$out"
substituteInPlace Makefile \
--replace-fail "target/release" \
"target/${stdenv.hostPlatform.rust.cargoShortTarget}/$cargoBuildType" \
'';
installFlags = [
"BINDIR=$(out)/bin"
"UNITDIR=$(out)/lib/systemd/system"
"UDEVDIR=$(out)/lib/udev/rules.d"
"SHAREDIR=$(out)/share"
"TMPFILESDIR=$(out)/lib/tmpfiles.d"
"DESTDIR=$(out)"
"BINDIR=bin"
"UNITDIR=lib/systemd/system"
"UDEVDIR=lib/udev/rules.d"
"SHAREDIR=share"
"TMPFILESDIR=lib/tmpfiles.d"
];
dontCargoInstall = true;
doInstallCheck = true;
meta = with lib; {
description = "Userspace daemon written in Rust that implements an analogue of the Texas Instruments Smart Amp speaker protection model";
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Userspace daemon that implements the Smart Amp protection model";
mainProgram = "speakersafetyd";
homepage = "https://github.com/AsahiLinux/speakersafetyd";
maintainers = with maintainers; [
maintainers = with lib.maintainers; [
normalcea
flokli
yuka
];
license = licenses.mit;
platforms = platforms.linux;
license = lib.licenses.mit;
platforms = lib.platforms.linux;
};
}
})
@@ -0,0 +1,16 @@
diff --git a/Makefile b/Makefile
index 41bf7b4..ca14be7 100644
--- a/Makefile
+++ b/Makefile
@@ -24,11 +24,8 @@ install-data:
install -pm0644 95-speakersafetyd.rules $(DESTDIR)/$(UDEVDIR)/95-speakersafetyd.rules
install -dDm0755 $(DESTDIR)/$(SHAREDIR)/speakersafetyd/apple
install -pm0644 -t $(DESTDIR)/$(SHAREDIR)/speakersafetyd/apple $(wildcard conf/apple/*)
- install -dDm0755 -o $(SPEAKERSAFETYD_USER) -g $(SPEAKERSAFETYD_GROUP) $(DESTDIR)/$(VARDIR)/lib/speakersafetyd
- install -dDm0700 -o $(SPEAKERSAFETYD_USER) -g $(SPEAKERSAFETYD_GROUP) $(DESTDIR)/$(VARDIR)/lib/speakersafetyd/blackbox
install -dDm0755 $(DESTDIR)/$(TMPFILESDIR)
install -pm0644 speakersafetyd.tmpfiles $(DESTDIR)/$(TMPFILESDIR)/speakersafetyd.conf
- install -dDm0755 -o $(SPEAKERSAFETYD_USER) -g $(SPEAKERSAFETYD_GROUP) $(DESTDIR)/run/speakersafetyd
uninstall:
rm -f $(DESTDIR)/$(BINDIR)/speakersafetyd $(DESTDIR)/$(UNITDIR)/speakersafetyd.service $(DESTDIR)/$(UDEVDIR)/95-speakersafetyd.rules $(DESTDIR)/$(TMPFILESDIR)/speakersafetyd.conf
@@ -32,8 +32,6 @@ stdenv.mkDerivation rec {
installPhase = "install -Dm755 srht-gen-oauth-tok $out/bin/srht-gen-oauth-tok";
passthru.tests.sourcehut = nixosTests.sourcehut;
meta = {
description = "Script to register a new Sourcehut OAuth token for a given user";
longDescription = ''
+13 -1
View File
@@ -38,7 +38,19 @@ stdenv.mkDerivation rec {
patches = [ ./fusermount-setuid.patch ];
configurePhase = ''
substituteInPlace src/tup/link.sh --replace '`git describe' '`echo ${version}'
substituteInPlace src/tup/link.sh --replace-fail '`git describe' '`echo ${version}'
for path in Tupfile build.sh src/tup/server/Tupfile ; do
substituteInPlace $path --replace-fail "pkg-config" "${stdenv.cc.targetPrefix}pkg-config"
done
# Replace "pcre2-config --libs8" => "pkg-config libpcre2-8 --libs".
#
# There is prefixed pkg-config for cross-compilation, but no prefixed "pcre2-config".
for path in Tupfile Tuprules.tup ; do
substituteInPlace $path --replace-fail "pcre2-config" "${stdenv.cc.targetPrefix}pkg-config libpcre2-8 "
done
substituteInPlace Tupfile --replace-fail "--libs8" "--libs"
cat << EOF > tup.config
CONFIG_CC=${stdenv.cc.targetPrefix}cc
+6 -6
View File
@@ -1,14 +1,14 @@
{
"darwin": {
"hash": "sha256-UJAirS6JFFLW0OsOYj8RNUfG85dRHnxXasNw2QHX1Xs=",
"version": "0.2025.06.20.22.47.stable_05"
"hash": "sha256-7/gSUR9h9PzBrTgxERXNjqzJDtqxebjmD0cF3Vx2ySY=",
"version": "0.2025.06.25.08.12.stable_01"
},
"linux_x86_64": {
"hash": "sha256-h0ODaO3SJcZAxFRFBYYjWXQYsRAemGizn/YA7AF36pw=",
"version": "0.2025.06.20.22.47.stable_05"
"hash": "sha256-2VQzEBAAu6YasottOTu3YjQvvXR5gT3DAjGhp63wMNo=",
"version": "0.2025.06.25.08.12.stable_01"
},
"linux_aarch64": {
"hash": "sha256-H4xldFBMpfu6UFGFA/IkA1zPFqhFN6abhfHTRdYNpGA=",
"version": "0.2025.06.20.22.47.stable_05"
"hash": "sha256-5jpW7mUHLshGZUWigAJ8QgmpYnfosJN1JpRLeNvVK3Y=",
"version": "0.2025.06.25.08.12.stable_01"
}
}
@@ -40,6 +40,11 @@ stdenv.mkDerivation (finalAttrs: {
url = "https://github.com/linuxdeepin/dde-shell/commit/936d62a2c20398b9ca6ae28f9101dd288c8b1678.patch";
hash = "sha256-u5TcPy2kZsOLGUgjTGZ5JX3mWnr/rOQ3SWBRyjWEiw4=";
})
(fetchpatch {
name = "adapt-import-change-of-QtQml-Models-in-Qt-6_9.patch";
url = "https://github.com/linuxdeepin/dde-shell/commit/ad92c160508a5eb53fd5af558ef1b1ba881b97ac.patch";
hash = "sha256-3GdkbFEt51EP04RQN54EDsGyXkeZoWhbnQAHkwjUeGY=";
})
];
+3 -3
View File
@@ -33,9 +33,9 @@ let
"19.1.7".officialRelease.sha256 = "sha256-cZAB5vZjeTsXt9QHbP5xluWNQnAHByHtHnAhVDV0E6I=";
"20.1.6".officialRelease.sha256 = "sha256-PfCzECiCM+k0hHqEUSr1TSpnII5nqIxg+Z8ICjmMj0Y=";
"21.0.0-git".gitRelease = {
rev = "f9fce4975bbad835deba6e639c21a62154dd8c14";
rev-version = "21.0.0-unstable-2025-06-22";
sha256 = "sha256-Xu9RD6R6tQDZ0kaSD7N0GTp1TcUV6BK12fobK0qPkIw=";
rev = "2d94c08d03ada0a4d3c30a93594d0381946aa85a";
rev-version = "21.0.0-unstable-2025-06-29";
sha256 = "sha256-waAXH17LNrzbq4kJ1u9EUpYGDky8iEVVCsYpthOrgMY=";
};
} // llvmVersions;
@@ -12,14 +12,15 @@
owner = "coq";
inherit version;
defaultVersion =
let
case = case: out: { inherit case out; };
in
with lib.versions;
lib.switch coq.coq-version (lib.lists.sort (x: y: isLe x.out y.out) (
lib.mapAttrsToList (out: case: { inherit case out; }) {
"9.0.0+rocq${coq.coq-version}" = range "9.0" "9.0";
"9.0.0+coq${coq.coq-version}" = range "8.13" "8.20";
"${coq.coq-version}.0" = range "8.6" "8.17";
}
)) null;
lib.switch coq.coq-version [
(case (range "9.0" "9.0") "9.0.0+rocq${coq.coq-version}")
(case (range "8.13" "8.20") "9.0.0+coq${coq.coq-version}")
(case (range "8.6" "8.17") "${coq.coq-version}.0")
] null;
release."9.0.0+rocq9.0".sha256 = "sha256-ctnwpyNVhryEUA5YEsAImrcJsNMhtBgDSOz+z5Z4R78=";
release."9.0.0+coq8.20".sha256 = "sha256-pkvyDaMXRalc6Uu1eBTuiqTpRauRrzu946c6TavyTKY=";
@@ -15,18 +15,19 @@ let
elpi-version
else
(
let
case = case: out: { inherit case out; };
in
with lib.versions;
lib.switch coq.coq-version (lib.lists.sort (x: y: lib.versions.isLe x.out y.out) (
lib.mapAttrsToList (out: case: { inherit case out; }) {
"1.11.4" = "8.11";
"1.12.0" = "8.12";
"1.13.7" = range "8.13" "8.14";
"1.15.0" = "8.15";
"1.17.0" = range "8.16" "8.17";
"1.18.1" = range "8.18" "8.19";
"2.0.7" = range "8.20" "9.0";
}
)) { }
lib.switch coq.coq-version [
(case "8.11" "1.11.4")
(case "8.12" "1.12.0")
(case (range "8.13" "8.14") "1.13.7")
(case "8.15" "1.15.0")
(case (range "8.16" "8.17") "1.17.0")
(case (range "8.18" "8.19") "1.18.1")
(case (range "8.20" "9.0") "2.0.7")
] { }
);
elpi = coq.ocamlPackages.elpi.override { version = default-elpi-version; };
propagatedBuildInputs_wo_elpi = [
@@ -38,21 +39,22 @@ let
owner = "LPCIC";
inherit version;
defaultVersion =
let
case = case: out: { inherit case out; };
in
with lib.versions;
lib.switch coq.coq-version (lib.lists.sort (x: y: lib.versions.isLe x.out y.out) (
lib.mapAttrsToList (out: case: { inherit case out; }) {
"2.5.2" = range "8.20" "9.0";
"2.0.1" = "8.19";
"2.0.0" = "8.18";
"1.18.0" = "8.17";
"1.15.6" = "8.16";
"1.14.0" = "8.15";
"1.11.2" = "8.14";
"1.11.1" = "8.13";
"1.8.3_8.12" = "8.12";
"1.6.3_8.11" = "8.11";
}
)) null;
lib.switch coq.coq-version [
(case (range "8.20" "9.0") "2.5.2")
(case "8.19" "2.0.1")
(case "8.18" "2.0.0")
(case "8.17" "1.18.0")
(case "8.16" "1.15.6")
(case "8.15" "1.14.0")
(case "8.14" "1.11.2")
(case "8.13" "1.11.1")
(case "8.12" "1.8.3_8.12")
(case "8.11" "1.6.3_8.11")
] null;
release."2.5.2".sha256 = "sha256-lLzjPrbVB3rrqox528YiheUb0u89R84Xmrgkn0oplOs=";
release."2.5.0".sha256 = "sha256-Z5xjO83X/ZoTQlWnVupGXPH3HuJefr57Kv128I0dltg=";
release."2.4.0".sha256 = "sha256-W2+vVGExLLux8e0nSZESSoMVvrLxhL6dmXkb+JuKiqc=";
+23 -19
View File
@@ -17,27 +17,31 @@ let
inherit version;
defaultVersion =
with lib.versions;
let
cmc = c: mc: [
c
mc
];
case = coq: mc: out: {
cases = [
coq
mc
];
inherit out;
};
in
lib.switch [ coq.coq-version mathcomp.version ] (lib.lists.sort (x: y: isLe x.out y.out) (
lib.mapAttrsToList (out: cases: { inherit cases out; }) {
"2.1.0" = cmc (range "8.20" "9.0") (isGe "2.3.0");
"2.0.3" = cmc (range "8.16" "8.20") (isGe "2.1.0");
"2.0.1" = cmc (range "8.16" "8.20") (isGe "2.0.0");
"2.0.0" = cmc (range "8.16" "8.17") (isGe "2.0.0");
"1.1.3" = cmc (range "8.15" "8.18") (range "1.15.0" "1.18.0");
"1.1.1" = cmc (range "8.13" "8.17") (range "1.13.0" "1.18.0");
"1.1.0" = cmc (range "8.10" "8.15") (range "1.12.0" "1.18.0");
"1.0.5" = cmc (isGe "8.10") (range "1.11.0" "1.12.0");
"1.0.4" = cmc (isGe "8.7") "1.11.0";
"1.0.3" = cmc (isGe "8.7") "1.10.0";
}
)) null;
with lib.versions;
lib.switch
[ coq.coq-version mathcomp.version ]
[
(case (range "8.20" "9.0") (isGe "2.3.0") "2.1.0")
(case (range "8.16" "8.20") (isGe "2.1.0") "2.0.3")
(case (range "8.16" "8.20") (isGe "2.0.0") "2.0.1")
(case (range "8.16" "8.17") (isGe "2.0.0") "2.0.0")
(case (range "8.15" "8.18") (range "1.15.0" "1.18.0") "1.1.3")
(case (range "8.13" "8.17") (range "1.13.0" "1.18.0") "1.1.1")
(case (range "8.10" "8.15") (range "1.12.0" "1.18.0") "1.1.0")
(case (isGe "8.10") (range "1.11.0" "1.12.0") "1.0.5")
(case (isGe "8.7") "1.11.0" "1.0.4")
(case (isGe "8.7") "1.10.0" "1.0.3")
]
null;
release."2.1.0".sha256 = "sha256-UoDxy2BKraDyRsO42GXRo26O74OF51biZQGkIMWLf8Y=";
release."2.0.3".sha256 = "sha256-5lDq7IWlEW0EkNzYPu+dA6KOvRgy53W/alikpDr/Kd0=";
@@ -14,18 +14,19 @@ mkCoqDerivation {
domain = "gitlab.inria.fr";
inherit version;
defaultVersion =
let
case = case: out: { inherit case out; };
in
with lib.versions;
lib.switch coq.coq-version (lib.lists.sort (x: y: isLe x.out y.out) (
lib.mapAttrsToList (out: case: { inherit case out; }) {
"3.4.3" = range "8.12" "9.0";
"3.4.2" = range "8.12" "8.20";
"3.4.0" = range "8.12" "8.18";
"3.3.0" = range "8.12" "8.17";
"3.2.0" = range "8.8" "8.16";
"3.1.0" = range "8.8" "8.13";
"3.0.2" = range "8.5" "8.9";
}
)) null;
lib.switch coq.coq-version [
(case (range "8.12" "9.0") "3.4.3")
(case (range "8.12" "8.20") "3.4.2")
(case (range "8.12" "8.18") "3.4.0")
(case (range "8.12" "8.17") "3.3.0")
(case (range "8.8" "8.16") "3.2.0")
(case (range "8.8" "8.13") "3.1.0")
(case (range "8.5" "8.9") "3.0.2")
] null;
release."3.4.3".sha256 = "sha256-bzzAIENU2OYTtmdBU9Xw8zyBvz9vqTiqjWSm7RnXXRA=";
release."3.4.2".sha256 = "sha256-aBTF8ZKu67Rb3ryCqFyejUXf/65KgG8i5je/ZMFSrj4=";
release."3.4.1".sha256 = "sha256-REhvIBl3EaL8CQqI34Gn7Xjf9NhPI3nrUAO26pSLbm0=";
@@ -13,21 +13,25 @@ mkCoqDerivation {
inherit version;
defaultVersion =
with lib.versions;
let
cmc = c: mc: [
c
mc
];
case = coq: mc: out: {
cases = [
coq
mc
];
inherit out;
};
in
lib.switch [ coq.coq-version ssreflect.version ] (lib.lists.sort (x: y: isLe x.out y.out) (
lib.mapAttrsToList (out: cases: { inherit cases out; }) {
"0.2.2" = cmc (range "8.17" "9.0") (range "2.0.0" "2.4.0");
"0.2.1" = cmc (range "8.17" "9.0") (range "2.0.0" "2.3.0");
"0.2.0" = cmc (range "8.17" "8.20") (range "2.0.0" "2.2.0");
"0.1.1" = cmc (range "8.11" "8.20") (isLe "2.0.0");
}
)) null;
with lib.versions;
lib.switch
[ coq.coq-version ssreflect.version ]
[
(case (range "8.17" "9.0") (range "2.0.0" "2.4.0") "0.2.2")
(case (range "8.17" "9.0") (range "2.0.0" "2.3.0") "0.2.1")
(case (range "8.17" "8.20") (range "2.0.0" "2.2.0") "0.2.0")
(case (range "8.11" "8.20") (isLe "2.0.0") "0.1.1")
]
null;
releaseRev = v: "v${v}";
@@ -15,24 +15,26 @@ mkCoqDerivation {
owner = "Karmaki";
repo = "coq-dpdgraph";
inherit version;
defaultVersion = lib.switch coq.coq-version (lib.lists.sort (x: y: lib.versions.isLe x.out y.out) (
lib.mapAttrsToList (out: case: { inherit case out; }) {
"1.0+8.20" = "8.20";
"1.0+8.19" = "8.19";
"1.0+8.18" = "8.18";
"1.0+8.17" = "8.17";
"1.0+8.16" = "8.16";
"1.0+8.15" = "8.15";
"1.0+8.14" = "8.14";
"1.0+8.13" = "8.13";
"0.6.8" = "8.12";
"0.6.7" = "8.11";
"0.6.6" = "8.10";
"0.6.5" = "8.9";
"0.6.3" = "8.8";
"0.6.2" = "8.7";
}
)) null;
defaultVersion =
let
case = case: out: { inherit case out; };
in
lib.switch coq.coq-version [
(case "8.20" "1.0+8.20")
(case "8.19" "1.0+8.19")
(case "8.18" "1.0+8.18")
(case "8.17" "1.0+8.17")
(case "8.16" "1.0+8.16")
(case "8.15" "1.0+8.15")
(case "8.14" "1.0+8.14")
(case "8.13" "1.0+8.13")
(case "8.12" "0.6.8")
(case "8.11" "0.6.7")
(case "8.10" "0.6.6")
(case "8.9" "0.6.5")
(case "8.8" "0.6.3")
(case "8.7" "0.6.2")
] null;
release."1.0+8.20".sha256 = "sha256-szfH/OksCH3SCbcFjwEvLwHE5avmHp1vYiJM6KAXFqs=";
release."1.0+8.19".sha256 = "sha256-L1vjEydYiwDFTXES3sgfdaO/D50AbTJKBXUKUCgbpto=";
@@ -12,26 +12,28 @@
repo = "Coq-Equations";
opam-name = "rocq-equations";
inherit version;
defaultVersion = lib.switch coq.coq-version (lib.lists.sort (x: y: lib.versions.isLe x.out y.out) (
lib.mapAttrsToList (out: case: { inherit case out; }) {
"1.3.1+9.0" = "9.0";
"1.3.1+8.20" = "8.20";
"1.3+8.19" = "8.19";
"1.3+8.18" = "8.18";
"1.3+8.17" = "8.17";
"1.3+8.16" = "8.16";
"1.3+8.15" = "8.15";
"1.3+8.14" = "8.14";
"1.3+8.13" = "8.13";
"1.2.4+coq8.12" = "8.12";
"1.2.4+coq8.11" = "8.11";
"1.2.1+coq8.10-2" = "8.10";
"1.2.1+coq8.9" = "8.9";
"1.2+coq8.8" = "8.8";
"1.0+coq8.7" = "8.7";
"1.0+coq8.6" = "8.6";
}
)) null;
defaultVersion =
let
case = case: out: { inherit case out; };
in
lib.switch coq.coq-version [
(case "9.0" "1.3.1+9.0")
(case "8.20" "1.3.1+8.20")
(case "8.19" "1.3+8.19")
(case "8.18" "1.3+8.18")
(case "8.17" "1.3+8.17")
(case "8.16" "1.3+8.16")
(case "8.15" "1.3+8.15")
(case "8.14" "1.3+8.14")
(case "8.13" "1.3+8.13")
(case "8.12" "1.2.4+coq8.12")
(case "8.11" "1.2.4+coq8.11")
(case "8.10" "1.2.1+coq8.10-2")
(case "8.9" "1.2.1+coq8.9")
(case "8.8" "1.2+coq8.8")
(case "8.7" "1.0+coq8.7")
(case "8.6" "1.0+coq8.6")
] null;
release."1.0+coq8.6".version = "1.0";
release."1.0+coq8.6".rev = "v1.0";
@@ -13,22 +13,26 @@
inherit version;
defaultVersion =
with lib.versions;
let
cmc = c: mc: [
c
mc
];
case = coq: mc: out: {
cases = [
coq
mc
];
inherit out;
};
in
lib.switch [ coq.coq-version mathcomp-boot.version ] (lib.lists.sort (x: y: isLe x.out y.out) (
lib.mapAttrsToList (out: cases: { inherit cases out; }) {
"0.5.0" = cmc (range "8.17" "9.0") (range "2.0.0" "2.4.0");
"0.4.0" = cmc (range "8.17" "8.20") (range "2.0.0" "2.3.0");
"0.3.1" = cmc (range "8.11" "8.20") (range "1.12.0" "1.19.0");
"0.3.0" = cmc (range "8.11" "8.14") (isLe "1.12.0");
"0.2.2" = cmc (range "8.10" "8.12") (isLe "1.12.0");
}
)) null;
with lib.versions;
lib.switch
[ coq.coq-version mathcomp-boot.version ]
[
(case (range "8.17" "9.0") (range "2.0.0" "2.4.0") "0.5.0")
(case (range "8.17" "8.20") (range "2.0.0" "2.3.0") "0.4.0")
(case (range "8.11" "8.20") (range "1.12.0" "1.19.0") "0.3.1")
(case (range "8.11" "8.14") (isLe "1.12.0") "0.3.0")
(case (range "8.10" "8.12") (isLe "1.12.0") "0.2.2")
]
null;
releaseRev = v: "v${v}";
+12 -11
View File
@@ -14,18 +14,19 @@ mkCoqDerivation {
domain = "gitlab.inria.fr";
inherit version;
defaultVersion =
let
case = case: out: { inherit case out; };
in
with lib.versions;
lib.switch coq.coq-version (lib.lists.sort (x: y: isLe x.out y.out) (
lib.mapAttrsToList (out: case: { inherit case out; }) {
"4.2.1" = range "8.15" "9.0";
"4.2.0" = range "8.14" "8.20";
"4.1.3" = range "8.14" "8.18";
"4.1.1" = range "8.14" "8.17";
"4.1.0" = range "8.14" "8.16";
"3.4.3" = range "8.7" "8.15";
"2.6.1" = range "8.5" "8.8";
}
)) null;
lib.switch coq.coq-version [
(case (range "8.15" "9.0") "4.2.1")
(case (range "8.14" "8.20") "4.2.0")
(case (range "8.14" "8.18") "4.1.3")
(case (range "8.14" "8.17") "4.1.1")
(case (range "8.14" "8.16") "4.1.0")
(case (range "8.7" "8.15") "3.4.3")
(case (range "8.5" "8.8") "2.6.1")
] null;
release."4.2.1".sha256 = "sha256-W5hcAm0GGmNsvre79/iGNcoBwFzStC4G177hZ3ds/4E=";
release."4.2.0".sha256 = "sha256-uTeo4GCs6wTLN3sLKsj0xLlt1fUDYfozXtq6iooLUgM=";
release."4.1.4".sha256 = "sha256-Use6Mlx79yef1CkCPyGoOItsD69B9KR+mQArCtmre4s=";
@@ -22,22 +22,26 @@ mkCoqDerivation {
inherit version;
defaultVersion =
with lib.versions;
let
cmc = c: mc: [
c
mc
];
case = coq: mc: out: {
cases = [
coq
mc
];
inherit out;
};
in
lib.switch [ coq.coq-version mathcomp.version ] (lib.lists.sort (x: y: isLe x.out y.out) (
lib.mapAttrsToList (out: cases: { inherit cases out; }) {
"1.4.1" = cmc (isGe "8.16") (isGe "2.0");
"1.3.0" = cmc (isGe "8.16") "2.0.0";
"1.2.5" = cmc (isGe "8.11") (range "1.12" "1.19");
"1.2.4" = cmc (isGe "8.11") (range "1.11" "1.14");
"1.2.3" = cmc (isLe "8.13") (lib.pred.inter (isGe "1.11.0") (isLt "1.13"));
}
)) null;
with lib.versions;
lib.switch
[ coq.coq-version mathcomp.version ]
[
(case (isGe "8.16") (isGe "2.0") "1.4.1")
(case (isGe "8.16") "2.0.0" "1.3.0")
(case (isGe "8.11") (range "1.12" "1.19") "1.2.5")
(case (isGe "8.11") (range "1.11" "1.14") "1.2.4")
(case (isLe "8.13") (lib.pred.inter (isGe "1.11.0") (isLt "1.13")) "1.2.3")
]
null;
propagatedBuildInputs = [
mathcomp.boot
+17 -13
View File
@@ -22,21 +22,25 @@ mkCoqDerivation {
inherit version;
defaultVersion =
with lib.versions;
let
cmc = c: mc: [
c
mc
];
case = coq: mc: out: {
cases = [
coq
mc
];
inherit out;
};
in
lib.switch [ coq.coq-version mathcomp.version ] (lib.lists.sort (x: y: isLe x.out y.out) (
lib.mapAttrsToList (out: cases: { inherit cases out; }) {
"2.3" = cmc (range "8.16" "9.0") (range "2.0" "2.4");
"2.2" = cmc (range "8.16" "9.0") (range "2.0" "2.3");
"1.17" = cmc (range "8.10" "8.18") (range "1.12.0" "1.18.0");
"1.11" = cmc (range "8.10" "8.12") "1.11.0";
}
)) null;
with lib.versions;
lib.switch
[ coq.coq-version mathcomp.version ]
[
(case (range "8.16" "9.0") (range "2.0" "2.4") "2.3")
(case (range "8.16" "9.0") (range "2.0" "2.3") "2.2")
(case (range "8.10" "8.18") (range "1.12.0" "1.18.0") "1.17")
(case (range "8.10" "8.12") "1.11.0" "1.11")
]
null;
propagatedBuildInputs = [
mathcomp.boot
@@ -24,23 +24,27 @@ mkCoqDerivation {
inherit version;
defaultVersion =
with lib.versions;
let
cmc = c: mc: [
c
mc
];
case = coq: mc: out: {
cases = [
coq
mc
];
inherit out;
};
in
lib.switch [ coq.coq-version mathcomp.version ] (lib.lists.sort (x: y: isLe x.out y.out) (
lib.mapAttrsToList (out: cases: { inherit cases out; }) {
"0.9.6" = cmc (range "8.18" "9.0") (range "2.0.0" "2.4.0");
"0.9.4" = cmc (range "8.16" "8.19") (range "2.0.0" "2.3.0");
"0.9.3" = cmc (range "8.16" "8.18") (range "2.0.0" "2.1.0");
"0.9.2" = cmc (range "8.14" "8.18") (range "1.13.0" "1.18.0");
"0.9.1" = cmc (range "8.14" "8.16") (range "1.13.0" "1.14.0");
"0.9" = cmc (range "8.12" "8.13") (range "1.12.0" "1.14.0");
}
)) null;
with lib.versions;
lib.switch
[ coq.coq-version mathcomp.version ]
[
(case (range "8.18" "9.0") (range "2.0.0" "2.4.0") "0.9.6")
(case (range "8.16" "8.19") (range "2.0.0" "2.3.0") "0.9.4")
(case (range "8.16" "8.18") (range "2.0.0" "2.1.0") "0.9.3")
(case (range "8.14" "8.18") (range "1.13.0" "1.18.0") "0.9.2")
(case (range "8.14" "8.16") (range "1.13.0" "1.14.0") "0.9.1")
(case (range "8.12" "8.13") (range "1.12.0" "1.14.0") "0.9")
]
null;
propagatedBuildInputs = [
mathcomp.algebra
@@ -14,20 +14,21 @@ let
owner = "math-comp";
inherit version;
defaultVersion =
let
case = case: out: { inherit case out; };
in
with lib.versions;
lib.switch coq.coq-version (lib.lists.sort (x: y: isLe x.out y.out) (
lib.mapAttrsToList (out: case: { inherit case out; }) {
"1.9.1" = range "8.20" "9.0";
"1.8.0" = range "8.19" "8.20";
"1.7.1" = range "8.18" "8.20";
"1.6.0" = range "8.16" "8.18";
"1.5.0" = range "8.15" "8.18";
"1.4.0" = range "8.15" "8.17";
"1.2.0" = range "8.13" "8.14";
"1.1.0" = range "8.12" "8.13";
"0.10.0" = isEq "8.11";
}
)) null;
lib.switch coq.coq-version [
(case (range "8.20" "9.0") "1.9.1")
(case (range "8.19" "8.20") "1.8.0")
(case (range "8.18" "8.20") "1.7.1")
(case (range "8.16" "8.18") "1.6.0")
(case (range "8.15" "8.18") "1.5.0")
(case (range "8.15" "8.17") "1.4.0")
(case (range "8.13" "8.14") "1.2.0")
(case (range "8.12" "8.13") "1.1.0")
(case (isEq "8.11") "0.10.0")
] null;
release."1.9.1".sha256 = "sha256-AiS0ezMyfIYlXnuNsVLz1GlKQZzJX+ilkrKkbo0GrF0=";
release."1.8.1".sha256 = "sha256-Z0WAHDyycqgL+Le/zNfEAoLWzFb7WIL+3G3vEBExlb4=";
release."1.8.0".sha256 = "sha256-4s/4ZZKj5tiTtSHGIM8Op/Pak4Vp52WVOpd4l9m19fY=";
@@ -15,13 +15,12 @@ mkCoqDerivation {
defaultVersion =
let
inherit (lib.versions) isLe range;
case = case: out: { inherit case out; };
inherit (lib.versions) range;
in
lib.switch coq.coq-version (lib.lists.sort (x: y: isLe x.out y.out) (
lib.mapAttrsToList (out: case: { inherit case out; }) {
"0.2.1" = range "8.14" "8.19";
}
)) null;
lib.switch coq.coq-version [
(case (range "8.14" "8.19") "0.2.1")
] null;
release = {
"0.2.1".sha256 = "sha256-CIcaXEojNdajXNoMBjGlQRc1sOJSKgUlditNxbNSPgk=";
};
@@ -19,13 +19,14 @@
inherit version;
defaultVersion =
let
case = case: out: { inherit case out; };
in
with lib.versions;
lib.switch coq.coq-version (lib.lists.sort (x: y: isLe x.out y.out) (
lib.mapAttrsToList (out: case: { inherit case out; }) {
"0.9" = range "8.13" "8.16";
"0.4" = range "8.11" "8.12";
}
)) null;
lib.switch coq.coq-version [
(case (range "8.13" "8.16") "0.9")
(case (range "8.11" "8.12") "0.4")
] null;
useDune = true;
@@ -18,20 +18,23 @@ mkCoqDerivation rec {
domain = "gitlab.inria.fr";
inherit version;
defaultVersion =
let
case = case: out: { inherit case out; };
in
with lib.versions;
lib.switch coq.coq-version (lib.lists.sort (x: y: isLe x.out y.out) (
lib.mapAttrsToList (out: case: { inherit case out; }) {
"4.11.1" = range "8.13" "8.20";
"4.10.0" = range "8.12" "8.19";
"4.9.0" = range "8.12" "8.18";
"4.8.0" = range "8.12" "8.17";
"4.6.0" = range "8.12" "8.16";
"4.5.2" = range "8.8" "8.16";
"4.0.0" = range "8.8" "8.12";
"3.4.2" = range "8.7" "8.11";
"3.3.0" = range "8.5" "8.6";
}
)) null;
lib.switch coq.coq-version [
(case (range "8.13" "9.0") "4.11.2")
(case (range "8.13" "8.20") "4.11.1")
(case (range "8.12" "8.19") "4.10.0")
(case (range "8.12" "8.18") "4.9.0")
(case (range "8.12" "8.17") "4.8.0")
(case (range "8.12" "8.16") "4.6.0")
(case (range "8.8" "8.16") "4.5.2")
(case (range "8.8" "8.12") "4.0.0")
(case (range "8.7" "8.11") "3.4.2")
(case (range "8.5" "8.6") "3.3.0")
] null;
release."4.11.2".sha256 = "sha256-ouhjHtlxcqt06+Pt+UZAzwp83bVYPh3N+8jnsVvapSU=";
release."4.11.1".sha256 = "sha256-QWZvU468rOhK796xCCEawW6rhCRTPnE0iLll9ynKflo=";
release."4.11.0".sha256 = "sha256-vPwa4zSjyvxHLGDoNaBnHV2pb77dnQFbC50BL80fcvE=";
release."4.10.0".sha256 = "sha256-MZJVoKGLXjDabdv9BuUSK1L9z1cubzC9cqVuWevKIXQ=";
+12 -11
View File
@@ -12,18 +12,19 @@ mkCoqDerivation {
owner = "iris";
inherit version;
defaultVersion =
let
case = case: out: { inherit case out; };
in
with lib.versions;
lib.switch coq.coq-version (lib.lists.sort (x: y: isLe x.out y.out) (
lib.mapAttrsToList (out: case: { inherit case out; }) {
"4.3.0" = range "8.19" "9.0";
"4.2.0" = range "8.18" "8.19";
"4.1.0" = range "8.16" "8.18";
"4.0.0" = range "8.13" "8.17";
"3.5.0" = range "8.12" "8.14";
"3.4.0" = range "8.11" "8.13";
"3.3.0" = range "8.9" "8.10";
}
)) null;
lib.switch coq.coq-version [
(case (range "8.19" "9.0") "4.3.0")
(case (range "8.18" "8.19") "4.2.0")
(case (range "8.16" "8.18") "4.1.0")
(case (range "8.13" "8.17") "4.0.0")
(case (range "8.12" "8.14") "3.5.0")
(case (range "8.11" "8.13") "3.4.0")
(case (range "8.9" "8.10") "3.3.0")
] null;
release."4.3.0".sha256 = "sha256-3qhjiFI+A3I3fD8rFfJL5Hek77wScfn/FNNbDyGqA1k=";
release."4.2.0".sha256 = "sha256-HuiHIe+5letgr1NN1biZZFq0qlWUbFmoVI7Q91+UIfM=";
release."4.1.0".sha256 = "sha256-nTZUeZOXiH7HsfGbMKDE7vGrNVCkbMaWxdMWUcTUNlo=";

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