Merge master into staging-next

This commit is contained in:
github-actions[bot]
2024-09-24 12:05:12 +00:00
committed by GitHub
81 changed files with 2812 additions and 1774 deletions
@@ -114,6 +114,7 @@ middleclass,,,,,,
mimetypes,,,,,,
mpack,,,,,,
moonscript,https://raw.githubusercontent.com/leafo/moonscript/master/moonscript-dev-1.rockspec,,,,,arobyn
neorg,,,,,,GaetanLepage
neotest,,,,,,mrcjkb
nlua,,,,,,teto
nui.nvim,,,,,,mrcjkb
1 name rockspec ref server version luaversion maintainers
114 mimetypes
115 mpack
116 moonscript https://raw.githubusercontent.com/leafo/moonscript/master/moonscript-dev-1.rockspec arobyn
117 neorg GaetanLepage
118 neotest mrcjkb
119 nlua teto
120 nui.nvim mrcjkb
+1
View File
@@ -565,6 +565,7 @@ with lib.maintainers;
linux-kernel = {
members = [
TredwellGit
k900
ma27
nequissimus
qyliss
@@ -153,6 +153,8 @@
- [Dependency Track](https://dependencytrack.org/), an intelligent Component Analysis platform that allows organizations to identify and reduce risk in the software supply chain. Available as [services.dependency-track](option.html#opt-services.dependency-track).
- [Immich](https://github.com/immich-app/immich), a self-hosted photo and video backup solution. Available as [services.immich](#opt-services.immich.enable).
## Backward Incompatibilities {#sec-release-24.11-incompatibilities}
- `transmission` package has been aliased with a `trace` warning to `transmission_3`. Since [Transmission 4 has been released last year](https://github.com/transmission/transmission/releases/tag/4.0.0), and Transmission 3 will eventually go away, it was decided perform this warning alias to make people aware of the new version. The `services.transmission.package` defaults to `transmission_3` as well because the upgrade can cause data loss in certain specific usage patterns (examples: [#5153](https://github.com/transmission/transmission/issues/5153), [#6796](https://github.com/transmission/transmission/issues/6796)). Please make sure to back up to your data directory per your usage:
@@ -499,6 +501,8 @@
place. The GUI components related to the project are non-free and not
packaged.
- Compatible string matching for `hardware.deviceTree.overlays` has been changed to a more correct behavior. See [below](#sec-release-24.11-migration-dto-compatible) for details.
## Other Notable Changes {#sec-release-24.11-notable-changes}
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
@@ -623,3 +627,22 @@ in {
];
};
```
### `hardware.deviceTree.overlays` compatible string matching {#sec-release-24.11-migration-dto-compatible}
The original compatible string implementation in older NixOS versions relied on substring matching,
which is incorrect for overlays with multiple compatible strings and other cases.
The new behavior is consistent with what other tools already do - the overlay is considered applicable if,
and only if, _any_ of the compatible strings in the overlay match _any_ of the compatible strings in the DT.
To provide some examples:
| Overlay `compatible` | DT `compatible` | Pre-24.11 behavior | Correct behavior | Notes |
|----------------------|-----------------|--------------------|------------------|--------------------------------------------|
| `"foo"` | `"foo", "bar"` | match | match | Most common use case does not change |
| `"foo"` | `"foobar"` | match | no match | Substrings should not be matched |
| `"foo bar"` | `"foo", "bar"` | match | no match | Separators should not be matched to spaces |
| `"foo", "bar"` | `"baz", "bar"` | no match | match | One compatible string matching is enough |
Note that this also allows writing overlays that explicitly apply to multiple boards.
+1 -1
View File
@@ -216,7 +216,7 @@ in
imports = let
mkToolModule = { name, package ? pkgs.${name} }: { config, ... }: {
options.system.tools.${name}.enable = lib.mkEnableOption "${name} script" // {
default = true;
default = config.nix.enable;
internal = true;
};
+1
View File
@@ -1430,6 +1430,7 @@
./services/web-apps/icingaweb2/icingaweb2.nix
./services/web-apps/icingaweb2/module-monitoring.nix
./services/web-apps/ifm.nix
./services/web-apps/immich.nix
./services/web-apps/invidious.nix
./services/web-apps/invoiceplane.nix
./services/web-apps/isso.nix
+311
View File
@@ -0,0 +1,311 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.immich;
isPostgresUnixSocket = lib.hasPrefix "/" cfg.database.host;
isRedisUnixSocket = lib.hasPrefix "/" cfg.redis.host;
commonServiceConfig = {
Type = "simple";
Restart = "on-failure";
RestartSec = 3;
# Hardening
CapabilityBoundingSet = "";
NoNewPrivileges = true;
PrivateUsers = true;
PrivateTmp = true;
PrivateDevices = true;
PrivateMounts = true;
ProtectClock = true;
ProtectControlGroups = true;
ProtectHome = true;
ProtectHostname = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
RestrictAddressFamilies = [
"AF_INET"
"AF_INET6"
"AF_UNIX"
];
RestrictNamespaces = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
};
inherit (lib)
types
mkIf
mkOption
mkEnableOption
;
in
{
options.services.immich = {
enable = mkEnableOption "Immich";
package = lib.mkPackageOption pkgs "immich" { };
mediaLocation = mkOption {
type = types.path;
default = "/var/lib/immich";
description = "Directory used to store media files. If it is not the default, the directory has to be created manually such that the immich user is able to read and write to it.";
};
environment = mkOption {
type = types.submodule { freeformType = types.attrsOf types.str; };
default = { };
example = {
IMMICH_LOG_LEVEL = "verbose";
};
description = ''
Extra configuration environment variables. Refer to the [documentation](https://immich.app/docs/install/environment-variables) for options tagged with 'server', 'api' or 'microservices'.
'';
};
secretsFile = mkOption {
type = types.nullOr (
types.str
// {
# We don't want users to be able to pass a path literal here but
# it should look like a path.
check = it: lib.isString it && lib.types.path.check it;
}
);
default = null;
example = "/run/secrets/immich";
description = ''
Path of a file with extra environment variables to be loaded from disk. This file is not added to the nix store, so it can be used to pass secrets to immich. Refer to the [documentation](https://immich.app/docs/install/environment-variables) for options.
To set a database password set this to a file containing:
```
DB_PASSWORD=<pass>
```
'';
};
host = mkOption {
type = types.str;
default = "localhost";
description = "The host that immich will listen on.";
};
port = mkOption {
type = types.port;
default = 3001;
description = "The port that immich will listen on.";
};
openFirewall = mkOption {
type = types.bool;
default = false;
description = "Whether to open the immich port in the firewall";
};
user = mkOption {
type = types.str;
default = "immich";
description = "The user immich should run as.";
};
group = mkOption {
type = types.str;
default = "immich";
description = "The group immich should run as.";
};
machine-learning = {
enable =
mkEnableOption "immich's machine-learning functionality to detect faces and search for objects"
// {
default = true;
};
environment = mkOption {
type = types.submodule { freeformType = types.attrsOf types.str; };
default = { };
example = {
MACHINE_LEARNING_MODEL_TTL = "600";
};
description = ''
Extra configuration environment variables. Refer to the [documentation](https://immich.app/docs/install/environment-variables) for options tagged with 'machine-learning'.
'';
};
};
database = {
enable =
mkEnableOption "the postgresql database for use with immich. See {option}`services.postgresql`"
// {
default = true;
};
createDB = mkEnableOption "the automatic creation of the database for immich." // {
default = true;
};
name = mkOption {
type = types.str;
default = "immich";
description = "The name of the immich database.";
};
host = mkOption {
type = types.str;
default = "/run/postgresql";
example = "127.0.0.1";
description = "Hostname or address of the postgresql server. If an absolute path is given here, it will be interpreted as a unix socket path.";
};
user = mkOption {
type = types.str;
default = "immich";
description = "The database user for immich.";
};
};
redis = {
enable = mkEnableOption "a redis cache for use with immich" // {
default = true;
};
host = mkOption {
type = types.str;
default = config.services.redis.servers.immich.unixSocket;
defaultText = lib.literalExpression "config.services.redis.servers.immich.unixSocket";
description = "The host that redis will listen on.";
};
port = mkOption {
type = types.port;
default = 0;
description = "The port that redis will listen on. Set to zero to disable TCP.";
};
};
};
config = mkIf cfg.enable {
assertions = [
{
assertion = !isPostgresUnixSocket -> cfg.secretsFile != null;
message = "A secrets file containing at least the database password must be provided when unix sockets are not used.";
}
];
services.postgresql = mkIf cfg.database.enable {
enable = true;
ensureDatabases = mkIf cfg.database.createDB [ cfg.database.name ];
ensureUsers = mkIf cfg.database.createDB [
{
name = cfg.database.user;
ensureDBOwnership = true;
ensureClauses.login = true;
}
];
extraPlugins = ps: with ps; [ pgvecto-rs ];
settings = {
shared_preload_libraries = [ "vectors.so" ];
search_path = "\"$user\", public, vectors";
};
};
systemd.services.postgresql.serviceConfig.ExecStartPost =
let
sqlFile = pkgs.writeText "immich-pgvectors-setup.sql" ''
CREATE EXTENSION IF NOT EXISTS unaccent;
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE EXTENSION IF NOT EXISTS vectors;
CREATE EXTENSION IF NOT EXISTS cube;
CREATE EXTENSION IF NOT EXISTS earthdistance;
CREATE EXTENSION IF NOT EXISTS pg_trgm;
ALTER SCHEMA public OWNER TO ${cfg.database.user};
ALTER SCHEMA vectors OWNER TO ${cfg.database.user};
GRANT SELECT ON TABLE pg_vector_index_stat TO ${cfg.database.user};
ALTER EXTENSION vectors UPDATE;
'';
in
[
''
${lib.getExe' config.services.postgresql.package "psql"} -d "${cfg.database.name}" -f "${sqlFile}"
''
];
services.redis.servers = mkIf cfg.redis.enable {
immich = {
enable = true;
user = cfg.user;
port = cfg.redis.port;
bind = mkIf (!isRedisUnixSocket) cfg.redis.host;
};
};
networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ cfg.port ];
services.immich.environment =
let
postgresEnv =
if isPostgresUnixSocket then
{ DB_URL = "socket://${cfg.database.host}?dbname=${cfg.database.name}"; }
else
{
DB_HOSTNAME = cfg.database.host;
DB_PORT = toString cfg.database.port;
DB_DATABASE_NAME = cfg.database.name;
DB_USERNAME = cfg.database.user;
};
redisEnv =
if isRedisUnixSocket then
{ REDIS_SOCKET = cfg.redis.host; }
else
{
REDIS_PORT = toString cfg.redis.port;
REDIS_HOSTNAME = cfg.redis.host;
};
in
postgresEnv
// redisEnv
// {
HOST = cfg.host;
IMMICH_PORT = toString cfg.port;
IMMICH_MEDIA_LOCATION = cfg.mediaLocation;
IMMICH_MACHINE_LEARNING_URL = "http://localhost:3003";
};
services.immich.machine-learning.environment = {
MACHINE_LEARNING_WORKERS = "1";
MACHINE_LEARNING_WORKER_TIMEOUT = "120";
MACHINE_LEARNING_CACHE_FOLDER = "/var/cache/immich";
IMMICH_HOST = "localhost";
IMMICH_PORT = "3003";
};
systemd.services.immich-server = {
description = "Immich backend server (Self-hosted photo and video backup solution)";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
inherit (cfg) environment;
serviceConfig = commonServiceConfig // {
ExecStart = lib.getExe cfg.package;
EnvironmentFile = mkIf (cfg.secretsFile != null) cfg.secretsFile;
StateDirectory = "immich";
RuntimeDirectory = "immich";
User = cfg.user;
Group = cfg.group;
};
};
systemd.services.immich-machine-learning = mkIf cfg.machine-learning.enable {
description = "immich machine learning";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
inherit (cfg.machine-learning) environment;
serviceConfig = commonServiceConfig // {
ExecStart = lib.getExe cfg.package.machine-learning;
CacheDirectory = "immich";
User = cfg.user;
Group = cfg.group;
};
};
users.users = mkIf (cfg.user == "immich") {
immich = {
name = "immich";
group = cfg.group;
isSystemUser = true;
};
};
users.groups = mkIf (cfg.group == "immich") { immich = { }; };
meta.maintainers = with lib.maintainers; [ jvanbruegge ];
};
}
+54 -27
View File
@@ -68,9 +68,19 @@ let
else showWarnings config.warnings baseSystem;
# Replace runtime dependencies
system = foldr ({ oldDependency, newDependency }: drv:
pkgs.replaceDependency { inherit oldDependency newDependency drv; }
) baseSystemAssertWarn config.system.replaceRuntimeDependencies;
system = let inherit (config.system.replaceDependencies) replacements cutoffPackages; in
if replacements == [] then
# Avoid IFD if possible, by sidestepping replaceDependencies if no replacements are specified.
baseSystemAssertWarn
else
(pkgs.replaceDependencies.override {
replaceDirectDependencies = pkgs.replaceDirectDependencies.override {
nix = config.nix.package;
};
}) {
drv = baseSystemAssertWarn;
inherit replacements cutoffPackages;
};
systemWithBuildDeps = system.overrideAttrs (o: {
systemBuildClosure = pkgs.closureInfo { rootPaths = [ system.drvPath ]; };
@@ -87,6 +97,7 @@ in
(mkRemovedOptionModule [ "nesting" "clone" ] "Use `specialisation.«name» = { inheritParentConfig = true; configuration = { ... }; }` instead.")
(mkRemovedOptionModule [ "nesting" "children" ] "Use `specialisation.«name».configuration = { ... }` instead.")
(mkRenamedOptionModule [ "system" "forbiddenDependenciesRegex" ] [ "system" "forbiddenDependenciesRegexes" ])
(mkRenamedOptionModule [ "system" "replaceRuntimeDependencies" ] [ "system" "replaceDependencies" "replacements" ])
];
options = {
@@ -205,31 +216,47 @@ in
'';
};
system.replaceRuntimeDependencies = mkOption {
default = [];
example = lib.literalExpression "[ ({ original = pkgs.openssl; replacement = pkgs.callPackage /path/to/openssl { }; }) ]";
type = types.listOf (types.submodule (
{ ... }: {
options.original = mkOption {
type = types.package;
description = "The original package to override.";
};
system.replaceDependencies = {
replacements = mkOption {
default = [];
example = lib.literalExpression "[ ({ oldDependency = pkgs.openssl; newDependency = pkgs.callPackage /path/to/openssl { }; }) ]";
type = types.listOf (types.submodule (
{ ... }: {
imports = [
(mkRenamedOptionModule [ "original" ] [ "oldDependency" ])
(mkRenamedOptionModule [ "replacement" ] [ "newDependency" ])
];
options.replacement = mkOption {
type = types.package;
description = "The replacement package.";
};
})
);
apply = map ({ original, replacement, ... }: {
oldDependency = original;
newDependency = replacement;
});
description = ''
List of packages to override without doing a full rebuild.
The original derivation and replacement derivation must have the same
name length, and ideally should have close-to-identical directory layout.
'';
options.oldDependency = mkOption {
type = types.package;
description = "The original package to override.";
};
options.newDependency = mkOption {
type = types.package;
description = "The replacement package.";
};
})
);
apply = map ({ oldDependency, newDependency, ... }: {
inherit oldDependency newDependency;
});
description = ''
List of packages to override without doing a full rebuild.
The original derivation and replacement derivation must have the same
name length, and ideally should have close-to-identical directory layout.
'';
};
cutoffPackages = mkOption {
default = [ config.system.build.initialRamdisk ];
defaultText = literalExpression "[ config.system.build.initialRamdisk ]";
type = types.listOf types.package;
description = ''
Packages to which no replacements should be applied.
The initrd is matched by default, because its structure renders the replacement process ineffective and prone to breakage.
'';
};
};
system.name = mkOption {
+2
View File
@@ -455,6 +455,7 @@ in {
icingaweb2 = handleTest ./icingaweb2.nix {};
ifm = handleTest ./ifm.nix {};
iftop = handleTest ./iftop.nix {};
immich = handleTest ./web-apps/immich.nix {};
incron = handleTest ./incron.nix {};
incus = pkgs.recurseIntoAttrs (handleTest ./incus { inherit handleTestOn; inherit (pkgs) incus; });
incus-lts = pkgs.recurseIntoAttrs (handleTest ./incus { inherit handleTestOn; });
@@ -856,6 +857,7 @@ in {
redlib = handleTest ./redlib.nix {};
redmine = handleTest ./redmine.nix {};
renovate = handleTest ./renovate.nix {};
replace-dependencies = handleTest ./replace-dependencies {};
restartByActivationScript = handleTest ./restart-by-activation-script.nix {};
restic-rest-server = handleTest ./restic-rest-server.nix {};
restic = handleTest ./restic.nix {};
@@ -0,0 +1,19 @@
import ../make-test-python.nix (
{ pkgs, ... }:
{
name = "replace-dependencies";
meta.maintainers = with pkgs.lib.maintainers; [ alois31 ];
nodes.machine =
{ ... }:
{
nix.settings.experimental-features = [ "ca-derivations" ];
system.extraDependencies = [ pkgs.stdenvNoCC ];
};
testScript = ''
start_all()
machine.succeed("nix-build --option substitute false ${pkgs.path}/nixos/tests/replace-dependencies/guest.nix")
'';
}
)
+149
View File
@@ -0,0 +1,149 @@
# This needs to be run in a NixOS test, because Hydra cannot do IFD.
let
pkgs = import ../../.. { };
inherit (pkgs)
runCommand
writeShellScriptBin
replaceDependency
replaceDependencies
;
inherit (pkgs.lib) escapeShellArg;
mkCheckOutput =
name: test: output:
runCommand name { } ''
actualOutput="$(${escapeShellArg "${test}/bin/test"})"
if [ "$(${escapeShellArg "${test}/bin/test"})" != ${escapeShellArg output} ]; then
echo >&2 "mismatched output: expected \""${escapeShellArg output}"\", got \"$actualOutput\""
exit 1
fi
touch "$out"
'';
oldDependency = writeShellScriptBin "dependency" ''
echo "got old dependency"
'';
oldDependency-ca = oldDependency.overrideAttrs { __contentAddressed = true; };
newDependency = writeShellScriptBin "dependency" ''
echo "got new dependency"
'';
newDependency-ca = newDependency.overrideAttrs { __contentAddressed = true; };
basic = writeShellScriptBin "test" ''
${oldDependency}/bin/dependency
'';
basic-ca = writeShellScriptBin "test" ''
${oldDependency-ca}/bin/dependency
'';
transitive = writeShellScriptBin "test" ''
${basic}/bin/test
'';
weirdDependency = writeShellScriptBin "dependency" ''
echo "got weird dependency"
${basic}/bin/test
'';
oldDependency1 = writeShellScriptBin "dependency1" ''
echo "got old dependency 1"
'';
newDependency1 = writeShellScriptBin "dependency1" ''
echo "got new dependency 1"
'';
oldDependency2 = writeShellScriptBin "dependency2" ''
${oldDependency1}/bin/dependency1
echo "got old dependency 2"
'';
newDependency2 = writeShellScriptBin "dependency2" ''
${oldDependency1}/bin/dependency1
echo "got new dependency 2"
'';
deep = writeShellScriptBin "test" ''
${oldDependency2}/bin/dependency2
'';
in
{
replacedependency-basic = mkCheckOutput "replacedependency-basic" (replaceDependency {
drv = basic;
inherit oldDependency newDependency;
}) "got new dependency";
replacedependency-basic-old-ca = mkCheckOutput "replacedependency-basic" (replaceDependency {
drv = basic-ca;
oldDependency = oldDependency-ca;
inherit newDependency;
}) "got new dependency";
replacedependency-basic-new-ca = mkCheckOutput "replacedependency-basic" (replaceDependency {
drv = basic;
inherit oldDependency;
newDependency = newDependency-ca;
}) "got new dependency";
replacedependency-transitive = mkCheckOutput "replacedependency-transitive" (replaceDependency {
drv = transitive;
inherit oldDependency newDependency;
}) "got new dependency";
replacedependency-weird =
mkCheckOutput "replacedependency-weird"
(replaceDependency {
drv = basic;
inherit oldDependency;
newDependency = weirdDependency;
})
''
got weird dependency
got old dependency'';
replacedependencies-precedence = mkCheckOutput "replacedependencies-precedence" (replaceDependencies
{
drv = basic;
replacements = [ { inherit oldDependency newDependency; } ];
cutoffPackages = [ oldDependency ];
}
) "got new dependency";
replacedependencies-self = mkCheckOutput "replacedependencies-self" (replaceDependencies {
drv = basic;
replacements = [
{
inherit oldDependency;
newDependency = oldDependency;
}
];
}) "got old dependency";
replacedependencies-deep-order1 =
mkCheckOutput "replacedependencies-deep-order1"
(replaceDependencies {
drv = deep;
replacements = [
{
oldDependency = oldDependency1;
newDependency = newDependency1;
}
{
oldDependency = oldDependency2;
newDependency = newDependency2;
}
];
})
''
got new dependency 1
got new dependency 2'';
replacedependencies-deep-order2 =
mkCheckOutput "replacedependencies-deep-order2"
(replaceDependencies {
drv = deep;
replacements = [
{
oldDependency = oldDependency2;
newDependency = newDependency2;
}
{
oldDependency = oldDependency1;
newDependency = newDependency1;
}
];
})
''
got new dependency 1
got new dependency 2'';
}
+51
View File
@@ -0,0 +1,51 @@
import ../make-test-python.nix (
{ ... }:
{
name = "immich-nixos";
nodes.machine =
{ pkgs, ... }:
{
# These tests need a little more juice
virtualisation = {
cores = 2;
memorySize = 2048;
diskSize = 4096;
};
environment.systemPackages = with pkgs; [ immich-cli ];
services.immich = {
enable = true;
environment.IMMICH_LOG_LEVEL = "verbose";
};
};
testScript = ''
import json
machine.wait_for_unit("immich-server.service")
machine.wait_for_open_port(3001) # Server
machine.wait_for_open_port(3003) # Machine learning
machine.succeed("curl --fail http://localhost:3001/")
machine.succeed("""
curl -H 'Content-Type: application/json' --data '{ "email": "test@example.com", "name": "Admin", "password": "admin" }' -X POST http://localhost:3001/api/auth/admin-sign-up
""")
res = machine.succeed("""
curl -H 'Content-Type: application/json' --data '{ "email": "test@example.com", "password": "admin" }' -X POST http://localhost:3001/api/auth/login
""")
token = json.loads(res)['accessToken']
res = machine.succeed("""
curl -H 'Content-Type: application/json' -H 'Cookie: immich_access_token=%s' --data '{ "name": "API Key", "permissions": ["all"] }' -X POST http://localhost:3001/api/api-keys
""" % token)
key = json.loads(res)['secret']
machine.succeed(f"immich login http://localhost:3001/api {key}")
res = machine.succeed("immich server-info")
print(res)
'';
}
)
@@ -605,6 +605,18 @@ final: prev:
meta.homepage = "https://github.com/aduros/ai.vim/";
};
aider-nvim = buildVimPlugin {
pname = "aider.nvim";
version = "2023-10-22";
src = fetchFromGitHub {
owner = "joshuavial";
repo = "aider.nvim";
rev = "74a01227271d0ea211f2edafa82028b22d4c2022";
sha256 = "jkco90IF948LuRILP3Bog3GelUGOQzsEw2jP4f9Ghbw=";
};
meta.homepage = "https://github.com/joshuavial/aider.nvim/";
};
alchemist-vim = buildVimPlugin {
pname = "alchemist.vim";
version = "2023-09-01";
@@ -7443,18 +7455,6 @@ final: prev:
meta.homepage = "https://github.com/ii14/neorepl.nvim/";
};
neorg = buildVimPlugin {
pname = "neorg";
version = "2024-09-08";
src = fetchFromGitHub {
owner = "nvim-neorg";
repo = "neorg";
rev = "ba35900b21921c439e676b063a79c8fad914eac9";
sha256 = "12sgvf7zbabxvmdf07cv8rcql6jdgdv5xdcn7v5w42q8lg9mps10";
};
meta.homepage = "https://github.com/nvim-neorg/neorg/";
};
neorg-telescope = buildVimPlugin {
pname = "neorg-telescope";
version = "2024-07-30";
@@ -131,6 +131,7 @@
hurl
, # must be lua51Packages
luajitPackages
, aider-chat
,
}: self: super:
let
@@ -1238,9 +1239,7 @@ in
dependencies = with self; [ plenary-nvim ];
};
neorg = super.neorg.overrideAttrs {
dependencies = with self; [ plenary-nvim ];
};
neorg = neovimUtils.buildNeovimPlugin { luaAttr = luaPackages.neorg; };
neotest = super.neotest.overrideAttrs {
dependencies = with self; [ nvim-nio plenary-nvim ];
@@ -1497,13 +1496,17 @@ in
'';
};
refactoring-nvim = super.refactoring-nvim.overrideAttrs {
dependencies = with self; [ nvim-treesitter plenary-nvim ];
aider-nvim = super.aider-nvim.overrideAttrs {
patches = [ ./patches/aider.nvim/fix-paths.patch ];
postPatch = ''
substituteInPlace lua/aider.lua --replace '@aider@' ${aider-chat}/bin/aider
substituteInPlace lua/helpers.lua --replace '@aider@' ${aider-chat}/bin/aider
'';
};
render-markdown-nvim = super.render-markdown-nvim.overrideAttrs {
dependencies = with self; [ nvim-treesitter ];
nvimRequireCheck = "render-markdown";
refactoring-nvim = super.refactoring-nvim.overrideAttrs {
dependencies = with self; [ nvim-treesitter plenary-nvim ];
};
# needs "http" and "json" treesitter grammars too
@@ -0,0 +1,26 @@
diff --git a/lua/aider.lua b/lua/aider.lua
index 38db0d1..d1ad6d5 100644
--- a/lua/aider.lua
+++ b/lua/aider.lua
@@ -26,7 +26,7 @@ function M.AiderOpen(args, window_type)
if M.aider_buf and vim.api.nvim_buf_is_valid(M.aider_buf) then
helpers.open_buffer_in_new_window(window_type, M.aider_buf)
else
- command = 'aider ' .. (args or '')
+ command = '@aider@ ' .. (args or '')
helpers.open_window(window_type)
command = helpers.add_buffers_to_command(command)
M.aider_job_id = vim.fn.termopen(command, {on_exit = OnExit})
diff --git a/lua/helpers.lua b/lua/helpers.lua
index 152182b..aa21584 100644
--- a/lua/helpers.lua
+++ b/lua/helpers.lua
@@ -63,7 +63,7 @@ end
local function build_background_command(args, prompt)
prompt = prompt or "Complete as many todo items as you can and remove the comment for any item you complete."
- local command = 'aider --msg "' .. prompt .. '" ' .. (args or '')
+ local command = '@aider@ --msg "' .. prompt .. '" ' .. (args or '')
command = add_buffers_to_command(command)
return command
end
@@ -49,6 +49,7 @@ https://github.com/stevearc/aerial.nvim/,,
https://github.com/Numkil/ag.nvim/,,
https://github.com/derekelkins/agda-vim/,,
https://github.com/aduros/ai.vim/,HEAD,
https://github.com/joshuavial/aider.nvim/,HEAD,
https://github.com/slashmili/alchemist.vim/,,
https://github.com/dense-analysis/ale/,,
https://github.com/vim-scripts/align/,,
@@ -623,7 +624,6 @@ https://github.com/neomake/neomake/,,
https://github.com/Shougo/neomru.vim/,,
https://github.com/rafamadriz/neon/,,
https://github.com/ii14/neorepl.nvim/,HEAD,
https://github.com/nvim-neorg/neorg/,,
https://github.com/nvim-neorg/neorg-telescope/,HEAD,
https://github.com/karb94/neoscroll.nvim/,,
https://github.com/Shougo/neosnippet-snippets/,,
@@ -2,13 +2,13 @@
buildGoModule rec {
pname = "deck";
version = "1.39.6";
version = "1.40.1";
src = fetchFromGitHub {
owner = "Kong";
repo = "deck";
rev = "v${version}";
hash = "sha256-IiwS+NsjXW4kVAaJnsI8HEAl2pPRQr3K2ZpC7n/VjU4=";
hash = "sha256-wb7/g1g7gxKhZyK7GW+6aGwuD+Dkcdg2Zpc0JCxVPjM=";
};
nativeBuildInputs = [ installShellFiles ];
@@ -21,7 +21,7 @@ buildGoModule rec {
];
proxyVendor = true; # darwin/linux hash mismatch
vendorHash = "sha256-wpTXuyeUIPg6WPzVyOIFadodlKHzr5DeDeHhDRKsYbY=";
vendorHash = "sha256-8o3jXkhfRIGGPtw8ow+NyAYAuCJNrBlSyfdSI0pjvDQ=";
postInstall = ''
installShellCompletion --cmd deck \
+193
View File
@@ -0,0 +1,193 @@
{
lib,
runCommandLocal,
replaceDirectDependencies,
}:
# Replace some dependencies in the requisites tree of drv, propagating the change all the way up the tree, even within other replacements, without a full rebuild.
# This can be useful, for example, to patch a security hole in libc and still use your system safely without rebuilding the world.
# This should be a short term solution, as soon as a rebuild can be done the properly rebuilt derivation should be used.
# Each old dependency and the corresponding new dependency MUST have the same-length name, and ideally should have close-to-identical directory layout.
#
# Example: safeFirefox = replaceDependencies {
# drv = firefox;
# replacements = [
# {
# oldDependency = glibc;
# newDependency = glibc.overrideAttrs (oldAttrs: {
# patches = oldAttrs.patches ++ [ ./fix-glibc-hole.patch ];
# });
# }
# {
# oldDependency = libwebp;
# newDependency = libwebp.overrideAttrs (oldAttrs: {
# patches = oldAttrs.patches ++ [ ./fix-libwebp-hole.patch ];
# });
# }
# ];
# };
# This will first rebuild glibc and libwebp with your security patches.
# Then it copies over firefox (and all of its dependencies) without rebuilding further.
# In particular, the glibc dependency of libwebp will be replaced by the patched version as well.
#
# In rare cases, it is possible for the replacement process to cause breakage (for example due to checksum mismatch).
# The cutoffPackages argument can be used to exempt the problematic packages from the replacement process.
{
drv,
replacements,
cutoffPackages ? [ ],
verbose ? true,
}:
let
inherit (builtins) unsafeDiscardStringContext appendContext;
inherit (lib)
listToAttrs
isStorePath
readFile
attrValues
mapAttrs
filter
hasAttr
mapAttrsToList
;
inherit (lib.attrsets) mergeAttrsList;
toContextlessString = x: unsafeDiscardStringContext (toString x);
warn = if verbose then lib.warn else (x: y: y);
referencesOf =
drv:
import
(runCommandLocal "references.nix"
{
exportReferencesGraph = [
"graph"
drv
];
}
''
(echo {
while read path
do
echo " \"$path\" = ["
read count
read count
while [ "0" != "$count" ]
do
read ref_path
if [ "$ref_path" != "$path" ]
then
echo " \"$ref_path\""
fi
count=$(($count - 1))
done
echo " ];"
done < graph
echo }) > $out
''
).outPath;
realisation =
drv:
if isStorePath drv then
# Input-addressed and fixed-output derivations have their realisation as outPath.
toContextlessString drv
else
# Floating and deferred derivations have a placeholder outPath.
# The realisation can only be obtained by performing an actual build.
unsafeDiscardStringContext (
readFile (
runCommandLocal "realisation"
{
env = {
inherit drv;
};
}
''
echo -n "$drv" > $out
''
)
);
rootReferences = referencesOf drv;
relevantReplacements = filter (
{ oldDependency, newDependency }:
if toString oldDependency == toString newDependency then
warn "replaceDependencies: attempting to replace dependency ${oldDependency} of ${drv} with itself"
# Attempting to replace a dependency by itself is completely useless, and would only lead to infinite recursion.
# Hence it must not be attempted to apply this replacement in any case.
false
else if !hasAttr (realisation oldDependency) rootReferences then
warn "replaceDependencies: ${drv} does not depend on ${oldDependency}, so it will not be replaced"
# Strictly speaking, another replacement could introduce the dependency.
# However, handling this corner case would add significant complexity.
# So we just leave it to the user to apply the replacement at the correct place, but show a warning to let them know.
false
else
true
) replacements;
targetDerivations = [ drv ] ++ map ({ newDependency, ... }: newDependency) relevantReplacements;
referencesMemo = listToAttrs (
map (drv: {
name = realisation drv;
value = referencesOf drv;
}) targetDerivations
);
relevantReferences = mergeAttrsList (attrValues referencesMemo);
# Make sure a derivation is returned even when no replacements are actually applied.
# Yes, even in the stupid edge case where the root derivation itself is replaced.
storePathOrKnownTargetDerivationMemo =
mapAttrs (
drv: _references:
# builtins.storePath does not work in pure evaluation mode, even though it is not impure.
# This reimplementation in Nix works as long as the path is already allowed in the evaluation state.
# This is always the case here, because all paths come from the closure of the original derivation.
appendContext drv { ${drv}.path = true; }
) relevantReferences
// listToAttrs (
map (drv: {
name = realisation drv;
value = drv;
}) targetDerivations
);
rewriteMemo =
# Mind the order of how the three attrsets are merged here.
# The order of precedence needs to be "explicitly specified replacements" > "rewrite exclusion (cutoffPackages)" > "rewrite".
# So the attrset merge order is the opposite.
mapAttrs (
drv: references:
let
rewrittenReferences = filter (dep: dep != drv && toString rewriteMemo.${dep} != dep) references;
rewrites = listToAttrs (
map (reference: {
name = reference;
value = rewriteMemo.${reference};
}) rewrittenReferences
);
in
replaceDirectDependencies {
drv = storePathOrKnownTargetDerivationMemo.${drv};
replacements = mapAttrsToList (name: value: {
oldDependency = name;
newDependency = value;
}) rewrites;
}
) relevantReferences
// listToAttrs (
map (drv: {
name = realisation drv;
value = storePathOrKnownTargetDerivationMemo.${realisation drv};
}) cutoffPackages
)
// listToAttrs (
map (
{ oldDependency, newDependency }:
{
name = realisation oldDependency;
value = rewriteMemo.${realisation newDependency};
}
) relevantReplacements
);
in
rewriteMemo.${realisation drv}
-94
View File
@@ -1,94 +0,0 @@
{ runCommandLocal, nix, lib }:
# Replace a single dependency in the requisites tree of drv, propagating
# the change all the way up the tree, without a full rebuild. This can be
# useful, for example, to patch a security hole in libc and still use your
# system safely without rebuilding the world. This should be a short term
# solution, as soon as a rebuild can be done the properly rebuild derivation
# should be used. The old dependency and new dependency MUST have the same-length
# name, and ideally should have close-to-identical directory layout.
#
# Example: safeFirefox = replaceDependency {
# drv = firefox;
# oldDependency = glibc;
# newDependency = overrideDerivation glibc (attrs: {
# patches = attrs.patches ++ [ ./fix-glibc-hole.patch ];
# });
# };
# This will rebuild glibc with your security patch, then copy over firefox
# (and all of its dependencies) without rebuilding further.
{ drv, oldDependency, newDependency, verbose ? true }:
let
inherit (lib)
any
attrNames
concatStringsSep
elem
filter
filterAttrs
listToAttrs
mapAttrsToList
stringLength
substring
;
warn = if verbose then builtins.trace else (x: y: y);
references = import (runCommandLocal "references.nix" { exportReferencesGraph = [ "graph" drv ]; } ''
(echo {
while read path
do
echo " \"$path\" = ["
read count
read count
while [ "0" != "$count" ]
do
read ref_path
if [ "$ref_path" != "$path" ]
then
echo " (builtins.storePath (/. + \"$ref_path\"))"
fi
count=$(($count - 1))
done
echo " ];"
done < graph
echo }) > $out
'').outPath;
discard = builtins.unsafeDiscardStringContext;
oldStorepath = builtins.storePath (discard (toString oldDependency));
referencesOf = drv: references.${discard (toString drv)};
dependsOnOldMemo = listToAttrs (map
(drv: { name = discard (toString drv);
value = elem oldStorepath (referencesOf drv) ||
any dependsOnOld (referencesOf drv);
}) (attrNames references));
dependsOnOld = drv: dependsOnOldMemo.${discard (toString drv)};
drvName = drv:
discard (substring 33 (stringLength (builtins.baseNameOf drv)) (builtins.baseNameOf drv));
rewriteHashes = drv: hashes: runCommandLocal (drvName drv) { nixStore = "${nix.out}/bin/nix-store"; } ''
$nixStore --dump ${drv} | sed 's|${baseNameOf drv}|'$(basename $out)'|g' | sed -e ${
concatStringsSep " -e " (mapAttrsToList (name: value:
"'s|${baseNameOf name}|${baseNameOf value}|g'"
) hashes)
} | $nixStore --restore $out
'';
rewrittenDeps = listToAttrs [ {name = discard (toString oldDependency); value = newDependency;} ];
rewriteMemo = listToAttrs (map
(drv: { name = discard (toString drv);
value = rewriteHashes (builtins.storePath drv)
(filterAttrs (n: v: elem (builtins.storePath (discard (toString n))) (referencesOf drv)) rewriteMemo);
})
(filter dependsOnOld (attrNames references))) // rewrittenDeps;
drvHash = discard (toString drv);
in assert (stringLength (drvName (toString oldDependency)) == stringLength (drvName (toString newDependency)));
rewriteMemo.${drvHash} or (warn "replace-dependency.nix: Derivation ${drvHash} does not depend on ${discard (toString oldDependency)}" drv)
@@ -0,0 +1,72 @@
{
lib,
runCommandLocal,
nix,
}:
# Replace some direct dependencies of drv, not recursing into the dependency tree.
# You likely want to use replaceDependencies instead, unless you plan to implement your own recursion mechanism.
{
drv,
replacements ? [ ],
}:
let
inherit (lib)
isStorePath
substring
stringLength
optionalString
escapeShellArgs
concatMap
;
in
if replacements == [ ] then
drv
else
let
drvName =
if isStorePath drv then
# Reconstruct the name from the actual store path if available.
substring 33 (stringLength (baseNameOf drv)) (baseNameOf drv)
else if drv ? drvAttrs.name then
# Try to get the name from the derivation arguments otherwise (for floating or deferred derivations).
drv.drvAttrs.name
+ (
let
outputName = drv.outputName or "out";
in
optionalString (outputName != "out") "-${outputName}"
)
else
throw "cannot reconstruct the derivation name from ${drv}";
in
runCommandLocal drvName { nativeBuildInputs = [ nix.out ]; } ''
createRewriteScript() {
while [ $# -ne 0 ]; do
oldBasename="$(basename "$1")"
newBasename="$(basename "$2")"
shift 2
if [ ''${#oldBasename} -ne ''${#newBasename} ]; then
echo "cannot rewrite $oldBasename to $newBasename: length does not match" >&2
exit 1
fi
echo "s|$oldBasename|$newBasename|g" >> rewrite.sed
done
}
createRewriteScript ${
escapeShellArgs (
[
drv
(placeholder "out")
]
++ concatMap (
{ oldDependency, newDependency }:
[
oldDependency
newDependency
]
) replacements
)
}
nix-store --dump ${drv} | sed -f rewrite.sed | nix-store --restore $out
''
+3 -3
View File
@@ -8,16 +8,16 @@
buildGoModule rec {
pname = "aliae";
version = "0.22.1";
version = "0.22.2";
src = fetchFromGitHub {
owner = "jandedobbeleer";
repo = "aliae";
rev = "refs/tags/v${version}";
hash = "sha256-slixB7mzEdX3ecgbM6tO9IzVH+1w6DwssD1X3MrwAHw=";
hash = "sha256-IpOfTCMbnNUW8flyb7p98QEwveNb8wClyBuv7fAKm8Y=";
};
vendorHash = "sha256-U0Mt2U8WxDFDadIxASz609tUtiF4tETobAmYrk29Lh0=";
vendorHash = "sha256-aUKF/r0OFN0gZXCKHFYKyQa806NFP5lQAONFZlMP4vE=";
sourceRoot = "${src.name}/src";
+36
View File
@@ -0,0 +1,36 @@
{
lib,
immich,
buildNpmPackage,
nodejs,
makeWrapper,
}:
buildNpmPackage {
pname = "immich-cli";
src = "${immich.src}/cli";
inherit (immich.sources.components.cli) version npmDepsHash;
nativeBuildInputs = [ makeWrapper ];
inherit (immich.web) preBuild;
installPhase = ''
runHook preInstall
mkdir -p $out
mv package.json package-lock.json node_modules dist $out/
makeWrapper ${lib.getExe nodejs} $out/bin/immich --add-flags $out/dist/index.js
runHook postInstall
'';
meta = {
description = "Self-hosted photo and video backup solution (command line interface)";
homepage = "https://immich.app/docs/features/command-line-interface";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ jvanbruegge ];
inherit (nodejs.meta) platforms;
mainProgram = "immich";
};
}
+105
View File
@@ -0,0 +1,105 @@
{
lib,
src,
fetchFromGitHub,
immich,
python3,
# Override Python packages using
# self: super: { pkg = super.pkg.overridePythonAttrs (oldAttrs: { ... }); }
# Applied after defaultOverrides
packageOverrides ? self: super: { },
}:
let
defaultOverrides = self: super: {
pydantic = super.pydantic_1;
versioningit = super.versioningit.overridePythonAttrs (_: {
doCheck = false;
});
albumentations = super.albumentations.overridePythonAttrs (_: rec {
version = "1.4.3";
src = fetchFromGitHub {
owner = "albumentations-team";
repo = "albumentations";
rev = version;
hash = "sha256-JIBwjYaUP4Sc1bVM/zlj45cz9OWpb/LOBsIqk1m+sQA=";
};
});
};
python = python3.override {
self = python;
packageOverrides = lib.composeExtensions defaultOverrides packageOverrides;
};
in
python.pkgs.buildPythonApplication {
pname = "immich-machine-learning";
inherit (immich) version;
src = "${src}/machine-learning";
pyproject = true;
postPatch = ''
substituteInPlace pyproject.toml --replace-fail 'fastapi-slim' 'fastapi'
'';
pythonRelaxDeps = [ "setuptools" ];
pythonRemoveDeps = [ "opencv-python-headless" ];
build-system = with python.pkgs; [
poetry-core
cython
];
dependencies =
with python.pkgs;
[
insightface
opencv4
pillow
fastapi
uvicorn
aiocache
rich
ftfy
setuptools
python-multipart
orjson
gunicorn
huggingface-hub
tokenizers
pydantic
]
++ uvicorn.optional-dependencies.standard;
doCheck = false;
postInstall = ''
mkdir -p $out/share/immich
cp log_conf.json $out/share/immich
cp -r ann $out/${python.sitePackages}/
makeWrapper ${lib.getExe python.pkgs.gunicorn} "''${!outputBin}"/bin/machine-learning \
--prefix PYTHONPATH : "$out/${python.sitePackages}:$PYTHONPATH" \
--set-default MACHINE_LEARNING_WORKERS 1 \
--set-default MACHINE_LEARNING_WORKER_TIMEOUT 120 \
--set-default MACHINE_LEARNING_CACHE_FOLDER /var/cache/immich \
--set-default IMMICH_HOST "[::]" \
--set-default IMMICH_PORT 3003 \
--add-flags "app.main:app -k app.config.CustomUvicornWorker \
-w \"\$MACHINE_LEARNING_WORKERS\" \
-b \"\$IMMICH_HOST:\$IMMICH_PORT\" \
-t \"\$MACHINE_LEARNING_WORKER_TIMEOUT\"
--log-config-json $out/share/immich/log_conf.json"
'';
meta = {
description = "Self-hosted photo and video backup solution (machine learning component)";
homepage = "https://immich.app/";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ jvanbruegge ];
mainProgram = "machine-learning";
inherit (immich.meta) platforms;
};
}
+232
View File
@@ -0,0 +1,232 @@
{
lib,
stdenvNoCC,
buildNpmPackage,
fetchFromGitHub,
python3,
nodejs,
node-gyp,
runCommand,
nixosTests,
callPackage,
# build-time deps
glib,
pkg-config,
makeWrapper,
curl,
cacert,
unzip,
# runtime deps
ffmpeg-headless,
imagemagick,
libraw,
libheif,
vips,
perl,
}:
let
buildNpmPackage' = buildNpmPackage.override { inherit nodejs; };
sources = lib.importJSON ./sources.json;
inherit (sources) version;
buildLock = {
sources =
builtins.map
(p: {
name = p.pname;
inherit (p) version;
inherit (p.src) rev;
})
[
imagemagick
libheif
libraw
];
packages = [ ];
};
# The geodata website is not versioned, so we use the internet archive
geodata =
runCommand "immich-geodata"
{
outputHash = "sha256-imqSfzXaEMNo9T9tZr80sr/89n19kiFc8qwidFzRUaY=";
outputHashMode = "recursive";
nativeBuildInputs = [
cacert
curl
unzip
];
meta.license = lib.licenses.cc-by-40;
}
''
mkdir $out
url="https://web.archive.org/web/20240724153050/http://download.geonames.org/export/dump"
curl -Lo ./cities500.zip "$url/cities500.zip"
curl -Lo $out/admin1CodesASCII.txt "$url/admin1CodesASCII.txt"
curl -Lo $out/admin2Codes.txt "$url/admin2Codes.txt"
curl -Lo $out/ne_10m_admin_0_countries.geojson \
https://raw.githubusercontent.com/nvkelso/natural-earth-vector/ca96624a56bd078437bca8184e78163e5039ad19/geojson/ne_10m_admin_0_countries.geojson
unzip ./cities500.zip -d $out/
echo "2024-07-24T15:30:50Z" > $out/geodata-date.txt
'';
src = fetchFromGitHub {
owner = "immich-app";
repo = "immich";
rev = "v${version}";
inherit (sources) hash;
};
openapi = buildNpmPackage' {
pname = "immich-openapi-sdk";
inherit version;
src = "${src}/open-api/typescript-sdk";
inherit (sources.components."open-api/typescript-sdk") npmDepsHash;
installPhase = ''
runHook preInstall
npm config delete cache
npm prune --omit=dev --omit=optional
mkdir -p $out
mv package.json package-lock.json node_modules build $out/
runHook postInstall
'';
};
web = buildNpmPackage' {
pname = "immich-web";
inherit version;
src = "${src}/web";
inherit (sources.components.web) npmDepsHash;
preBuild = ''
rm node_modules/@immich/sdk
ln -s ${openapi} node_modules/@immich/sdk
# Rollup does not find the dependency otherwise
ln -s node_modules/@immich/sdk/node_modules/@oazapfts node_modules/
'';
installPhase = ''
runHook preInstall
cp -r build $out
runHook postInstall
'';
};
node-addon-api = stdenvNoCC.mkDerivation rec {
pname = "node-addon-api";
version = "8.0.0";
src = fetchFromGitHub {
owner = "nodejs";
repo = "node-addon-api";
rev = "v${version}";
hash = "sha256-k3v8lK7uaEJvcaj1sucTjFZ6+i5A6w/0Uj9rYlPhjCE=";
};
installPhase = ''
mkdir $out
cp -r *.c *.h *.gyp *.gypi index.js package-support.json package.json tools $out/
'';
};
vips' = vips.overrideAttrs (prev: {
mesonFlags = prev.mesonFlags ++ [ "-Dtiff=disabled" ];
});
in
buildNpmPackage' {
pname = "immich";
inherit version;
src = "${src}/server";
inherit (sources.components.server) npmDepsHash;
nativeBuildInputs = [
pkg-config
python3
makeWrapper
glib
node-gyp
];
buildInputs = [
ffmpeg-headless
imagemagick
libraw
libheif
vips' # Required for sharp
];
# Required because vips tries to write to the cache dir
makeCacheWritable = true;
preBuild = ''
cd node_modules/sharp
mkdir node_modules
ln -s ${node-addon-api} node_modules/node-addon-api
${lib.getExe nodejs} install/check
rm -r node_modules
cd ../..
rm -r node_modules/@img/sharp*
'';
installPhase = ''
runHook preInstall
npm config delete cache
npm prune --omit=dev
mkdir -p $out/build
mv package.json package-lock.json node_modules dist resources $out/
ln -s ${web} $out/build/www
ln -s ${geodata} $out/build/geodata
echo '${builtins.toJSON buildLock}' > $out/build/build-lock.json
makeWrapper ${lib.getExe nodejs} $out/bin/admin-cli --add-flags $out/dist/main --add-flags cli
makeWrapper ${lib.getExe nodejs} $out/bin/server --add-flags $out/dist/main --chdir $out \
--set IMMICH_BUILD_DATA $out/build --set NODE_ENV production \
--suffix PATH : "${
lib.makeBinPath [
perl
ffmpeg-headless
]
}"
runHook postInstall
'';
passthru = {
tests = {
inherit (nixosTests) immich;
};
machine-learning = callPackage ./machine-learning.nix { inherit src; };
inherit
src
sources
web
geodata
;
updateScript = ./update.sh;
};
meta = {
description = "Self-hosted photo and video backup solution";
homepage = "https://immich.app/";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ jvanbruegge ];
platforms = lib.platforms.linux;
mainProgram = "server";
};
}
+22
View File
@@ -0,0 +1,22 @@
{
"version": "1.115.0",
"hash": "sha256-H2FCR55redomrDjnnCQys47AaYbWEmlxO5NJEcVMBwY=",
"components": {
"cli": {
"npmDepsHash": "sha256-+zKtPHXjBd1KAKvI5xaY2/9qzVUg+8Ho/wrV9+TlU64=",
"version": "2.2.19"
},
"server": {
"npmDepsHash": "sha256-6CehRhPepspDpQW1h0Bx7EpH7hn42Ygqma/6wim14jA=",
"version": "1.115.0"
},
"web": {
"npmDepsHash": "sha256-ZmXfYktgOmMkDjfqSGyyflr2CmnC9yVnJ1gAcmd6A00=",
"version": "1.115.0"
},
"open-api/typescript-sdk": {
"npmDepsHash": "sha256-l1mLYFpFQjYxytY0ZWLq+ldUhZA6so0HqPgCABt0s9k=",
"version": "1.115.0"
}
}
}
+44
View File
@@ -0,0 +1,44 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq prefetch-npm-deps nix-prefetch-github coreutils
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
old_version=$(jq -r ".version" sources.json || echo -n "0.0.1")
version=$(curl -s "https://api.github.com/repos/immich-app/immich/releases/latest" | jq -r ".tag_name")
version="${version#v}"
echo "Updating to $version"
if [[ "$old_version" == "$version" ]]; then
echo "Already up to date!"
exit 0
fi
echo "Fetching src"
src_hash=$(nix-prefetch-github immich-app immich --rev "v${version}" | jq -r .hash)
upstream_src="https://raw.githubusercontent.com/immich-app/immich/v$version"
sources_tmp="$(mktemp)"
cat <<EOF > "$sources_tmp"
{
"version": "$version",
"hash": "$src_hash",
"components": {}
}
EOF
lock=$(mktemp)
for npm_component in cli server web "open-api/typescript-sdk"; do
echo "fetching $npm_component"
curl -s -o "$lock" "$upstream_src/$npm_component/package-lock.json"
hash=$(prefetch-npm-deps "$lock")
echo "$(jq --arg npm_component "$npm_component" \
--arg hash "$hash" \
--arg version "$(jq -r '.version' <"$lock")" \
'.components += {($npm_component): {npmDepsHash: $hash, version: $version}}' \
"$sources_tmp")" > "$sources_tmp"
done
rm "$lock"
cp "$sources_tmp" sources.json
+25 -23
View File
@@ -1,16 +1,17 @@
{ lib
, copyDesktopItems
, fetchFromGitHub
, makeDesktopItem
, python3
, libsForQt5
, ffmpeg
{
lib,
copyDesktopItems,
fetchFromGitHub,
makeDesktopItem,
python3,
libsForQt5,
ffmpeg,
}:
python3.pkgs.buildPythonApplication rec {
pname = "onthespot";
version = "0.5";
format = "pyproject";
pyproject = true;
src = fetchFromGitHub {
owner = "casualsnek";
@@ -19,12 +20,23 @@ python3.pkgs.buildPythonApplication rec {
hash = "sha256-VaJBNsT7uNOGY43GnzhUqDQNiPoFZcc2UaIfOKgkufg=";
};
pythonRemoveDeps = [
"PyQt5-Qt5"
"PyQt5-stubs"
# Doesn't seem to be used in the sources and causes
# build issues
"PyOgg"
];
pythonRelaxDeps = true;
nativeBuildInputs = with python3.pkgs; [
copyDesktopItems
libsForQt5.wrapQtAppsHook
];
propagatedBuildInputs = with python3.pkgs; [
dependencies = with python3.pkgs; [
async-timeout
charset-normalizer
defusedxml
ffmpeg
@@ -43,16 +55,6 @@ python3.pkgs.buildPythonApplication rec {
zeroconf
];
pythonRemoveDeps = [
"PyQt5-Qt5"
"PyQt5-stubs"
# Doesn't seem to be used in the sources and causes
# build issues
"PyOgg"
];
pythonRelaxDeps = true;
postInstall = ''
install -Dm444 $src/src/onthespot/resources/icon.png $out/share/icons/hicolor/256x256/apps/onthespot.png
'';
@@ -72,13 +74,13 @@ python3.pkgs.buildPythonApplication rec {
})
];
meta = with lib; {
meta = {
description = "QT based Spotify music downloader written in Python";
homepage = "https://github.com/casualsnek/onthespot";
changelog = "https://github.com/casualsnek/onthespot/releases/tag/v${version}";
license = licenses.gpl2Only;
maintainers = with maintainers; [ onny ];
platforms = platforms.linux;
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ onny ];
platforms = lib.platforms.linux;
mainProgram = "onthespot_gui";
};
}
@@ -0,0 +1,79 @@
{
lib,
stdenv,
darwin,
python3Packages,
fetchFromGitHub,
installShellFiles,
ruff,
testers,
openapi-python-client,
}:
python3Packages.buildPythonApplication rec {
pname = "openapi-python-client";
version = "0.21.5";
pyproject = true;
src = fetchFromGitHub {
inherit version;
owner = "openapi-generators";
repo = "openapi-python-client";
rev = "refs/tags/v${version}";
hash = "sha256-/m/XXNqsr0FjYSEGMSw4zIUpWJDOqu9BzNuJKyb7fKY=";
};
nativeBuildInputs =
[
installShellFiles
]
++ lib.optionals stdenv.isDarwin [
darwin.ps
];
build-system = with python3Packages; [
hatchling
];
dependencies =
(with python3Packages; [
attrs
httpx
jinja2
pydantic
python-dateutil
ruamel-yaml
shellingham
typer
typing-extensions
])
++ [ ruff ];
# ruff is not packaged as a python module in nixpkgs
pythonRemoveDeps = [ "ruff" ];
postInstall = ''
# see: https://github.com/fastapi/typer/blob/5889cf82f4ed925f92e6b0750bf1b1ed9ee672f3/typer/completion.py#L54
# otherwise shellingham throws exception on darwin
export _TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION=1
installShellCompletion --cmd openapi-python-client \
--bash <($out/bin/openapi-python-client --show-completion bash) \
--fish <($out/bin/openapi-python-client --show-completion fish) \
--zsh <($out/bin/openapi-python-client --show-completion zsh)
'';
passthru = {
tests.version = testers.testVersion {
package = openapi-python-client;
};
};
meta = {
description = "Generate modern Python clients from OpenAPI";
homepage = "https://github.com/openapi-generators/openapi-python-client";
changelog = "https://github.com/openapi-generators/openapi-python-client/releases/tag/v${version}";
license = lib.licenses.mit;
mainProgram = "openapi-python-client";
maintainers = with lib.maintainers; [ konradmalik ];
};
}
+10 -10
View File
@@ -2,7 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
python3,
python311,
pkg-config,
SDL2,
libpng,
@@ -22,8 +22,8 @@ let
# base_version is of the form major.minor.patch
# vc_version is of the form YYMMDDCC
# version corresponds to the tag on GitHub
base_version = "8.2.1";
vc_version = "24030407";
base_version = "8.3.1";
vc_version = "24090601";
version = "${base_version}.${vc_version}";
in
stdenv.mkDerivation {
@@ -34,7 +34,7 @@ stdenv.mkDerivation {
owner = "renpy";
repo = "renpy";
rev = version;
hash = "sha256-07Hj8mJGR0+Pn1DQ+sK5YQ3x3CTMsZ5h5yEoz44b2TM=";
hash = "sha256-k8mcDzaFngRF3Xl9cinUFU0T9sjxNIVrECUguARJVZ4=";
};
nativeBuildInputs = [
@@ -42,8 +42,8 @@ stdenv.mkDerivation {
makeWrapper
# Ren'Py currently does not compile on Cython 3.x.
# See https://github.com/renpy/renpy/issues/5359
python3.pkgs.cython_0
python3.pkgs.setuptools
python311.pkgs.cython_0
python311.pkgs.setuptools
];
buildInputs =
@@ -59,7 +59,7 @@ stdenv.mkDerivation {
zlib
harfbuzz
]
++ (with python3.pkgs; [
++ (with python311.pkgs; [
python
pygame-sdl2
tkinter
@@ -100,13 +100,13 @@ stdenv.mkDerivation {
EOF
'';
buildPhase = with python3.pkgs; ''
buildPhase = with python311.pkgs; ''
runHook preBuild
${python.pythonOnBuildForHost.interpreter} module/setup.py build --parallel=$NIX_BUILD_CORES
runHook postBuild
'';
installPhase = with python3.pkgs; ''
installPhase = with python311.pkgs; ''
runHook preInstall
${python.pythonOnBuildForHost.interpreter} module/setup.py install_lib -d $out/${python.sitePackages}
@@ -120,7 +120,7 @@ stdenv.mkDerivation {
runHook postInstall
'';
env.NIX_CFLAGS_COMPILE = with python3.pkgs; "-I${pygame-sdl2}/include/${python.libPrefix}";
env.NIX_CFLAGS_COMPILE = with python311.pkgs; "-I${pygame-sdl2}/include/${python.libPrefix}";
meta = {
description = "Visual Novel Engine";
+3 -3
View File
@@ -19,13 +19,13 @@
buildDotnetModule rec {
pname = "ryujinx";
version = "1.1.1385"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml
version = "1.1.1398"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml
src = fetchFromGitHub {
owner = "Ryujinx";
repo = "Ryujinx";
rev = "ca59c3f4998e2d1beb3b0d0214611e3332238557";
hash = "sha256-pLE8UUH4BzYyR3pqyUwQ112vBOump0wKyZaKwE131yY=";
rev = "319507f2a12a6751f3ab833e498a3efd3119f806";
hash = "sha256-3DM/kahNhl8EhSIRuqH0trYoR51OrGxSE+GuOKxKr2c=";
};
enableParallelBuilding = false;
+4 -2
View File
@@ -1,5 +1,6 @@
#! /usr/bin/env nix-shell
#! nix-shell -I nixpkgs=./. -i bash -p coreutils gnused curl common-updater-scripts nix-prefetch-git jq
# shellcheck shell=bash
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
@@ -68,9 +69,10 @@ cd ../../../..
if [[ "${1-default}" != "--deps-only" ]]; then
SHA="$(nix-prefetch-git https://github.com/ryujinx/ryujinx --rev "$COMMIT" --quiet | jq -r '.sha256')"
update-source-version ryujinx "$NEW_VERSION" "$SHA" --rev="$COMMIT"
SRI=$(nix --experimental-features nix-command hash to-sri "sha256:$SHA")
update-source-version ryujinx "$NEW_VERSION" "$SRI" --rev="$COMMIT"
fi
echo "building Nuget lockfile"
$(nix-build -A ryujinx.fetch-deps --no-out-link)
eval "$(nix-build -A ryujinx.fetch-deps --no-out-link)"
+5 -5
View File
@@ -112,11 +112,11 @@ let
in
{
ogre_14 = common {
version = "14.2.6";
hash = "sha256-kxvrRigSe6sPa3lAH+6zKTY4YEU9javlKHK8Zf6jxZE=";
# https://github.com/OGRECave/ogre/blob/v14.2.5/Components/Overlay/CMakeLists.txt
imguiVersion = "1.90.4";
imguiHash = "sha256-7+Ay7H97tIO6CUsEyaQv4i9q2FCw98eQUq/KYZyfTAw=";
version = "14.3.0";
hash = "sha256-SQ0Ij04W/KgonHDLFEPFDhXb/TDkT8I6W8J7hz3gtrg=";
# https://github.com/OGRECave/ogre/blob/v14.3.0/Components/Overlay/CMakeLists.txt
imguiVersion = "1.91.2";
imguiHash = "sha256-B7XXQNuEPcT1ID5nMYbAV+aNCG9gIrC9J7BLnYB8yjI=";
};
ogre_13 = common {
@@ -2718,6 +2718,28 @@ buildLuarocksPackage {
};
}) {};
neorg = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, lua-utils-nvim, luaOlder, nui-nvim, nvim-nio, pathlib-nvim, plenary-nvim }:
buildLuarocksPackage {
pname = "neorg";
version = "9.1.1-1";
knownRockspec = (fetchurl {
url = "mirror://luarocks/neorg-9.1.1-1.rockspec";
sha256 = "0zafy1hkrvh41vlx1g4rqlcvc4x9pi8dcji30qi0b8lj45pldyr3";
}).outPath;
src = fetchzip {
url = "https://github.com/nvim-neorg/neorg/archive/v9.1.1.zip";
sha256 = "18lk22lfzwwn4hy2s035g3kslqmvrr28lm5w9k3dazqwj5nlka3z";
};
disabled = luaOlder "5.1";
propagatedBuildInputs = [ lua-utils-nvim nui-nvim nvim-nio pathlib-nvim plenary-nvim ];
meta = {
homepage = "https://github.com/nvim-neorg/neorg";
description = "Modernity meets insane extensibility. The future of organizing your life in Neovim.";
maintainers = with lib.maintainers; [ GaetanLepage ];
license.fullName = "GPL-3.0";
};
}) {};
neotest = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, luaOlder, nvim-nio, plenary-nvim }:
buildLuarocksPackage {
pname = "neotest";
+10 -1
View File
@@ -583,7 +583,16 @@ in
export HOME=$(mktemp -d)
busted --lua=nlua
runHook postCheck
'';
'';
});
neorg = prev.neorg.overrideAttrs (oa: {
postConfigure = ''
cat ''${rockspecFilename}
substituteInPlace ''${rockspecFilename} \
--replace-fail "'nvim-nio ~> 1.7'," "'nvim-nio >= 1.7'," \
--replace-fail "'plenary.nvim == 0.1.4'," "'plenary.nvim',"
'';
});
plenary-nvim = prev.plenary-nvim.overrideAttrs (oa: {
@@ -5,7 +5,7 @@
, faraday
, base64
, psq
, httpaf
, httpun-types
, alcotest
, yojson
, hex
@@ -34,7 +34,7 @@ buildDunePackage rec {
base64
psq
hpack
httpaf
httpun-types
];
doCheck = true;
@@ -7,11 +7,11 @@
buildDunePackage rec {
pname = "hpack";
version = "0.11.0";
version = "0.13.0";
src = fetchurl {
url = "https://github.com/anmonteiro/ocaml-h2/releases/download/${version}/h2-${version}.tbz";
hash = "sha256-GdXwazlgDurjzy7ekLpuMkCii8W+F/jl/IBv/WTHgFM=";
hash = "sha256-DYm28XgXUpTnogciO+gdW4P8Mbl1Sb7DTwQyo7KoBw8=";
};
minimalOCamlVersion = "4.08";
@@ -0,0 +1,24 @@
{ lib
, buildDunePackage
, fetchurl
, faraday
}:
buildDunePackage rec {
pname = "httpun-types";
version = "0.2.0";
src = fetchurl {
url = "https://github.com/anmonteiro/httpun/releases/download/${version}/httpun-${version}.tbz";
hash = "sha256-os4n70yFro4cEAjR49Xok9ayEbk0WGod0pQvfbaHvSw=";
};
propagatedBuildInputs = [ faraday ];
meta = {
description = "Common HTTP/1.x types";
homepage = "https://github.com/anmonteiro/httpun";
license = lib.licenses.bsd3;
maintainers = [ lib.maintainers.vbgl ];
};
}
@@ -0,0 +1,30 @@
{
lib,
fetchFromGitHub,
buildDunePackage,
ounit,
}:
buildDunePackage {
pname = "mlbdd";
version = "0.7.2";
minimalOCamlVersion = "4.04";
src = fetchFromGitHub {
owner = "arlencox";
repo = "mlbdd";
rev = "v0.7.2";
hash = "sha256-GRkaUL8LQDdQx9mPvlJIXatgRfen/zKt+nGLiH7Mfvs=";
};
checkInputs = [ ounit ];
doCheck = true;
meta = {
homepage = "https://github.com/arlencox/mlbdd";
description = "A not-quite-so-simple Binary Decision Diagrams implementation for OCaml";
maintainers = with lib.maintainers; [ katrinafyi ];
};
}
@@ -19,6 +19,7 @@
, uri
, alcotest-lwt
, cstruct
, httpaf
}:
buildDunePackage rec {
@@ -43,6 +44,7 @@ buildDunePackage rec {
tls
cstruct
tcpip
httpaf
];
doCheck = true;
@@ -28,7 +28,7 @@
buildPythonPackage rec {
pname = "aiogram";
version = "3.13.0";
version = "3.13.1";
pyproject = true;
disabled = pythonOlder "3.8";
@@ -37,7 +37,7 @@ buildPythonPackage rec {
owner = "aiogram";
repo = "aiogram";
rev = "refs/tags/v${version}";
hash = "sha256-P/W47IhVL7wvYI+v6OvnFJt79KPrgY6d1jdOk477MdM=";
hash = "sha256-uTFh1ncIPF9SmAEVGeBnXEKrYzgifZan1sxk5UiG92U=";
};
build-system = [ hatchling ];
@@ -16,19 +16,19 @@
buildPythonPackage rec {
pname = "aioitertools";
version = "0.11.0";
format = "pyproject";
version = "0.12.0";
pyproject = true;
disabled = pythonOlder "3.6";
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-QsaLjdOmnCv38iM7999LtYtVe8pSUqwC7VGHu8Z9aDE=";
hash = "sha256-wqkFW0+7dwX1YbnYYFPor10QzIRdIsMgCMQ0kLLY3Ws=";
};
nativeBuildInputs = [ flit-core ];
build-system = [ flit-core ];
propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [ typing-extensions ];
dependencies = lib.optionals (pythonOlder "3.10") [ typing-extensions ];
nativeCheckInputs = [ unittestCheckHook ];
@@ -37,6 +37,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "Implementation of itertools, builtins, and more for AsyncIO and mixed-type iterables";
homepage = "https://aioitertools.omnilib.dev/";
changelog = "https://github.com/omnilib/aioitertools/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ teh ];
};
@@ -30,16 +30,14 @@
buildPythonPackage rec {
pname = "ale-py";
version = "0.9.1";
version = "0.10.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "Farama-Foundation";
repo = "Arcade-Learning-Environment";
rev = "refs/tags/v${version}";
hash = "sha256-MpumAQ5OW/+fRIvrBlRWkgioxMVceb5LxEH2JjRk5zY=";
hash = "sha256-JQG8Db7OEKQ7THkHJ+foUm/L7Ctr0Ur8nb6Zc2Z/MJI=";
};
build-system = [
@@ -64,12 +62,8 @@ buildPythonPackage rec {
postPatch =
# Relax the pybind11 version
''
substituteInPlace src/python/CMakeLists.txt \
substituteInPlace src/ale/python/CMakeLists.txt \
--replace-fail 'find_package(pybind11 ''${PYBIND11_VER} QUIET)' 'find_package(pybind11 QUIET)'
''
+ ''
substituteInPlace pyproject.toml \
--replace-fail 'dynamic = ["version"]' 'version = "${version}"'
'';
dontUseCmakeConfigure = true;
@@ -5,30 +5,32 @@
buildPythonPackage,
fetchPypi,
isodate,
msrest,
pythonOlder,
setuptools,
typing-extensions,
}:
buildPythonPackage rec {
pname = "azure-mgmt-privatedns";
version = "1.1.0";
format = "setuptools";
version = "1.2.0";
pyproject = true;
disabled = pythonOlder "3.7";
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-MtucYFpKj/ANNON1UdXrBrTsJnq53iph3SJ1ypWj+5g=";
extension = "zip";
pname = "azure_mgmt_privatedns";
inherit version;
hash = "sha256-NCMYcvAblPYZXY7lQo4XRpJS7QTqCCjVIyXr578KEgs=";
};
propagatedBuildInputs = [
build-system = [ setuptools ];
dependencies = [
azure-common
azure-mgmt-core
isodate
msrest
] ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ];
typing-extensions
];
# no tests included
doCheck = false;
@@ -40,7 +42,8 @@ buildPythonPackage rec {
meta = with lib; {
description = "Microsoft Azure DNS Private Zones Client Library for Python";
homepage = "https://github.com/Azure/azure-sdk-for-python";
homepage = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/network/azure-mgmt-privatedns";
changelog = "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-privatedns_${version}/sdk/network/azure-mgmt-privatedns/CHANGELOG.md";
license = licenses.mit;
maintainers = [ ];
};
@@ -9,13 +9,13 @@
darwin,
fastapi,
fetchFromGitHub,
fetchpatch,
grpcio,
httpx,
hypothesis,
importlib-resources,
kubernetes,
mmh3,
nixosTests,
numpy,
onnxruntime,
openssl,
@@ -28,6 +28,7 @@
pkg-config,
posthog,
protobuf,
psutil,
pulsar-client,
pydantic,
pypika,
@@ -38,8 +39,8 @@
requests,
rustc,
rustPlatform,
setuptools,
setuptools-scm,
setuptools,
tenacity,
tokenizers,
tqdm,
@@ -47,12 +48,11 @@
typing-extensions,
uvicorn,
zstd,
nixosTests,
}:
buildPythonPackage rec {
pname = "chromadb";
version = "0.5.5";
version = "0.5.7";
pyproject = true;
disabled = pythonOlder "3.9";
@@ -61,29 +61,15 @@ buildPythonPackage rec {
owner = "chroma-core";
repo = "chroma";
rev = "refs/tags/${version}";
hash = "sha256-e6ZctUFeq9hHXWaxGdVTiqFpwaU7A+EKn2EdQPI7DHE=";
hash = "sha256-+wRauCRrTQsGTadA6Ps0fXcpAl6ajsJRjcVEhP2+2ss=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-3FmnQEpknYNzI3WlQ3kc8qa4LFcn1zpxKDbkATU7/48=";
hash = "sha256-Y2mkWGgS77sGOOL+S/pw/UmrKDRyO+ZbN2Msj35sIl8=";
};
patches = [
# Remove these on the next release
(fetchpatch {
name = "pydantic19-fastapi1.patch";
url = "https://github.com/chroma-core/chroma/commit/d62c13da29b7bff77bd7dee887123e3c57e2c19e.patch";
hash = "sha256-E3xmh9vQZH3NCfG6phvzM65NGwlcHmPgfU6FERKAJ60=";
})
(fetchpatch {
name = "no-union-types-pydantic1.patch";
url = "https://github.com/chroma-core/chroma/commit/2fd5b27903dffcf8bdfbb781a25bcecc17b27672.patch";
hash = "sha256-nmiA/lKZVrHKXumc+J4uVRiMwrnFrz2tgMpfcay5hhw=";
})
];
pythonRelaxDeps = [
"chroma-hnswlib"
"orjson"
@@ -141,6 +127,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
hypothesis
psutil
pytest-asyncio
pytestCheckHook
];
@@ -3,21 +3,24 @@
cirq-core,
requests,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "cirq-aqt";
format = "setuptools";
pyproject = true;
inherit (cirq-core) version src meta;
sourceRoot = "${src.name}/${pname}";
postPatch = ''
substituteInPlace requirements.txt \
--replace "requests~=2.18" "requests"
--replace-fail "requests~=2.18" "requests"
'';
propagatedBuildInputs = [
build-system = [ setuptools ];
dependencies = [
cirq-core
requests
];
@@ -34,7 +34,7 @@ buildPythonPackage rec {
version = "1.4.1";
pyproject = true;
disabled = pythonOlder "3.9";
disabled = pythonOlder "3.10";
src = fetchFromGitHub {
owner = "quantumlib";
@@ -47,7 +47,7 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace requirements.txt \
--replace "matplotlib~=3.0" "matplotlib"
--replace-fail "matplotlib~=3.0" "matplotlib"
'';
build-system = [ setuptools ];
@@ -15,11 +15,9 @@ buildPythonPackage rec {
sourceRoot = "${src.name}/${pname}";
nativeBuildInputs = [
setuptools
];
build-system = [ setuptools ];
propagatedBuildInputs = [
dependencies = [
cirq-core
google-api-core
protobuf
@@ -3,21 +3,24 @@
cirq-core,
requests,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "cirq-ionq";
format = "setuptools";
pyproject = true;
inherit (cirq-core) version src meta;
sourceRoot = "${src.name}/${pname}";
postPatch = ''
substituteInPlace requirements.txt \
--replace "requests~=2.18" "requests"
--replace-fail "requests~=2.18" "requests"
'';
propagatedBuildInputs = [
build-system = [ setuptools ];
dependencies = [
cirq-core
requests
];
@@ -3,21 +3,24 @@
cirq-core,
requests,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "cirq-pasqal";
format = "setuptools";
pyproject = true;
inherit (cirq-core) version src meta;
sourceRoot = "${src.name}/${pname}";
postPatch = ''
substituteInPlace requirements.txt \
--replace "requests~=2.18" "requests"
--replace-fail "requests~=2.18" "requests"
'';
propagatedBuildInputs = [
build-system = [ setuptools ];
dependencies = [
cirq-core
requests
];
@@ -1,36 +1,21 @@
{
lib,
buildPythonPackage,
cirq-core,
fetchpatch2,
lib,
pytestCheckHook,
attrs,
certifi,
h11,
httpcore,
idna,
httpx,
iso8601,
pydantic,
pyjwt,
pyquil,
python-dateutil,
pytestCheckHook,
pythonOlder,
qcs-api-client,
retrying,
rfc3339,
rfc3986,
six,
sniffio,
toml,
qcs-sdk-python,
setuptools,
}:
buildPythonPackage rec {
pname = "cirq-rigetti";
format = "setuptools";
pyproject = true;
inherit (cirq-core) version src;
disabled = pythonOlder "3.7";
disabled = pythonOlder "3.10";
patches = [
# https://github.com/quantumlib/Cirq/pull/6734
@@ -44,46 +29,19 @@ buildPythonPackage rec {
sourceRoot = "${src.name}/${pname}";
pythonRelaxDeps = [
"attrs"
"certifi"
"h11"
"httpcore"
"httpx"
"idna"
"iso8601"
"pydantic"
"pyjwt"
"pyquil"
"qcs-api-client"
"rfc3986"
];
pythonRelaxDeps = [ "pyquil" ];
postPatch = ''
# Remove outdated test
rm cirq_rigetti/service_test.py
'';
propagatedBuildInputs = [
build-system = [ setuptools ];
dependencies = [
cirq-core
attrs
certifi
h11
httpcore
httpx
idna
iso8601
pydantic
pyjwt
pyquil
python-dateutil
qcs-api-client
retrying
rfc3339
rfc3986
six
sniffio
toml
qcs-sdk-python
];
nativeCheckInputs = [ pytestCheckHook ];
@@ -2,16 +2,19 @@
buildPythonPackage,
cirq-core,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "cirq-web";
format = "setuptools";
pyproject = true;
inherit (cirq-core) version src meta;
sourceRoot = "${src.name}/${pname}";
propagatedBuildInputs = [ cirq-core ];
build-system = [ setuptools ];
dependencies = [ cirq-core ];
nativeCheckInputs = [ pytestCheckHook ];
@@ -8,14 +8,17 @@
cirq-rigetti,
cirq-web,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "cirq";
format = "setuptools";
pyproject = true;
inherit (cirq-core) version src meta;
propagatedBuildInputs = [
build-system = [ setuptools ];
dependencies = [
cirq-aqt
cirq-core
cirq-ionq
@@ -18,14 +18,14 @@
buildPythonPackage rec {
pname = "huggingface-hub";
version = "0.25.0";
version = "0.25.1";
pyproject = true;
src = fetchFromGitHub {
owner = "huggingface";
repo = "huggingface_hub";
rev = "refs/tags/v${version}";
hash = "sha256-N/c/aTUWHolQ1TWVOoyfQ3eCLOSX3/6qtXk1T918/wg=";
hash = "sha256-MloCUtvJ3A7t6NbCCPp4kcR+7apTrIjbvm6Ppe0SgdA=";
};
build-system = [ setuptools ];
@@ -17,7 +17,7 @@
buildPythonPackage rec {
pname = "plugwise";
version = "1.4.0";
version = "1.4.1";
pyproject = true;
disabled = pythonOlder "3.11";
@@ -26,7 +26,7 @@ buildPythonPackage rec {
owner = "plugwise";
repo = "python-plugwise";
rev = "refs/tags/v${version}";
hash = "sha256-CVgcqyg5DDtEJxE/oen5MJP+mV4B+Sq0uopEZTOCfV0=";
hash = "sha256-lMcehjG1Zc9s02MBsRUXZHQjxcrZetOgOSne0nCGVV0=";
};
postPatch = ''
@@ -15,7 +15,7 @@
buildPythonPackage rec {
pname = "polyswarm-api";
version = "3.9.0";
version = "3.10.0";
pyproject = true;
disabled = pythonOlder "3.8";
@@ -24,7 +24,7 @@ buildPythonPackage rec {
owner = "polyswarm";
repo = "polyswarm-api";
rev = "refs/tags/${version}";
hash = "sha256-RjzB7S3qTCl6fo+qZ+mVCsQg6CLUnSwutNse5QPQOHU=";
hash = "sha256-3K0FdqsEjt5cTymgxmt0Ohud/+bsILe9bDclZXJqPV8=";
};
pythonRelaxDeps = [ "future" ];
@@ -20,7 +20,7 @@
buildPythonPackage rec {
pname = "pytelegrambotapi";
version = "4.22.0";
version = "4.23.0";
pyproject = true;
disabled = pythonOlder "3.7";
@@ -29,7 +29,7 @@ buildPythonPackage rec {
owner = "eternnoir";
repo = "pyTelegramBotAPI";
rev = "refs/tags/${version}";
hash = "sha256-hP9MXv3/754ouvPgyOZKzBtEU2BugHUUE/e8biZPLFY=";
hash = "sha256-R/RbkiKkhcZd17hgDJnEpr3OCVMvn744YM+lmzSXKWs=";
};
build-system = [ hatchling ];
@@ -10,7 +10,7 @@
buildPythonPackage rec {
pname = "pyexploitdb";
version = "0.2.35";
version = "0.2.36";
pyproject = true;
disabled = pythonOlder "3.7";
@@ -18,7 +18,7 @@ buildPythonPackage rec {
src = fetchPypi {
pname = "pyExploitDb";
inherit version;
hash = "sha256-lwsLP29lQmb7MJYPrOfgspdj4qepx7TirEksMASqrb4=";
hash = "sha256-JezjKbCO75JFHLsDzk3zNMHO6Xpz2xTjecTfrXhgUiA=";
};
build-system = [ setuptools ];
@@ -26,7 +26,7 @@ buildPythonPackage {
src = fetchurl {
url = "https://www.renpy.org/dl/${renpy_version}/pygame_sdl2-${version}+renpy${renpy_version}.tar.gz";
hash = "sha256-Zib39NyQ1pGVCWPrK5/Tl3dAylUlmKZKxU8pf+OpAdY=";
hash = "sha256-bcTrdXWLTCnZQ/fP5crKIPoqJiyz+o6s0PzRChV7TQE=";
};
# force rebuild of headers needed for install
@@ -16,7 +16,7 @@
buildPythonPackage rec {
pname = "pygitguardian";
version = "1.16.0";
version = "1.17.0";
pyproject = true;
disabled = pythonOlder "3.8";
@@ -25,7 +25,7 @@ buildPythonPackage rec {
owner = "GitGuardian";
repo = "py-gitguardian";
rev = "refs/tags/v${version}";
hash = "sha256-2yuYu02Nd9B3UfzrM0p19hDM5HmvigBf48gu+ZSO0kU=";
hash = "sha256-+L0rF5wy4iL/6nPdLSXwYazxsobH2G3pCATrqYe9B6U=";
};
pythonRelaxDeps = [
@@ -71,6 +71,7 @@ buildPythonPackage rec {
"test_read_metadata_bad_response"
"test_read_metadata_no_remediation_message"
"test_read_metadata_remediation_message"
"test_retrieve_secret_incident"
"test_sca_client_scan_diff"
"test_sca_scan_all_with_params"
"test_sca_scan_directory_invalid_tar"
@@ -12,28 +12,28 @@
buildPythonPackage rec {
pname = "pysml";
version = "0.1.2";
format = "pyproject";
version = "0.1.3";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "mtdcr";
repo = pname;
repo = "pysml";
rev = "refs/tags/${version}";
hash = "sha256-TLIpc0bVx1As2oLyYD+BBMalwJiKdvBCcrd1tUNyh6Y=";
hash = "sha256-LmybrMHHWsLd6Y2xMqJ8g65SQCsysBGxeL43qouo3SM=";
};
nativeBuildInputs = [ poetry-core ];
build-system = [ poetry-core ];
propagatedBuildInputs = [
dependencies = [
aiohttp
async-timeout
bitstring
pyserial-asyncio
];
# Project has no tests
# Module has no tests
doCheck = false;
pythonImportsCheck = [ "sml" ];
@@ -41,7 +41,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "Python library for EDL21 smart meters using Smart Message Language (SML)";
homepage = "https://github.com/mtdcr/pysml";
license = with licenses; [ mit ];
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}
@@ -26,7 +26,7 @@
buildPythonPackage rec {
pname = "pytenable";
version = "1.5.1";
version = "1.5.2";
pyproject = true;
disabled = pythonOlder "3.7";
@@ -35,7 +35,7 @@ buildPythonPackage rec {
owner = "tenable";
repo = "pyTenable";
rev = "refs/tags/${version}";
hash = "sha256-xiFpwwlQfhpljRbJeytO3Sjh4ue0cSpKgJ9bqUul7rk=";
hash = "sha256-SGfvaYzqJ+OsJ9sGyR3pgCbEkPondhMQMNrE/r/nIY0=";
};
pythonRelaxDeps = [
@@ -2,45 +2,57 @@
lib,
buildPythonPackage,
fetchFromGitHub,
html5lib,
nh3,
pillow,
pytest-cov-stub,
pytestCheckHook,
pythonOlder,
regex,
setuptools-scm,
setuptools,
}:
buildPythonPackage rec {
pname = "textile";
version = "4.0.2";
format = "setuptools";
version = "4.0.3";
pyproject = true;
disabled = pythonOlder "3.7";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = pname;
owner = "textile";
repo = "python-textile";
rev = version;
hash = "sha256-WwX7h07Bq8sNsViHwmfhrrqleXacmrIY4ZBBaP2kKnI=";
rev = "refs/tags/${version}";
hash = "sha256-KVDppsvX48loV9OJ70yqmQ5ZSypzcxrjH1j31DcyfM8=";
};
propagatedBuildInputs = [
html5lib
build-system = [
setuptools
setuptools-scm
];
dependencies = [
nh3
regex
];
nativeCheckInputs = [ pytestCheckHook ];
optional-dependencies = {
imagesize = [ pillow ];
};
postPatch = ''
substituteInPlace pytest.ini \
--replace " --cov=textile --cov-report=html --cov-append --cov-report=term-missing" ""
'';
nativeCheckInputs = [
pytest-cov-stub
pytestCheckHook
];
pythonImportsCheck = [ "textile" ];
meta = with lib; {
description = "MOdule for generating web text";
mainProgram = "pytextile";
homepage = "https://github.com/textile/python-textile";
changelog = "https://github.com/textile/python-textile/blob/${version}/CHANGELOG.textile";
license = licenses.bsd3;
maintainers = with maintainers; [ fab ];
mainProgram = "pytextile";
};
}
@@ -14,7 +14,7 @@
buildPythonPackage rec {
pname = "xknx";
version = "3.1.1";
version = "3.2.0";
pyproject = true;
disabled = pythonOlder "3.8";
@@ -23,7 +23,7 @@ buildPythonPackage rec {
owner = "XKNX";
repo = "xknx";
rev = "refs/tags/${version}";
hash = "sha256-mlY9jPB3Sme9iajh5kWGf+8MHI0vMUilHe8W7AwmuCo=";
hash = "sha256-hgCmzWncHTsvfVeU/ePpu59THtmuLlqeCO11/L4BRvM=";
};
build-system = [ setuptools ];
@@ -24,7 +24,7 @@
buildPythonPackage rec {
pname = "yalexs";
version = "8.6.4";
version = "8.7.1";
pyproject = true;
disabled = pythonOlder "3.9";
@@ -33,7 +33,7 @@ buildPythonPackage rec {
owner = "bdraco";
repo = "yalexs";
rev = "refs/tags/v${version}";
hash = "sha256-KUm+e/ZrfkrS4MA0Wb3VAo9URYmC0ucKw3L+yMMoMtU=";
hash = "sha256-+1Ff0VttUm9cwrEWNiKQfBmYjrtA3AZxWVm/iU21XCE=";
};
build-system = [ poetry-core ];
@@ -45,35 +45,35 @@
},
"30": {
"hashes": {
"aarch64-darwin": "2238c45a85b2c78aed00aeaf15bbfa2f64b4d13e48cc6b9bc330f24c4d214595",
"aarch64-linux": "aa422122373b84f4eb8ce937937b1b6fe8fb3975c3edafb9df85f7fba449afd4",
"armv7l-linux": "3643857e1eec3037ad6f07e755bffc64f033a7196307ff0386bf67c9cc3ec31e",
"headers": "1zpl51g8d0j6xw4h2pw1wy6qlwgxj37x4lsj377kg27y809rf5ah",
"x86_64-darwin": "6e633bf87be9f8bf46dff9733cfd0d611e018ae5df75f30735747721f91fcf43",
"x86_64-linux": "b365aac23c61dc0b18002c60937c4842e814cbe6d8e6a34e4dc211774ebaec01"
"aarch64-darwin": "d312544ea29844cf328b44b9dbde12f4fdced90cb442dfca6df36c098dbb6e7a",
"aarch64-linux": "eb31470c0d7cd6e23e7ce0d89cc93a2356c9dac8bcc997e335353b8aa995afa0",
"armv7l-linux": "224bd46983e503101c756c72d10b195f14712a7a56438718acb126017dd04edf",
"headers": "0db38ndw9rrd8ixa14761cbff6ns31b6302bzx5q4in8i4dkrrs3",
"x86_64-darwin": "faf9dcc20d525607ea205f2f6a1dfe3270f6268aa439bb0ba5646c7e4fbbd842",
"x86_64-linux": "ec4707783d39e86005f42899e30ae59e50dd5d9c7f28531ed494eb43f2361403"
},
"version": "30.4.0"
"version": "30.5.1"
},
"31": {
"hashes": {
"aarch64-darwin": "4cd04f75e97f6cdfee1d166c7756b9a3c7341e51a7b12255c37bd46fa5a45da5",
"aarch64-linux": "37fbede76b30bad461cbfa3efec8aef07a34f6991c71c50a69ac489623413098",
"armv7l-linux": "7a6cba2d78ef3ff776d9482121f9b2400370da23b3065bfdafc4cd83c8bbe423",
"headers": "0iclnzcihiw7bnf7nn0p56m8zz8cwn951ccf6g52d7pfr791gbnv",
"x86_64-darwin": "e177e9846bfe63eefea3ecd6a889e9865e1fba21b93179a0cde08bd7c94796ee",
"x86_64-linux": "9b95e66cb4d55bb632e37bcb6083992a5d665f0b378466a771a2948c1aab57b7"
"aarch64-darwin": "dec23ecc15f4d0503163c5f65f59114127ce6d2518af8e6547ea787372575fcb",
"aarch64-linux": "1911b1cef253d68fead45432e93740223c686ebc11c931bdd08439ec88030cfd",
"armv7l-linux": "957d888d016270b658fb558f6e2061ffaa7f71c9d2b1c73c4f122342519ba741",
"headers": "1vm3r688cjl5014x4lmmwh9927wbx26nd38lijmim434n32aby88",
"x86_64-darwin": "4d5d21963bf833ccc25edbc2e8e884f408e24c2a39b53f1d0c30f4017ac2ba8a",
"x86_64-linux": "86b3794aba055e84f23cba5d8319ca9f23a05385d2c06fe7d78d24d2bb356b67"
},
"version": "31.4.0"
"version": "31.6.0"
},
"32": {
"hashes": {
"aarch64-darwin": "b0e04b765702c35341e587e41b01eb9bcb1233953ab243a0c82e9555c04b269b",
"aarch64-linux": "1bf3b53cba77e070fb0da4b32540fedc29586b2111700b897fd62e3577708d53",
"armv7l-linux": "6e52f9fd163e54cb482354645dc32d42b24c6624bbb8927d194dbbb9eaf92959",
"headers": "0gw7yvj9i3kwmxbjj6w4l442saac3pcn3g7m42kvbpbwbfds1h4d",
"x86_64-darwin": "e3bb68b37e723af4aab8d9694661e5e9ecbe7b1fbc253fe263940dafffd66864",
"x86_64-linux": "5a9980bc3c80d1d2af0965eba2bc3c0f532b4ccc29194a595cefdd4dbe98e7dc"
"aarch64-darwin": "b5f6db900997ba931c98addaef28744a0a6af0f2ec2e8e5755f7f50db2fe8bbc",
"aarch64-linux": "702326c51679ed705bc22d7e4049b29cef2d66366d3387c401836aaae0fa450c",
"armv7l-linux": "d9511449c328f90f47e499f44c6d84c6204d4a3a2caec5c5d52f176cfc77f50d",
"headers": "19x1hyrzkakcrq49sfvzhhz05hi1iagzl2i3h4rfijrhy9jcv4sk",
"x86_64-darwin": "150ac6a59e31ad516685bdbb9cee67c7e927b872ad94ffc900fbf6616433f8ab",
"x86_64-linux": "b51e5f1296f8971d7eb4ca86606b6f5d31fb3dab8caa91dcfbfa522be5679691"
},
"version": "32.1.1"
"version": "32.1.2"
}
}
@@ -34,13 +34,13 @@
},
"32": {
"hashes": {
"aarch64-darwin": "3fff987133294dcc18420500292bdfc32b452cfcf72f2e89af96404aa566aa27",
"aarch64-linux": "cfd75fdd5ec2bc86483b0779f241f98f775b74e4b75407a08b3755103304421a",
"armv7l-linux": "469d23434bca0f8bd4def7d3d9d3e9ff30dfa29e65450bac88cbbc0ae1ffc09c",
"headers": "0gw7yvj9i3kwmxbjj6w4l442saac3pcn3g7m42kvbpbwbfds1h4d",
"x86_64-darwin": "2b0e23c214580716dbeedd7b6bccc2b8994cbaa7827fa34208ed22ccb4ccdf77",
"x86_64-linux": "5d824770f97216138a209f268fbcab3de64bc967046ed9ad92ec0059abef184f"
"aarch64-darwin": "7fb7b8736fcd9dbde92628e4aa951fd2c54d3136bf20c1821ce2a1b85fef3046",
"aarch64-linux": "405664c1b6529cd6c2af65778f2c84bfe262ad0b8d9d044a39d2eff2ed218828",
"armv7l-linux": "32682f487ed9307d0f40d35c4b998cee75272effd228093be3e008ca7b39e16e",
"headers": "19x1hyrzkakcrq49sfvzhhz05hi1iagzl2i3h4rfijrhy9jcv4sk",
"x86_64-darwin": "a9e43916cbe91c9a905f2bf38d326d5dc462c3d8a7d88f52c25c1e7c1b9ce7cc",
"x86_64-linux": "d98aa7a90ebfe519700e47fa6bcb94a157483fac615920c5ee467dcc41c46702"
},
"version": "32.1.1"
"version": "32.1.2"
}
}
+21 -21
View File
@@ -47,10 +47,10 @@
},
"src/electron": {
"fetcher": "fetchFromGitHub",
"hash": "sha256-SUwtnpYQbPRCIzTQcJnoW9sI597LP1BvqNrhcb2NNfk=",
"hash": "sha256-LkDhMO6FOS/8WgAQBs3HZ8ujkS4yBtVJR7ARxEiJIME=",
"owner": "electron",
"repo": "electron",
"rev": "v30.4.0"
"rev": "v30.5.1"
},
"src/media/cdm/api": {
"fetcher": "fetchFromGitiles",
@@ -276,10 +276,10 @@
},
"src/third_party/electron_node": {
"fetcher": "fetchFromGitHub",
"hash": "sha256-FJVFKLhVCoOdM6dbuu/DQxw0hXjg+C8a2WfF0u3Qndw=",
"hash": "sha256-3pcWLDR1Y6oJUuwtequ5pK7nGwPeOqzALVNGJYskuc0=",
"owner": "nodejs",
"repo": "node",
"rev": "v20.15.1"
"rev": "v20.16.0"
},
"src/third_party/emoji-segmenter/src": {
"fetcher": "fetchFromGitiles",
@@ -913,8 +913,8 @@
},
"electron_yarn_hash": "0vq12z09hcm6xdrd34b01vx1c47r4zdaqrkw9db6r612xrp2xi0c",
"modules": "123",
"node": "20.15.1",
"version": "30.4.0"
"node": "20.16.0",
"version": "30.5.1"
},
"31": {
"chrome": "126.0.6478.234",
@@ -964,10 +964,10 @@
},
"src/electron": {
"fetcher": "fetchFromGitHub",
"hash": "sha256-pio5G9ATJHsM4ygKkDhmAbpZecS8p1AQUJ7LHavMq6I=",
"hash": "sha256-dw2WLjkHCt/uYXT+eZpaJ1bdB6DdMcJLjnscREp4YU8=",
"owner": "electron",
"repo": "electron",
"rev": "v31.4.0"
"rev": "v31.6.0"
},
"src/media/cdm/api": {
"fetcher": "fetchFromGitiles",
@@ -1211,10 +1211,10 @@
},
"src/third_party/electron_node": {
"fetcher": "fetchFromGitHub",
"hash": "sha256-3pcWLDR1Y6oJUuwtequ5pK7nGwPeOqzALVNGJYskuc0=",
"hash": "sha256-fYx771gbZTsgEmHQf4mj3qSqmFHs8YVg4sVyUnfsmqI=",
"owner": "nodejs",
"repo": "node",
"rev": "v20.16.0"
"rev": "v20.17.0"
},
"src/third_party/emoji-segmenter/src": {
"fetcher": "fetchFromGitiles",
@@ -1854,11 +1854,11 @@
},
"electron_yarn_hash": "12pcq3zzx6627igdfd5bgyismz9n21093smpd43c4aall2mn6194",
"modules": "125",
"node": "20.16.0",
"version": "31.4.0"
"node": "20.17.0",
"version": "31.6.0"
},
"32": {
"chrome": "128.0.6613.137",
"chrome": "128.0.6613.162",
"chromium": {
"deps": {
"gn": {
@@ -1868,15 +1868,15 @@
"version": "2024-06-11"
}
},
"version": "128.0.6613.137"
"version": "128.0.6613.162"
},
"chromium_npm_hash": "sha256-OBUYgjfoEZly8JLTtprfU+hlKNFSnHLheaVWhrirGJk=",
"deps": {
"src": {
"fetcher": "fetchFromGitiles",
"hash": "sha256-H+C79mGXUaDYcDoJz25iobN3xWUJz6OplleJlTX3ilg=",
"hash": "sha256-52pb9e5XYaiIpUlazoXbmEJ/3l4uPWt9sVmF0+cVBKQ=",
"postFetch": "rm -r $out/third_party/blink/web_tests; rm -r $out/third_party/hunspell/tests; rm -r $out/content/test/data; rm -r $out/courgette/testdata; rm -r $out/extensions/test/data; rm -r $out/media/test/data; ",
"rev": "128.0.6613.137",
"rev": "128.0.6613.162",
"url": "https://chromium.googlesource.com/chromium/src.git"
},
"src/chrome/test/data/perf/canvas_bench": {
@@ -1905,10 +1905,10 @@
},
"src/electron": {
"fetcher": "fetchFromGitHub",
"hash": "sha256-OErkW4OrDU9WJd8iqWAUZZ5qR4vuX+laLzwTt5OMrOc=",
"hash": "sha256-RkSdNjEmXO4xsCRzp5y5suG8svNT5LSI/eVbAUDbi5c=",
"owner": "electron",
"repo": "electron",
"rev": "v32.1.1"
"rev": "v32.1.2"
},
"src/media/cdm/api": {
"fetcher": "fetchFromGitiles",
@@ -2788,14 +2788,14 @@
},
"src/v8": {
"fetcher": "fetchFromGitiles",
"hash": "sha256-bhGdJhSfvBFUh0PY9xssNinO1CKb36lxKuU3b35aV0M=",
"rev": "6f774f929205be0a49cf861b8d73a92655e1dd36",
"hash": "sha256-weN8PR9qaRcws9T5PhWyJntrJJ4sKoLwP3gTSLHU574=",
"rev": "485b9d9f88ef1c4787b183b8ccc6cdcfbc07ab1a",
"url": "https://chromium.googlesource.com/v8/v8.git"
}
},
"electron_yarn_hash": "0jb1rs1in1bp71syim7a7p0n669kbc6as90y3zi6nd0q340cwgqa",
"modules": "128",
"node": "20.17.0",
"version": "32.1.1"
"version": "32.1.2"
}
}
@@ -321,7 +321,6 @@ class ElectronChromedriverRepo(ElectronBinRepo):
# and it is rather pointless trying to update those.
#
# https://endoflife.date/electron
@memory.cache
def supported_version_range() -> range:
"""Returns a range of electron releases that have not reached end-of-life yet"""
releases_json = json.loads(
@@ -56,6 +56,7 @@
# dependency here. Set to false and provide rustfmt in nativeBuildInputs, if you need it, e.g.
# if you include the generated code in the output via postInstall.
, useFakeRustfmt ? true
, usePgTestCheckFeature ? true
, ...
} @ args:
let
@@ -96,7 +97,7 @@ let
pg_ctl stop
'';
argsForBuildRustPackage = builtins.removeAttrs args [ "postgresql" "useFakeRustfmt" ];
argsForBuildRustPackage = builtins.removeAttrs args [ "postgresql" "useFakeRustfmt" "usePgTestCheckFeature" ];
# so we don't accidentally `(rustPlatform.buildRustPackage argsForBuildRustPackage) // { ... }` because
# we forgot parentheses
@@ -154,7 +155,7 @@ let
RUST_BACKTRACE = "full";
checkNoDefaultFeatures = true;
checkFeatures = (args.checkFeatures or [ ]) ++ [ "pg_test pg${pgrxPostgresMajor}" ];
checkFeatures = (args.checkFeatures or [ ]) ++ (lib.optionals usePgTestCheckFeature [ "pg_test" ]) ++ [ "pg${pgrxPostgresMajor}" ];
};
in
rustPlatform.buildRustPackage finalArgs
@@ -71,4 +71,10 @@ in
hash = "sha256-UHIfwOdXoJvR4Svha6ud0FxahP1wPwUtviUwUnTmLXU=";
cargoHash = "sha256-j4HnD8Zt9uhlV5N7ldIy9564o9qFEqs5KfXHmnQ1WEw=";
};
cargo-pgrx_0_12_0_alpha_1 = generic {
version = "0.12.0-alpha.1";
hash = "sha256-0m9oaqjU42RYyttkTihADDrRMjr2WoK/8sInZALeHws=";
cargoHash = "sha256-9XTIcpoCnROP63ZTDgMMMmj0kPggiTazKlKQfCgXKzk=";
};
}
@@ -2,7 +2,7 @@
lib,
stdenv,
stdenvNoCC,
stdenvNoLibc,
stdenvNoLibs,
overrideCC,
buildPackages,
stdenvNoLibcxx ? overrideCC stdenv buildPackages.llvmPackages.clangNoLibcxx,
@@ -28,7 +28,7 @@ lib.makeOverridable (
if attrs.noCC or false then
stdenvNoCC
else if attrs.noLibc or false then
stdenvNoLibc
stdenvNoLibs
else if attrs.noLibcxx or false then
stdenvNoLibcxx
else
+18 -11
View File
@@ -185,20 +185,27 @@ installPhase() {
patchelf --set-rpath "$out/lib:$libPath" "$libname"
fi
libname_short=`echo -n "$libname" | sed 's/so\..*/so/'`
# Manually create the right symlinks for the libraries.
#
# We can't just use ldconfig, because it does not create libfoo.so symlinks,
# only libfoo.so.1.
# Also, the symlink chain must be libfoo.so -> libfoo.so.1 -> libfoo.so.123.45,
# or ldconfig will explode.
# See: https://github.com/bminor/glibc/blob/6f3f6c506cdaf981a4374f1f12863b98ac7fea1a/elf/ldconfig.c#L854-L877
if [[ "$libname" != "$libname_short" ]]; then
ln -srnf "$libname" "$libname_short"
fi
libbase=$(basename "$libname")
libdir=$(dirname "$libname")
soname=$(patchelf --print-soname "$libname")
unversioned=${libbase/\.so\.[0-9\.]*/.so}
if [[ $libname_short =~ libEGL.so || $libname_short =~ libEGL_nvidia.so || $libname_short =~ libGLX.so || $libname_short =~ libGLX_nvidia.so ]]; then
major=0
else
major=1
fi
if [[ -n "$soname" ]]; then
if [[ "$soname" != "$libbase" ]]; then
ln -s "$libbase" "$libdir/$soname"
fi
if [[ "$libname" != "$libname_short.$major" ]]; then
ln -srnf "$libname" "$libname_short.$major"
if [[ "$soname" != "$unversioned" ]]; then
ln -s "$soname" "$libdir/$unversioned"
fi
fi
done
+1
View File
@@ -27,6 +27,7 @@ stdenv.mkDerivation rec {
ps.gevent-websocket
ps.pillow
ps.setuptools
ps.psycopg2
]))
] ++ runtimeProgDeps;
@@ -4,16 +4,16 @@ index 8d822e5..8b7e371 100644
+++ b/crates/c/build.rs
@@ -1,9 +1,13 @@
fn main() {
println!("cargo:rerun-if-changed=src/c.h");
println!("cargo:rerun-if-changed=src/c.c");
println!("cargo:rerun-if-changed=src/f16.h");
println!("cargo:rerun-if-changed=src/f16.c");
+ println!("cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS");
cc::Build::new()
- .compiler("clang-16")
+ .compiler("@clang@")
.file("./src/c.c")
.file("./src/f16.c")
+ // read env var set by rustPlatform.bindgenHook
+ .try_flags_from_environment("BINDGEN_EXTRA_CLANG_ARGS")
+ .expect("the BINDGEN_EXTRA_CLANG_ARGS environment variable must be specified and UTF-8")
.opt_level(3)
.debug(true)
.compile("pgvectorsc");
.compile("vectorsc");
@@ -1,25 +0,0 @@
diff --git a/Cargo.lock b/Cargo.lock
index a52b978..092bc1d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2788,7 +2788,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
[[package]]
name = "std_detect"
version = "0.1.5"
-source = "git+https://github.com/tensorchord/stdarch.git?branch=avx512fp16#db0cdbc9b02074bfddabfd23a4a681f21640eada"
+source = "git+https://github.com/rust-lang/stdarch.git?branch=master#d2b1a070afc72d9ba4df80e055109ede5fc0a81f"
dependencies = [
"cfg-if",
"libc",
diff --git a/crates/detect/Cargo.toml b/crates/detect/Cargo.toml
index b3ac782..c671c6a 100644
--- a/crates/detect/Cargo.toml
+++ b/crates/detect/Cargo.toml
@@ -4,6 +4,6 @@ version.workspace = true
edition.workspace = true
[dependencies]
-std_detect = { git = "https://github.com/tensorchord/stdarch.git", branch = "avx512fp16" }
+std_detect = { git = "https://github.com/rust-lang/stdarch.git", branch = "master" }
ctor = "0.2.6"
rustix.workspace = true
File diff suppressed because it is too large Load Diff
@@ -1,6 +1,6 @@
{ lib
, buildPgrxExtension
, cargo-pgrx_0_11_2
, cargo-pgrx_0_12_0_alpha_1
, clang_16
, fetchFromGitHub
, nix-update-script
@@ -27,13 +27,13 @@ in
# Upstream only works with a fixed version of cargo-pgrx for each release,
# so we're pinning it here to avoid future incompatibility.
# See https://docs.pgvecto.rs/developers/development.html#environment, step 6
cargo-pgrx = cargo-pgrx_0_11_2;
cargo-pgrx = cargo-pgrx_0_12_0_alpha_1;
rustPlatform = rustPlatform';
}) rec {
inherit postgresql;
pname = "pgvecto-rs";
version = "0.2.1";
version = "0.3.0";
buildInputs = [ openssl ];
nativeBuildInputs = [ pkg-config ];
@@ -44,17 +44,13 @@ in
src = ./0001-read-clang-flags-from-environment.diff;
clang = lib.getExe clang;
})
# Fix build failure on rustc 1.78 due to missing feature flag.
# Can (likely) be removed when pgvecto-rs 0.3.0 is released.
# See https://github.com/NixOS/nixpkgs/issues/320131
./0002-std-detect-use-upstream.diff
];
src = fetchFromGitHub {
owner = "tensorchord";
repo = "pgvecto.rs";
rev = "v${version}";
hash = "sha256-kwaGHerEVh6Oxb9jQupSapm7CsKl5CoH6jCv+zbi4FE=";
hash = "sha256-X7BY2Exv0xQNhsS/GA7GNvj9OeVDqVCd/k3lUkXtfgE=";
};
# Package has git dependencies on Cargo.lock (instead of just crate.io dependencies),
@@ -62,8 +58,7 @@ in
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"openai_api_rust-0.1.8" = "sha256-os5Y8KIWXJEYEcNzzT57wFPpEXdZ2Uy9W3j5+hJhhR4=";
"std_detect-0.1.5" = "sha256-Rsy8N0pTJ/3AIHjRyeOeyY7Q9Ho46ZcDmJFurCbRxiQ=";
"pgrx-0.12.0-alpha.1" = "sha256-HSQrAR9DFJsi4ZF4hLiJ1sIy+M9Ygva2+WxeUzflOLk=";
};
};
@@ -86,6 +81,9 @@ in
RUSTC_BOOTSTRAP = 1;
};
# This crate does not have the "pg_test" feature
usePgTestCheckFeature = false;
passthru = {
updateScript = nix-update-script { };
tests = {
@@ -94,11 +92,8 @@ in
};
meta = with lib; {
# The pgrx 0.11.2 dependency is broken in aarch64-linux: https://github.com/pgcentralfoundation/pgrx/issues/1429
# It is fixed in pgrx 0.11.3, but upstream is still using pgrx 0.11.2
# Additionally, upstream (accidentally) broke support for PostgreSQL 12 and 13 on 0.2.1, but
# they are removing it in 0.3.0 either way: https://github.com/tensorchord/pgvecto.rs/issues/343
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin || (versionOlder postgresql.version "14");
# Upstream removed support for PostgreSQL 12 and 13 on 0.3.0: https://github.com/tensorchord/pgvecto.rs/issues/343
broken = stdenv.isDarwin || (versionOlder postgresql.version "14");
description = "Scalable, Low-latency and Hybrid-enabled Vector Search in Postgres";
homepage = "https://github.com/tensorchord/pgvecto.rs";
license = licenses.asl20;
+5 -5
View File
@@ -1,17 +1,17 @@
{ lib, fetchzip, buildGoModule, nixosTests }:
{ lib, fetchzip, buildGo123Module, nixosTests }:
buildGoModule rec {
buildGo123Module rec {
pname = "traefik";
version = "3.1.2";
version = "3.1.4";
# Archive with static assets for webui
src = fetchzip {
url = "https://github.com/traefik/traefik/releases/download/v${version}/traefik-v${version}.src.tar.gz";
hash = "sha256-PHS4x9RDoc2zDPS1SaYYEeZVa4SyQpvqzPT/SDo1ygg=";
hash = "sha256-e77PCMeN6Ck6hQ3Rx7MU4EL+f/1kpA2E+gVcISoUnf4=";
stripRoot = false;
};
vendorHash = "sha256-xQPDlwu/mRdyvZW0qSCA9eko9pOQAMwh2vVJWzMnyfs=";
vendorHash = "sha256-iYwA/y9AuHomyEckOyl4845lkQkeBAFDsGiZWESylqs=";
subPackages = [ "cmd/traefik" ];
-70
View File
@@ -1,70 +0,0 @@
{ lib
, buildNpmPackage
, fetchFromGitHub
, testers
}:
let
version = "2.2.15";
src = fetchFromGitHub {
owner = "immich-app";
repo = "immich";
# Using a fixed commit until upstream has release tags for cli.
rev = "f7bfde6a3286d4b454c2f05ccf354914f8eccac6";
hash = "sha256-O014Y2HwhfPqKKFFGtNDJBzCaR6ugI4azw6/kfzKET0=";
};
meta' = {
description = "CLI utilities for Immich to help upload images and videos";
homepage = "https://github.com/immich-app/immich";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ felschr pineapplehunter ];
mainProgram = "immich";
};
open-api-typescript-sdk = buildNpmPackage {
pname = "immich-cli-openapi-typescript-sdk";
inherit src version;
npmDepsHash = "sha256-rIN88xw8kdLfhFbT4OReTwzWqNlD4QVAAuvfMyda+V8=";
postPatch = ''
cd open-api/typescript-sdk
'';
meta = {
# using inherit for `builtin.unsafeGetAttrPos` to work correctly
inherit (meta')
description
homepage
license
maintainers;
};
};
immich-cli = buildNpmPackage {
pname = "immich-cli";
inherit src version;
npmDepsHash = "sha256-r/kCE6FmhbnMVv2Z76hH/1O1YEYSq9VY5kB0xlqWzaM=";
postPatch = ''
ln -sv ${open-api-typescript-sdk}/lib/node_modules/@immich/sdk/{build,node_modules} open-api/typescript-sdk
cd cli
'';
passthru = {
inherit open-api-typescript-sdk;
tests.version = testers.testVersion { package = immich-cli; };
};
meta = {
# using inherit for `builtin.unsafeGetAttrPos` to work correctly
inherit (meta')
description
homepage
license
maintainers
mainProgram;
};
};
in
immich-cli
+1 -1
View File
@@ -27,7 +27,7 @@ stdenv.mkDerivation {
outputs = [ "out" "info" ]; # the man pages are rather small
nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ];
buildInputs = [ pcre2 libiconv runtimeShellPackage ];
buildInputs = [ pcre2 libiconv ] ++ lib.optional (!stdenv.hostPlatform.isWindows) runtimeShellPackage;
# cygwin: FAIL: multibyte-white-space
# freebsd: FAIL mb-non-UTF8-performance
+13 -3
View File
@@ -1306,10 +1306,21 @@ with pkgs;
substituteAllFiles = callPackage ../build-support/substitute-files/substitute-all-files.nix { };
replaceDependency = callPackage ../build-support/replace-dependency.nix { };
replaceDependencies = callPackage ../build-support/replace-dependencies.nix { };
replaceDependency = { drv, oldDependency, newDependency, verbose ? true }: replaceDependencies {
inherit drv verbose;
replacements = [{
inherit oldDependency newDependency;
}];
# When newDependency depends on drv, instead of causing infinite recursion, keep it as is.
cutoffPackages = [ newDependency ];
};
replaceVars = callPackage ../build-support/replace-vars { };
replaceDirectDependencies = callPackage ../build-support/replace-direct-dependencies.nix { };
nukeReferences = callPackage ../build-support/nuke-references {
inherit (darwin) signingUtils;
};
@@ -1796,8 +1807,6 @@ with pkgs;
hyperpotamus = callPackage ../tools/misc/hyperpotamus { };
immich-cli = callPackage ../tools/misc/immich-cli { };
inherit (callPackages ../tools/networking/ivpn/default.nix {}) ivpn ivpn-service;
jobber = callPackage ../tools/system/jobber { };
@@ -15734,6 +15743,7 @@ with pkgs;
cargo-pgrx_0_10_2
cargo-pgrx_0_11_2
cargo-pgrx_0_11_3
cargo-pgrx_0_12_0_alpha_1
;
cargo-pgrx = cargo-pgrx_0_11_2;
+4
View File
@@ -689,6 +689,8 @@ let
httpaf-lwt-unix = callPackage ../development/ocaml-modules/httpaf/lwt-unix.nix { };
httpun-types = callPackage ../development/ocaml-modules/httpun/types.nix { };
hxd = callPackage ../development/ocaml-modules/hxd { };
### I ###
@@ -1177,6 +1179,8 @@ let
mirage-vnetif = callPackage ../development/ocaml-modules/mirage-vnetif { };
mlbdd = callPackage ../development/ocaml-modules/mlbdd { };
mldoc = callPackage ../development/ocaml-modules/mldoc { };
mlgmpidl = callPackage ../development/ocaml-modules/mlgmpidl { };