Merge e1db604e23 into haskell-updates
This commit is contained in:
+3
-1
@@ -18,7 +18,9 @@ let
|
||||
|
||||
pkgs = import nixpkgs' {
|
||||
inherit system;
|
||||
config = { };
|
||||
config = {
|
||||
permittedInsecurePackages = [ "nix-2.3.18" ];
|
||||
};
|
||||
overlays = [ ];
|
||||
};
|
||||
|
||||
|
||||
@@ -24,6 +24,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
@@ -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,
|
||||
|
||||
@@ -703,7 +703,7 @@
|
||||
github = "aduh95";
|
||||
githubId = 14309773;
|
||||
name = "Antoine du Hamel";
|
||||
keys = [ { fingerprint = "C0D6 2484 39F1 D560 4AAF FB40 21D9 00FF DB23 3756"; } ];
|
||||
keys = [ { fingerprint = "5BE8 A3F6 C8A5 C01D 106C 0AD8 20B1 A390 B168 D356"; } ];
|
||||
};
|
||||
aerialx = {
|
||||
email = "aaron+nixos@aaronlindsay.com";
|
||||
@@ -9308,6 +9308,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";
|
||||
@@ -22911,7 +22917,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";
|
||||
|
||||
@@ -245,6 +245,7 @@ rec {
|
||||
--revision ${escapeShellArg revision} \
|
||||
${optionsJSON}/${common.outputPath}/options.json \
|
||||
$out/share/man/man5/configuration.nix.5
|
||||
compressManPages $out
|
||||
'';
|
||||
|
||||
}
|
||||
|
||||
@@ -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).
|
||||
|
||||
@@ -62,6 +62,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.
|
||||
@@ -100,6 +102,8 @@
|
||||
|
||||
- `services.gitea` supports sending notifications with sendmail again. To do this, activate the parameter `services.gitea.mailerUseSendmail` and configure SMTP server.
|
||||
|
||||
- `services.ntpd-rs` now performs configuration validation.
|
||||
|
||||
- `amdgpu` kernel driver overdrive mode can now be enabled by setting [hardware.amdgpu.overdrive.enable](#opt-hardware.amdgpu.overdrive.enable) and customized through [hardware.amdgpu.overdrive.ppfeaturemask](#opt-hardware.amdgpu.overdrive.ppfeaturemask).
|
||||
This allows for fine-grained control over the GPU's performance and maybe required by overclocking softwares like Corectrl and Lact. These new options replace old options such as {option}`programs.corectrl.gpuOverclock.enable` and {option}`programs.tuxclocker.enableAMD`.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -207,6 +207,5 @@ in
|
||||
|
||||
meta.maintainers = with lib.maintainers; [
|
||||
primeos
|
||||
colemickens
|
||||
];
|
||||
}
|
||||
|
||||
@@ -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."
|
||||
)
|
||||
|
||||
@@ -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") {
|
||||
|
||||
@@ -52,7 +52,11 @@ in
|
||||
systemd.services.govee2mqtt = {
|
||||
description = "Govee2MQTT Service";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "networking.target" ];
|
||||
after = [
|
||||
"networking.target"
|
||||
"network-online.target"
|
||||
];
|
||||
requires = [ "network-online.target" ];
|
||||
serviceConfig = {
|
||||
CacheDirectory = "govee2mqtt";
|
||||
Environment = [
|
||||
|
||||
@@ -464,7 +464,7 @@ in
|
||||
};
|
||||
|
||||
SENDMAIL_PATH = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
type = lib.types.str;
|
||||
# somewhat duplicated with useSendmail but cannot be deduped because of infinite recursion
|
||||
default =
|
||||
if config.mailer.ENABLED && config.mailer.PROTOCOL == "sendmail" then
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
]);
|
||||
}
|
||||
@@ -354,7 +354,7 @@ in
|
||||
description = ''
|
||||
Attrset of the LibreNMS configuration.
|
||||
See <https://docs.librenms.org/Support/Configuration/> for reference.
|
||||
All possible options are listed [here](https://github.com/librenms/librenms/blob/master/misc/config_definitions.json).
|
||||
All possible options are listed [here](https://github.com/librenms/librenms/blob/master/resources/definitions/config_definitions.json).
|
||||
See <https://docs.librenms.org/Extensions/Authentication/> for setting other authentication methods.
|
||||
'';
|
||||
default = { };
|
||||
|
||||
@@ -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
|
||||
];
|
||||
}
|
||||
@@ -9,6 +9,17 @@ let
|
||||
cfg = config.services.ntpd-rs;
|
||||
format = pkgs.formats.toml { };
|
||||
configFile = format.generate "ntpd-rs.toml" cfg.settings;
|
||||
|
||||
validateConfig =
|
||||
file:
|
||||
pkgs.runCommand "validate-ntpd-rs.toml"
|
||||
{
|
||||
nativeBuildInputs = [ cfg.package ];
|
||||
}
|
||||
''
|
||||
ntp-ctl validate -c ${file}
|
||||
ln -s "${file}" "$out"
|
||||
'';
|
||||
in
|
||||
{
|
||||
options.services.ntpd-rs = {
|
||||
@@ -77,7 +88,7 @@ in
|
||||
DynamicUser = true;
|
||||
ExecStart = [
|
||||
""
|
||||
"${lib.makeBinPath [ cfg.package ]}/ntp-daemon --config=${configFile}"
|
||||
"${lib.makeBinPath [ cfg.package ]}/ntp-daemon --config=${validateConfig configFile}"
|
||||
];
|
||||
};
|
||||
};
|
||||
@@ -90,7 +101,7 @@ in
|
||||
DynamicUser = true;
|
||||
ExecStart = [
|
||||
""
|
||||
"${lib.makeBinPath [ cfg.package ]}/ntp-metrics-exporter --config=${configFile}"
|
||||
"${lib.makeBinPath [ cfg.package ]}/ntp-metrics-exporter --config=${validateConfig configFile}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -532,7 +532,7 @@ in
|
||||
# required for services generated with writeShellScript and friends
|
||||
pkgs.runtimeShell
|
||||
# some tools like xfs still want the sh symlink
|
||||
"${pkgs.bash}/bin"
|
||||
"${pkgs.bashNonInteractive}/bin"
|
||||
|
||||
# so NSS can look up usernames
|
||||
"${pkgs.glibc}/lib/libnss_files.so.2"
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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")
|
||||
'';
|
||||
}
|
||||
)
|
||||
@@ -28,10 +28,10 @@
|
||||
with subtest("Prowlarr data directory migration works"):
|
||||
machine.systemctl("stop prowlarr.service")
|
||||
machine.succeed("mkdir -p /tmp/prowlarr-migration")
|
||||
machine.succeed("mv /var/lib/prowlarr/* /tmp/prowlarr-migration")
|
||||
machine.succeed("rsync -a -delete /var/lib/prowlarr/ /tmp/prowlarr-migration")
|
||||
machine.succeed("${config.nodes.machine.system.build.toplevel}/specialisation/customDataDir/bin/switch-to-configuration test")
|
||||
machine.wait_for_unit("var-lib-private-prowlarr.mount")
|
||||
machine.succeed("mv /tmp/prowlarr-migration/* /var/lib/prowlarr")
|
||||
machine.succeed("rsync -a -delete /tmp/prowlarr-migration/ /var/lib/prowlarr")
|
||||
machine.systemctl("restart prowlarr.service")
|
||||
# Check that we're using a bind mount when using a non-default dataDir
|
||||
machine.succeed("findmnt /var/lib/private/prowlarr | grep /srv/prowlarr")
|
||||
|
||||
@@ -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")
|
||||
'';
|
||||
}
|
||||
)
|
||||
@@ -1,6 +0,0 @@
|
||||
{ system, pkgs, ... }:
|
||||
|
||||
{
|
||||
git = import ./git.nix { inherit system pkgs; };
|
||||
builds = import ./builds.nix { inherit system pkgs; };
|
||||
}
|
||||
@@ -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")
|
||||
'';
|
||||
}
|
||||
)
|
||||
@@ -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
|
||||
];
|
||||
};
|
||||
}
|
||||
-25
@@ -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=
|
||||
-26
@@ -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=
|
||||
-25
@@ -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=
|
||||
-25
@@ -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=
|
||||
-26
@@ -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=
|
||||
-25
@@ -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=
|
||||
-26
@@ -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=
|
||||
-25
@@ -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=
|
||||
-25
@@ -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=
|
||||
-25
@@ -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=
|
||||
-43
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "docker-buildx";
|
||||
version = "0.23.0";
|
||||
version = "0.25.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "docker";
|
||||
repo = "buildx";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-KU9B6ygK6PwMvXDL+SBB79TCBScJDgVMs4m92zgibdE=";
|
||||
hash = "sha256-DdG2z0raDHcbBMDl7C0WORKhG0ZB9Gvie8u4/isE8ow=";
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
|
||||
@@ -2,31 +2,21 @@
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
testers,
|
||||
adrgen,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "adrgen";
|
||||
version = "0.4.0-beta";
|
||||
version = "0.4.1-beta";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "asiermarques";
|
||||
repo = "adrgen";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-2ZE/orsfwL59Io09c4yfXt2enVmpSM/QHlUMgyd9RYQ=";
|
||||
hash = "sha256-9EiJe5shhwbjLIvUQMUTSGTgCA+r3RdkLkPRPoWvZ3g=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# https://github.com/asiermarques/adrgen/pull/14
|
||||
(fetchpatch {
|
||||
name = "update-x-sys-for-go-1.18-on-aarch64-darwin.patch";
|
||||
url = "https://github.com/asiermarques/adrgen/commit/485dc383106467d1029ee6d92c9bcbc3c2281626.patch";
|
||||
hash = "sha256-38ktHrRgW5ysQmafvFthNtkZ6nnM61z4yEA7wUGmWb4=";
|
||||
})
|
||||
];
|
||||
|
||||
vendorHash = "sha256-RXwwv3Q/kQ6FondpiUm5XZogAVK2aaVmKu4hfr+AnAM=";
|
||||
|
||||
passthru.tests.version = testers.testVersion {
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "airwindows";
|
||||
version = "0-unstable-2025-06-08";
|
||||
version = "0-unstable-2025-06-22";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "airwindows";
|
||||
repo = "airwindows";
|
||||
rev = "a88ee4caa6e874efec86a1e8c62853dbc1caa514";
|
||||
hash = "sha256-fTVDpDxPMrRxHGUJh8/qGYGkziPdjKj9Q/q3LCd1brE=";
|
||||
rev = "fd36e62f00ce73d371d528ed1f63d0617e445caa";
|
||||
hash = "sha256-XDIXDDkb88Kdf3XQsMB0ee0F8QTyoz82LOLrQcezK1I=";
|
||||
};
|
||||
|
||||
# we patch helpers because honestly im spooked out by where those variables
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "armadillo";
|
||||
version = "14.4.2";
|
||||
version = "14.4.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/arma/armadillo-${version}.tar.xz";
|
||||
hash = "sha256-bf3c+9kecGedfBHpSlljp+/aAC/sNR5vSHWsjiRcURc=";
|
||||
hash = "sha256-w6rdWb2w6kM5sFbymXL5LuGf3FL2jreNMtLkyvTYDDo=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
@@ -8,19 +8,19 @@
|
||||
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "atlas";
|
||||
version = "0.34.0";
|
||||
version = "0.35.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ariga";
|
||||
repo = "atlas";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-7s03YrZw7J2LRCHibMqzBBtVUBSPVEf+TMqtKoWSkkM=";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-USA3PiZcOF39LK45Xu0Oq/GJi3URMxJpBrUXxIsEkCY=";
|
||||
};
|
||||
|
||||
modRoot = "cmd/atlas";
|
||||
|
||||
proxyVendor = true;
|
||||
vendorHash = "sha256-K94zOisolCplE/cFrWmv4/MWl5DD27lRekPTl+o4Jwk=";
|
||||
vendorHash = "sha256-G78KpERRAP4lVsy3ur2ejT6jA6K5T257FHLb7afC/7c=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
@@ -46,7 +46,7 @@ buildGoModule (finalAttrs: {
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Modern tool for managing database schemas";
|
||||
description = "Manage your database schema as code";
|
||||
homepage = "https://atlasgo.io/";
|
||||
changelog = "https://github.com/ariga/atlas/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.asl20;
|
||||
|
||||
Generated
-2940
File diff suppressed because it is too large
Load Diff
@@ -4,24 +4,19 @@
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "autocorrect";
|
||||
version = "2.14.0";
|
||||
version = "2.14.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "huacnlee";
|
||||
repo = "autocorrect";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-Tqg0awxRtzqAVTTVrmN0RDTQvYJllejx8V94jTreZyI=";
|
||||
rev = "5af1bc295d48b0fd04f7dbc35ea99d479f682e78";
|
||||
hash = "sha256-tbN+48a8NnwirJqUci0LgxsvJI0KzuG/aDvV/Yr8Xu8=";
|
||||
};
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
cp ${./Cargo.lock} Cargo.lock
|
||||
'';
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-cEiIs7wvfjP5/tkRtYb2XEZfssw09zkbOrqZsOX9ajQ=";
|
||||
|
||||
cargoBuildFlags = [
|
||||
"-p"
|
||||
@@ -32,14 +27,12 @@ rustPlatform.buildRustPackage rec {
|
||||
"autocorrect-cli"
|
||||
];
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
meta = {
|
||||
description = "Linter and formatter for help you improve copywriting, to correct spaces, punctuations between CJK (Chinese, Japanese, Korean)";
|
||||
mainProgram = "autocorrect";
|
||||
homepage = "https://huacnlee.github.io/autocorrect";
|
||||
changelog = "https://github.com/huacnlee/autocorrect/releases/tag/v${version}";
|
||||
changelog = "https://github.com/huacnlee/autocorrect/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
maintainers = with lib.maintainers; [ definfo ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p coreutils curl jq common-updater-scripts cargo
|
||||
# shellcheck shell=bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
version=$(curl -s https://api.github.com/repos/huacnlee/autocorrect/releases/latest | jq -r .tag_name)
|
||||
update-source-version autocorrect "${version#v}"
|
||||
|
||||
tmp=$(mktemp -d)
|
||||
trap 'rm -rf -- "${tmp}"' EXIT
|
||||
|
||||
git clone --depth 1 --branch "${version}" https://github.com/huacnlee/autocorrect.git "${tmp}/autocorrect"
|
||||
cargo generate-lockfile --manifest-path "${tmp}/autocorrect/Cargo.toml"
|
||||
cp "${tmp}/autocorrect/Cargo.lock" "$(dirname "$0")/Cargo.lock"
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "bazel-buildtools";
|
||||
version = "8.2.0";
|
||||
version = "8.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bazelbuild";
|
||||
repo = "buildtools";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-7O82TE6NgJSrYOz1gO+t9nWgrTshyK8EIemI7SM2DuM=";
|
||||
hash = "sha256-YkxEc+hcfOH2zzdHngoJmuCqGD4FWSkFd2cVqIrpHD4=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-sYZ7ogQY0dWOwJMvLljOjaKeYGYdLrF5AnetregdlYY=";
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "bazel-gazelle";
|
||||
version = "0.43.0";
|
||||
version = "0.44.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bazelbuild";
|
||||
repo = "bazel-gazelle";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-jj2mAGzz5BOim008LNRH0tVLbJy/mNodsTENMVbjUbk=";
|
||||
hash = "sha256-vkGLzrseERxl0LygFm1zCC7kK7j+pHpTbG2fy4fLztw=";
|
||||
};
|
||||
|
||||
vendorHash = null;
|
||||
|
||||
@@ -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,13 +6,13 @@
|
||||
}:
|
||||
buildGoModule rec {
|
||||
pname = "bitrise";
|
||||
version = "2.31.2";
|
||||
version = "2.31.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bitrise-io";
|
||||
repo = "bitrise";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-WMvk5VEXc0cEWVdop50mSlAJKP8RhRijCia0fgBG79M=";
|
||||
hash = "sha256-uy2B2tjtg6/ufMWy9sPoheSw2hxIsl2gUdAKVfixpoM=";
|
||||
};
|
||||
|
||||
# many tests rely on writable $HOME/.bitrise and require network access
|
||||
|
||||
@@ -5,18 +5,17 @@
|
||||
protobuf,
|
||||
git,
|
||||
testers,
|
||||
buf,
|
||||
installShellFiles,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "buf";
|
||||
version = "1.55.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bufbuild";
|
||||
repo = "buf";
|
||||
rev = "v${version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-41IY2P2s9kCV6aQh5vg7xVmu4Ovl9gakGmgcI/QSwfw=";
|
||||
};
|
||||
|
||||
@@ -81,11 +80,11 @@ buildGoModule rec {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.tests.version = testers.testVersion { package = buf; };
|
||||
passthru.tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
|
||||
|
||||
meta = {
|
||||
homepage = "https://buf.build";
|
||||
changelog = "https://github.com/bufbuild/buf/releases/tag/v${version}";
|
||||
changelog = "https://github.com/bufbuild/buf/releases/tag/v${finalAttrs.version}";
|
||||
description = "Create consistent Protobuf APIs that preserve compatibility and comply with design best-practices";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [
|
||||
@@ -95,4 +94,4 @@ buildGoModule rec {
|
||||
];
|
||||
mainProgram = "buf";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -35,6 +35,7 @@ stdenv.mkDerivation rec {
|
||||
homepage = "https://github.com/fedeinthemix/chez-mit/";
|
||||
maintainers = [ maintainers.jitwit ];
|
||||
license = licenses.gpl3Plus;
|
||||
broken = stdenv.hostPlatform.isDarwin;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "cimg";
|
||||
version = "3.5.4";
|
||||
version = "3.5.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "GreycLab";
|
||||
repo = "CImg";
|
||||
tag = "v.${finalAttrs.version}";
|
||||
hash = "sha256-VCgMSIaQAcPH7DWUEfoJahCQDr49lzO7pUw1+NXHA60=";
|
||||
hash = "sha256-vVRdSjrSCprhxraLzZ531zIYXsqbnnxOcoawJddwvgY=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
|
||||
@@ -7,16 +7,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "cirrus-cli";
|
||||
version = "0.144.3";
|
||||
version = "0.145.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cirruslabs";
|
||||
repo = "cirrus-cli";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-aqsPh6pZ2v5ysYoD9rG/ATAPBKUslxlif1uKMPGY6gU=";
|
||||
hash = "sha256-RyT0pR/hcqkvavI4HkWjCG5AS4H5hBbjOChHrUoq2GI=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-fcaOMSOLcl1rzp4zn6KiojC0ewJMFbyG4+1uod+/6yc=";
|
||||
vendorHash = "sha256-CvypJVRLdMr38Qn8E67IZ33cSq5fYhM3i5HyifXGYNE=";
|
||||
|
||||
ldflags = [
|
||||
"-X github.com/cirruslabs/cirrus-cli/internal/version.Version=v${version}"
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "cloudlog";
|
||||
version = "2.6.18";
|
||||
version = "2.6.19";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "magicbug";
|
||||
repo = "Cloudlog";
|
||||
rev = version;
|
||||
hash = "sha256-GH6vGZRWM2q6ExpZzRRmJf+7VGs4Ymg2S/6TIJgfJEg=";
|
||||
hash = "sha256-nSozkRj4aeZZJ/H0zfzzlH4rWGVThC03ByA4FF6IgT4=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -66,13 +66,13 @@
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "cyrus-imapd";
|
||||
version = "3.12.0";
|
||||
version = "3.12.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cyrusimap";
|
||||
repo = "cyrus-imapd";
|
||||
tag = "cyrus-imapd-${finalAttrs.version}";
|
||||
hash = "sha256-sdHAxlrxQHzcSt2buOGfRv/OR8BYFHrNoo+r/ePVFsg=";
|
||||
hash = "sha256-fwt8ierxM4bMp+ZfYINXUIcKNMnkTIWJTNWyv8GyX0c=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
fetchurl,
|
||||
undmg,
|
||||
makeWrapper,
|
||||
openjdk17,
|
||||
openjdk21,
|
||||
gnused,
|
||||
autoPatchelfHook,
|
||||
wrapGAppsHook3,
|
||||
@@ -76,8 +76,8 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
mkdir -p $out/opt/dbeaver $out/bin
|
||||
cp -r * $out/opt/dbeaver
|
||||
makeWrapper $out/opt/dbeaver/dbeaver $out/bin/dbeaver \
|
||||
--prefix PATH : "${openjdk17}/bin" \
|
||||
--set JAVA_HOME "${openjdk17.home}" \
|
||||
--prefix PATH : "${openjdk21}/bin" \
|
||||
--set JAVA_HOME "${openjdk21.home}" \
|
||||
--prefix GIO_EXTRA_MODULES : "${glib-networking}/lib/gio/modules" \
|
||||
--prefix LD_LIBRARY_PATH : "$out/lib:${
|
||||
lib.makeLibraryPath [
|
||||
@@ -109,8 +109,8 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
mkdir -p $out/{Applications/dbeaver.app,bin}
|
||||
cp -R . $out/Applications/dbeaver.app
|
||||
makeWrapper $out/{Applications/dbeaver.app/Contents/MacOS,bin}/dbeaver \
|
||||
--prefix PATH : "${openjdk17}/bin" \
|
||||
--set JAVA_HOME "${openjdk17.home}"
|
||||
--prefix PATH : "${openjdk21}/bin" \
|
||||
--set JAVA_HOME "${openjdk21.home}"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/cmd/dlv/main.go b/cmd/dlv/main.go
|
||||
index 2207708e..a7e8a3c2 100644
|
||||
--- a/cmd/dlv/main.go
|
||||
+++ b/cmd/dlv/main.go
|
||||
@@ -21,6 +21,8 @@ func main() {
|
||||
version.DelveVersion.Build = Build
|
||||
}
|
||||
|
||||
+ os.Setenv("disableHardening", "fortify "+os.Getenv("disableHardening"))
|
||||
+
|
||||
const cgoCflagsEnv = "CGO_CFLAGS"
|
||||
if os.Getenv(cgoCflagsEnv) == "" {
|
||||
os.Setenv(cgoCflagsEnv, "-O0 -g")
|
||||
@@ -2,7 +2,6 @@
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
makeWrapper,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
@@ -17,12 +16,14 @@ buildGoModule rec {
|
||||
hash = "sha256-bp8pYWS3Vpg0R2Xfe5agDTENzLGu9r43BgORa8VrP+Y=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./disable-fortify.diff
|
||||
];
|
||||
|
||||
vendorHash = null;
|
||||
|
||||
subPackages = [ "cmd/dlv" ];
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
hardeningDisable = [ "fortify" ];
|
||||
|
||||
preCheck = ''
|
||||
@@ -38,10 +39,6 @@ buildGoModule rec {
|
||||
doCheck = !stdenv.hostPlatform.isDarwin;
|
||||
|
||||
postInstall = ''
|
||||
# fortify source breaks build since delve compiles with -O0
|
||||
wrapProgram $out/bin/dlv \
|
||||
--prefix disableHardening " " fortify
|
||||
|
||||
# add symlink for vscode golang extension
|
||||
# https://github.com/golang/vscode-go/blob/master/docs/debugging.md#manually-installing-dlv-dap
|
||||
ln $out/bin/dlv $out/bin/dlv-dap
|
||||
|
||||
@@ -12,20 +12,20 @@
|
||||
}:
|
||||
let
|
||||
pname = "dependabot-cli";
|
||||
version = "1.66.0";
|
||||
version = "1.67.1";
|
||||
|
||||
# `tag` is what `dependabot` uses to find the relevant docker images.
|
||||
tag = "nixpkgs-dependabot-cli-${version}";
|
||||
|
||||
# Get these hashes from
|
||||
# nix run nixpkgs#nix-prefetch-docker -- --image-name ghcr.io/github/dependabot-update-job-proxy/dependabot-update-job-proxy --image-tag latest --final-image-name dependabot-update-job-proxy --final-image-tag ${tag}
|
||||
updateJobProxy.imageDigest = "sha256:0b0d8c67cad11fa0885fcc3fe0add06638c29c19f05a83f80077d5dbb70c2037";
|
||||
updateJobProxy.hash = "sha256-7O/1NYdhtmO+MAwfu8BSaJQ1RVkXrFPBpfRy0N7p1lQ=";
|
||||
updateJobProxy.imageDigest = "sha256:0a7207bc265d7daaae61f2f105659d7c5947dc7e70395d6604cf114695d23578";
|
||||
updateJobProxy.hash = "sha256-tQFkP260Vl2j19vTk7kz6/UmbKVg0CtjLuZYe7wHKSA=";
|
||||
|
||||
# Get these hashes from
|
||||
# nix run nixpkgs#nix-prefetch-docker -- --image-name ghcr.io/dependabot/dependabot-updater-github-actions --image-tag latest --final-image-name dependabot-updater-github-actions --final-image-tag ${tag}
|
||||
updaterGitHubActions.imageDigest = "sha256:11de6594db1c23e7ed4a6b621e8584b4a3b34484d51f2f8aa850c21fbce9094f";
|
||||
updaterGitHubActions.hash = "sha256-cImOCW7tggBWEPlmE55b4OFMxf/+VGLoqx0tRualowo=";
|
||||
updaterGitHubActions.imageDigest = "sha256:d0b91fa5fcfe306614f3c4307b4571cabe25405e06f3ce737a2b7b225530a71c";
|
||||
updaterGitHubActions.hash = "sha256-yisnwxqFOUUBSq0YPX0C89dNOYYJ/mfNFhyrQCV6yoc=";
|
||||
in
|
||||
buildGoModule {
|
||||
inherit pname version;
|
||||
@@ -34,10 +34,10 @@ buildGoModule {
|
||||
owner = "dependabot";
|
||||
repo = "cli";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-9VgcQgiNv1v6+jnaWK10yccC1ILSxiIj9ZCIhHY57jk=";
|
||||
hash = "sha256-K3ZHLauAtG1pSZsiLwWj9sMWL1epPILLUvc22/+oj+g=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-gENlo1EPzsML+HkDBg4a2VGTUhyKY8AhlpHVszYWBno=";
|
||||
vendorHash = "sha256-4737CHJCeq7qn8dGz3bYsauCLipKqItltpI5u6uBvuo=";
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
|
||||
+11
-11
@@ -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";
|
||||
};
|
||||
}
|
||||
})
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -20,17 +20,17 @@ in
|
||||
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "dmlive";
|
||||
version = "5.5.8-unstable-2025-04-06";
|
||||
version = "5.6.0-unstable-2025-06-21";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "THMonster";
|
||||
repo = "dmlive";
|
||||
rev = "b066a637093871de9962e08d4f0ae0b77bd8f1f4"; # no tag
|
||||
hash = "sha256-pAsxr6zGCDZ0qysGT1+2+5+WKI2QopGxnZWpfnxk/fI=";
|
||||
rev = "485eae06737530360c0e6f6415c62791767d595b"; # no tag
|
||||
hash = "sha256-0JjPZPtAtbxdh0HDycWHEonZggBcoqv5SJUnhKzXNIk=";
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-GVko8GK5Muha4uqDMgk7VkFoFCVcmk0vM1GUELvSzgM=";
|
||||
cargoHash = "sha256-B1v9m4Nn5wXMbNBlh7+A8zBejJ0tHdqvSXVpRz+wC5g=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
})
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -1,338 +0,0 @@
|
||||
From: Tristan Ross <tristan.ross@midstall.com>
|
||||
Date: Wed, 31 Jul 2024 04:03:03 +0000 (-0700)
|
||||
Subject: Prevent binaries in src from colliding with libc++ headers
|
||||
X-Git-Url: https://sourceware.org/git/?p=elfutils.git;a=commitdiff_plain;h=232b9ede92cbecabbd61291c2fc9aaf3fc61061f;hp=87a60d22299c4ba7b94cbce04a32c2abf015f98a
|
||||
|
||||
Prevent binaries in src from colliding with libc++ headers
|
||||
|
||||
Discovered with Nix and LLVM 17. Headers inside of libc++ can easily
|
||||
collide with binaries being linked in src. This results in clang trying
|
||||
to include a binary as a header.
|
||||
|
||||
Fix this by removing '-I.' and '-I$(srcdir)' from AM_CPPFLAGS and
|
||||
DEFAULT_INCLUDES in src/Makefile.am.
|
||||
|
||||
To facilitate this config/eu.am has been refactored. New file
|
||||
config/eu-common.am contains all of the old eu.am but with the
|
||||
AM_CPPFLAGS definition removed. eu.am now includes eu-common.am and
|
||||
contains the old AM_CPPFLAGS definition.
|
||||
|
||||
eu.am functionality does not change, but src/Makefile.am can instead
|
||||
include eu-common.am and define its own AM_CPPFLAGS without causing a
|
||||
"multiply defined" warning during autoreconf.
|
||||
|
||||
Signed-off-by: Tristan Ross <tristan.ross@midstall.com>
|
||||
---
|
||||
|
||||
diff --git a/config/eu-common.am b/config/eu-common.am
|
||||
new file mode 100644
|
||||
index 00000000..9cc7f696
|
||||
--- /dev/null
|
||||
+++ b/config/eu-common.am
|
||||
@@ -0,0 +1,148 @@
|
||||
+## Common automake fragments for elfutils subdirectory makefiles.
|
||||
+##
|
||||
+## Copyright (C) 2010, 2014, 2016 Red Hat, Inc.
|
||||
+## Copyright (C) 2023, Mark J. Wielaard <mark@klomp.org>
|
||||
+##
|
||||
+## This file is part of elfutils.
|
||||
+##
|
||||
+## This file is free software; you can redistribute it and/or modify
|
||||
+## it under the terms of either
|
||||
+##
|
||||
+## * the GNU Lesser General Public License as published by the Free
|
||||
+## Software Foundation; either version 3 of the License, or (at
|
||||
+## your option) any later version
|
||||
+##
|
||||
+## or
|
||||
+##
|
||||
+## * the GNU General Public License as published by the Free
|
||||
+## Software Foundation; either version 2 of the License, or (at
|
||||
+## your option) any later version
|
||||
+##
|
||||
+## or both in parallel, as here.
|
||||
+##
|
||||
+## elfutils is distributed in the hope that it will be useful, but
|
||||
+## WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+## General Public License for more details.
|
||||
+##
|
||||
+## You should have received copies of the GNU General Public License and
|
||||
+## the GNU Lesser General Public License along with this program. If
|
||||
+## not, see <http://www.gnu.org/licenses/>.
|
||||
+##
|
||||
+
|
||||
+DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
|
||||
+
|
||||
+# Drop the 'u' flag that automake adds by default. It is incompatible
|
||||
+# with deterministic archives.
|
||||
+ARFLAGS = cr
|
||||
+
|
||||
+# Warn about stack usage of more than 256K = 262144 bytes.
|
||||
+if ADD_STACK_USAGE_WARNING
|
||||
+STACK_USAGE_WARNING=-Wstack-usage=262144
|
||||
+STACK_USAGE_NO_ERROR=-Wno-error=stack-usage=
|
||||
+else
|
||||
+STACK_USAGE_WARNING=
|
||||
+STACK_USAGE_NO_ERROR=
|
||||
+endif
|
||||
+
|
||||
+if SANE_LOGICAL_OP_WARNING
|
||||
+LOGICAL_OP_WARNING=-Wlogical-op
|
||||
+else
|
||||
+LOGICAL_OP_WARNING=
|
||||
+endif
|
||||
+
|
||||
+if HAVE_DUPLICATED_COND_WARNING
|
||||
+DUPLICATED_COND_WARNING=-Wduplicated-cond
|
||||
+else
|
||||
+DUPLICATED_COND_WARNING=
|
||||
+endif
|
||||
+
|
||||
+if HAVE_NULL_DEREFERENCE_WARNING
|
||||
+NULL_DEREFERENCE_WARNING=-Wnull-dereference
|
||||
+else
|
||||
+NULL_DEREFERENCE_WARNING=
|
||||
+endif
|
||||
+
|
||||
+if HAVE_IMPLICIT_FALLTHROUGH_WARNING
|
||||
+# Use strict fallthrough. Only __attribute__((fallthrough)) will prevent the
|
||||
+# warning
|
||||
+if HAVE_IMPLICIT_FALLTHROUGH_5_WARNING
|
||||
+IMPLICIT_FALLTHROUGH_WARNING=-Wimplicit-fallthrough=5
|
||||
+else
|
||||
+IMPLICIT_FALLTHROUGH_WARNING=-Wimplicit-fallthrough
|
||||
+endif
|
||||
+else
|
||||
+IMPLICIT_FALLTHROUGH_WARNING=
|
||||
+endif
|
||||
+
|
||||
+if HAVE_TRAMPOLINES_WARNING
|
||||
+TRAMPOLINES_WARNING=-Wtrampolines
|
||||
+else
|
||||
+TRAMPOLINES_WARNING=
|
||||
+endif
|
||||
+
|
||||
+if HAVE_NO_PACKED_NOT_ALIGNED_WARNING
|
||||
+NO_PACKED_NOT_ALIGNED_WARNING=-Wno-packed-not-aligned
|
||||
+else
|
||||
+NO_PACKED_NOT_ALIGNED_WARNING=
|
||||
+endif
|
||||
+
|
||||
+if HAVE_USE_AFTER_FREE3_WARNING
|
||||
+USE_AFTER_FREE3_WARNING=-Wuse-after-free=3
|
||||
+else
|
||||
+USE_AFTER_FREE3_WARNING=
|
||||
+endif
|
||||
+
|
||||
+AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
|
||||
+ -Wold-style-definition -Wstrict-prototypes $(TRAMPOLINES_WARNING) \
|
||||
+ $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
|
||||
+ $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
|
||||
+ $(USE_AFTER_FREE3_WARNING) \
|
||||
+ $(if $($(*F)_no_Werror),,-Werror) \
|
||||
+ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
|
||||
+ $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
|
||||
+ $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \
|
||||
+ $($(*F)_CFLAGS)
|
||||
+
|
||||
+AM_CXXFLAGS = -std=c++11 -Wall -Wshadow \
|
||||
+ $(TRAMPOLINES_WARNING) \
|
||||
+ $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
|
||||
+ $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
|
||||
+ $(if $($(*F)_no_Werror),,-Werror) \
|
||||
+ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
|
||||
+ $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
|
||||
+ $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \
|
||||
+ $($(*F)_CXXFLAGS)
|
||||
+
|
||||
+COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE))
|
||||
+
|
||||
+DEFS.os = -DPIC -DSHARED
|
||||
+if SYMBOL_VERSIONING
|
||||
+DEFS.os += -DSYMBOL_VERSIONING
|
||||
+else
|
||||
+endif
|
||||
+
|
||||
+%.os: %.c %.o
|
||||
+if AMDEP
|
||||
+ $(AM_V_CC)if $(COMPILE.os) -c -o $@ $(fpic_CFLAGS) $(DEFS.os) -MT $@ -MD -MP \
|
||||
+ -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
+ then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \
|
||||
+ rm -f "$(DEPDIR)/$*.Tpo"; \
|
||||
+ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
+ fi
|
||||
+else
|
||||
+ $(AM_V_CC)$(COMPILE.os) -c -o $@ $(fpic_CFLAGS) $(DEFS.os) $<
|
||||
+endif
|
||||
+
|
||||
+CLEANFILES = *.gcno *.gcda
|
||||
+
|
||||
+textrel_msg = echo "WARNING: TEXTREL found in '$@'"
|
||||
+if FATAL_TEXTREL
|
||||
+textrel_found = $(textrel_msg); exit 1
|
||||
+else
|
||||
+textrel_found = $(textrel_msg)
|
||||
+endif
|
||||
+textrel_check = if $(READELF) -d $@ | grep -F -q TEXTREL; then $(textrel_found); fi
|
||||
+
|
||||
+print-%:
|
||||
+ @echo $*=$($*)
|
||||
diff --git a/config/eu.am b/config/eu.am
|
||||
index 0b7dab5b..3aa6048a 100644
|
||||
--- a/config/eu.am
|
||||
+++ b/config/eu.am
|
||||
@@ -1,4 +1,5 @@
|
||||
-## Common automake fragments for elfutils subdirectory makefiles.
|
||||
+## Common automake fragments for elfutils subdirectory makefiles
|
||||
+## with AM_CPPFLAGS set.
|
||||
##
|
||||
## Copyright (C) 2010, 2014, 2016 Red Hat, Inc.
|
||||
## Copyright (C) 2023, Mark J. Wielaard <mark@klomp.org>
|
||||
@@ -30,120 +31,5 @@
|
||||
## not, see <http://www.gnu.org/licenses/>.
|
||||
##
|
||||
|
||||
-DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
|
||||
-AM_CPPFLAGS = -iquote . -I$(srcdir) -I$(top_srcdir)/lib -I..
|
||||
-
|
||||
-# Drop the 'u' flag that automake adds by default. It is incompatible
|
||||
-# with deterministic archives.
|
||||
-ARFLAGS = cr
|
||||
-
|
||||
-# Warn about stack usage of more than 256K = 262144 bytes.
|
||||
-if ADD_STACK_USAGE_WARNING
|
||||
-STACK_USAGE_WARNING=-Wstack-usage=262144
|
||||
-STACK_USAGE_NO_ERROR=-Wno-error=stack-usage=
|
||||
-else
|
||||
-STACK_USAGE_WARNING=
|
||||
-STACK_USAGE_NO_ERROR=
|
||||
-endif
|
||||
-
|
||||
-if SANE_LOGICAL_OP_WARNING
|
||||
-LOGICAL_OP_WARNING=-Wlogical-op
|
||||
-else
|
||||
-LOGICAL_OP_WARNING=
|
||||
-endif
|
||||
-
|
||||
-if HAVE_DUPLICATED_COND_WARNING
|
||||
-DUPLICATED_COND_WARNING=-Wduplicated-cond
|
||||
-else
|
||||
-DUPLICATED_COND_WARNING=
|
||||
-endif
|
||||
-
|
||||
-if HAVE_NULL_DEREFERENCE_WARNING
|
||||
-NULL_DEREFERENCE_WARNING=-Wnull-dereference
|
||||
-else
|
||||
-NULL_DEREFERENCE_WARNING=
|
||||
-endif
|
||||
-
|
||||
-if HAVE_IMPLICIT_FALLTHROUGH_WARNING
|
||||
-# Use strict fallthrough. Only __attribute__((fallthrough)) will prevent the
|
||||
-# warning
|
||||
-if HAVE_IMPLICIT_FALLTHROUGH_5_WARNING
|
||||
-IMPLICIT_FALLTHROUGH_WARNING=-Wimplicit-fallthrough=5
|
||||
-else
|
||||
-IMPLICIT_FALLTHROUGH_WARNING=-Wimplicit-fallthrough
|
||||
-endif
|
||||
-else
|
||||
-IMPLICIT_FALLTHROUGH_WARNING=
|
||||
-endif
|
||||
-
|
||||
-if HAVE_TRAMPOLINES_WARNING
|
||||
-TRAMPOLINES_WARNING=-Wtrampolines
|
||||
-else
|
||||
-TRAMPOLINES_WARNING=
|
||||
-endif
|
||||
-
|
||||
-if HAVE_NO_PACKED_NOT_ALIGNED_WARNING
|
||||
-NO_PACKED_NOT_ALIGNED_WARNING=-Wno-packed-not-aligned
|
||||
-else
|
||||
-NO_PACKED_NOT_ALIGNED_WARNING=
|
||||
-endif
|
||||
-
|
||||
-if HAVE_USE_AFTER_FREE3_WARNING
|
||||
-USE_AFTER_FREE3_WARNING=-Wuse-after-free=3
|
||||
-else
|
||||
-USE_AFTER_FREE3_WARNING=
|
||||
-endif
|
||||
-
|
||||
-AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
|
||||
- -Wold-style-definition -Wstrict-prototypes $(TRAMPOLINES_WARNING) \
|
||||
- $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
|
||||
- $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
|
||||
- $(USE_AFTER_FREE3_WARNING) \
|
||||
- $(if $($(*F)_no_Werror),,-Werror) \
|
||||
- $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
|
||||
- $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
|
||||
- $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \
|
||||
- $($(*F)_CFLAGS)
|
||||
-
|
||||
-AM_CXXFLAGS = -std=c++11 -Wall -Wshadow \
|
||||
- $(TRAMPOLINES_WARNING) \
|
||||
- $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
|
||||
- $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
|
||||
- $(if $($(*F)_no_Werror),,-Werror) \
|
||||
- $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
|
||||
- $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
|
||||
- $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \
|
||||
- $($(*F)_CXXFLAGS)
|
||||
-
|
||||
-COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE))
|
||||
-
|
||||
-DEFS.os = -DPIC -DSHARED
|
||||
-if SYMBOL_VERSIONING
|
||||
-DEFS.os += -DSYMBOL_VERSIONING
|
||||
-else
|
||||
-endif
|
||||
-
|
||||
-%.os: %.c %.o
|
||||
-if AMDEP
|
||||
- $(AM_V_CC)if $(COMPILE.os) -c -o $@ $(fpic_CFLAGS) $(DEFS.os) -MT $@ -MD -MP \
|
||||
- -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
- then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \
|
||||
- rm -f "$(DEPDIR)/$*.Tpo"; \
|
||||
- else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
- fi
|
||||
-else
|
||||
- $(AM_V_CC)$(COMPILE.os) -c -o $@ $(fpic_CFLAGS) $(DEFS.os) $<
|
||||
-endif
|
||||
-
|
||||
-CLEANFILES = *.gcno *.gcda
|
||||
-
|
||||
-textrel_msg = echo "WARNING: TEXTREL found in '$@'"
|
||||
-if FATAL_TEXTREL
|
||||
-textrel_found = $(textrel_msg); exit 1
|
||||
-else
|
||||
-textrel_found = $(textrel_msg)
|
||||
-endif
|
||||
-textrel_check = if $(READELF) -d $@ | grep -F -q TEXTREL; then $(textrel_found); fi
|
||||
-
|
||||
-print-%:
|
||||
- @echo $*=$($*)
|
||||
+AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
|
||||
+include $(top_srcdir)/config/eu-common.am
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 97a0c61a..5bb8c078 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -16,14 +16,15 @@
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
##
|
||||
-include $(top_srcdir)/config/eu.am
|
||||
+include $(top_srcdir)/config/eu-common.am
|
||||
DEFS += $(YYDEBUG) -DDEBUGPRED=@DEBUGPRED@ \
|
||||
-DSRCDIR=\"$(shell cd $(srcdir);pwd)\" -DOBJDIR=\"$(shell pwd)\"
|
||||
|
||||
-DEFAULT_INCLUDES =
|
||||
-AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
|
||||
- -I$(srcdir)/../libdw -I$(srcdir)/../libdwelf \
|
||||
- -I$(srcdir)/../libdwfl -I$(srcdir)/../libasm -I../debuginfod
|
||||
+DEFAULT_INCLUDES = -I$(top_builddir)
|
||||
+AM_CPPFLAGS = -I$(top_srcdir)/lib -I.. \
|
||||
+ -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
|
||||
+ -I$(srcdir)/../libdw -I$(srcdir)/../libdwelf \
|
||||
+ -I$(srcdir)/../libdwfl -I$(srcdir)/../libasm -I../debuginfod
|
||||
|
||||
AM_LDFLAGS = -Wl,-rpath-link,../libelf:../libdw $(STACK_USAGE_NO_ERROR)
|
||||
@@ -23,7 +23,6 @@
|
||||
libmicrohttpd,
|
||||
libarchive,
|
||||
gitUpdater,
|
||||
autoreconfHook,
|
||||
}:
|
||||
|
||||
# TODO: Look at the hardcoded paths to kernel, modules etc.
|
||||
@@ -36,34 +35,29 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-eFf0S2JPTY1CHfhRqq57FALP5rzdLYBJ8V/AfT3edjU=";
|
||||
};
|
||||
|
||||
patches =
|
||||
[
|
||||
./debug-info-from-env.patch
|
||||
(fetchpatch {
|
||||
name = "fix-aarch64_fregs.patch";
|
||||
url = "https://git.alpinelinux.org/aports/plain/main/elfutils/fix-aarch64_fregs.patch?id=2e3d4976eeffb4704cf83e2cc3306293b7c7b2e9";
|
||||
sha256 = "zvncoRkQx3AwPx52ehjA2vcFroF+yDC2MQR5uS6DATs=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "musl-asm-ptrace-h.patch";
|
||||
url = "https://git.alpinelinux.org/aports/plain/main/elfutils/musl-asm-ptrace-h.patch?id=2e3d4976eeffb4704cf83e2cc3306293b7c7b2e9";
|
||||
sha256 = "8D1wPcdgAkE/TNBOgsHaeTZYhd9l+9TrZg8d5C7kG6k=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "musl-macros.patch";
|
||||
url = "https://git.alpinelinux.org/aports/plain/main/elfutils/musl-macros.patch?id=2e3d4976eeffb4704cf83e2cc3306293b7c7b2e9";
|
||||
sha256 = "tp6O1TRsTAMsFe8vw3LMENT/vAu6OmyA8+pzgThHeA8=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "musl-strndupa.patch";
|
||||
url = "https://git.alpinelinux.org/aports/plain/main/elfutils/musl-strndupa.patch?id=2e3d4976eeffb4704cf83e2cc3306293b7c7b2e9";
|
||||
sha256 = "sha256-7daehJj1t0wPtQzTv+/Rpuqqs5Ng/EYnZzrcf2o/Lb0=";
|
||||
})
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isMusl [ ./musl-error_h.patch ]
|
||||
# Prevent headers and binaries from colliding which results in an error.
|
||||
# https://sourceware.org/pipermail/elfutils-devel/2024q3/007281.html
|
||||
++ lib.optional (stdenv.targetPlatform.useLLVM or false) ./cxx-header-collision.patch;
|
||||
patches = [
|
||||
./debug-info-from-env.patch
|
||||
(fetchpatch {
|
||||
name = "fix-aarch64_fregs.patch";
|
||||
url = "https://git.alpinelinux.org/aports/plain/main/elfutils/fix-aarch64_fregs.patch?id=2e3d4976eeffb4704cf83e2cc3306293b7c7b2e9";
|
||||
sha256 = "zvncoRkQx3AwPx52ehjA2vcFroF+yDC2MQR5uS6DATs=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "musl-asm-ptrace-h.patch";
|
||||
url = "https://git.alpinelinux.org/aports/plain/main/elfutils/musl-asm-ptrace-h.patch?id=2e3d4976eeffb4704cf83e2cc3306293b7c7b2e9";
|
||||
sha256 = "8D1wPcdgAkE/TNBOgsHaeTZYhd9l+9TrZg8d5C7kG6k=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "musl-macros.patch";
|
||||
url = "https://git.alpinelinux.org/aports/plain/main/elfutils/musl-macros.patch?id=2e3d4976eeffb4704cf83e2cc3306293b7c7b2e9";
|
||||
sha256 = "tp6O1TRsTAMsFe8vw3LMENT/vAu6OmyA8+pzgThHeA8=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "musl-strndupa.patch";
|
||||
url = "https://git.alpinelinux.org/aports/plain/main/elfutils/musl-strndupa.patch?id=2e3d4976eeffb4704cf83e2cc3306293b7c7b2e9";
|
||||
sha256 = "sha256-7daehJj1t0wPtQzTv+/Rpuqqs5Ng/EYnZzrcf2o/Lb0=";
|
||||
})
|
||||
] ++ lib.optionals stdenv.hostPlatform.isMusl [ ./musl-error_h.patch ];
|
||||
|
||||
postPatch =
|
||||
''
|
||||
@@ -85,16 +79,13 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# We need bzip2 in NativeInputs because otherwise we can't unpack the src,
|
||||
# as the host-bzip2 will be in the path.
|
||||
nativeBuildInputs =
|
||||
[
|
||||
m4
|
||||
bison
|
||||
flex
|
||||
gettext
|
||||
bzip2
|
||||
]
|
||||
++ lib.optional enableDebuginfod pkg-config
|
||||
++ lib.optional (stdenv.targetPlatform.useLLVM or false) autoreconfHook;
|
||||
nativeBuildInputs = [
|
||||
m4
|
||||
bison
|
||||
flex
|
||||
gettext
|
||||
bzip2
|
||||
] ++ lib.optional enableDebuginfod pkg-config;
|
||||
buildInputs =
|
||||
[
|
||||
zlib
|
||||
@@ -119,22 +110,28 @@ stdenv.mkDerivation rec {
|
||||
|
||||
hardeningDisable = [ "strictflexarrays3" ];
|
||||
|
||||
configureFlags =
|
||||
[
|
||||
"--program-prefix=eu-" # prevent collisions with binutils
|
||||
"--enable-deterministic-archives"
|
||||
(lib.enableFeature enableDebuginfod "libdebuginfod")
|
||||
(lib.enableFeature enableDebuginfod "debuginfod")
|
||||
# build elfutils out-of-source-tree to avoid ./stack inclusion
|
||||
# as a c++ header on libc++: https://sourceware.org/PR33103
|
||||
preConfigure =
|
||||
if (stdenv.targetPlatform.useLLVM or false) then
|
||||
''
|
||||
mkdir build-tree
|
||||
cd build-tree
|
||||
''
|
||||
else
|
||||
null;
|
||||
configureScript = if (stdenv.targetPlatform.useLLVM or false) then "../configure" else null;
|
||||
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766
|
||||
# Versioned symbols are nice to have, but we can do without.
|
||||
(lib.enableFeature (!stdenv.hostPlatform.isMicroBlaze) "symbol-versioning")
|
||||
]
|
||||
++ lib.optional (stdenv.targetPlatform.useLLVM or false) "--disable-demangler"
|
||||
++ lib.optionals stdenv.cc.isClang [
|
||||
"CFLAGS=-Wno-unused-private-field"
|
||||
"CXXFLAGS=-Wno-unused-private-field"
|
||||
];
|
||||
configureFlags = [
|
||||
"--program-prefix=eu-" # prevent collisions with binutils
|
||||
"--enable-deterministic-archives"
|
||||
(lib.enableFeature enableDebuginfod "libdebuginfod")
|
||||
(lib.enableFeature enableDebuginfod "debuginfod")
|
||||
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766
|
||||
# Versioned symbols are nice to have, but we can do without.
|
||||
(lib.enableFeature (!stdenv.hostPlatform.isMicroBlaze) "symbol-versioning")
|
||||
] ++ lib.optional (stdenv.targetPlatform.useLLVM or false) "--disable-demangler";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
ninja,
|
||||
gettext,
|
||||
fetchurl,
|
||||
fetchpatch,
|
||||
pkg-config,
|
||||
gtk4,
|
||||
glib,
|
||||
@@ -38,29 +37,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "epiphany";
|
||||
version = "48.3";
|
||||
version = "48.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/epiphany/${lib.versions.major finalAttrs.version}/epiphany-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-2ilT5+K3O/dHPAozl5EE15NieVKV6qCio46hiFN9rxM=";
|
||||
hash = "sha256-D2ZVKtZZPHlSo93uW/UVZWyMQ0hxB22fGpGnr5NGsbQ=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# shell: Fix startup crash on Pantheon
|
||||
# https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1818
|
||||
(fetchpatch {
|
||||
url = "https://gitlab.gnome.org/GNOME/epiphany/-/commit/da4437beb7f1fbc9c2fa3d4629b8c826d484835e.patch";
|
||||
hash = "sha256-meufd5gnhLcK0dgIXEMDnid9e1R2M1D3jZ9Yoh6YobM=";
|
||||
})
|
||||
|
||||
# action-bar-end: Fix startup crash on Pantheon
|
||||
# https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1819
|
||||
(fetchpatch {
|
||||
url = "https://gitlab.gnome.org/GNOME/epiphany/-/commit/d69866854b315123c8832fae58c6de008da20ea0.patch";
|
||||
hash = "sha256-GnZQC4rtBYRr+x9mF8pCFDcDOjEJj+27ECdXBNL42kQ=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
desktop-file-utils
|
||||
gettext
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/src/EWS/camel/camel-ews-utils.c b/src/EWS/camel/camel-ews-utils.c
|
||||
index 32817df..da65217 100644
|
||||
index 32817df..c8b3f2e 100644
|
||||
--- a/src/EWS/camel/camel-ews-utils.c
|
||||
+++ b/src/EWS/camel/camel-ews-utils.c
|
||||
@@ -1550,7 +1550,7 @@ ews_utils_save_category_changes (GHashTable *old_categories, /* gchar *guid ~> C
|
||||
@@ -32,7 +32,7 @@ index 32817df..da65217 100644
|
||||
|
||||
for (ii = 0; strv && strv[ii]; ii++) {
|
||||
diff --git a/src/Microsoft365/camel/camel-m365-store.c b/src/Microsoft365/camel/camel-m365-store.c
|
||||
index 7374c36..7da2023 100644
|
||||
index 7374c36..dbf9099 100644
|
||||
--- a/src/Microsoft365/camel/camel-m365-store.c
|
||||
+++ b/src/Microsoft365/camel/camel-m365-store.c
|
||||
@@ -305,7 +305,7 @@ m365_store_save_category_changes (GHashTable *old_categories, /* gchar *id ~> Ca
|
||||
@@ -65,7 +65,7 @@ index 7374c36..7da2023 100644
|
||||
|
||||
for (ii = 0; strv && strv[ii]; ii++) {
|
||||
diff --git a/src/Microsoft365/common/e-m365-tz-utils.c b/src/Microsoft365/common/e-m365-tz-utils.c
|
||||
index cec5417..2e744a0 100644
|
||||
index cec5417..38f1a87 100644
|
||||
--- a/src/Microsoft365/common/e-m365-tz-utils.c
|
||||
+++ b/src/Microsoft365/common/e-m365-tz-utils.c
|
||||
@@ -192,10 +192,21 @@ e_m365_tz_utils_get_user_timezone (void)
|
||||
@@ -93,7 +93,7 @@ index cec5417..2e744a0 100644
|
||||
if (g_settings_get_boolean (settings, "use-system-timezone"))
|
||||
location = e_cal_util_get_system_timezone_location ();
|
||||
diff --git a/src/common/e-ews-common-utils.c b/src/common/e-ews-common-utils.c
|
||||
index 3458c10..7d21784 100644
|
||||
index f388e3b..ed57213 100644
|
||||
--- a/src/common/e-ews-common-utils.c
|
||||
+++ b/src/common/e-ews-common-utils.c
|
||||
@@ -208,10 +208,21 @@ e_ews_common_utils_get_configured_icaltimezone (void)
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "evolution-ews";
|
||||
version = "3.56.1";
|
||||
version = "3.56.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||
hash = "sha256-DgC2qxV9j+r7T1HXchusP2IfI4f1WrS7PEPRN0KFrWs=";
|
||||
hash = "sha256-Hrfsz5TGuGGNa0XDICNQIJ21Z8SJEIrcICM8TRn48o8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fasmg";
|
||||
version = "kp60";
|
||||
version = "ktge";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://flatassembler.net/fasmg.${version}.zip";
|
||||
sha256 = "sha256-gOkAVi3hoHer7Buzu6O8Y66cXVys6CI+tqwEPtTOO9U=";
|
||||
sha256 = "sha256-z/2SeN6FgRvLg8hA+lle/f2qEkce1GF1cC0uSnXExhg=";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user