Merge remote-tracking branch 'origin/master' into staging-next

Conflicts:
- pkgs/top-level/python-packages.nix
This commit is contained in:
Martin Weinelt
2024-08-13 13:21:03 +02:00
74 changed files with 1702 additions and 311 deletions
+1
View File
@@ -1484,6 +1484,7 @@
./services/web-apps/trilium.nix
./services/web-apps/tt-rss.nix
./services/web-apps/vikunja.nix
./services/web-apps/weblate.nix
./services/web-apps/whitebophir.nix
./services/web-apps/wiki-js.nix
./services/web-apps/windmill.nix
@@ -21,6 +21,7 @@ let
manifestDir = "/var/lib/rancher/k3s/server/manifests";
chartDir = "/var/lib/rancher/k3s/server/static/charts";
imageDir = "/var/lib/rancher/k3s/agent/images";
containerdConfigTemplateFile = "/var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl";
manifestModule =
let
@@ -119,6 +120,11 @@ let
${builtins.concatStringsSep "\n" (map linkManifestEntry enabledManifests)}
${builtins.concatStringsSep "\n" (lib.mapAttrsToList linkChartEntry cfg.charts)}
${builtins.concatStringsSep "\n" (map linkImageEntry cfg.images)}
${lib.optionalString (cfg.containerdConfigTemplate != null) ''
mkdir -p $(dirname ${containerdConfigTemplateFile})
${pkgs.coreutils-full}/bin/ln -sfn ${pkgs.writeText "config.toml.tmpl" cfg.containerdConfigTemplate} ${containerdConfigTemplateFile}
''}
'';
in
{
@@ -340,6 +346,26 @@ in
'';
};
containerdConfigTemplate = mkOption {
type = types.nullOr types.str;
default = null;
example = lib.literalExpression ''
# Base K3s config
{{ template "base" . }}
# Add a custom runtime
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes."custom"]
runtime_type = "io.containerd.runc.v2"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes."custom".options]
BinaryName = "/path/to/custom-container-runtime"
'';
description = ''
Config template for containerd, to be placed at
`/var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl`.
See the K3s docs on [configuring containerd](https://docs.k3s.io/advanced#configuring-containerd).
'';
};
images = mkOption {
type = with types; listOf package;
default = [ ];
@@ -1,4 +1,5 @@
{
deviceNameStrategy,
glibc,
jq,
lib,
@@ -25,6 +26,7 @@ writeScriptBin "nvidia-cdi-generator"
function cdiGenerate {
${lib.getExe' nvidia-container-toolkit "nvidia-ctk"} cdi generate \
--format json \
--device-name-strategy ${deviceNameStrategy} \
--ldconfig-path ${lib.getExe' glibc "ldconfig"} \
--library-search-path ${lib.getLib nvidia-driver}/lib \
--nvidia-ctk-path ${lib.getExe' nvidia-container-toolkit "nvidia-ctk"}
@@ -52,6 +52,17 @@
'';
};
device-name-strategy = lib.mkOption {
default = "index";
type = lib.types.enum [ "index" "uuid" "type-index" ];
description = ''
Specify the strategy for generating device names,
passed to `nvidia-ctk cdi generate`. This will affect how
you reference the device using `nvidia.com/gpu=` in
the container runtime.
'';
};
mount-nvidia-docker-1-directories = lib.mkOption {
default = true;
type = lib.types.bool;
@@ -119,6 +130,7 @@
script = pkgs.callPackage ./cdi-generate.nix {
inherit (config.hardware.nvidia-container-toolkit) mounts;
nvidia-driver = config.hardware.nvidia.package;
deviceNameStrategy = config.hardware.nvidia-container-toolkit.device-name-strategy;
};
in
lib.getExe script;
+388
View File
@@ -0,0 +1,388 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.weblate;
dataDir = "/var/lib/weblate";
settingsDir = "${dataDir}/settings";
finalPackage = cfg.package.overridePythonAttrs (old: {
# We only support the PostgreSQL backend in this module
dependencies = old.dependencies ++ cfg.package.optional-dependencies.postgres;
# Use a settings module in dataDir, to avoid having to rebuild the package
# when user changes settings.
makeWrapperArgs = (old.makeWrapperArgs or [ ]) ++ [
"--set PYTHONPATH \"${settingsDir}\""
"--set DJANGO_SETTINGS_MODULE \"settings\""
];
});
inherit (finalPackage) python;
pythonEnv = python.buildEnv.override {
extraLibs = with python.pkgs; [
(toPythonModule finalPackage)
celery
];
};
# This extends and overrides the weblate/settings_example.py code found in upstream.
weblateConfig =
''
# This was autogenerated by the NixOS module.
SITE_TITLE = "Weblate"
SITE_DOMAIN = "${cfg.localDomain}"
# TLS terminates at the reverse proxy, but this setting controls how links to weblate are generated.
ENABLE_HTTPS = True
SESSION_COOKIE_SECURE = ENABLE_HTTPS
DATA_DIR = "${dataDir}"
CACHE_DIR = f"{DATA_DIR}/cache"
STATIC_ROOT = "${finalPackage.static}/static"
MEDIA_ROOT = "/var/lib/weblate/media"
COMPRESS_ROOT = "${finalPackage.static}/compressor-cache"
DEBUG = False
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"HOST": "/run/postgresql",
"NAME": "weblate",
"USER": "weblate",
}
}
with open("${cfg.djangoSecretKeyFile}") as f:
SECRET_KEY = f.read().rstrip("\n")
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "unix://${config.services.redis.servers.weblate.unixSocket}",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
"PASSWORD": None,
"CONNECTION_POOL_KWARGS": {},
},
"KEY_PREFIX": "weblate",
"TIMEOUT": 3600,
},
"avatar": {
"BACKEND": "django.core.cache.backends.filebased.FileBasedCache",
"LOCATION": "/var/lib/weblate/avatar-cache",
"TIMEOUT": 86400,
"OPTIONS": {"MAX_ENTRIES": 1000},
}
}
CELERY_TASK_ALWAYS_EAGER = False
CELERY_BROKER_URL = "redis+socket://${config.services.redis.servers.weblate.unixSocket}"
CELERY_RESULT_BACKEND = CELERY_BROKER_URL
VCS_BACKENDS = ("weblate.vcs.git.GitRepository",)
''
+ lib.optionalString cfg.smtp.enable ''
ADMINS = (("Weblate Admin", "${cfg.smtp.user}"),)
EMAIL_HOST = "${cfg.smtp.host}"
EMAIL_USE_TLS = True
EMAIL_HOST_USER = "${cfg.smtp.user}"
SERVER_EMAIL = "${cfg.smtp.user}"
DEFAULT_FROM_EMAIL = "${cfg.smtp.user}"
EMAIL_PORT = 587
with open("${cfg.smtp.passwordFile}") as f:
EMAIL_HOST_PASSWORD = f.read().rstrip("\n")
''
+ cfg.extraConfig;
settings_py =
pkgs.runCommand "weblate_settings.py"
{
inherit weblateConfig;
passAsFile = [ "weblateConfig" ];
}
''
mkdir -p $out
cat \
${finalPackage}/${python.sitePackages}/weblate/settings_example.py \
$weblateConfigPath \
> $out/settings.py
'';
environment = {
PYTHONPATH = "${settingsDir}:${pythonEnv}/${python.sitePackages}/";
DJANGO_SETTINGS_MODULE = "settings";
# We run Weblate through gunicorn, so we can't utilise the env var set in the wrapper.
inherit (finalPackage) GI_TYPELIB_PATH;
};
weblatePath = with pkgs; [
gitSVN
#optional
git-review
tesseract
licensee
mercurial
];
in
{
options = {
services.weblate = {
enable = lib.mkEnableOption "Weblate service";
package = lib.mkPackageOption pkgs "weblate" { };
localDomain = lib.mkOption {
description = "The domain name serving your Weblate instance.";
example = "weblate.example.org";
type = lib.types.str;
};
djangoSecretKeyFile = lib.mkOption {
description = ''
Location of the Django secret key.
This should be a path pointing to a file with secure permissions (not /nix/store).
Can be generated with `weblate-generate-secret-key` which is available as the `weblate` user.
'';
type = lib.types.path;
};
extraConfig = lib.mkOption {
type = lib.types.lines;
default = "";
description = ''
Text to append to `settings.py` Weblate configuration file.
'';
};
smtp = {
enable = lib.mkEnableOption "Weblate SMTP support";
user = lib.mkOption {
description = "SMTP login name.";
example = "weblate@example.org";
type = lib.types.str;
};
host = lib.mkOption {
description = "SMTP host used when sending emails to users.";
type = lib.types.str;
example = "127.0.0.1";
};
passwordFile = lib.mkOption {
description = ''
Location of a file containing the SMTP password.
This should be a path pointing to a file with secure permissions (not /nix/store).
'';
type = lib.types.path;
};
};
};
};
config = lib.mkIf cfg.enable {
systemd.tmpfiles.rules = [ "L+ ${settingsDir} - - - - ${settings_py}" ];
services.nginx = {
enable = true;
virtualHosts."${cfg.localDomain}" = {
forceSSL = true;
enableACME = true;
locations = {
"= /favicon.ico".alias = "${finalPackage}/${python.sitePackages}/weblate/static/favicon.ico";
"/static/".alias = "${finalPackage.static}/static/";
"/static/CACHE/".alias = "${finalPackage.static}/compressor-cache/CACHE/";
"/media/".alias = "/var/lib/weblate/media/";
"/".proxyPass = "http://unix:///run/weblate.socket";
};
};
};
systemd.services.weblate-postgresql-setup = {
description = "Weblate PostgreSQL setup";
after = [ "postgresql.service" ];
serviceConfig = {
Type = "oneshot";
User = "postgres";
Group = "postgres";
ExecStart = ''
${config.services.postgresql.package}/bin/psql weblate -c "CREATE EXTENSION IF NOT EXISTS pg_trgm"
'';
};
};
systemd.services.weblate-migrate = {
description = "Weblate migration";
after = [ "weblate-postgresql-setup.service" ];
requires = [ "weblate-postgresql-setup.service" ];
# We want this to be active on boot, not just on socket activation
wantedBy = [ "multi-user.target" ];
inherit environment;
path = weblatePath;
serviceConfig = {
Type = "oneshot";
StateDirectory = "weblate";
User = "weblate";
Group = "weblate";
ExecStart = "${finalPackage}/bin/weblate migrate --noinput";
};
};
systemd.services.weblate-celery = {
description = "Weblate Celery";
after = [
"network.target"
"redis.service"
"postgresql.service"
];
# We want this to be active on boot, not just on socket activation
wantedBy = [ "multi-user.target" ];
environment = environment // {
CELERY_WORKER_RUNNING = "1";
};
path = weblatePath;
# Recommendations from:
# https://github.com/WeblateOrg/weblate/blob/main/weblate/examples/celery-weblate.service
serviceConfig =
let
# We have to push %n through systemd's replacement, therefore %%n.
pidFile = "/run/celery/weblate-%%n.pid";
nodes = "celery notify memory backup translate";
cmd = verb: ''
${pythonEnv}/bin/celery multi ${verb} \
${nodes} \
-A "weblate.utils" \
--pidfile=${pidFile} \
--logfile=/var/log/celery/weblate-%%n%%I.log \
--loglevel=DEBUG \
--beat:celery \
--queues:celery=celery \
--prefetch-multiplier:celery=4 \
--queues:notify=notify \
--prefetch-multiplier:notify=10 \
--queues:memory=memory \
--prefetch-multiplier:memory=10 \
--queues:translate=translate \
--prefetch-multiplier:translate=4 \
--concurrency:backup=1 \
--queues:backup=backup \
--prefetch-multiplier:backup=2
'';
in
{
Type = "forking";
User = "weblate";
Group = "weblate";
WorkingDirectory = "${finalPackage}/${python.sitePackages}/weblate/";
RuntimeDirectory = "celery";
RuntimeDirectoryPreserve = "restart";
LogsDirectory = "celery";
ExecStart = cmd "start";
ExecReload = cmd "restart";
ExecStop = ''
${pythonEnv}/bin/celery multi stopwait \
${nodes} \
--pidfile=${pidFile}
'';
Restart = "always";
};
};
systemd.services.weblate = {
description = "Weblate Gunicorn app";
after = [
"network.target"
"weblate-migrate.service"
"weblate-celery.service"
];
requires = [
"weblate-migrate.service"
"weblate-celery.service"
"weblate.socket"
];
inherit environment;
path = weblatePath;
serviceConfig = {
Type = "notify";
NotifyAccess = "all";
ExecStart =
let
gunicorn = python.pkgs.gunicorn.overridePythonAttrs (old: {
# Allows Gunicorn to set a meaningful process name
dependencies = (old.dependencies or [ ]) ++ old.optional-dependencies.setproctitle;
});
in
''
${gunicorn}/bin/gunicorn \
--name=weblate \
--bind='unix:///run/weblate.socket' \
weblate.wsgi
'';
ExecReload = "kill -s HUP $MAINPID";
KillMode = "mixed";
PrivateTmp = true;
WorkingDirectory = dataDir;
StateDirectory = "weblate";
RuntimeDirectory = "weblate";
User = "weblate";
Group = "weblate";
};
};
systemd.sockets.weblate = {
before = [ "nginx.service" ];
wantedBy = [ "sockets.target" ];
socketConfig = {
ListenStream = "/run/weblate.socket";
SocketUser = "weblate";
SocketGroup = "weblate";
SocketMode = "770";
};
};
services.redis.servers.weblate = {
enable = true;
user = "weblate";
unixSocket = "/run/redis-weblate/redis.sock";
unixSocketPerm = 770;
};
services.postgresql = {
enable = true;
ensureUsers = [
{
name = "weblate";
ensureDBOwnership = true;
}
];
ensureDatabases = [ "weblate" ];
};
users.users.weblate = {
isSystemUser = true;
group = "weblate";
packages = [ finalPackage ] ++ weblatePath;
};
users.groups.weblate.members = [ config.services.nginx.user ];
};
meta.maintainers = with lib.maintainers; [ erictapen ];
}
+1
View File
@@ -1074,6 +1074,7 @@ in {
wastebin = handleTest ./wastebin.nix {};
watchdogd = handleTest ./watchdogd.nix {};
webhook = runTest ./webhook.nix;
weblate = handleTest ./web-apps/weblate.nix {};
wiki-js = handleTest ./wiki-js.nix {};
wine = handleTest ./wine.nix {};
wireguard = handleTest ./wireguard {};
+52
View File
@@ -0,0 +1,52 @@
# A test that containerdConfigTemplate settings get written to containerd/config.toml
import ../make-test-python.nix (
{ lib, k3s, ... }:
let
nodeName = "test";
in
{
name = "${k3s.name}-containerd-config";
nodes.machine =
{ ... }:
{
# k3s uses enough resources the default vm fails.
virtualisation.memorySize = 1536;
virtualisation.diskSize = 4096;
services.k3s = {
enable = true;
package = k3s;
# Slightly reduce resource usage
extraFlags = [
"--disable coredns"
"--disable local-storage"
"--disable metrics-server"
"--disable servicelb"
"--disable traefik"
"--node-name ${nodeName}"
];
containerdConfigTemplate = ''
# Base K3s config
{{ template "base" . }}
# MAGIC COMMENT
'';
};
};
testScript = ''
start_all()
machine.wait_for_unit("k3s")
# wait until the node is ready
machine.wait_until_succeeds(r"""kubectl wait --for='jsonpath={.status.conditions[?(@.type=="Ready")].status}=True' nodes/${nodeName}""")
# test whether the config template file contains the magic comment
out=machine.succeed("cat /var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl")
assert "MAGIC COMMENT" in out, "the containerd config template does not contain the magic comment"
# test whether the config file contains the magic comment
out=machine.succeed("cat /var/lib/rancher/k3s/agent/etc/containerd/config.toml")
assert "MAGIC COMMENT" in out, "the containerd config does not contain the magic comment"
'';
meta.maintainers = lib.teams.k3s.members;
}
)
+3
View File
@@ -11,6 +11,9 @@ in
_: k3s: import ./airgap-images.nix { inherit system pkgs k3s; }
) allK3s;
auto-deploy = lib.mapAttrs (_: k3s: import ./auto-deploy.nix { inherit system pkgs k3s; }) allK3s;
containerd-config = lib.mapAttrs (
_: k3s: import ./containerd-config.nix { inherit system pkgs k3s; }
) allK3s;
etcd = lib.mapAttrs (
_: k3s:
import ./etcd.nix {
+104
View File
@@ -0,0 +1,104 @@
import ../make-test-python.nix (
{ pkgs, ... }:
let
certs = import ../common/acme/server/snakeoil-certs.nix;
serverDomain = certs.domain;
admin = {
username = "admin";
password = "snakeoilpass";
};
# An API token that we manually insert into the db as a valid one.
apiToken = "OVJh65sXaAfQMZ4NTcIGbFZIyBZbEZqWTi7azdDf";
in
{
name = "weblate";
meta.maintainers = with pkgs.lib.maintainers; [ erictapen ];
nodes.server =
{ pkgs, lib, ... }:
{
virtualisation.memorySize = 2048;
services.weblate = {
enable = true;
localDomain = "${serverDomain}";
djangoSecretKeyFile = pkgs.writeText "weblate-django-secret" "thisissnakeoilsecretwithmorethan50characterscorrecthorsebatterystaple";
extraConfig = ''
# Weblate tries to fetch Avatars from the network
ENABLE_AVATARS = False
'';
};
services.nginx.virtualHosts."${serverDomain}" = {
enableACME = lib.mkForce false;
sslCertificate = certs."${serverDomain}".cert;
sslCertificateKey = certs."${serverDomain}".key;
};
security.pki.certificateFiles = [ certs.ca.cert ];
networking.hosts."::1" = [ "${serverDomain}" ];
networking.firewall.allowedTCPPorts = [
80
443
];
users.users.weblate.shell = pkgs.bashInteractive;
};
nodes.client =
{ pkgs, nodes, ... }:
{
environment.systemPackages = [ pkgs.wlc ];
environment.etc."xdg/weblate".text = ''
[weblate]
url = https://${serverDomain}/api/
key = ${apiToken}
'';
networking.hosts."${nodes.server.networking.primaryIPAddress}" = [ "${serverDomain}" ];
security.pki.certificateFiles = [ certs.ca.cert ];
};
testScript = ''
import json
start_all()
server.wait_for_unit("weblate.socket")
server.wait_until_succeeds("curl -f https://${serverDomain}/")
server.succeed("sudo -iu weblate -- weblate createadmin --username ${admin.username} --password ${admin.password} --email weblate@example.org")
# It's easier to replace the generated API token with a predefined one than
# to extract it at runtime.
server.succeed("sudo -iu weblate -- psql -d weblate -c \"UPDATE authtoken_token SET key = '${apiToken}' WHERE user_id = (SELECT id FROM weblate_auth_user WHERE username = 'admin');\"")
client.wait_for_unit("multi-user.target")
# Test the official Weblate client wlc.
client.wait_until_succeeds("REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt wlc --debug list-projects")
def call_wl_api(arg):
(rv, result) = client.execute("curl -H \"Content-Type: application/json\" -H \"Authorization: Token ${apiToken}\" https://${serverDomain}/api/{}".format(arg))
assert rv == 0
print(result)
call_wl_api("users/ --data '{}'".format(
json.dumps(
{"username": "test1",
"full_name": "test1",
"email": "test1@example.org"
})))
# TODO: Check sending and receiving email.
# server.wait_for_unit("postfix.service")
# TODO: The goal is for this to succeed, but there are still some checks failing.
# server.succeed("sudo -iu weblate -- weblate check --deploy")
'';
}
)
+2 -2
View File
@@ -16,13 +16,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "mympd";
version = "17.0.0";
version = "17.0.1";
src = fetchFromGitHub {
owner = "jcorporation";
repo = "myMPD";
rev = "v${finalAttrs.version}";
sha256 = "sha256-/8IDwzgZzf63MvXTBP2CoC5IHi7Umr3exU1/oDdadgk=";
sha256 = "sha256-NkOTCvpU6MxGOvQwiTLMJ444HgNK5tpt3hUs2epFyLE=";
};
nativeBuildInputs = [
@@ -136,8 +136,8 @@ let
libGccJitLibraryPaths = [
"${lib.getLib libgccjit}/lib/gcc"
"${lib.getLib stdenv.cc.libc}/lib"
] ++ lib.optionals (stdenv.cc?cc.libgcc) [
"${lib.getLib stdenv.cc.cc.libgcc}/lib"
] ++ lib.optionals (stdenv.cc?cc.lib.libgcc) [
"${lib.getLib stdenv.cc.cc.lib.libgcc}/lib"
];
inherit (if variant == "macport"
@@ -2,6 +2,7 @@
, lib
, binutils
, fetchFromGitHub
, fetchpatch
, cmake
, pkg-config
, wrapGAppsHook3
@@ -15,6 +16,7 @@
, expat
, glew
, glib
, glib-networking
, gmp
, gtk3
, hicolor-icon-theme
@@ -64,15 +66,27 @@ let
});
openvdb_tbb_2021_8 = openvdb.override { tbb = tbb_2021_11; };
wxGTK-override' = if wxGTK-override == null then wxGTK-prusa else wxGTK-override;
patches = [
(fetchpatch {
url = "https://raw.githubusercontent.com/gentoo/gentoo/master/media-gfx/prusaslicer/files/prusaslicer-2.8.0-missing-includes.patch";
hash = "sha256-/R9jv9zSP1lDW6IltZ8V06xyLdxfaYrk3zD6JRFUxHg=";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/gentoo/gentoo/master/media-gfx/prusaslicer/files/prusaslicer-2.8.0-fixed-linking.patch";
hash = "sha256-G1JNdVH+goBelag9aX0NctHFVqtoYFnqjwK/43FVgvM=";
})
];
in
stdenv.mkDerivation (finalAttrs: {
pname = "prusa-slicer";
version = "2.7.4";
version = "2.8.0";
inherit patches;
src = fetchFromGitHub {
owner = "prusa3d";
repo = "PrusaSlicer";
hash = "sha256-g2I2l6i/8p8werDs4mDI/lGeDQsma4WSB9vT6OB2LGg=";
hash = "sha256-A/uxNIEXCchLw3t5erWdhqFAeh6nudcMfASi+RoJkFg=";
rev = "version_${finalAttrs.version}";
};
@@ -93,6 +107,7 @@ stdenv.mkDerivation (finalAttrs: {
expat
glew
glib
glib-networking
gmp
gtk3
hicolor-icon-theme
@@ -128,9 +143,6 @@ stdenv.mkDerivation (finalAttrs: {
# prusa-slicer uses dlopen on `libudev.so` at runtime
NIX_LDFLAGS = lib.optionalString withSystemd "-ludev";
# FIXME: remove in 2.8.0
NIX_CFLAGS_COMPILE = "-Wno-enum-constexpr-conversion";
prePatch = ''
# Since version 2.5.0 of nlopt we need to link to libnlopt, as libnlopt_cxx
# now seems to be integrated into the main lib.
@@ -1,67 +0,0 @@
{ lib
, python3Packages
, fetchFromGitHub
, ledger
, hledger
, useLedger ? true
, useHledger ? true
}:
python3Packages.buildPythonApplication rec {
pname = "ledger-autosync";
version = "1.0.3";
format = "pyproject";
# no tests included in PyPI tarball
src = fetchFromGitHub {
owner = "egh";
repo = "ledger-autosync";
rev = "v${version}";
sha256 = "0n3y4qxsv1cyvyap95h3rj4bj1sinyfgsajygm7s8di3j5aabqr2";
};
nativeBuildInputs = with python3Packages; [
poetry-core
];
propagatedBuildInputs = with python3Packages; [
asn1crypto
beautifulsoup4
cffi
cryptography
entrypoints
fuzzywuzzy
idna
jeepney
keyring
lxml
mock
nose
ofxclient
ofxhome
ofxparse
pbr
pycparser
secretstorage
six
] ++ lib.optional useLedger ledger
++ lib.optional useHledger hledger;
# Checks require ledger as a python package,
# ledger does not support python3 while ledger-autosync requires it.
nativeCheckInputs = with python3Packages; [ ledger hledger nose mock pytestCheckHook ];
# Disable some non-passing tests:
# https://github.com/egh/ledger-autosync/issues/127
disabledTests = [
"test_payee_match"
"test_args_only"
];
meta = with lib; {
homepage = "https://github.com/egh/ledger-autosync";
description = "OFX/CSV autosync for ledger and hledger";
license = licenses.gpl3;
maintainers = with maintainers; [ eamsden ];
};
}
@@ -17,6 +17,7 @@ let
fetchModule =
{ module
, npmRoot ? null
, fetcherOpts
}: (
if module ? "resolved" then
(
@@ -34,16 +35,16 @@ let
)
else if (scheme == "http" || scheme == "https") then
(
fetchurl {
fetchurl ({
url = module.resolved;
hash = module.integrity;
}
} // fetcherOpts )
)
else if lib.hasPrefix "git" module.resolved then
(
builtins.fetchGit {
builtins.fetchGit ({
url = module.resolved;
}
} // fetcherOpts )
)
else throw "Unsupported URL scheme: ${scheme}"
)
@@ -62,6 +63,10 @@ in
, packageLock ? importJSON (npmRoot + "/package-lock.json")
, pname ? getName package
, version ? getVersion package
# A map of additional fetcher options forwarded to the fetcher used to download the package.
# Example: { "node_modules/axios" = { curlOptsList = [ "--verbose" ]; }; }
# This will download the axios package with curl's verbose option.
, fetcherOpts ? {}
}:
let
mapLockDependencies =
@@ -82,10 +87,11 @@ in
packageLock' = packageLock // {
packages =
mapAttrs
(_: module:
(modulePath: module:
let
src = fetchModule {
inherit module npmRoot;
fetcherOpts = fetcherOpts.${modulePath} or {};
};
in
(removeAttrs module [
+5
View File
@@ -20,6 +20,11 @@ buildGoModule rec {
vendorHash = "sha256-jscyNyVr+RDN1EaxIOc3aYCAVT+1eO/c+dxEsIorDIs=";
checkFlags = [
# Test tries to monkey-patch the stdlib, fails with permission denied error.
"-skip=TestKeystore"
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
local INSTALL="$out/bin/keepassxc-go"
installShellCompletion --cmd keepassxc-go \
@@ -0,0 +1,64 @@
{
lib,
python3Packages,
fetchFromGitHub,
fetchpatch2,
ledger,
hledger,
}:
python3Packages.buildPythonApplication rec {
pname = "ledger-autosync";
version = "1.0.3";
pyproject = true;
# no tests included in PyPI tarball
src = fetchFromGitHub {
owner = "egh";
repo = "ledger-autosync";
rev = "v${version}";
hash = "sha256-IuOlVJEjNqRPfV4q/Zy3UQe5iMwDlnSV356FrTsmflg=";
};
patches = [
(fetchpatch2 {
name = "drop-distutils.patch";
url = "https://github.com/egh/ledger-autosync/commit/b7a2a185b9c3b17764322dcc80153410d12e6a5f.patch";
hash = "sha256-qKuTpsNFuS00yRAH4VGpMA249ml0BGZsGVb75WrBWEo=";
})
(fetchpatch2 {
name = "drop-imp.patch";
url = "https://github.com/egh/ledger-autosync/commit/453d92ad279e6c90fadf835d1c39189a1179eb17.patch";
hash = "sha256-mncMvdWldAnVDy1+bJ+oyDOrUb14v9LrBRz/CYrtYbc=";
})
];
build-system = with python3Packages; [ poetry-core ];
dependencies = with python3Packages; [
ofxclient
ofxparse
];
nativeCheckInputs = [
hledger
ledger
python3Packages.ledger
python3Packages.pytestCheckHook
];
# Disable some non-passing tests:
# https://github.com/egh/ledger-autosync/issues/127
disabledTests = [
"test_payee_match"
"test_args_only"
];
meta = with lib; {
homepage = "https://github.com/egh/ledger-autosync";
changelog = "https://github.com/egh/ledger-autosync/releases/tag/v${version}";
description = "OFX/CSV autosync for ledger and hledger";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ eamsden ];
};
}
+34 -17
View File
@@ -2,6 +2,7 @@
, stdenv
, fetchurl
, appimageTools
, unzip
, makeWrapper
# Notice: graphs will not sync without matching upstream's major electron version
# the specific electron version is set at top-level file to preserve override interface.
@@ -13,32 +14,44 @@
}:
stdenv.mkDerivation (finalAttrs: let
inherit (finalAttrs) pname version src appimageContents;
inherit (finalAttrs) pname version src;
inherit (stdenv.hostPlatform) system;
selectSystem = attrs: attrs.${system} or (throw "Unsupported system: ${system}");
suffix = selectSystem {
x86_64-linux = "linux-x64-${version}.AppImage";
x86_64-darwin = "darwin-x64-${version}.zip";
aarch64-darwin = "darwin-arm64-${version}.zip";
};
hash = selectSystem {
x86_64-linux = "sha256-XROuY2RlKnGvK1VNvzauHuLJiveXVKrIYPppoz8fCmc=";
x86_64-darwin = "sha256-0i9ozqBSeV/y8v+YEmQkbY0V6JHOv6tKub4O5Fdx2fQ=";
aarch64-darwin = "sha256-Uvv96XWxpFj14wPH0DwPT+mlf3Z2dy1g/z8iBt5Te7Q=";
};
in {
pname = "logseq";
version = "0.10.9";
src = fetchurl {
url = "https://github.com/logseq/logseq/releases/download/${version}/logseq-linux-x64-${version}.AppImage";
hash = "sha256-XROuY2RlKnGvK1VNvzauHuLJiveXVKrIYPppoz8fCmc=";
name = "${pname}-${version}.AppImage";
inherit hash;
url = "https://github.com/logseq/logseq/releases/download/${version}/logseq-${suffix}";
name = lib.optionalString stdenv.isLinux "${pname}-${version}.AppImage";
};
appimageContents = appimageTools.extract {
inherit pname src version;
};
nativeBuildInputs = [ makeWrapper ]
++ lib.optionals stdenv.isLinux [ autoPatchelfHook ]
++ lib.optionals stdenv.isDarwin [ unzip ];
buildInputs = [ stdenv.cc.cc.lib ];
dontUnpack = true;
dontUnpack = stdenv.isLinux;
dontConfigure = true;
dontBuild = true;
nativeBuildInputs = [ makeWrapper autoPatchelfHook ];
buildInputs = [ stdenv.cc.cc.lib ];
installPhase = ''
runHook preInstall
'' + lib.optionalString stdenv.isLinux (
let
appimageContents = appimageTools.extract { inherit pname src version; };
in
''
mkdir -p $out/bin $out/share/${pname} $out/share/applications
cp -a ${appimageContents}/{locales,resources} $out/share/${pname}
cp -a ${appimageContents}/Logseq.desktop $out/share/applications/${pname}.desktop
@@ -55,11 +68,15 @@ in {
substituteInPlace $out/share/applications/${pname}.desktop \
--replace Exec=Logseq Exec=${pname} \
--replace Icon=Logseq Icon=${pname}
'') + lib.optionalString stdenv.isDarwin ''
mkdir -p $out/{Applications/Logseq.app,bin}
cp -R . $out/Applications/Logseq.app
makeWrapper $out/Applications/Logseq.app/Contents/MacOS/Logseq $out/bin/${pname}
'' + ''
runHook postInstall
'';
postFixup = ''
postFixup = lib.optionalString stdenv.isLinux ''
# set the env "LOCAL_GIT_DIRECTORY" for dugite so that we can use the git in nixpkgs
makeWrapper ${electron}/bin/electron $out/bin/${pname} \
--set "LOCAL_GIT_DIRECTORY" ${git} \
@@ -76,7 +93,7 @@ in {
license = lib.licenses.agpl3Plus;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
maintainers = [ ];
platforms = [ "x86_64-linux" ];
platforms = [ "x86_64-linux" ] ++ lib.platforms.darwin;
mainProgram = "logseq";
};
})
+68
View File
@@ -0,0 +1,68 @@
{
lib,
stdenv,
fetchurl,
gd,
giflib,
groff,
libpng,
tk,
callPackage,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "npiet";
version = "1.3f";
src = fetchurl {
url = "https://www.bertnase.de/npiet/npiet-${finalAttrs.version}.tar.gz";
hash = "sha256-Le2FYGKr1zWZ6F4edozmvGC6LbItx9aptidj3KBLhVo=";
};
buildInputs = [
gd
giflib
libpng
];
nativeBuildInputs = [ groff ];
postPatch = ''
# malloc.h is not needed because stdlib.h is already included.
# On macOS, malloc.h does not even exist, resulting in an error.
substituteInPlace npiet-foogol.c \
--replace-fail '#include <malloc.h>' ""
substituteInPlace npietedit \
--replace-fail 'exec wish' 'exec ${tk}/bin/wish'
'';
strictDeps = true;
passthru.tests =
let
all-tests = callPackage ./tests { };
in
{
inherit (all-tests)
hello
prime
no-prime
brainfuck
;
};
meta = {
description = "Interpreter for piet programs. Also includes npietedit and npiet-foogol";
longDescription = ''
npiet is an interpreter for the piet programming language.
Instead of text, piet programs are pictures. Commands are determined based on changes in color.
'';
homepage = "https://www.bertnase.de/npiet/";
changelog = "https://www.bertnase.de/npiet/ChangeLog";
license = lib.licenses.gpl2Only;
platforms = lib.platforms.unix;
mainProgram = "npiet";
maintainers = with lib.maintainers; [ Luflosi ];
};
})
+41
View File
@@ -0,0 +1,41 @@
{ fetchurl, callPackage }:
let
# More examples can be found at https://www.dangermouse.net/esoteric/piet/samples.html
hello-program = fetchurl {
url = "https://www.dangermouse.net/esoteric/piet/hw6.png";
hash = "sha256-E8OMu0b/oU8lDF3X4o5WMnnD1IKNT2YF+qe4MXLuczI=";
};
prime-tester-program = fetchurl {
url = "https://www.bertnase.de/npiet/nprime.gif";
hash = "sha256-4eaJweV/n73byoWZWCXiMLkfSEhMPf5itVwz48AK/FA=";
};
brainfuck-interpreter-program = fetchurl {
url = "https://www.dangermouse.net/esoteric/piet/piet_bfi.gif";
hash = "sha256-LIfOG0KFpr4nxAtLLeIsPQl+8Ujyvfz/YnEm/HRoVjY=";
};
in
{
hello = callPackage ./run-test.nix {
testName = "hello";
programPath = hello-program;
expectedOutput = "Hello, world!";
};
prime = callPackage ./run-test.nix {
testName = "prime";
programPath = prime-tester-program;
programInput = "2069";
expectedOutput = "Y";
};
no-prime = callPackage ./run-test.nix {
testName = "no-prime";
programPath = prime-tester-program;
programInput = "2070";
expectedOutput = "N";
};
brainfuck = callPackage ./run-test.nix {
testName = "brainfuck";
programPath = brainfuck-interpreter-program;
programInput = ",+>,+>,+>,+.<.<.<.|sdhO";
expectedOutput = "Piet";
};
}
+19
View File
@@ -0,0 +1,19 @@
{
runCommand,
lib,
npiet,
testName,
programPath,
programInput ? "",
expectedOutput,
}:
runCommand "npiet-test-${testName}" { } ''
actual_output="$(echo '${programInput}' | '${lib.getExe npiet}' -q -w -e 100000 '${programPath}')"
if [ "$actual_output" != '${expectedOutput}' ]; then
echo "npiet failed to run the program correctly. The output should be ${expectedOutput} but is $actual_output."
exit 1
fi
echo "The program successfully output $actual_output"
touch "$out"
''
+4 -4
View File
@@ -15,18 +15,18 @@
buildGoModule rec {
pname = "picocrypt";
version = "1.38";
version = "1.40";
src = fetchFromGitHub {
owner = "Picocrypt";
repo = "Picocrypt";
rev = version;
hash = "sha256-rKYqzXdQrSLZhPXb4NeLSSrNJSfztsdPYbWWn+7ZYJo=";
rev = "refs/tags/${version}";
hash = "sha256-L3UkWUT6zsUj5C/RHVvaTbt6E8VERk3hZNBGSGbON3c=";
};
sourceRoot = "${src.name}/src";
vendorHash = "sha256-lc34GeO8y5XGRk0x6ghw/m/Ew7TDn6MOk4fc2u9UofQ=";
vendorHash = "sha256-YYQMJXyVANDrYsd7B/q8L5dpvbzxqjLvm6v20PnpAkY=";
ldflags = [
"-s"
+22
View File
@@ -0,0 +1,22 @@
diff --git a/weblate/utils/lock.py b/weblate/utils/lock.py
index 53c1486bc9..a0a5fc5a74 100644
--- a/weblate/utils/lock.py
+++ b/weblate/utils/lock.py
@@ -43,8 +43,6 @@ class WeblateLock:
self._name = self._format_template(cache_template)
self._lock = cache.lock(
key=self._name,
- expire=3600,
- auto_renewal=True,
)
self._enter_implementation = self._enter_redis
else:
@@ -62,7 +60,7 @@ class WeblateLock:
def _enter_redis(self):
try:
- lock_result = self._lock.acquire(timeout=self._timeout)
+ lock_result = self._lock.acquire()
except AlreadyAcquired:
return
+180
View File
@@ -0,0 +1,180 @@
{
lib,
python3,
fetchFromGitHub,
pango,
harfbuzz,
librsvg,
gdk-pixbuf,
glib,
borgbackup,
writeText,
nixosTests,
}:
let
python = python3.override {
packageOverrides = final: prev: {
django = prev.django_5.overridePythonAttrs (old: {
dependencies = old.dependencies ++ prev.django_5.optional-dependencies.argon2;
});
sentry-sdk = prev.sentry-sdk_2;
djangorestframework = prev.djangorestframework.overridePythonAttrs (old: {
# https://github.com/encode/django-rest-framework/discussions/9342
disabledTests = (old.disabledTests or [ ]) ++ [ "test_invalid_inputs" ];
});
celery = prev.celery.overridePythonAttrs (old: {
dependencies = old.dependencies ++ prev.celery.optional-dependencies.redis;
});
python-redis-lock = prev.python-redis-lock.overridePythonAttrs (old: {
dependencies = old.dependencies ++ prev.python-redis-lock.optional-dependencies.django;
});
};
};
in
python.pkgs.buildPythonApplication rec {
pname = "weblate";
version = "5.6.2";
pyproject = true;
outputs = [
"out"
"static"
];
src = fetchFromGitHub {
owner = "WeblateOrg";
repo = "weblate";
rev = "weblate-${version}";
sha256 = "sha256-t/hnigsKjdWCkUd8acNWhYVFmZ7oGn74+12347MkFgM=";
};
patches = [
# FIXME This shouldn't be necessary and probably has to do with some dependency mismatch.
./cache.lock.patch
];
# Relax dependency constraints
# mistletoe: https://github.com/WeblateOrg/weblate/commit/50df46a25dda2b7b39de86d4c65ecd7a685f62e6
# borgbackup: https://github.com/WeblateOrg/weblate/commit/355c81c977c59948535a98a35a5c05d7e6909703
# django-crispy-forms: https://github.com/WeblateOrg/weblate/commit/7b341c523ed9b3b41ecfbc5c92dd6156992e4f32
postPatch = ''
substituteInPlace pyproject.toml \
--replace '"mistletoe>=1.3.0,<1.4"' '"mistletoe>=1.3.0,<1.5"' \
--replace '"borgbackup>=1.2.5,<1.3"' '"borgbackup>=1.2.5,<1.5"' \
--replace '"django-crispy-forms>=2.1,<2.3"' '"django-crispy-forms>=2.1,<2.4"'
'';
build-system = with python.pkgs; [ setuptools ];
# Build static files into a separate output
postBuild =
let
staticSettings = writeText "static_settings.py" ''
STATIC_ROOT = os.environ["static"] + "/static"
COMPRESS_ENABLED = True
COMPRESS_OFFLINE = True
COMPRESS_ROOT = os.environ["static"] + "/compressor-cache"
# So we don't need postgres dependencies
DATABASES = {}
'';
in
''
mkdir $static
cat weblate/settings_example.py ${staticSettings} > weblate/settings_static.py
export DJANGO_SETTINGS_MODULE="weblate.settings_static"
${python.pythonOnBuildForHost.interpreter} manage.py collectstatic --no-input
${python.pythonOnBuildForHost.interpreter} manage.py compress
'';
dependencies = with python.pkgs; [
aeidon
ahocorasick-rs
borgbackup
celery
certifi
charset-normalizer
django-crispy-bootstrap3
cryptography
cssselect
cython
diff-match-patch
django-appconf
django-celery-beat
django-compressor
django-cors-headers
django-crispy-forms
django-filter
django-redis
django
djangorestframework
filelock
fluent-syntax
gitpython
hiredis
html2text
iniparse
jsonschema
lxml
misaka
mistletoe
nh3
openpyxl
packaging
phply
pillow
pycairo
pygments
pygobject3
pyicumessageformat
pyparsing
python-dateutil
python-redis-lock
rapidfuzz
redis
requests
ruamel-yaml
sentry-sdk
siphashc
social-auth-app-django
social-auth-core
tesserocr
translate-toolkit
translation-finder
user-agents
weblate-language-data
weblate-schemas
];
optional-dependencies = {
postgres = with python.pkgs; [ psycopg ];
};
# We don't just use wrapGAppsNoGuiHook because we need to expose GI_TYPELIB_PATH
GI_TYPELIB_PATH = lib.makeSearchPathOutput "out" "lib/girepository-1.0" [
pango
harfbuzz
librsvg
gdk-pixbuf
glib
];
makeWrapperArgs = [ "--set GI_TYPELIB_PATH \"$GI_TYPELIB_PATH\"" ];
passthru = {
inherit python;
# We need to expose this so weblate can work outside of calling its bin output
inherit GI_TYPELIB_PATH;
tests = {
inherit (nixosTests) weblate;
};
};
meta = with lib; {
description = "Web based translation tool with tight version control integration";
homepage = "https://weblate.org/";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ erictapen ];
};
}
+3 -3
View File
@@ -5,16 +5,16 @@
rustPlatform.buildRustPackage rec {
pname = "wit-bindgen";
version = "0.29.0";
version = "0.30.0";
src = fetchFromGitHub {
owner = "bytecodealliance";
repo = "wit-bindgen";
rev = "v${version}";
hash = "sha256-mn51ussusBZGfgAj1JP1hjNsblXXGAt7W6D10yKTuZ8=";
hash = "sha256-MeozLpwtOFnYxK2H+9bd7nG6BL6jSVqfBCVg1t3lErQ=";
};
cargoHash = "sha256-JSsneDsbqs4DT0oMvucPVg/Jpf10xk3TWi0pDS1oOzQ=";
cargoHash = "sha256-d6oMUAGyIFDWtjgXfIe0k3hx7QTFTfVuKnQ3XRux1HU=";
# Some tests fail because they need network access to install the `wasm32-unknown-unknown` target.
# However, GitHub Actions ensures a proper build.
+2 -2
View File
@@ -2,13 +2,13 @@
buildGoModule rec {
pname = "yggdrasil";
version = "0.5.7";
version = "0.5.8";
src = fetchFromGitHub {
owner = "yggdrasil-network";
repo = "yggdrasil-go";
rev = "v${version}";
sha256 = "sha256-hKgZejK7q0rySVBz3amC1wPhZsxCDexVECJWBMRQTDc=";
sha256 = "sha256-3sX1xNfblmIXI1hiXL9bhA4+CobUZ5xhpJFKugzwlGE=";
};
vendorHash = "sha256-HBl30BnSERivIHb3dbfhDwwBvs3MUkltDf+R790vSGE=";
@@ -1,45 +0,0 @@
{ lib
, stdenv
, fetchurl
, gd
, giflib
, groff
, libpng
, tk
}:
stdenv.mkDerivation rec {
pname = "npiet";
version = "1.3f";
src = fetchurl {
url = "https://www.bertnase.de/npiet/npiet-${version}.tar.gz";
sha256 = "sha256-Le2FYGKr1zWZ6F4edozmvGC6LbItx9aptidj3KBLhVo=";
};
buildInputs = [ gd giflib libpng ];
nativeBuildInputs = [ groff ];
postPatch = ''
# malloc.h is not needed because stdlib.h is already included.
# On macOS, malloc.h does not even exist, resulting in an error.
substituteInPlace npiet-foogol.c \
--replace '#include <malloc.h>' ""
substituteInPlace npietedit \
--replace 'exec wish' 'exec ${tk}/bin/wish'
'';
meta = with lib; {
description = "Interpreter for piet programs. Also includes npietedit and npiet-foogol";
longDescription = ''
npiet is an interpreter for the piet programming language.
Instead of text, piet programs are pictures. Commands are determined based on changes in color.
'';
homepage = "https://www.bertnase.de/npiet/";
license = licenses.gpl2Only;
platforms = platforms.unix;
maintainers = with maintainers; [ Luflosi ];
};
}
@@ -15,7 +15,7 @@
stdenv.mkDerivation rec {
pname = "egl-wayland";
version = "1.1.14";
version = "1.1.15";
outputs = [ "out" "dev" ];
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
owner = "Nvidia";
repo = pname;
rev = version;
hash = "sha256-MD+D/dRem3ONWGPoZ77j2UKcOCUuQ0nrahEQkNVEUnI=";
hash = "sha256-7spfmYwJ6U97x83219/kMwdJXS2vir+U0MUnYWJOLB4=";
};
postPatch = ''
@@ -0,0 +1,61 @@
{
lib,
buildPythonPackage,
fetchPypi,
gettext,
flake8,
isocodes,
pytestCheckHook,
charset-normalizer,
}:
buildPythonPackage rec {
pname = "aeidon";
version = "1.15";
src = fetchPypi {
pname = "aeidon";
inherit version;
sha256 = "sha256-qGpGraRZFVaW1Jys24qvfPo5WDg7Q/fhvm44JH8ulVw=";
};
nativeBuildInputs = [
gettext
flake8
];
dependencies = [ isocodes ];
installPhase = ''
runHook preInstall
python setup.py --without-gaupol install --prefix=$out
runHook postInstall
'';
nativeCheckInputs = [
pytestCheckHook
charset-normalizer
];
# Aeidon is looking in the wrong subdirectory for data
preCheck = ''
cp -r data aeidon/
'';
pytestFlagsArray = [ "aeidon/test" ];
disabledTests = [
# requires gspell to work with gobject introspection
"test_spell"
];
pythonImportsCheck = [ "aeidon" ];
meta = with lib; {
description = "Reading, writing and manipulationg text-based subtitle files";
homepage = "https://github.com/otsaloma/gaupol";
license = licenses.gpl3Only;
maintainers = with maintainers; [ erictapen ];
};
}
@@ -5,15 +5,12 @@
fetchFromGitHub,
geopy,
pythonOlder,
requests,
setuptools,
urllib3,
wheel,
}:
buildPythonPackage rec {
pname = "aemet-opendata";
version = "0.5.3";
version = "0.5.4";
pyproject = true;
disabled = pythonOlder "3.11";
@@ -22,19 +19,14 @@ buildPythonPackage rec {
owner = "Noltari";
repo = "AEMET-OpenData";
rev = "refs/tags/${version}";
hash = "sha256-KsmH7QJGVf+bZ5XoT+NeScwvvyrXSTZcAwdc12nJLHI=";
hash = "sha256-iy1ptkxc4dh/fwWSi/GgPX5KRulyG0zwWTbCNBirsCo=";
};
build-system = [
setuptools
wheel
];
build-system = [ setuptools ];
dependencies = [
aiohttp
geopy
requests
urllib3
];
# no tests implemented
@@ -0,0 +1,53 @@
{
lib,
buildPythonPackage,
fetchPypi,
rustPlatform,
typing-extensions,
pytestCheckHook,
pyahocorasick,
hypothesis,
pytest-benchmark,
}:
buildPythonPackage rec {
pname = "ahocorasick-rs";
version = "0.22.0";
pyproject = true;
src = fetchPypi {
inherit version;
pname = "ahocorasick_rs";
sha256 = "sha256-lzRwODlJlymMSih3CqNIeR+HrUbgVhroM1JuHFfW848=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-CIt/ChNcoqKln6PgeTGp9pfmIWlJj+c5SCPtBhsnT6U=";
};
nativeBuildInputs = with rustPlatform; [
maturinBuildHook
cargoSetupHook
typing-extensions
];
nativeCheckInputs = [
pytest-benchmark
pytestCheckHook
pyahocorasick
hypothesis
];
pythonImportsCheck = [ "ahocorasick_rs" ];
meta = with lib; {
description = "Fast Aho-Corasick algorithm for Python";
homepage = "https://github.com/G-Research/ahocorasick_rs/";
license = licenses.asl20;
maintainers = with maintainers; [ erictapen ];
};
}
@@ -5,7 +5,6 @@
buildPythonPackage,
fetchFromGitHub,
hatchling,
httpx,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
@@ -13,7 +12,7 @@
buildPythonPackage rec {
pname = "aioweenect";
version = "1.1.2";
version = "1.1.5";
pyproject = true;
disabled = pythonOlder "3.9";
@@ -22,7 +21,7 @@ buildPythonPackage rec {
owner = "eifinger";
repo = "aioweenect";
rev = "refs/tags/v${version}";
hash = "sha256-qVhF+gy5qcH/okuncDuzbAUPonkmQo1/QwOjC70IV4w=";
hash = "sha256-2qTjRXQdTExqY5/ckB6UrkmavzjZK/agfL9+o6fXS0M=";
};
postPatch = ''
@@ -34,10 +33,7 @@ buildPythonPackage rec {
build-system = [ hatchling ];
dependencies = [
aiohttp
httpx
];
dependencies = [ aiohttp ];
nativeCheckInputs = [
aresponses
@@ -17,19 +17,19 @@
buildPythonPackage rec {
pname = "auditwheel";
version = "6.0.0";
version = "6.1.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-ZCLEq2Qh0j41XJHplGkmzVMrn99G8rX/2vGr/p7inmc=";
hash = "sha256-O9xobndM+eNV6SSw/lpWLVXKo4XXIjT/57gbN426Ng8=";
};
nativeBuildInputs = [ setuptools-scm ];
build-system = [ setuptools-scm ];
propagatedBuildInputs = [ pyelftools ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
dependencies = [ pyelftools ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
nativeCheckInputs = [
pretend
@@ -3,7 +3,7 @@
buildPythonPackage,
fetchPypi,
setuptools-scm,
can,
python-can,
canmatrix,
pytestCheckHook,
pythonOlder,
@@ -24,7 +24,7 @@ buildPythonPackage rec {
nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [
can
python-can
canmatrix
];
@@ -3,7 +3,7 @@
argparse-addons,
bitstruct,
buildPythonPackage,
can,
python-can,
crccheck,
diskcache,
fetchPypi,
@@ -36,7 +36,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [
argparse-addons
bitstruct
can
python-can
crccheck
diskcache
textparser
@@ -14,6 +14,7 @@
msgpack,
nixosTests,
pymongo,
redis,
pytest-celery,
pytest-click,
pytest-subtests,
@@ -59,6 +60,7 @@ buildPythonPackage rec {
mongodb = [ pymongo ];
msgpack = [ msgpack ];
yaml = [ pyyaml ];
redis = [ redis ];
};
nativeCheckInputs = [
@@ -1,45 +1,46 @@
{ lib
, commitizen
, fetchFromGitHub
, buildPythonPackage
, git
, pythonOlder
, stdenv
, installShellFiles
, poetry-core
, nix-update-script
, testers
, argcomplete
, charset-normalizer
, colorama
, decli
, importlib-metadata
, jinja2
, packaging
, pyyaml
, questionary
, termcolor
, tomlkit
, py
, pytest-freezer
, pytest-mock
, pytest-regressions
, pytest7CheckHook
, deprecated
{
lib,
commitizen,
fetchFromGitHub,
buildPythonPackage,
git,
pythonOlder,
stdenv,
installShellFiles,
poetry-core,
nix-update-script,
testers,
argcomplete,
charset-normalizer,
colorama,
decli,
importlib-metadata,
jinja2,
packaging,
pyyaml,
questionary,
termcolor,
tomlkit,
py,
pytest-freezer,
pytest-mock,
pytest-regressions,
pytest7CheckHook,
deprecated,
}:
buildPythonPackage rec {
pname = "commitizen";
version = "3.28.0";
format = "pyproject";
version = "3.29.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "commitizen-tools";
repo = pname;
repo = "commitizen";
rev = "refs/tags/v${version}";
hash = "sha256-Z/L8TvMoee3qB+P6HUJEQxqw3nDEbBQabQOUyx0iugw=";
hash = "sha256-7EQFip8r2Ey7Rbbwns1gvhsBOj7Hjm94NYhq8aANDIo=";
};
pythonRelaxDeps = [
@@ -47,12 +48,11 @@ buildPythonPackage rec {
"decli"
];
nativeBuildInputs = [
poetry-core
installShellFiles
];
build-system = [ poetry-core ];
propagatedBuildInputs = [
nativeBuildInputs = [ installShellFiles ];
dependencies = [
argcomplete
charset-normalizer
colorama
@@ -108,13 +108,12 @@ buildPythonPackage rec {
let
register-python-argcomplete = lib.getExe' argcomplete "register-python-argcomplete";
in
lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform)
''
installShellCompletion --cmd cz \
--bash <(${register-python-argcomplete} --shell bash $out/bin/cz) \
--zsh <(${register-python-argcomplete} --shell zsh $out/bin/cz) \
--fish <(${register-python-argcomplete} --shell fish $out/bin/cz)
'';
lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd cz \
--bash <(${register-python-argcomplete} --shell bash $out/bin/cz) \
--zsh <(${register-python-argcomplete} --shell zsh $out/bin/cz) \
--fish <(${register-python-argcomplete} --shell fish $out/bin/cz)
'';
passthru = {
updateScript = nix-update-script { };
@@ -130,6 +129,9 @@ buildPythonPackage rec {
changelog = "https://github.com/commitizen-tools/commitizen/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
mainProgram = "cz";
maintainers = with maintainers; [ lovesegfault anthonyroussel ];
maintainers = with maintainers; [
lovesegfault
anthonyroussel
];
};
}
@@ -0,0 +1,43 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
django,
setuptools,
pytestCheckHook,
pytest-django,
django-crispy-forms,
}:
buildPythonPackage rec {
pname = "django-crispy-bootstrap3";
version = "2024.1";
pyproject = true;
src = fetchFromGitHub {
owner = "django-crispy-forms";
repo = "crispy-bootstrap3";
rev = "refs/tags/${version}";
hash = "sha256-w5CGWf14Wa8hndpk5r4hlz6gGykvRL+1AhA5Pz5Ejtk=";
};
dependencies = [
django
setuptools
];
nativeCheckInputs = [
pytest-django
pytestCheckHook
django-crispy-forms
];
pythonImportsCheck = [ "crispy_bootstrap3" ];
meta = with lib; {
description = "Bootstrap 3 template pack for django-crispy-forms";
homepage = "https://github.com/django-crispy-forms/crispy-bootstrap3";
license = licenses.mit;
maintainers = with maintainers; [ erictapen ];
};
}
@@ -15,7 +15,7 @@
buildPythonPackage rec {
pname = "dvc-data";
version = "3.15.2";
version = "3.16.0";
pyproject = true;
disabled = pythonOlder "3.8";
@@ -24,7 +24,7 @@ buildPythonPackage rec {
owner = "iterative";
repo = "dvc-data";
rev = "refs/tags/${version}";
hash = "sha256-8720nqWmi/1Be2ckuCvctfJbOSFCME27OOtA3qZMr7E=";
hash = "sha256-NBZbuOgM6m/8qhW+izXE4QRI3Ou28mF4nhESWF7Mmn0=";
};
nativeBuildInputs = [ setuptools-scm ];
@@ -57,7 +57,7 @@
buildPythonPackage rec {
pname = "dvc";
version = "3.53.1";
version = "3.53.2";
pyproject = true;
disabled = pythonOlder "3.8";
@@ -66,7 +66,7 @@ buildPythonPackage rec {
owner = "iterative";
repo = "dvc";
rev = "refs/tags/${version}";
hash = "sha256-YX65jAkM0LFFtKf+MX0w1BfhyR2Dzr5Vpwxl2jJ/GGw=";
hash = "sha256-tC1Uv0EQZc0G4Eub98c/0mOp+haQPiQFGErQiRK0Gcw=";
};
pythonRelaxDeps = [
@@ -18,14 +18,14 @@
buildPythonPackage rec {
pname = "google-cloud-firestore";
version = "2.17.0";
version = "2.17.1";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-PoG3HZY7fjvMh/uBMjbzhkvHsKPyB6xNh7xlle/iuKM=";
hash = "sha256-4gRp51JgDkEwBUjo9aFpBQjG1nXk0QpuwCE9L8qvwj4=";
};
build-system = [ setuptools ];
@@ -8,14 +8,14 @@
buildPythonPackage rec {
pname = "json-repair";
version = "0.27.0";
version = "0.27.2";
pyproject = true;
src = fetchFromGitHub {
owner = "mangiucugna";
repo = "json_repair";
rev = "refs/tags/${version}";
hash = "sha256-kaTwdS2zRt94pJko9AKEvszLR4z62u3ZrKlfXkJr5TQ=";
hash = "sha256-NYY76sIp4XirVifOPOs6iEzP93ERzNIHAvpgU4+fi24=";
};
build-system = [ setuptools ];
@@ -27,8 +27,9 @@ buildPythonPackage rec {
pythonImportsCheck = [ "json_repair" ];
meta = with lib; {
description = "Module to repair invalid JSON, commonly used to parse the output of LLMs";
homepage = "https://github.com/mangiucugna/json_repair/";
description = "repair invalid JSON, commonly used to parse the output of LLMs";
changelog = "https://github.com/mangiucugna/json_repair/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ greg ];
};
@@ -19,11 +19,12 @@
packaging,
rich,
tensorflow,
tf-keras,
}:
buildPythonPackage rec {
pname = "keras";
version = "3.4.1";
version = "3.5.0";
pyproject = true;
disabled = pythonOlder "3.9";
@@ -32,7 +33,7 @@ buildPythonPackage rec {
owner = "keras-team";
repo = "keras";
rev = "refs/tags/v${version}";
hash = "sha256-Pp84wTvcrWnxuksYUrzs9amapwBC8yU1PA0PE5dRl6k=";
hash = "sha256-hp+kKsKI2Jmh30/KeUZ+uBW0MG49+QgsyR5yCS63p08=";
};
build-system = [
@@ -51,6 +52,7 @@ buildPythonPackage rec {
packaging
rich
tensorflow
tf-keras
];
pythonImportsCheck = [
@@ -1,27 +1,32 @@
{
buildPythonPackage,
fetchFromGitHub,
setuptools,
pytestCheckHook,
lib,
}:
buildPythonPackage rec {
pname = "leb128";
version = "1.0.7";
format = "setuptools";
version = "1.0.8";
pyproject = true;
# fetchPypi doesn't include files required for tests
src = fetchFromGitHub {
owner = "mohanson";
repo = "leb128";
rev = "refs/tags/v${version}";
hash = "sha256-17C0Eic8T2PFkuIGExcrfb3b1HldaSBAPSh5TtRBUuU=";
hash = "sha256-7ZjDqxGUANk3FfB3HPTc5CB5YcIi2ee0igXWAYXaZ88=";
};
build-system = [ setuptools ];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "leb128" ];
meta = with lib; {
changelog = "https://github.com/mohanson/leb128/releases/tag/v${version}";
description = "Utility to encode and decode Little Endian Base 128";
homepage = "https://github.com/mohanson/leb128";
license = licenses.mit;
@@ -16,7 +16,7 @@
buildPythonPackage rec {
pname = "microsoft-kiota-http";
version = "1.3.2";
version = "1.3.3";
pyproject = true;
disabled = pythonOlder "3.8";
@@ -25,7 +25,7 @@ buildPythonPackage rec {
owner = "microsoft";
repo = "kiota-http-python";
rev = "refs/tags/v${version}";
hash = "sha256-9Xf/M9d+lScCTWXakJ+BMeBbbRGshtzRzhOg5FGbC5o=";
hash = "sha256-dtSTrsLVDNJ+s5B3wLvZ9qGerZ8fdYpEsqrBoPf7Lrk=";
};
build-system = [ flit-core ];
@@ -16,8 +16,8 @@
buildPythonPackage rec {
pname = "notifications-python-client";
version = "9.1.0";
format = "setuptools";
version = "10.0.0";
pyproject = true;
disabled = pythonOlder "3.8";
@@ -30,12 +30,12 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace setup.py \
--replace "pytest-runner" ""
--replace-fail "pytest-runner" ""
'';
nativeBuildInputs = [ setuptools ];
build-system = [ setuptools ];
propagatedBuildInputs = [
dependencies = [
docopt
pyjwt
requests
@@ -55,7 +55,7 @@ buildPythonPackage rec {
description = "Python client for the GOV.UK Notify API";
homepage = "https://github.com/alphagov/notifications-python-client";
changelog = "https://github.com/alphagov/notifications-python-client/blob/${version}/CHANGELOG.md";
license = with licenses; [ mit ];
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}
@@ -0,0 +1,31 @@
{
lib,
buildPythonPackage,
fetchPypi,
ply,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "phply";
version = "1.2.6";
src = fetchPypi {
pname = "phply";
inherit version;
sha256 = "sha256-Cyd3TShfUHo0RYBaBfj7KZj1bXCScPeLiSCLZbDYSRc=";
};
dependencies = [ ply ];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "phply" ];
meta = with lib; {
description = "Lexer and parser for PHP source implemented using PLY";
homepage = "https://github.com/viraptor/phply";
license = licenses.bsd3;
maintainers = with maintainers; [ erictapen ];
};
}
@@ -22,7 +22,7 @@
buildPythonPackage rec {
pname = "playwrightcapture";
version = "1.25.10";
version = "1.25.11";
pyproject = true;
disabled = pythonOlder "3.8";
@@ -31,7 +31,7 @@ buildPythonPackage rec {
owner = "Lookyloo";
repo = "PlaywrightCapture";
rev = "refs/tags/v${version}";
hash = "sha256-aBex+29NGPELQY+uaOXzGOWxt8injSk2hmOtVqzodmM=";
hash = "sha256-2nT6VRK0HQr1M8iUW/JUHEYhMwATZGWur4XL/KWZcRA=";
};
pythonRelaxDeps = [
@@ -9,7 +9,7 @@
buildPythonPackage rec {
pname = "py-nextbusnext";
version = "2.0.3";
version = "2.0.4";
pyproject = true;
disabled = pythonOlder "3.9";
@@ -18,7 +18,7 @@ buildPythonPackage rec {
owner = "ViViDboarder";
repo = "py_nextbus";
rev = "refs/tags/v${version}";
hash = "sha256-dSBjOMqryEddWB54AddGDojRE8/STi3kxfjJsVFBuOw=";
hash = "sha256-mmuD5edgcesMFsdfbWJyzOuKLCgsqvUPG61j/dA6Crc=";
};
build-system = [ setuptools ];
@@ -3,7 +3,7 @@
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
can,
python-can,
cobs,
libpcap,
nunavut,
@@ -34,7 +34,7 @@ buildPythonPackage rec {
];
passthru.optional-dependencies = {
transport-can-pythoncan = [ can ] ++ can.optional-dependencies.serial;
transport-can-pythoncan = [ python-can ] ++ python-can.optional-dependencies.serial;
transport-serial = [
cobs
pyserial
@@ -0,0 +1,32 @@
{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "pyicumessageformat";
version = "1.0.0";
pyproject = true;
build-system = [ setuptools ];
src = fetchPypi {
pname = "pyicumessageformat";
inherit version;
hash = "sha256-s+l8DtEMKxA/DzpwGqZSlwDqCrZuDzsj3I5K7hgfyEA=";
};
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "pyicumessageformat" ];
meta = with lib; {
description = "Unopinionated Python3 parser for ICU MessageFormat";
homepage = "https://github.com/SirStendec/pyicumessageformat/";
license = licenses.mit;
maintainers = with maintainers; [ erictapen ];
};
}
@@ -12,7 +12,7 @@
buildPythonPackage rec {
pname = "pyschlage";
version = "2024.6.0";
version = "2024.8.0";
pyproject = true;
disabled = pythonOlder "3.7";
@@ -21,15 +21,15 @@ buildPythonPackage rec {
owner = "dknowles2";
repo = "pyschlage";
rev = "refs/tags/${version}";
hash = "sha256-mfrESWXkGV6r+VNw1dHRpIEtfZsLdsCf3D74ydgcy58=";
hash = "sha256-40WNvpFNBhjg2+1H5PRBlziKrcSjl1fppUk4HOmDRDk=";
};
nativeBuildInputs = [
build-system = [
setuptools
setuptools-scm
];
propagatedBuildInputs = [
dependencies = [
pycognito
requests
];
@@ -19,7 +19,7 @@
}:
buildPythonPackage rec {
pname = "can";
pname = "python-can";
version = "4.4.2";
pyproject = true;
@@ -11,7 +11,7 @@
buildPythonPackage rec {
pname = "requirements-parser";
version = "0.10.2";
version = "0.11.0";
pyproject = true;
disabled = pythonOlder "3.7";
@@ -20,7 +20,7 @@ buildPythonPackage rec {
owner = "madpah";
repo = "requirements-parser";
rev = "refs/tags/v${version}";
hash = "sha256-/zV9PfG4mEE7VN0FIk3m4sUVhKIyuryI6znQNh+zjak=";
hash = "sha256-o9IriQXa2Pd7s16IENqcWgi73XZQoXsbXU471V1CFaI=";
};
build-system = [ poetry-core ];
@@ -7,7 +7,7 @@
pycrypto,
ecdsa, # TODO
mock,
can,
python-can,
brotli,
withOptionalDeps ? true,
tcpdump,
@@ -86,7 +86,7 @@ buildPythonPackage rec {
doCheck = false;
nativeCheckInputs = [
mock
can
python-can
brotli
];
checkPhase = ''
@@ -0,0 +1,31 @@
{
lib,
fetchPypi,
buildPythonPackage,
setuptools,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "siphashc";
version = "2.4.1";
pyproject = true;
build-system = [ setuptools ];
src = fetchPypi {
pname = "siphashc";
inherit version;
sha256 = "sha256-ptNpy7VkUXHbjvdir6v+eYOmtQ/j8XPXq4lj7ceS/5s=";
};
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "siphashc" ];
meta = with lib; {
description = "Python c-module for siphash";
homepage = "https://github.com/WeblateOrg/siphashc";
license = licenses.mit;
maintainers = with maintainers; [ erictapen ];
};
}
@@ -12,7 +12,7 @@
buildPythonPackage rec {
pname = "tf-keras";
version = "2.16.0";
version = "2.17.0";
pyproject = true;
disabled = pythonOlder "3.9";
@@ -20,7 +20,7 @@ buildPythonPackage rec {
src = fetchPypi {
pname = "tf_keras";
inherit version;
hash = "sha256-21OJHxrJgZfCrM7ZjNyowGuoJVZVpst+uV7UlnYRgoA=";
hash = "sha256-/al8GNow2g9ypafoDz7uNDsJ9MIG2tbFfJRPss0YVg4=";
};
nativeBuildInputs = [
@@ -0,0 +1,72 @@
{
lib,
fetchPypi,
buildPythonPackage,
setuptools-scm,
lxml,
wcwidth,
pytestCheckHook,
iniparse,
vobject,
mistletoe,
phply,
pyparsing,
ruamel-yaml,
cheroot,
fluent-syntax,
aeidon,
charset-normalizer,
syrupy,
gettext,
}:
buildPythonPackage rec {
pname = "translate-toolkit";
version = "3.13.2";
pyproject = true;
build-system = [ setuptools-scm ];
src = fetchPypi {
pname = "translate_toolkit";
inherit version;
sha256 = "sha256-95zIAelFSNK5+f1GY8DUgHPDQBS5K+9ULjXaSaa0wWM=";
};
dependencies = [
lxml
wcwidth
];
nativeCheckInputs = [
pytestCheckHook
iniparse
vobject
mistletoe
phply
pyparsing
ruamel-yaml
cheroot
fluent-syntax
aeidon
charset-normalizer
syrupy
gettext
];
disabledTests = [
# Probably breaks because of nix sandbox
"test_timezones"
# Requires network
"test_xliff_conformance"
];
pythonImportsCheck = [ "translate" ];
meta = with lib; {
description = "Useful localization tools for building localization & translation systems";
homepage = "https://toolkit.translatehouse.org/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ erictapen ];
};
}
@@ -0,0 +1,40 @@
{
lib,
buildPythonPackage,
fetchPypi,
charset-normalizer,
ruamel-yaml,
weblate-language-data,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "translation-finder";
version = "2.16";
src = fetchPypi {
pname = "translation-finder";
inherit version;
hash = "sha256-a1C+j4Zo0DJ9BWDn5Zsu4zAftcUixfPktAWdqiFJpiU=";
};
patches = [ ./fix_tests.patch ];
dependencies = [
charset-normalizer
ruamel-yaml
weblate-language-data
];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "translation_finder" ];
meta = with lib; {
description = "Translation file finder for Weblate";
homepage = "https://github.com/WeblateOrg/translation-finder";
license = licenses.gpl3Only;
maintainers = with maintainers; [ erictapen ];
};
}
@@ -0,0 +1,25 @@
diff --git a/translation_finder/test_api.py b/translation_finder/test_api.py
index c3b020c..9be070d 100644
--- a/translation_finder/test_api.py
+++ b/translation_finder/test_api.py
@@ -173,6 +173,7 @@ class APITest(DiscoveryTestCase):
"filemask": "json/gotext-*.json",
"template": "json/gotext-en.json",
},
+ {'filemask': 'linked/*.po', 'new_base': 'linked/messages.pot', 'file_format': 'po'},
],
)
diff --git a/translation_finder/test_discovery.py b/translation_finder/test_discovery.py
index 1a0ca40..14caa4f 100644
--- a/translation_finder/test_discovery.py
+++ b/translation_finder/test_discovery.py
@@ -945,6 +945,9 @@ class JSONDiscoveryTest(DiscoveryTestCase):
"file_format": "json-nested",
"template": "src/app/[locale]/_translations/en.json",
},
+ {'filemask': '*/app/[locale]/_translations/cs.json', 'file_format': 'json-nested'},
+ {'filemask': '*/app/[locale]/_translations/de.json', 'file_format': 'json-nested'},
+ {'filemask': '*/app/[locale]/_translations/en.json', 'file_format': 'json-nested'}
],
)
@@ -0,0 +1,35 @@
{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
translate-toolkit,
}:
buildPythonPackage rec {
pname = "weblate-language-data";
version = "2024.5";
pyproject = true;
build-system = [ setuptools ];
src = fetchPypi {
pname = "weblate_language_data";
inherit version;
hash = "sha256-kDt5ZF8cFH6HoQVlGX+jbchbwVCUIvmxHsCY3hjtjDM=";
};
dependencies = [ translate-toolkit ];
# No tests
doCheck = false;
pythonImportsCheck = [ "weblate_language_data" ];
meta = with lib; {
description = "Language definitions used by Weblate";
homepage = "https://github.com/WeblateOrg/language-data";
license = licenses.mit;
maintainers = with maintainers; [ erictapen ];
};
}
@@ -0,0 +1,40 @@
{
lib,
buildPythonPackage,
fetchPypi,
fqdn,
jsonschema,
rfc3987,
strict-rfc3339,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "weblate-schemas";
version = "2024.1";
src = fetchPypi {
pname = "weblate_schemas";
inherit version;
hash = "sha256-nYPLD3VDO1Z97HI79J6Yjj3bWp1xKB79FWPCW146iz4=";
};
dependencies = [
fqdn
jsonschema
rfc3987
strict-rfc3339
];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "weblate_schemas" ];
meta = with lib; {
description = "Schemas used by Weblate";
homepage = "https://github.com/WeblateOrg/weblate_schemas";
license = licenses.mit;
maintainers = with maintainers; [ erictapen ];
};
}
@@ -6,14 +6,14 @@
python3.pkgs.buildPythonApplication rec {
pname = "checkov";
version = "3.2.219";
version = "3.2.221";
pyproject = true;
src = fetchFromGitHub {
owner = "bridgecrewio";
repo = "checkov";
rev = "refs/tags/${version}";
hash = "sha256-PNWOT4vnlruRPoGSPcBy4GPxmuflVbF+UheIpBo14kE=";
hash = "sha256-reidEqm5qKNbYM5n3OsdtuBQ2HZfRdUKboU34nibvfU=";
};
patches = [ ./flake8-compat-5.x.patch ];
+1 -1
View File
@@ -15,7 +15,7 @@ let
buildHashes = builtins.fromJSON (builtins.readFile ./hashes.json);
# the version of infisical
version = "0.26.1";
version = "0.27.0";
# the platform-specific, statically linked binary
src =
+4 -4
View File
@@ -1,6 +1,6 @@
{ "_comment": "@generated by pkgs/development/tools/infisical/update.sh"
, "x86_64-linux": "sha256-53Nk24THJ16elOTuPkXohxvLeSn1cXyI8PIogpg7b2g="
, "x86_64-darwin": "sha256-iO/WPfLSmYQJRuuPSfXbrb1p75czP4FQkc3ryQ/PWF4="
, "aarch64-linux": "sha256-7FCxF6M9J6NYTeXw98uu3GjWsXsTZ+eQdKgbutGKDtI="
, "aarch64-darwin": "sha256-lV2jye63ZWlMIa41+xbfe39kBHKwnXtNsBlM+WZvWhQ="
, "x86_64-linux": "sha256-M/LYq3W200U3YCjKDQOlRKaKZiflvL/2jM9G1brh720="
, "x86_64-darwin": "sha256-Xrp05HeCRysPSo3MIFcCIl1U+0TVwB9JAfAb8q4dt5E="
, "aarch64-linux": "sha256-hKR7CemWqqiPDp675k8ClQAzC6SI9BXADCiFge2LzmU="
, "aarch64-darwin": "sha256-uXhA41bdCrgegOBB5YBjaTUbwbm1uKNF9oKfrQu8w94="
}
@@ -15,47 +15,47 @@ let
phpMajor = lib.versions.majorMinor php.version;
inherit (stdenv.hostPlatform) system;
version = "1.92.21";
version = "1.92.22";
hashes = {
"x86_64-linux" = {
system = "amd64";
hash = {
"8.1" = "sha256-sEpoykSzgGGubXMUFrmxmYp1dNMfG6PfBb/tiMl/Tgs=";
"8.2" = "sha256-ivF1SlzhnxpJEdTcia1GFsXd0etF5ItK13WzRIrf9n0=";
"8.3" = "sha256-wonpCcbrvwo5xqKObZsr6eFNumv7E8vxvujXh7gSjtM=";
"8.1" = "sha256-MWAKoshKC+hW8ldRLfYQIcMwpSHvW+hV9dRMvZ4rqcU=";
"8.2" = "sha256-xAdECbxuaV5PxG+X7+o2p5pOEG9lgRLuOTp46k5I4RM=";
"8.3" = "sha256-4vCLpSy4kJ4qwOSonSFvlevCfNMxjIU6AUswm0uG59o=";
};
};
"i686-linux" = {
system = "i386";
hash = {
"8.1" = "sha256-a6jkXJFHtsV0f8NC3ljeyQOjIASFBMuJA2hscX7j+QI=";
"8.2" = "sha256-ASgWrfd0My4B3O0InOuMRaLPfVw4dgoqV4EJM1aEr2I=";
"8.3" = "sha256-VRPEODt94DEwvrem7vNhpPt9i82HxB1UHup93GYcD5U=";
"8.1" = "sha256-fvXv3Yn3FXBO4EIgb/5LI3jJxV5HA2Q2JCNy14bA8eU=";
"8.2" = "sha256-0m2ze1e09IUGjTpxbyTOchQBBMa86cpiMrAImiXrAZ0=";
"8.3" = "sha256-nhVP4/Ls71MxPN6Ko1bDG8PSHkHQt+vC08EbP0WAL8g=";
};
};
"aarch64-linux" = {
system = "arm64";
hash = {
"8.1" = "sha256-tSK+fhDQwSCTcrKQuvAe+JfHdCZIuneShvkz0rGunwM=";
"8.2" = "sha256-38oZCy2BrcQ6Hg/q40iw+PdQ2p2QKyb08A3ZT9L6Ots=";
"8.3" = "sha256-xEOV3dXu9AcDvm0qiUYVUySBTx7rTE0XFQdiSpDLY74=";
"8.1" = "sha256-pvzKVvtpBh+nwppqSqxSsR989mWzwyAHtwIdDjWx08o=";
"8.2" = "sha256-O6RhO/PY2C4GubYl/jcTzpWeiUKSGy8Np4/KrlMsE1Y=";
"8.3" = "sha256-3sfjwXq980oRV8u+IAamyYKDp2UMREFaynigz/dpyXE=";
};
};
"aarch64-darwin" = {
system = "arm64";
hash = {
"8.1" = "sha256-gRdtxGv3C30ZtYv7s8wspd/z21HWtMS+gw7MRt/77DA=";
"8.2" = "sha256-jxEs6kGHHgswOHPmUM4UlYfJmH9f58zj6G19o00xQiQ=";
"8.3" = "sha256-IFS/quwCWJkTogAK+GUzFNZYBkFupp06vskkueJA+Us=";
"8.1" = "sha256-peZmwxzQ2NCKkq5qSraIb4pnnJDwcRkCyGW8qeBSGRk=";
"8.2" = "sha256-MvF7S+VITEnsJSLz3xEy927zIR6TN+p3nRGQFjKqtu8=";
"8.3" = "sha256-sUlD8cPk7emJPtz4en6AcFxs/7NUjxUMkqf/Qs3INIA=";
};
};
"x86_64-darwin" = {
system = "amd64";
hash = {
"8.1" = "sha256-5Mbu0ppvpzC64zJ7MWFrOJeG33z4/f8SobLMywYiIOg=";
"8.2" = "sha256-PDvGidy+Qjo+woeaWkTCJmEVymR9vTKCSoSb1YgSqCE=";
"8.3" = "sha256-iwg+CMly70k8RWTPnJ7KPkIRKumxPlDjDZDzzElcruA=";
"8.1" = "sha256-kMftb/fC9uyMZyjP4jmtYLM+xEhFqP7umQ5FLvR9vAo=";
"8.2" = "sha256-W8LXYz8KzWlzdpyqmo7XQmkzuyfXO0BZSkiBIlfi18g=";
"8.3" = "sha256-a/Q7avEJr/we5GF2NxTZywpsal5AkAGxEABMPCgy2LM=";
};
};
};
+1 -1
View File
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
makeWrapper
];
buildInputs = [ (python3.withPackages (p: with p; [ can cffi pyserial greenlet jinja2 markupsafe numpy ])) ];
buildInputs = [ (python3.withPackages (p: with p; [ python-can cffi pyserial greenlet jinja2 markupsafe numpy ])) ];
# we need to run this to prebuild the chelper.
postBuild = ''
+3 -3
View File
@@ -9,7 +9,7 @@
buildGoModule rec {
pname = "telegraf";
version = "1.31.2";
version = "1.31.3";
subPackages = [ "cmd/telegraf" ];
@@ -17,10 +17,10 @@ buildGoModule rec {
owner = "influxdata";
repo = "telegraf";
rev = "v${version}";
hash = "sha256-LTo9wWCqjLoA9wjCXhZ6EjvRR/Xp8ByHvq/ytgS8sCo=";
hash = "sha256-J5jIyrxG2cLEu909/fcPQCo+xUlW6VAoge5atCrW4HY=";
};
vendorHash = "sha256-spXS1vNRgXBO2xZIyVgsfO5V+SYK8dC6YDA/dGOYt6g=";
vendorHash = "sha256-lxLFUKOFg7HAjgZIVACW6VlWLgCeZX38SNRsjxc9D7g=";
proxyVendor = true;
ldflags = [
+3 -3
View File
@@ -2,18 +2,18 @@
buildGoModule rec {
pname = "chamber";
version = "2.14.1";
version = "3.0.0";
src = fetchFromGitHub {
owner = "segmentio";
repo = pname;
rev = "v${version}";
sha256 = "sha256-Vbz8rpNy6+iIr/WyegALSo4gRoDL2P1x/6lHg6Kvm/w=";
sha256 = "sha256-oeHnzKsOgR1R9oEUQJofYaXJR6X6WwRlGU72g4Yc1yg=";
};
CGO_ENABLED = 0;
vendorHash = "sha256-ZRKs/5JtsTjWL62RuQRwroA6TvTpJqkf6pOecvO3134=";
vendorHash = "sha256-1glSjsuHN7urlktxJ/vR/jfDgbVBWsui0bZWMhmJ50c=";
ldflags = [ "-s" "-w" "-X main.Version=v${version}" ];
+3 -3
View File
@@ -19,16 +19,16 @@
rustPlatform.buildRustPackage rec {
pname = "broot";
version = "1.40.0";
version = "1.41.1";
src = fetchFromGitHub {
owner = "Canop";
repo = pname;
rev = "v${version}";
hash = "sha256-3KStqeT/SZa7KGFEqwGEvchMB6MSME5jPfGSPQ+xZpw=";
hash = "sha256-MUwW9b5rXErjNBvF+O3zA/OlSl0Zy8pTRJLNMWSY8jo=";
};
cargoHash = "sha256-E1MNlmJnkV+VKHMbuTkuItIi7bG0TrmfD/8P47c+Qhc=";
cargoHash = "sha256-GaYQqFRUJZ4Mpe+DKD+KmhrgK5I/DkJTJaA/PDifXbo=";
nativeBuildInputs = [
installShellFiles
+1 -1
View File
@@ -47,7 +47,7 @@ buildPythonApplication rec {
aiocoap
awsiotpythonsdk
bluepy
can
python-can
cmd2
cryptography
paho-mqtt
+7 -7
View File
@@ -7,33 +7,33 @@
python3.pkgs.buildPythonApplication rec {
pname = "gallia";
version = "1.7.0";
version = "1.8.0";
pyproject = true;
src = fetchFromGitHub {
owner = "Fraunhofer-AISEC";
repo = "gallia";
rev = "refs/tags/v${version}";
hash = "sha256-hLGaImYkv6/1Wv1a+0tKmW4qmV4akNoyd0RXopJjetI=";
hash = "sha256-x1sTvb+Z/AttYJVBEfXMx2/Ps34ZbqdLeGN8qHkFXsQ=";
};
pythonRelaxDeps = [ "httpx" ];
pythonRelaxDeps = [ "aiofiles" ];
build-system = with python3.pkgs; [ poetry-core ];
dependencies = with python3.pkgs; [
aiofiles
aiohttp
aiosqlite
argcomplete
can
python-can
exitcode
construct
httpx
more-itertools
msgspec
platformdirs
psutil
construct
msgspec
pydantic
pygit2
tabulate
-4
View File
@@ -10833,8 +10833,6 @@ with pkgs;
npapi_sdk = callPackage ../development/libraries/npapi-sdk { };
npiet = callPackage ../development/interpreters/npiet { };
npth = callPackage ../development/libraries/npth { };
nmap-formatter = callPackage ../tools/security/nmap-formatter { };
@@ -31707,8 +31705,6 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) Foundation;
};
ledger-autosync = callPackage ../applications/office/ledger-autosync { };
ledger-web = callPackage ../applications/office/ledger-web { };
ledger2beancount = callPackage ../tools/text/ledger2beancount { };
+1
View File
@@ -87,6 +87,7 @@ mapAliases ({
BTrees = btrees; # added 2023-02-19
cacheyou = throw "cacheyou has been removed, as it was no longer used for the only consumer pdm"; # added 2023-12-21
cadquery = throw "cadquery was removed, because it was disabled on all python version since 3.8 and marked as broken"; # added 2024-05-13
can = python-can; # added 2024-08-12
carrot = throw "carrot has been removed, as its development was discontinued in 2012"; # added 2022-01-18
case = throw "case has been removed, since it is an unused leaf package with a dependency on the nose test framework"; # added 2024-07-08
cchardet = faust-cchardet; # added 2023-03-02
+22 -2
View File
@@ -93,6 +93,8 @@ self: super: with self; {
advocate = callPackage ../development/python-modules/advocate { };
aeidon = callPackage ../development/python-modules/aeidon { };
aemet-opendata = callPackage ../development/python-modules/aemet-opendata { };
aenum = callPackage ../development/python-modules/aenum { };
@@ -125,6 +127,8 @@ self: super: with self; {
aggdraw = callPackage ../development/python-modules/aggdraw { };
ahocorasick-rs = callPackage ../development/python-modules/ahocorasick-rs { };
aigpy = callPackage ../development/python-modules/aigpy { };
aio-geojson-client = callPackage ../development/python-modules/aio-geojson-client { };
@@ -1961,8 +1965,6 @@ self: super: with self; {
camel-converter = callPackage ../development/python-modules/camel-converter { };
can = callPackage ../development/python-modules/can { };
canals = callPackage ../development/python-modules/canals { };
canmatrix = callPackage ../development/python-modules/canmatrix { };
@@ -3287,6 +3289,8 @@ self: super: with self; {
django-countries = callPackage ../development/python-modules/django-countries { };
django-crispy-bootstrap3 = callPackage ../development/python-modules/django-crispy-bootstrap3 { };
django-crispy-bootstrap4 = callPackage ../development/python-modules/django-crispy-bootstrap4 { };
django-crispy-bootstrap5 = callPackage ../development/python-modules/django-crispy-bootstrap5 { };
@@ -10032,6 +10036,8 @@ self: super: with self; {
phe = callPackage ../development/python-modules/phe { };
phply = callPackage ../development/python-modules/phply { };
phik = callPackage ../development/python-modules/phik { };
phone-modem = callPackage ../development/python-modules/phone-modem { };
@@ -10450,6 +10456,8 @@ self: super: with self; {
pywebcopy = callPackage ../development/python-modules/pywebcopy { };
python-can = callPackage ../development/python-modules/python-can { };
python-codon-tables = callPackage ../development/python-modules/python-codon-tables { };
python-creole = callPackage ../development/python-modules/python-creole { };
@@ -11569,6 +11577,8 @@ self: super: with self; {
pyicu = callPackage ../development/python-modules/pyicu { };
pyicumessageformat = callPackage ../development/python-modules/pyicumessageformat { };
pyimpfuzzy = callPackage ../development/python-modules/pyimpfuzzy {
inherit (pkgs) ssdeep;
};
@@ -14441,6 +14451,8 @@ self: super: with self; {
sip = callPackage ../development/python-modules/sip { };
siphashc = callPackage ../development/python-modules/siphashc { };
sip4 = callPackage ../development/python-modules/sip/4.x.nix { };
sipyco = callPackage ../development/python-modules/sipyco { };
@@ -15835,6 +15847,10 @@ self: super: with self; {
tracing = callPackage ../development/python-modules/tracing { };
translate-toolkit = callPackage ../development/python-modules/translate-toolkit { };
translation-finder = callPackage ../development/python-modules/translation-finder { };
trackpy = callPackage ../development/python-modules/trackpy { };
trafilatura = callPackage ../development/python-modules/trafilatura { };
@@ -17403,6 +17419,10 @@ self: super: with self; {
webmin-xmlrpc = callPackage ../development/python-modules/webmin-xmlrpc { };
weblate-language-data = callPackage ../development/python-modules/weblate-language-data { };
weblate-schemas = callPackage ../development/python-modules/weblate-schemas { };
webob = callPackage ../development/python-modules/webob { };
webrtc-noise-gain = callPackage ../development/python-modules/webrtc-noise-gain { };