mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 07:15:54 +03:00
Merge master into staging-next
This commit is contained in:
commit
20c720272e
5
.github/CODEOWNERS
vendored
5
.github/CODEOWNERS
vendored
@ -159,7 +159,6 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @raitobezarius @ma27
|
||||
|
||||
# C compilers
|
||||
/pkgs/development/compilers/gcc
|
||||
/pkgs/development/compilers/llvm @RaitoBezarius
|
||||
/pkgs/development/compilers/emscripten @raitobezarius
|
||||
/doc/languages-frameworks/emscripten.section.md @raitobezarius
|
||||
|
||||
@ -204,10 +203,6 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
|
||||
/nixos/modules/services/databases/postgresql.nix @thoughtpolice
|
||||
/nixos/tests/postgresql.nix @thoughtpolice
|
||||
|
||||
# Linux kernel
|
||||
/pkgs/os-specific/linux/kernel @raitobezarius
|
||||
/pkgs/top-level/linux-kernels.nix @raitobezarius
|
||||
|
||||
# Hardened profile & related modules
|
||||
/nixos/modules/profiles/hardened.nix @joachifm
|
||||
/nixos/modules/security/hidepid.nix @joachifm
|
||||
|
@ -18090,6 +18090,16 @@
|
||||
github = "silky";
|
||||
githubId = 129525;
|
||||
};
|
||||
sils = {
|
||||
name = "Silas Schöffel";
|
||||
email = "sils@sils.li";
|
||||
matrix = "@sils:vhack.eu";
|
||||
github = "s1ls";
|
||||
githubId = 91412114;
|
||||
keys = [{
|
||||
fingerprint = "C1DA A551 B422 7A6F 3FD9 6B3A 467B 7D12 9EA7 3AC9";
|
||||
}];
|
||||
};
|
||||
Silver-Golden = {
|
||||
name = "Brendan Golden";
|
||||
email = "github+nixpkgs@brendan.ie";
|
||||
|
@ -559,7 +559,6 @@ with lib.maintainers; {
|
||||
ericson2314
|
||||
lovek323
|
||||
qyliss
|
||||
raitobezarius
|
||||
RossComputerGuy
|
||||
rrbutani
|
||||
sternenseemann
|
||||
|
@ -107,6 +107,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
|
||||
|
||||
- [transfer-sh](https://github.com/dutchcoders/transfer.sh), a tool that supports easy and fast file sharing from the command-line. Available as [services.transfer-sh](#opt-services.transfer-sh.enable).
|
||||
|
||||
- [MollySocket](https://github.com/mollyim/mollysocket) which allows getting Signal notifications via UnifiedPush.
|
||||
|
||||
- [Suwayomi Server](https://github.com/Suwayomi/Suwayomi-Server), a free and open source manga reader server that runs extensions built for [Tachiyomi](https://tachiyomi.org). Available as [services.suwayomi-server](#opt-services.suwayomi-server.enable).
|
||||
|
||||
- [ping_exporter](https://github.com/czerwonk/ping_exporter), a Prometheus exporter for ICMP echo requests. Available as [services.prometheus.exporters.ping](#opt-services.prometheus.exporters.ping.enable).
|
||||
|
@ -728,6 +728,7 @@
|
||||
./services/misc/mbpfan.nix
|
||||
./services/misc/mediatomb.nix
|
||||
./services/misc/metabase.nix
|
||||
./services/misc/mollysocket.nix
|
||||
./services/misc/moonraker.nix
|
||||
./services/misc/mqtt2influxdb.nix
|
||||
./services/misc/n8n.nix
|
||||
|
@ -9,6 +9,7 @@ in {
|
||||
options = {
|
||||
services.roon-server = {
|
||||
enable = mkEnableOption (lib.mdDoc "Roon Server");
|
||||
package = lib.mkPackageOption pkgs "roon-server" { };
|
||||
openFirewall = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
@ -43,7 +44,7 @@ in {
|
||||
environment.ROON_ID_DIR = "/var/lib/${name}";
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.roon-server}/bin/RoonServer";
|
||||
ExecStart = "${lib.getExe cfg.package}";
|
||||
LimitNOFILE = 8192;
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
|
133
nixos/modules/services/misc/mollysocket.nix
Normal file
133
nixos/modules/services/misc/mollysocket.nix
Normal file
@ -0,0 +1,133 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) getExe mkIf mkOption mkEnableOption optionals types;
|
||||
|
||||
cfg = config.services.mollysocket;
|
||||
configuration = format.generate "mollysocket.conf" cfg.settings;
|
||||
format = pkgs.formats.toml { };
|
||||
package = pkgs.writeShellScriptBin "mollysocket" ''
|
||||
MOLLY_CONF=${configuration} exec ${getExe pkgs.mollysocket} "$@"
|
||||
'';
|
||||
in {
|
||||
options.services.mollysocket = {
|
||||
enable = mkEnableOption ''
|
||||
[MollySocket](https://github.com/mollyim/mollysocket) for getting Signal
|
||||
notifications via UnifiedPush
|
||||
'';
|
||||
|
||||
settings = mkOption {
|
||||
default = { };
|
||||
description = ''
|
||||
Configuration for MollySocket. Available options are listed
|
||||
[here](https://github.com/mollyim/mollysocket#configuration).
|
||||
'';
|
||||
type = types.submodule {
|
||||
freeformType = format.type;
|
||||
options = {
|
||||
host = mkOption {
|
||||
default = "127.0.0.1";
|
||||
description = "Listening address of the web server";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
default = 8020;
|
||||
description = "Listening port of the web server";
|
||||
type = types.port;
|
||||
};
|
||||
|
||||
allowed_endpoints = mkOption {
|
||||
default = [ "*" ];
|
||||
description = "List of UnifiedPush servers";
|
||||
example = [ "https://ntfy.sh" ];
|
||||
type = with types; listOf str;
|
||||
};
|
||||
|
||||
allowed_uuids = mkOption {
|
||||
default = [ "*" ];
|
||||
description = "UUIDs of Signal accounts that may use this server";
|
||||
example = [ "abcdef-12345-tuxyz-67890" ];
|
||||
type = with types; listOf str;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environmentFile = mkOption {
|
||||
default = null;
|
||||
description = ''
|
||||
Environment file (see {manpage}`systemd.exec(5)` "EnvironmentFile="
|
||||
section for the syntax) passed to the service. This option can be
|
||||
used to safely include secrets in the configuration.
|
||||
'';
|
||||
example = "/run/secrets/mollysocket";
|
||||
type = with types; nullOr path;
|
||||
};
|
||||
|
||||
logLevel = mkOption {
|
||||
default = "info";
|
||||
description = "Set the {env}`RUST_LOG` environment variable";
|
||||
example = "debug";
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
package
|
||||
];
|
||||
|
||||
# see https://github.com/mollyim/mollysocket/blob/main/mollysocket.service
|
||||
systemd.services.mollysocket = {
|
||||
description = "MollySocket";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
environment.RUST_LOG = cfg.logLevel;
|
||||
serviceConfig = let
|
||||
capabilities = [ "" ] ++ optionals (cfg.settings.port < 1024) [ "CAP_NET_BIND_SERVICE" ];
|
||||
in {
|
||||
EnvironmentFile = cfg.environmentFile;
|
||||
ExecStart = "${getExe package} server";
|
||||
KillSignal = "SIGINT";
|
||||
Restart = "on-failure";
|
||||
StateDirectory = "mollysocket";
|
||||
TimeoutStopSec = 5;
|
||||
WorkingDirectory = "/var/lib/mollysocket";
|
||||
|
||||
# hardening
|
||||
AmbientCapabilities = capabilities;
|
||||
CapabilityBoundingSet = capabilities;
|
||||
DevicePolicy = "closed";
|
||||
DynamicUser = true;
|
||||
LockPersonality = true;
|
||||
MemoryDenyWriteExecute = true;
|
||||
NoNewPrivileges = true;
|
||||
PrivateDevices = true;
|
||||
PrivateTmp = true;
|
||||
PrivateUsers = true;
|
||||
ProcSubset = "pid";
|
||||
ProtectClock = true;
|
||||
ProtectControlGroups = true;
|
||||
ProtectHome = true;
|
||||
ProtectHostname = true;
|
||||
ProtectKernelLogs = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectProc = "invisible";
|
||||
ProtectSystem = "strict";
|
||||
RemoveIPC = true;
|
||||
RestrictAddressFamilies = [ "AF_INET" "AF_INET6" ];
|
||||
RestrictNamespaces = true;
|
||||
RestrictRealtime = true;
|
||||
RestrictSUIDSGID = true;
|
||||
SystemCallArchitectures = "native";
|
||||
SystemCallFilter = [ "@system-service" "~@resources" "~@privileged" ];
|
||||
UMask = "0077";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ dotlambda ];
|
||||
}
|
@ -61,18 +61,16 @@ let
|
||||
eval -- "\$@"
|
||||
'';
|
||||
|
||||
peertubeCli = pkgs.writeShellScriptBin "peertube" ''
|
||||
node ~/dist/server/tools/peertube.js $@
|
||||
nginxCommonHeaders = lib.optionalString config.services.nginx.virtualHosts.${cfg.localDomain}.forceSSL ''
|
||||
add_header Strict-Transport-Security 'max-age=31536000';
|
||||
'' + lib.optionalString (config.services.nginx.virtualHosts.${cfg.localDomain}.quic && config.services.nginx.virtualHosts.${cfg.localDomain}.http3) ''
|
||||
add_header Alt-Svc 'h3=":$server_port"; ma=604800';
|
||||
'';
|
||||
|
||||
nginxCommonHeaders = lib.optionalString cfg.enableWebHttps ''
|
||||
add_header Strict-Transport-Security 'max-age=63072000; includeSubDomains';
|
||||
'' + lib.optionalString config.services.nginx.virtualHosts.${cfg.localDomain}.http3 ''
|
||||
add_header Alt-Svc 'h3=":443"; ma=86400';
|
||||
'' + ''
|
||||
add_header Access-Control-Allow-Origin '*';
|
||||
add_header Access-Control-Allow-Methods 'GET, OPTIONS';
|
||||
add_header Access-Control-Allow-Headers 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
|
||||
nginxCommonHeadersExtra = ''
|
||||
add_header Access-Control-Allow-Origin '*';
|
||||
add_header Access-Control-Allow-Methods 'GET, OPTIONS';
|
||||
add_header Access-Control-Allow-Headers 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
|
||||
'';
|
||||
|
||||
in {
|
||||
@ -330,6 +328,8 @@ in {
|
||||
}
|
||||
];
|
||||
|
||||
environment.systemPackages = [ cfg.package.cli ];
|
||||
|
||||
services.peertube.settings = lib.mkMerge [
|
||||
{
|
||||
listen = {
|
||||
@ -355,12 +355,13 @@ in {
|
||||
tmp_persistent = lib.mkDefault "/var/lib/peertube/storage/tmp_persistent/";
|
||||
bin = lib.mkDefault "/var/lib/peertube/storage/bin/";
|
||||
avatars = lib.mkDefault "/var/lib/peertube/storage/avatars/";
|
||||
videos = lib.mkDefault "/var/lib/peertube/storage/videos/";
|
||||
web_videos = lib.mkDefault "/var/lib/peertube/storage/web-videos/";
|
||||
streaming_playlists = lib.mkDefault "/var/lib/peertube/storage/streaming-playlists/";
|
||||
redundancy = lib.mkDefault "/var/lib/peertube/storage/redundancy/";
|
||||
logs = lib.mkDefault "/var/lib/peertube/storage/logs/";
|
||||
previews = lib.mkDefault "/var/lib/peertube/storage/previews/";
|
||||
thumbnails = lib.mkDefault "/var/lib/peertube/storage/thumbnails/";
|
||||
storyboards = lib.mkDefault "/var/lib/peertube/storage/storyboards/";
|
||||
torrents = lib.mkDefault "/var/lib/peertube/storage/torrents/";
|
||||
captions = lib.mkDefault "/var/lib/peertube/storage/captions/";
|
||||
cache = lib.mkDefault "/var/lib/peertube/storage/cache/";
|
||||
@ -428,7 +429,7 @@ in {
|
||||
|
||||
environment = env;
|
||||
|
||||
path = with pkgs; [ bashInteractive ffmpeg nodejs_18 openssl yarn python3 ];
|
||||
path = with pkgs; [ nodejs_18 yarn ffmpeg-headless openssl ];
|
||||
|
||||
script = ''
|
||||
#!/bin/sh
|
||||
@ -456,7 +457,7 @@ in {
|
||||
ln -sf ${cfg.package}/config/default.yaml /var/lib/peertube/config/default.yaml
|
||||
ln -sf ${cfg.package}/client/dist -T /var/lib/peertube/www/client
|
||||
ln -sf ${cfg.settings.storage.client_overrides} -T /var/lib/peertube/www/client-overrides
|
||||
npm start
|
||||
node dist/server
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
@ -488,6 +489,9 @@ in {
|
||||
|
||||
services.nginx = lib.mkIf cfg.configureNginx {
|
||||
enable = true;
|
||||
upstreams."peertube".servers = {
|
||||
"127.0.0.1:${toString cfg.listenHttp}".fail_timeout = "0";
|
||||
};
|
||||
virtualHosts."${cfg.localDomain}" = {
|
||||
root = "/var/lib/peertube/www";
|
||||
|
||||
@ -497,14 +501,14 @@ in {
|
||||
priority = 1110;
|
||||
};
|
||||
|
||||
locations."= /api/v1/videos/upload-resumable" = {
|
||||
locations."~ ^/api/v1/videos/(upload-resumable|([^/]+/source/replace-resumable))$" = {
|
||||
tryFiles = "/dev/null @api";
|
||||
priority = 1120;
|
||||
|
||||
extraConfig = ''
|
||||
client_max_body_size 0;
|
||||
proxy_request_buffering off;
|
||||
'';
|
||||
client_max_body_size 0;
|
||||
proxy_request_buffering off;
|
||||
'' + nginxCommonHeaders;
|
||||
};
|
||||
|
||||
locations."~ ^/api/v1/videos/(upload|([^/]+/studio/edit))$" = {
|
||||
@ -513,13 +517,11 @@ in {
|
||||
priority = 1130;
|
||||
|
||||
extraConfig = ''
|
||||
client_max_body_size 12G;
|
||||
add_header X-File-Maximum-Size 8G always;
|
||||
'' + lib.optionalString cfg.enableWebHttps ''
|
||||
add_header Strict-Transport-Security 'max-age=63072000; includeSubDomains';
|
||||
'' + lib.optionalString config.services.nginx.virtualHosts.${cfg.localDomain}.http3 ''
|
||||
add_header Alt-Svc 'h3=":443"; ma=86400';
|
||||
'';
|
||||
limit_except POST HEAD { deny all; }
|
||||
|
||||
client_max_body_size 12G;
|
||||
add_header X-File-Maximum-Size 8G always;
|
||||
'' + nginxCommonHeaders;
|
||||
};
|
||||
|
||||
locations."~ ^/api/v1/runners/jobs/[^/]+/(update|success)$" = {
|
||||
@ -528,13 +530,9 @@ in {
|
||||
priority = 1135;
|
||||
|
||||
extraConfig = ''
|
||||
client_max_body_size 12G;
|
||||
add_header X-File-Maximum-Size 8G always;
|
||||
'' + lib.optionalString cfg.enableWebHttps ''
|
||||
add_header Strict-Transport-Security 'max-age=63072000; includeSubDomains';
|
||||
'' + lib.optionalString config.services.nginx.virtualHosts.${cfg.localDomain}.http3 ''
|
||||
add_header Alt-Svc 'h3=":443"; ma=86400';
|
||||
'';
|
||||
client_max_body_size 12G;
|
||||
add_header X-File-Maximum-Size 8G always;
|
||||
'' + nginxCommonHeaders;
|
||||
};
|
||||
|
||||
locations."~ ^/api/v1/(videos|video-playlists|video-channels|users/me)" = {
|
||||
@ -542,32 +540,28 @@ in {
|
||||
priority = 1140;
|
||||
|
||||
extraConfig = ''
|
||||
client_max_body_size 6M;
|
||||
add_header X-File-Maximum-Size 4M always;
|
||||
'' + lib.optionalString cfg.enableWebHttps ''
|
||||
add_header Strict-Transport-Security 'max-age=63072000; includeSubDomains';
|
||||
'' + lib.optionalString config.services.nginx.virtualHosts.${cfg.localDomain}.http3 ''
|
||||
add_header Alt-Svc 'h3=":443"; ma=86400';
|
||||
'';
|
||||
client_max_body_size 6M;
|
||||
add_header X-File-Maximum-Size 4M always;
|
||||
'' + nginxCommonHeaders;
|
||||
};
|
||||
|
||||
locations."@api" = {
|
||||
proxyPass = "http://127.0.0.1:${toString cfg.listenHttp}";
|
||||
proxyPass = "http://peertube";
|
||||
priority = 1150;
|
||||
|
||||
extraConfig = ''
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
proxy_connect_timeout 10m;
|
||||
proxy_connect_timeout 10m;
|
||||
|
||||
proxy_send_timeout 10m;
|
||||
proxy_read_timeout 10m;
|
||||
proxy_send_timeout 10m;
|
||||
proxy_read_timeout 10m;
|
||||
|
||||
client_max_body_size 100k;
|
||||
send_timeout 10m;
|
||||
'';
|
||||
client_max_body_size 100k;
|
||||
send_timeout 10m;
|
||||
''+ nginxCommonHeaders;
|
||||
};
|
||||
|
||||
# Websocket
|
||||
@ -581,7 +575,7 @@ in {
|
||||
priority = 1220;
|
||||
|
||||
extraConfig = ''
|
||||
proxy_read_timeout 15m;
|
||||
proxy_read_timeout 15m;
|
||||
'';
|
||||
};
|
||||
|
||||
@ -591,84 +585,82 @@ in {
|
||||
};
|
||||
|
||||
locations."@api_websocket" = {
|
||||
proxyPass = "http://127.0.0.1:${toString cfg.listenHttp}";
|
||||
proxyPass = "http://peertube";
|
||||
priority = 1240;
|
||||
|
||||
extraConfig = ''
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
'';
|
||||
'' + nginxCommonHeaders;
|
||||
};
|
||||
|
||||
# Bypass PeerTube for performance reasons.
|
||||
locations."~ ^/client/(assets/images/(icons/icon-36x36\.png|icons/icon-48x48\.png|icons/icon-72x72\.png|icons/icon-96x96\.png|icons/icon-144x144\.png|icons/icon-192x192\.png|icons/icon-512x512\.png|logo\.svg|favicon\.png|default-playlist\.jpg|default-avatar-account\.png|default-avatar-account-48x48\.png|default-avatar-video-channel\.png|default-avatar-video-channel-48x48\.png))$" = {
|
||||
tryFiles = "/client-overrides/$1 /client/$1 $1";
|
||||
priority = 1310;
|
||||
|
||||
extraConfig = nginxCommonHeaders;
|
||||
};
|
||||
|
||||
locations."~ ^/client/(.*\.(js|css|png|svg|woff2|otf|ttf|woff|eot))$" = {
|
||||
alias = "${cfg.package}/client/dist/$1";
|
||||
priority = 1320;
|
||||
extraConfig = ''
|
||||
add_header Cache-Control 'public, max-age=604800, immutable';
|
||||
'' + lib.optionalString cfg.enableWebHttps ''
|
||||
add_header Strict-Transport-Security 'max-age=63072000; includeSubDomains';
|
||||
'' + lib.optionalString config.services.nginx.virtualHosts.${cfg.localDomain}.http3 ''
|
||||
add_header Alt-Svc 'h3=":443"; ma=86400';
|
||||
'';
|
||||
add_header Cache-Control 'public, max-age=604800, immutable';
|
||||
'' + nginxCommonHeaders;
|
||||
};
|
||||
|
||||
locations."^~ /download/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString cfg.listenHttp}";
|
||||
proxyPass = "http://peertube";
|
||||
priority = 1410;
|
||||
extraConfig = ''
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
proxy_limit_rate 5M;
|
||||
'';
|
||||
proxy_limit_rate 5M;
|
||||
'' + nginxCommonHeaders;
|
||||
};
|
||||
|
||||
locations."^~ /static/streaming-playlists/private/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString cfg.listenHttp}";
|
||||
locations."^~ /static/streaming-playlists/hls/private/" = {
|
||||
proxyPass = "http://peertube";
|
||||
priority = 1420;
|
||||
extraConfig = ''
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
proxy_limit_rate 5M;
|
||||
'';
|
||||
proxy_limit_rate 5M;
|
||||
'' + nginxCommonHeaders;
|
||||
};
|
||||
|
||||
locations."^~ /static/web-videos/private/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString cfg.listenHttp}";
|
||||
proxyPass = "http://peertube";
|
||||
priority = 1430;
|
||||
extraConfig = ''
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
proxy_limit_rate 5M;
|
||||
'';
|
||||
proxy_limit_rate 5M;
|
||||
'' + nginxCommonHeaders;
|
||||
};
|
||||
|
||||
locations."^~ /static/webseed/private/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString cfg.listenHttp}";
|
||||
proxyPass = "http://peertube";
|
||||
priority = 1440;
|
||||
extraConfig = ''
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
proxy_limit_rate 5M;
|
||||
'';
|
||||
proxy_limit_rate 5M;
|
||||
'' + nginxCommonHeaders;
|
||||
};
|
||||
|
||||
locations."^~ /static/redundancy/" = {
|
||||
@ -676,33 +668,35 @@ in {
|
||||
root = cfg.settings.storage.redundancy;
|
||||
priority = 1450;
|
||||
extraConfig = ''
|
||||
set $peertube_limit_rate 800k;
|
||||
set $peertube_limit_rate 800k;
|
||||
|
||||
if ($request_uri ~ -fragmented.mp4$) {
|
||||
set $peertube_limit_rate 5M;
|
||||
set $peertube_limit_rate 5M;
|
||||
}
|
||||
|
||||
if ($request_method = 'OPTIONS') {
|
||||
${nginxCommonHeaders}
|
||||
add_header Access-Control-Max-Age 1728000;
|
||||
add_header Content-Type 'text/plain charset=UTF-8';
|
||||
add_header Content-Length 0;
|
||||
return 204;
|
||||
${nginxCommonHeadersExtra}
|
||||
add_header Access-Control-Max-Age 1728000;
|
||||
add_header Content-Type 'text/plain charset=UTF-8';
|
||||
add_header Content-Length 0;
|
||||
return 204;
|
||||
}
|
||||
if ($request_method = 'GET') {
|
||||
${nginxCommonHeaders}
|
||||
${nginxCommonHeadersExtra}
|
||||
|
||||
access_log off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
aio threads;
|
||||
sendfile on;
|
||||
sendfile_max_chunk 1M;
|
||||
aio threads;
|
||||
sendfile on;
|
||||
sendfile_max_chunk 1M;
|
||||
|
||||
limit_rate $peertube_limit_rate;
|
||||
limit_rate_after 5M;
|
||||
limit_rate $peertube_limit_rate;
|
||||
limit_rate_after 5M;
|
||||
|
||||
rewrite ^/static/redundancy/(.*)$ /$1 break;
|
||||
rewrite ^/static/redundancy/(.*)$ /$1 break;
|
||||
'';
|
||||
};
|
||||
|
||||
@ -711,109 +705,111 @@ in {
|
||||
root = cfg.settings.storage.streaming_playlists;
|
||||
priority = 1460;
|
||||
extraConfig = ''
|
||||
set $peertube_limit_rate 800k;
|
||||
set $peertube_limit_rate 800k;
|
||||
|
||||
if ($request_uri ~ -fragmented.mp4$) {
|
||||
set $peertube_limit_rate 5M;
|
||||
set $peertube_limit_rate 5M;
|
||||
}
|
||||
|
||||
if ($request_method = 'OPTIONS') {
|
||||
${nginxCommonHeaders}
|
||||
add_header Access-Control-Max-Age 1728000;
|
||||
add_header Content-Type 'text/plain charset=UTF-8';
|
||||
add_header Content-Length 0;
|
||||
return 204;
|
||||
${nginxCommonHeadersExtra}
|
||||
add_header Access-Control-Max-Age 1728000;
|
||||
add_header Content-Type 'text/plain charset=UTF-8';
|
||||
add_header Content-Length 0;
|
||||
return 204;
|
||||
}
|
||||
if ($request_method = 'GET') {
|
||||
${nginxCommonHeaders}
|
||||
${nginxCommonHeadersExtra}
|
||||
|
||||
access_log off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
aio threads;
|
||||
sendfile on;
|
||||
sendfile_max_chunk 1M;
|
||||
aio threads;
|
||||
sendfile on;
|
||||
sendfile_max_chunk 1M;
|
||||
|
||||
limit_rate $peertube_limit_rate;
|
||||
limit_rate_after 5M;
|
||||
limit_rate $peertube_limit_rate;
|
||||
limit_rate_after 5M;
|
||||
|
||||
rewrite ^/static/streaming-playlists/(.*)$ /$1 break;
|
||||
rewrite ^/static/streaming-playlists/(.*)$ /$1 break;
|
||||
'';
|
||||
};
|
||||
|
||||
locations."^~ /static/web-videos/" = {
|
||||
tryFiles = "$uri @api";
|
||||
root = cfg.settings.storage.streaming_playlists;
|
||||
root = cfg.settings.storage.web_videos;
|
||||
priority = 1470;
|
||||
extraConfig = ''
|
||||
set $peertube_limit_rate 800k;
|
||||
set $peertube_limit_rate 800k;
|
||||
|
||||
if ($request_uri ~ -fragmented.mp4$) {
|
||||
set $peertube_limit_rate 5M;
|
||||
set $peertube_limit_rate 5M;
|
||||
}
|
||||
|
||||
if ($request_method = 'OPTIONS') {
|
||||
${nginxCommonHeaders}
|
||||
add_header Access-Control-Max-Age 1728000;
|
||||
add_header Content-Type 'text/plain charset=UTF-8';
|
||||
add_header Content-Length 0;
|
||||
return 204;
|
||||
${nginxCommonHeadersExtra}
|
||||
add_header Access-Control-Max-Age 1728000;
|
||||
add_header Content-Type 'text/plain charset=UTF-8';
|
||||
add_header Content-Length 0;
|
||||
return 204;
|
||||
}
|
||||
if ($request_method = 'GET') {
|
||||
${nginxCommonHeaders}
|
||||
${nginxCommonHeadersExtra}
|
||||
|
||||
access_log off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
aio threads;
|
||||
sendfile on;
|
||||
sendfile_max_chunk 1M;
|
||||
aio threads;
|
||||
sendfile on;
|
||||
sendfile_max_chunk 1M;
|
||||
|
||||
limit_rate $peertube_limit_rate;
|
||||
limit_rate_after 5M;
|
||||
limit_rate $peertube_limit_rate;
|
||||
limit_rate_after 5M;
|
||||
|
||||
rewrite ^/static/streaming-playlists/(.*)$ /$1 break;
|
||||
rewrite ^/static/web-videos/(.*)$ /$1 break;
|
||||
'';
|
||||
};
|
||||
|
||||
locations."^~ /static/webseed/" = {
|
||||
tryFiles = "$uri @api";
|
||||
root = cfg.settings.storage.videos;
|
||||
root = cfg.settings.storage.web_videos;
|
||||
priority = 1480;
|
||||
extraConfig = ''
|
||||
set $peertube_limit_rate 800k;
|
||||
set $peertube_limit_rate 800k;
|
||||
|
||||
if ($request_uri ~ -fragmented.mp4$) {
|
||||
set $peertube_limit_rate 5M;
|
||||
set $peertube_limit_rate 5M;
|
||||
}
|
||||
|
||||
if ($request_method = 'OPTIONS') {
|
||||
${nginxCommonHeaders}
|
||||
add_header Access-Control-Max-Age 1728000;
|
||||
add_header Content-Type 'text/plain charset=UTF-8';
|
||||
add_header Content-Length 0;
|
||||
return 204;
|
||||
${nginxCommonHeadersExtra}
|
||||
add_header Access-Control-Max-Age 1728000;
|
||||
add_header Content-Type 'text/plain charset=UTF-8';
|
||||
add_header Content-Length 0;
|
||||
return 204;
|
||||
}
|
||||
if ($request_method = 'GET') {
|
||||
${nginxCommonHeaders}
|
||||
${nginxCommonHeadersExtra}
|
||||
|
||||
access_log off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
aio threads;
|
||||
sendfile on;
|
||||
sendfile_max_chunk 1M;
|
||||
aio threads;
|
||||
sendfile on;
|
||||
sendfile_max_chunk 1M;
|
||||
|
||||
limit_rate $peertube_limit_rate;
|
||||
limit_rate_after 5M;
|
||||
limit_rate $peertube_limit_rate;
|
||||
limit_rate_after 5M;
|
||||
|
||||
rewrite ^/static/webseed/(.*)$ /$1 break;
|
||||
rewrite ^/static/webseed/(.*)$ /web-videos/$1 break;
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = lib.optionalString cfg.enableWebHttps ''
|
||||
add_header Strict-Transport-Security 'max-age=63072000; includeSubDomains';
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
@ -848,7 +844,7 @@ in {
|
||||
home = cfg.package;
|
||||
};
|
||||
})
|
||||
(lib.attrsets.setAttrByPath [ cfg.user "packages" ] [ cfg.package peertubeEnv peertubeCli pkgs.ffmpeg pkgs.nodejs_18 pkgs.yarn ])
|
||||
(lib.attrsets.setAttrByPath [ cfg.user "packages" ] [ peertubeEnv pkgs.nodejs_18 pkgs.yarn pkgs.ffmpeg-headless ])
|
||||
(lib.mkIf cfg.redis.enableUnixSocket {${config.services.peertube.user}.extraGroups = [ "redis-peertube" ];})
|
||||
];
|
||||
|
||||
|
@ -543,6 +543,7 @@ in {
|
||||
mobilizon = handleTest ./mobilizon.nix {};
|
||||
mod_perl = handleTest ./mod_perl.nix {};
|
||||
molly-brown = handleTest ./molly-brown.nix {};
|
||||
mollysocket = handleTest ./mollysocket.nix { };
|
||||
monado = handleTest ./monado.nix {};
|
||||
monetdb = handleTest ./monetdb.nix {};
|
||||
monica = handleTest ./web-apps/monica.nix {};
|
||||
|
27
nixos/tests/mollysocket.nix
Normal file
27
nixos/tests/mollysocket.nix
Normal file
@ -0,0 +1,27 @@
|
||||
import ./make-test-python.nix ({ pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
port = 1234;
|
||||
in {
|
||||
name = "mollysocket";
|
||||
meta.maintainers = with lib.maintainers; [ dotlambda ];
|
||||
|
||||
nodes.mollysocket = { ... }: {
|
||||
services.mollysocket = {
|
||||
enable = true;
|
||||
settings = {
|
||||
inherit port;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
import json
|
||||
|
||||
mollysocket.wait_for_unit("mollysocket.service")
|
||||
mollysocket.wait_for_open_port(${toString port})
|
||||
|
||||
out = mollysocket.succeed("curl --fail http://127.0.0.1:${toString port}")
|
||||
assert json.loads(out)["mollysocket"]["version"] == "${toString pkgs.mollysocket.version}"
|
||||
'';
|
||||
})
|
@ -60,7 +60,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
# Need to run `nixos-rebuild` twice because the first run will install
|
||||
# GRUB anyway
|
||||
with subtest("Switch system again and install bootloader"):
|
||||
result = machine.succeed("nixos-rebuild switch --install-bootloader")
|
||||
result = machine.succeed("nixos-rebuild switch --install-bootloader 2>&1")
|
||||
# install-grub2.pl messages
|
||||
assert "updating GRUB 2 menu..." in result
|
||||
assert "installing the GRUB 2 boot loader on /dev/vda..." in result
|
||||
|
@ -17,16 +17,18 @@ import ../make-test-python.nix ({pkgs, ...}:
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
enableTCPIP = true;
|
||||
ensureDatabases = [ "peertube_test" ];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "peertube_test";
|
||||
ensureDBOwnership = true;
|
||||
}
|
||||
];
|
||||
authentication = ''
|
||||
hostnossl peertube_local peertube_test 192.168.2.11/32 md5
|
||||
hostnossl peertube_test peertube_test 192.168.2.11/32 md5
|
||||
'';
|
||||
initialScript = pkgs.writeText "postgresql_init.sql" ''
|
||||
CREATE ROLE peertube_test LOGIN PASSWORD '0gUN0C1mgST6czvjZ8T9';
|
||||
CREATE DATABASE peertube_local TEMPLATE template0 ENCODING UTF8;
|
||||
GRANT ALL PRIVILEGES ON DATABASE peertube_local TO peertube_test;
|
||||
\connect peertube_local
|
||||
CREATE EXTENSION IF NOT EXISTS pg_trgm;
|
||||
CREATE EXTENSION IF NOT EXISTS unaccent;
|
||||
'';
|
||||
};
|
||||
|
||||
@ -41,6 +43,9 @@ import ../make-test-python.nix ({pkgs, ...}:
|
||||
server = { pkgs, ... }: {
|
||||
environment = {
|
||||
etc = {
|
||||
"peertube/password-init-root".text = ''
|
||||
PT_INITIAL_ROOT_PASSWORD=zw4SqYVdcsXUfRX8aaFX
|
||||
'';
|
||||
"peertube/secrets-peertube".text = ''
|
||||
063d9c60d519597acef26003d5ecc32729083965d09181ef3949200cbe5f09ee
|
||||
'';
|
||||
@ -70,13 +75,15 @@ import ../make-test-python.nix ({pkgs, ...}:
|
||||
localDomain = "peertube.local";
|
||||
enableWebHttps = false;
|
||||
|
||||
serviceEnvironmentFile = "/etc/peertube/password-init-root";
|
||||
|
||||
secrets = {
|
||||
secretsFile = "/etc/peertube/secrets-peertube";
|
||||
};
|
||||
|
||||
database = {
|
||||
host = "192.168.2.10";
|
||||
name = "peertube_local";
|
||||
name = "peertube_test";
|
||||
user = "peertube_test";
|
||||
passwordFile = "/etc/peertube/password-posgressql-db";
|
||||
};
|
||||
@ -99,7 +106,7 @@ import ../make-test-python.nix ({pkgs, ...}:
|
||||
};
|
||||
|
||||
client = {
|
||||
environment.systemPackages = [ pkgs.jq ];
|
||||
environment.systemPackages = [ pkgs.jq pkgs.peertube.cli ];
|
||||
networking = {
|
||||
interfaces.eth1 = {
|
||||
ipv4.addresses = [
|
||||
@ -130,7 +137,10 @@ import ../make-test-python.nix ({pkgs, ...}:
|
||||
client.succeed("curl --fail http://peertube.local:9000/api/v1/config/about | jq -r '.instance.name' | grep 'PeerTube\ Test\ Server'")
|
||||
|
||||
# Check PeerTube CLI version
|
||||
assert "${pkgs.peertube.version}" in server.succeed('su - peertube -s /bin/sh -c "peertube --version"')
|
||||
client.succeed('peertube-cli auth add -u "http://peertube.local:9000" -U "root" --password "zw4SqYVdcsXUfRX8aaFX"')
|
||||
client.succeed('peertube-cli auth list | grep "http://peertube.local:9000"')
|
||||
client.succeed('peertube-cli auth del "http://peertube.local:9000"')
|
||||
client.fail('peertube-cli auth list | grep "http://peertube.local:9000"')
|
||||
|
||||
client.shutdown()
|
||||
server.shutdown()
|
||||
|
@ -28,12 +28,12 @@
|
||||
version = "2024-02-19";
|
||||
};
|
||||
ungoogled-patches = {
|
||||
hash = "sha256-vaL5lClzUzksjeJ/qneQ0uJ7IO5pJKBXa/cEgRx8s70=";
|
||||
rev = "123.0.6312.58-1";
|
||||
hash = "sha256-ET/fAQCpCx1wadA52mcEA3lBlIZPIK/DX2r2vhGf79o=";
|
||||
rev = "123.0.6312.86-1";
|
||||
};
|
||||
};
|
||||
hash = "sha256-GrCYCUjxV16tinqrIqW4DQD51dKIgKNu2fLLz9Yqq7k=";
|
||||
hash_deb_amd64 = "sha256-z+UC7wUsWAX7kPIgk8S9ujW2n6HlUp0m3zHTvsAiTps=";
|
||||
version = "123.0.6312.58";
|
||||
hash = "sha256-b72MiRv4uxolKE92tK224FvyA56NM3FcCjijkc9m3ro=";
|
||||
hash_deb_amd64 = "sha256-JsEJw8aEptesRiCtIrfHRQu1xq27TzHSmUr+dsvnV7o=";
|
||||
version = "123.0.6312.86";
|
||||
};
|
||||
}
|
||||
|
@ -59,11 +59,11 @@ buildGoModule rec {
|
||||
buildInputs = lib.optional pamSupport pam;
|
||||
|
||||
patches = [
|
||||
./../gitea/static-root-path.patch
|
||||
./static-root-path.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace modules/setting/setting.go --subst-var data
|
||||
substituteInPlace modules/setting/server.go --subst-var data
|
||||
'';
|
||||
|
||||
tags = lib.optional pamSupport "pam"
|
||||
|
@ -0,0 +1,13 @@
|
||||
diff --git a/modules/setting/server.go b/modules/setting/server.go
|
||||
index 183906268..fa02e8915 100644
|
||||
--- a/modules/setting/server.go
|
||||
+++ b/modules/setting/server.go
|
||||
@@ -319,7 +319,7 @@ func loadServerFrom(rootCfg ConfigProvider) {
|
||||
OfflineMode = sec.Key("OFFLINE_MODE").MustBool()
|
||||
Log.DisableRouterLog = sec.Key("DISABLE_ROUTER_LOG").MustBool()
|
||||
if len(StaticRootPath) == 0 {
|
||||
- StaticRootPath = AppWorkPath
|
||||
+ StaticRootPath = "@data@"
|
||||
}
|
||||
StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString(StaticRootPath)
|
||||
StaticCacheTime = sec.Key("STATIC_CACHE_TIME").MustDuration(6 * time.Hour)
|
@ -7,16 +7,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "files-cli";
|
||||
version = "2.12.44";
|
||||
version = "2.12.46";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "files-cli";
|
||||
owner = "files-com";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-6Y+MJCPDa64vCbg7aIqWuT6HaIFf36g++7STIVKj6GU=";
|
||||
hash = "sha256-GloZt9vAh+b65iOy4qqrH1Os1Ygh45sP9lZepxTs0qc=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-gP41EI5rZuiGzPkzWOGB69o57YSVYIvpDaKHAHtFaHM=";
|
||||
vendorHash = "sha256-pT8+s/xzsDXul8S+8JF18MRJv6FgoNDcwnL12Wkxryo=";
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
|
30
pkgs/by-name/in/invidious-router/package.nix
Normal file
30
pkgs/by-name/in/invidious-router/package.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
lib,
|
||||
buildGo122Module,
|
||||
fetchFromGitLab,
|
||||
}: let
|
||||
version = "1.1";
|
||||
in
|
||||
buildGo122Module {
|
||||
pname = "invidious-router";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "gaincoder";
|
||||
repo = "invidious-router";
|
||||
rev = version;
|
||||
hash = "sha256-t8KQqMPkBbVis1odDcSu+H0uvyvoFqCmtWoHqVRxmfc=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-c03vYidm8SkoesRVQZdg/bCp9LIpdTmpXdfwInlHBKk=";
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
homepage = "https://gitlab.com/gaincoder/invidious-router";
|
||||
description = "A Go application that routes requests to different Invidious instances based on their health status and (optional) response time";
|
||||
license = with lib.licenses; [mit];
|
||||
maintainers = with lib.maintainers; [sils];
|
||||
mainProgram = "invidious-router";
|
||||
};
|
||||
}
|
39
pkgs/by-name/lm/lmstudio/package.nix
Normal file
39
pkgs/by-name/lm/lmstudio/package.nix
Normal file
@ -0,0 +1,39 @@
|
||||
{ lib
|
||||
, appimageTools
|
||||
, fetchurl
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "lmstudio";
|
||||
version = "0.2.18";
|
||||
src = fetchurl {
|
||||
url = "https://releases.lmstudio.ai/linux/${version}/beta/LM_Studio-${version}.AppImage";
|
||||
hash = "sha256-cUa0fjV7xx6+2tnGVP7uLG0QQb44LhP2nYsn6Qn0al4=";
|
||||
};
|
||||
|
||||
appimageContents = appimageTools.extractType2 { inherit pname version src; };
|
||||
in
|
||||
appimageTools.wrapType2 {
|
||||
inherit pname version src;
|
||||
|
||||
extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) ++ [ pkgs.ocl-icd ];
|
||||
|
||||
extraInstallCommands = ''
|
||||
mkdir -p $out/share/applications
|
||||
mv $out/bin/lmstudio-${version} $out/bin/lmstudio
|
||||
cp -r ${appimageContents}/usr/share/icons $out/share
|
||||
install -m 444 -D ${appimageContents}/lm-studio.desktop -t $out/share/applications
|
||||
substituteInPlace $out/share/applications/lm-studio.desktop \
|
||||
--replace-fail 'Exec=AppRun --no-sandbox %U' 'Exec=lmstudio'
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "LM Studio is an easy to use desktop app for experimenting with local and open-source Large Language Models (LLMs)";
|
||||
homepage = "https://lmstudio.ai/";
|
||||
license = lib.licenses.unfree;
|
||||
mainProgram = "lmstudio";
|
||||
maintainers = with lib.maintainers; [ drupol ];
|
||||
platforms = lib.platforms.linux;
|
||||
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||
};
|
||||
}
|
58
pkgs/by-name/mo/mollysocket/package.nix
Normal file
58
pkgs/by-name/mo/mollysocket/package.nix
Normal file
@ -0,0 +1,58 @@
|
||||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, openssl
|
||||
, sqlite
|
||||
, stdenv
|
||||
, darwin
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "mollysocket";
|
||||
version = "1.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mollyim";
|
||||
repo = "mollysocket";
|
||||
rev = version;
|
||||
hash = "sha256-eFvRjGUQ1AU+kXUp6YALm1lqhTMY2DxvFuf+MHCL38c=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-3UwvnbHH6v1fJyivdU55GmJ2/+RSqXfBKIcOARASWbE=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
openssl
|
||||
sqlite
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk.frameworks.Security
|
||||
];
|
||||
|
||||
checkFlags = [
|
||||
# tests interact with Signal servers
|
||||
"--skip=config::tests::check_wildcard_endpoint"
|
||||
"--skip=utils::post_allowed::tests::test_allowed"
|
||||
"--skip=utils::post_allowed::tests::test_not_allowed"
|
||||
"--skip=utils::post_allowed::tests::test_post"
|
||||
"--skip=ws::tls::tests::connect_untrusted_server"
|
||||
"--skip=ws::tls::tests::connect_trusted_server"
|
||||
];
|
||||
|
||||
passthru.tests = {
|
||||
inherit (nixosTests) mollysocket;
|
||||
};
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/mollyim/mollysocket/releases/tag/${version}";
|
||||
description = "Get Signal notifications via UnifiedPush";
|
||||
homepage = "https://github.com/mollyim/mollysocket";
|
||||
license = lib.licenses.agpl3Plus;
|
||||
mainProgram = "mollysocket";
|
||||
maintainers = with lib.maintainers; [ dotlambda ];
|
||||
};
|
||||
}
|
@ -5,307 +5,52 @@
|
||||
}:
|
||||
|
||||
let
|
||||
fetchElmDeps = pkgs.callPackage ./fetchElmDeps.nix { };
|
||||
fetchElmDeps = pkgs.callPackage ./lib/fetchElmDeps.nix { };
|
||||
|
||||
# Haskell packages that require ghc 9.6
|
||||
hs96Pkgs = self: pkgs.haskell.packages.ghc96.override {
|
||||
overrides = self: super: with pkgs.haskell.lib.compose; with lib;
|
||||
let elmPkgs = rec {
|
||||
elm = overrideCabal (drv: {
|
||||
# sadly with parallelism most of the time breaks compilation
|
||||
enableParallelBuilding = false;
|
||||
preConfigure = fetchElmDeps {
|
||||
elmPackages = (import ./packages/elm-srcs.nix);
|
||||
elmVersion = drv.version;
|
||||
registryDat = ./registry.dat;
|
||||
};
|
||||
buildTools = drv.buildTools or [] ++ [ makeWrapper ];
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/elm \
|
||||
--prefix PATH ':' ${lib.makeBinPath [ nodejs ]}
|
||||
'';
|
||||
|
||||
description = "A delightful language for reliable webapps";
|
||||
homepage = "https://elm-lang.org/";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ domenkozar turbomack ];
|
||||
}) (self.callPackage ./packages/elm.nix { });
|
||||
|
||||
inherit fetchElmDeps;
|
||||
elmVersion = elmPkgs.elm.version;
|
||||
};
|
||||
in elmPkgs // {
|
||||
inherit elmPkgs;
|
||||
|
||||
ansi-wl-pprint = overrideCabal (drv: {
|
||||
jailbreak = true;
|
||||
}) (self.callPackage ./packages/ansi-wl-pprint.nix {});
|
||||
};
|
||||
};
|
||||
hs96Pkgs = import ./packages/ghc9_6 { inherit pkgs lib makeWrapper nodejs fetchElmDeps; };
|
||||
|
||||
# Haskell packages that require ghc 8.10
|
||||
hs810Pkgs = self: pkgs.haskell.packages.ghc810.override {
|
||||
overrides = self: super: with pkgs.haskell.lib.compose; with lib;
|
||||
let elmPkgs = rec {
|
||||
elmi-to-json = justStaticExecutables (overrideCabal (drv: {
|
||||
prePatch = ''
|
||||
substituteInPlace package.yaml --replace "- -Werror" ""
|
||||
hpack
|
||||
'';
|
||||
jailbreak = true;
|
||||
|
||||
description = "Tool that reads .elmi files (Elm interface file) generated by the elm compiler";
|
||||
homepage = "https://github.com/stoeffel/elmi-to-json";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.turbomack ];
|
||||
}) (self.callPackage ./packages/elmi-to-json.nix {}));
|
||||
|
||||
elm-instrument = justStaticExecutables (overrideCabal (drv: {
|
||||
prePatch = ''
|
||||
sed "s/desc <-.*/let desc = \"${drv.version}\"/g" Setup.hs --in-place
|
||||
'';
|
||||
jailbreak = true;
|
||||
# Tests are failing because of missing instances for Eq and Show type classes
|
||||
doCheck = false;
|
||||
|
||||
description = "Instrument Elm code as a preprocessing step for elm-coverage";
|
||||
homepage = "https://github.com/zwilias/elm-instrument";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.turbomack ];
|
||||
}) (self.callPackage ./packages/elm-instrument.nix {}));
|
||||
};
|
||||
in elmPkgs // {
|
||||
inherit elmPkgs;
|
||||
|
||||
# We need attoparsec < 0.14 to build elm for now
|
||||
attoparsec = self.attoparsec_0_13_2_5;
|
||||
|
||||
# aeson 2.0.3.0 does not build with attoparsec_0_13_2_5
|
||||
aeson = doJailbreak self.aeson_1_5_6_0;
|
||||
|
||||
# elm-instrument needs this
|
||||
indents = self.callPackage ./packages/indents.nix {};
|
||||
|
||||
# elm-instrument's tests depend on an old version of elm-format, but we set doCheck to false for other reasons above
|
||||
elm-format = null;
|
||||
};
|
||||
};
|
||||
hs810Pkgs = import ./packages/ghc8_10 { inherit pkgs lib; };
|
||||
|
||||
# Haskell packages that require ghc 9.2
|
||||
hs92Pkgs = self: pkgs.haskell.packages.ghc92.override {
|
||||
overrides = self: super: with pkgs.haskell.lib.compose; with lib;
|
||||
let elmPkgs = rec {
|
||||
/*
|
||||
The elm-format expression is updated via a script in the https://github.com/avh4/elm-format repo:
|
||||
`package/nix/build.sh`
|
||||
hs92Pkgs = import ./packages/ghc9_2 { inherit pkgs lib; };
|
||||
|
||||
# Patched, originally npm-downloaded, packages
|
||||
patchedNodePkgs = import ./packages/node { inherit pkgs lib nodejs makeWrapper; };
|
||||
|
||||
assembleScope = self: basics:
|
||||
(hs96Pkgs self).elmPkgs // (hs92Pkgs self).elmPkgs // (hs810Pkgs self).elmPkgs // (patchedNodePkgs self) // basics;
|
||||
in
|
||||
lib.makeScope pkgs.newScope
|
||||
(self: assembleScope self
|
||||
(with self; {
|
||||
inherit fetchElmDeps nodejs;
|
||||
|
||||
/* Node/NPM based dependencies can be upgraded using script `packages/generate-node-packages.sh`.
|
||||
|
||||
* Packages which rely on `bin-wrap` will fail by default
|
||||
and can be patched using `patchBinwrap` function defined in `packages/lib.nix`.
|
||||
|
||||
* Packages which depend on npm installation of elm can be patched using
|
||||
`patchNpmElm` function also defined in `packages/lib.nix`.
|
||||
*/
|
||||
elm-format = justStaticExecutables (overrideCabal (drv: {
|
||||
jailbreak = true;
|
||||
|
||||
description = "Formats Elm source code according to a standard set of rules based on the official Elm Style Guide";
|
||||
homepage = "https://github.com/avh4/elm-format";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ avh4 turbomack ];
|
||||
}) (self.callPackage ./packages/elm-format.nix {}));
|
||||
};
|
||||
in elmPkgs // {
|
||||
inherit elmPkgs;
|
||||
|
||||
# Needed for elm-format
|
||||
avh4-lib = doJailbreak (self.callPackage ./packages/avh4-lib.nix {});
|
||||
elm-format-lib = doJailbreak (self.callPackage ./packages/elm-format-lib.nix {});
|
||||
elm-format-test-lib = self.callPackage ./packages/elm-format-test-lib.nix {};
|
||||
elm-format-markdown = self.callPackage ./packages/elm-format-markdown.nix {};
|
||||
|
||||
# elm-format requires text >= 2.0
|
||||
text = self.text_2_0_2;
|
||||
# unorderd-container's tests indirectly depend on text < 2.0
|
||||
unordered-containers = overrideCabal (drv: { doCheck = false; }) super.unordered-containers;
|
||||
# relude-1.1.0.0's tests depend on hedgehog < 1.2, which indirectly depends on text < 2.0
|
||||
relude = overrideCabal (drv: { doCheck = false; }) super.relude;
|
||||
};
|
||||
};
|
||||
|
||||
nodePkgs = pkgs.callPackage ./packages/node-composition.nix {
|
||||
inherit pkgs nodejs;
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
};
|
||||
|
||||
in lib.makeScope pkgs.newScope (self: with self; {
|
||||
inherit fetchElmDeps nodejs;
|
||||
|
||||
/* Node/NPM based dependencies can be upgraded using script `packages/generate-node-packages.sh`.
|
||||
|
||||
* Packages which rely on `bin-wrap` will fail by default
|
||||
and can be patched using `patchBinwrap` function defined in `packages/lib.nix`.
|
||||
|
||||
* Packages which depend on npm installation of elm can be patched using
|
||||
`patchNpmElm` function also defined in `packages/lib.nix`.
|
||||
*/
|
||||
elmLib = let
|
||||
hsElmPkgs = (hs810Pkgs self) // (hs96Pkgs self);
|
||||
in import ./packages/lib.nix {
|
||||
inherit lib;
|
||||
inherit (pkgs) writeScriptBin stdenv;
|
||||
inherit (hsElmPkgs.elmPkgs) elm;
|
||||
};
|
||||
|
||||
elm-json = callPackage ./packages/elm-json.nix { };
|
||||
|
||||
elm-test-rs = callPackage ./packages/elm-test-rs.nix { };
|
||||
|
||||
elm-test = callPackage ./packages/elm-test.nix { };
|
||||
} // (hs96Pkgs self).elmPkgs // (hs92Pkgs self).elmPkgs // (hs810Pkgs self).elmPkgs // (with elmLib; with (hs96Pkgs self).elmPkgs; {
|
||||
elm-verify-examples = let
|
||||
patched = patchBinwrap [elmi-to-json] nodePkgs.elm-verify-examples // {
|
||||
meta = with lib; nodePkgs.elm-verify-examples.meta // {
|
||||
description = "Verify examples in your docs";
|
||||
homepage = "https://github.com/stoeffel/elm-verify-examples";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.turbomack ];
|
||||
};
|
||||
};
|
||||
in patched.override (old: {
|
||||
preRebuild = (old.preRebuild or "") + ''
|
||||
# This should not be needed (thanks to binwrap* being nooped) but for some reason it still needs to be done
|
||||
# in case of just this package
|
||||
# TODO: investigate, same as for elm-coverage below
|
||||
sed 's/\"install\".*/\"install\":\"echo no-op\",/g' --in-place node_modules/elmi-to-json/package.json
|
||||
'';
|
||||
});
|
||||
|
||||
elm-coverage = let
|
||||
patched = patchNpmElm (patchBinwrap [elmi-to-json] nodePkgs.elm-coverage);
|
||||
in patched.override (old: {
|
||||
# Symlink Elm instrument binary
|
||||
preRebuild = (old.preRebuild or "") + ''
|
||||
# Noop custom installation script
|
||||
sed 's/\"install\".*/\"install\":\"echo no-op\"/g' --in-place package.json
|
||||
|
||||
# This should not be needed (thanks to binwrap* being nooped) but for some reason it still needs to be done
|
||||
# in case of just this package
|
||||
# TODO: investigate
|
||||
sed 's/\"install\".*/\"install\":\"echo no-op\",/g' --in-place node_modules/elmi-to-json/package.json
|
||||
'';
|
||||
postInstall = (old.postInstall or "") + ''
|
||||
mkdir -p unpacked_bin
|
||||
ln -sf ${elm-instrument}/bin/elm-instrument unpacked_bin/elm-instrument
|
||||
'';
|
||||
meta = with lib; nodePkgs.elm-coverage.meta // {
|
||||
description = "Work in progress - Code coverage tooling for Elm";
|
||||
homepage = "https://github.com/zwilias/elm-coverage";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.turbomack ];
|
||||
};
|
||||
});
|
||||
|
||||
create-elm-app = patchNpmElm
|
||||
nodePkgs.create-elm-app // {
|
||||
meta = with lib; nodePkgs.create-elm-app.meta // {
|
||||
description = "Create Elm apps with no build configuration";
|
||||
homepage = "https://github.com/halfzebra/create-elm-app";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.turbomack ];
|
||||
};
|
||||
};
|
||||
|
||||
elm-graphql =
|
||||
nodePkgs."@dillonkearns/elm-graphql" // {
|
||||
meta = with lib; nodePkgs."@dillonkearns/elm-graphql".meta // {
|
||||
description = " Autogenerate type-safe GraphQL queries in Elm.";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.pedrohlc ];
|
||||
};
|
||||
};
|
||||
|
||||
elm-review =
|
||||
nodePkgs.elm-review // {
|
||||
meta = with lib; nodePkgs.elm-review.meta // {
|
||||
description = "Analyzes Elm projects, to help find mistakes before your users find them";
|
||||
homepage = "https://package.elm-lang.org/packages/jfmengels/elm-review/${nodePkgs.elm-review.version}";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.turbomack ];
|
||||
};
|
||||
};
|
||||
|
||||
elm-language-server = nodePkgs."@elm-tooling/elm-language-server" // {
|
||||
meta = with lib; nodePkgs."@elm-tooling/elm-language-server".meta // {
|
||||
description = "Language server implementation for Elm";
|
||||
homepage = "https://github.com/elm-tooling/elm-language-server";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.turbomack ];
|
||||
};
|
||||
};
|
||||
|
||||
elm-spa = nodePkgs."elm-spa".overrideAttrs (
|
||||
old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ makeWrapper old.nodejs.pkgs.node-gyp-build ];
|
||||
|
||||
meta = with lib; nodePkgs."elm-spa".meta // {
|
||||
description = "A tool for building single page apps in Elm";
|
||||
homepage = "https://www.elm-spa.dev/";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.ilyakooo0 ];
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
elm-optimize-level-2 = nodePkgs."elm-optimize-level-2" // {
|
||||
meta = with lib; nodePkgs."elm-optimize-level-2".meta // {
|
||||
description = "A second level of optimization for the Javascript that the Elm Compiler produces";
|
||||
homepage = "https://github.com/mdgriffith/elm-optimize-level-2";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.turbomack ];
|
||||
};
|
||||
};
|
||||
|
||||
elm-pages = nodePkgs."elm-pages".overrideAttrs (
|
||||
old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ makeWrapper old.nodejs.pkgs.node-gyp-build ];
|
||||
|
||||
# can't use `patches = [ <patch_file> ]` with a nodePkgs derivation;
|
||||
# need to patch in one of the build phases instead.
|
||||
# see upstream issue https://github.com/dillonkearns/elm-pages/issues/305 for dealing with the read-only problem
|
||||
preFixup = ''
|
||||
patch $out/lib/node_modules/elm-pages/generator/src/codegen.js ${./packages/elm-pages-fix-read-only.patch}
|
||||
patch $out/lib/node_modules/elm-pages/generator/src/init.js ${./packages/elm-pages-fix-init-read-only.patch}
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/elm-pages --prefix PATH : ${
|
||||
with pkgs.elmPackages; lib.makeBinPath [ elm elm-review elm-optimize-level-2 ]
|
||||
}
|
||||
'';
|
||||
|
||||
meta = with lib; nodePkgs."elm-pages".meta // {
|
||||
description = "A statically typed site generator for Elm.";
|
||||
homepage = "https://github.com/dillonkearns/elm-pages";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.turbomack maintainers.jali-clarke ];
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
elm-land =
|
||||
elmLib =
|
||||
let
|
||||
patched = patchNpmElm nodePkgs.elm-land;
|
||||
hsElmPkgs = (hs810Pkgs self) // (hs96Pkgs self);
|
||||
in
|
||||
patched.override (old: {
|
||||
meta = with lib; nodePkgs."elm-land".meta // {
|
||||
description = "A production-ready framework for building Elm applications.";
|
||||
homepage = "https://elm.land/";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.zupo ];
|
||||
};
|
||||
}
|
||||
);
|
||||
import ./lib {
|
||||
inherit lib;
|
||||
inherit (pkgs) writeScriptBin stdenv;
|
||||
inherit (self) elm;
|
||||
};
|
||||
|
||||
lamdera = callPackage ./packages/lamdera.nix {};
|
||||
elm-json = callPackage ./packages/elm-json { };
|
||||
|
||||
elm-doc-preview = nodePkgs."elm-doc-preview".overrideAttrs (old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ old.nodejs.pkgs.node-gyp-build ];
|
||||
});
|
||||
elm-test-rs = callPackage ./packages/elm-test-rs { };
|
||||
|
||||
inherit (nodePkgs) elm-live elm-upgrade elm-xref elm-analyse elm-git-install;
|
||||
elm-test = callPackage ./packages/elm-test { };
|
||||
|
||||
lamdera = callPackage ./packages/lamdera { };
|
||||
})
|
||||
)
|
||||
|
36
pkgs/development/compilers/elm/lib/makeDotElm.nix
Normal file
36
pkgs/development/compilers/elm/lib/makeDotElm.nix
Normal file
@ -0,0 +1,36 @@
|
||||
{ stdenv, lib, fetchurl, registryDat }:
|
||||
|
||||
ver: deps:
|
||||
let
|
||||
cmds = lib.mapAttrsToList
|
||||
(name: info:
|
||||
let
|
||||
pkg = stdenv.mkDerivation {
|
||||
name = lib.replaceStrings [ "/" ] [ "-" ] name + "-${info.version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/${name}/archive/${info.version}.tar.gz";
|
||||
meta.homepage = "https://github.com/${name}/";
|
||||
inherit (info) sha256;
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r * $out
|
||||
'';
|
||||
};
|
||||
in
|
||||
''
|
||||
mkdir -p .elm/${ver}/packages/${name}
|
||||
cp -R ${pkg} .elm/${ver}/packages/${name}/${info.version}
|
||||
'')
|
||||
deps;
|
||||
in
|
||||
(lib.concatStrings cmds) + ''
|
||||
mkdir -p .elm/${ver}/packages;
|
||||
cp ${registryDat} .elm/${ver}/packages/registry.dat;
|
||||
chmod -R +w .elm
|
||||
''
|
@ -1,35 +0,0 @@
|
||||
{stdenv, lib, fetchurl, registryDat}:
|
||||
|
||||
ver: deps:
|
||||
let cmds = lib.mapAttrsToList (name: info: let
|
||||
pkg = stdenv.mkDerivation {
|
||||
name = lib.replaceStrings ["/"] ["-"] name + "-${info.version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/${name}/archive/${info.version}.tar.gz";
|
||||
meta.homepage = "https://github.com/${name}/";
|
||||
inherit (info) sha256;
|
||||
};
|
||||
|
||||
configurePhase = ''
|
||||
true
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
true
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r * $out
|
||||
'';
|
||||
};
|
||||
in ''
|
||||
mkdir -p .elm/${ver}/packages/${name}
|
||||
cp -R ${pkg} .elm/${ver}/packages/${name}/${info.version}
|
||||
'') deps;
|
||||
in (lib.concatStrings cmds) + ''
|
||||
mkdir -p .elm/${ver}/packages;
|
||||
cp ${registryDat} .elm/${ver}/packages/registry.dat;
|
||||
chmod -R +w .elm
|
||||
''
|
@ -1,15 +0,0 @@
|
||||
{ mkDerivation, base, containers, exceptions, lib, QuickCheck
|
||||
, template-haskell
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "bimap";
|
||||
version = "0.3.3";
|
||||
sha256 = "73829355c7bcbd3eedba22a382a04a3ab641702b00828790ec082ec2db3a8ad1";
|
||||
libraryHaskellDepends = [ base containers exceptions ];
|
||||
testHaskellDepends = [
|
||||
base containers exceptions QuickCheck template-haskell
|
||||
];
|
||||
homepage = "https://github.com/joelwilliamson/bimap";
|
||||
description = "Bidirectional mapping between two key types";
|
||||
license = lib.licenses.bsd3;
|
||||
}
|
@ -17,12 +17,13 @@ rustPlatform.buildRustPackage rec {
|
||||
sha256 = "sha256:nlpxlPzWk3wwDgczuMI9T6DFY1YtQpQ1R4BhdPbzZBs=";
|
||||
};
|
||||
|
||||
cargoPatches = [ ./elm-json.patch ];
|
||||
cargoPatches = [ ./use-system-ssl.patch ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
curl openssl
|
||||
curl
|
||||
openssl
|
||||
] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
|
||||
|
||||
cargoSha256 = "sha256:8SOpL8nfhYen9vza0LYpB/5fgVmBwG7vGMmFOaJskIc=";
|
79
pkgs/development/compilers/elm/packages/ghc8_10/default.nix
Normal file
79
pkgs/development/compilers/elm/packages/ghc8_10/default.nix
Normal file
@ -0,0 +1,79 @@
|
||||
{ pkgs, lib }:
|
||||
|
||||
self: pkgs.haskell.packages.ghc810.override {
|
||||
overrides = self: super: with pkgs.haskell.lib.compose; with lib;
|
||||
let
|
||||
elmPkgs = rec {
|
||||
elmi-to-json = justStaticExecutables (overrideCabal
|
||||
(drv: {
|
||||
version = "unstable-2021-07-19";
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://github.com/stoeffel/elmi-to-json";
|
||||
sha256 = "0vy678k15rzpsn0aly90fb01pxsbqkgf86pa86w0gd94lka8acwl";
|
||||
rev = "6a42376ef4b6877e130971faf964578cc096e29b";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace package.yaml --replace "- -Werror" ""
|
||||
hpack
|
||||
'';
|
||||
jailbreak = true;
|
||||
|
||||
description = "Tool that reads .elmi files (Elm interface file) generated by the elm compiler";
|
||||
homepage = "https://github.com/stoeffel/elmi-to-json";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.turbomack ];
|
||||
})
|
||||
(self.callPackage ./elmi-to-json { }));
|
||||
|
||||
elm-instrument = justStaticExecutables (overrideCabal
|
||||
(drv: {
|
||||
version = "unstable-2020-03-16";
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://github.com/zwilias/elm-instrument";
|
||||
sha256 = "167d7l2547zxdj7i60r6vazznd9ichwc0bqckh3vrh46glkz06jv";
|
||||
rev = "63e15bb5ec5f812e248e61b6944189fa4a0aee4e";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
patches = [
|
||||
# Update code after breaking change in optparse-applicative
|
||||
# https://github.com/zwilias/elm-instrument/pull/5
|
||||
(pkgs.fetchpatch {
|
||||
name = "update-optparse-applicative.patch";
|
||||
url = "https://github.com/mdevlamynck/elm-instrument/commit/c548709d4818aeef315528e842eaf4c5b34b59b4.patch";
|
||||
sha256 = "0ln7ik09n3r3hk7jmwwm46kz660mvxfa71120rkbbaib2falfhsc";
|
||||
})
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
sed "s/desc <-.*/let desc = \"${drv.version}\"/g" Setup.hs --in-place
|
||||
'';
|
||||
jailbreak = true;
|
||||
# Tests are failing because of missing instances for Eq and Show type classes
|
||||
doCheck = false;
|
||||
|
||||
description = "Instrument Elm code as a preprocessing step for elm-coverage";
|
||||
homepage = "https://github.com/zwilias/elm-instrument";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.turbomack ];
|
||||
})
|
||||
(self.callPackage ./elm-instrument { }));
|
||||
};
|
||||
in
|
||||
elmPkgs // {
|
||||
inherit elmPkgs;
|
||||
|
||||
# We need attoparsec < 0.14 to build elm for now
|
||||
attoparsec = self.attoparsec_0_13_2_5;
|
||||
|
||||
# aeson 2.0.3.0 does not build with attoparsec_0_13_2_5
|
||||
aeson = doJailbreak self.aeson_1_5_6_0;
|
||||
|
||||
# elm-instrument needs this
|
||||
indents = self.callPackage ./indents { };
|
||||
|
||||
# elm-instrument's tests depend on an old version of elm-format, but we set doCheck to false for other reasons above
|
||||
elm-format = null;
|
||||
};
|
||||
}
|
@ -1,28 +1,18 @@
|
||||
{ mkDerivation, fetchpatch, ansi-terminal, ansi-wl-pprint, base, binary
|
||||
{ mkDerivation, ansi-terminal, ansi-wl-pprint, base, binary
|
||||
, bytestring, Cabal, cmark, containers, directory, elm-format
|
||||
, fetchgit, filepath, free, HUnit, indents, json, mtl
|
||||
, fetchgit, filepath, free, HUnit, indents, json, lib, mtl
|
||||
, optparse-applicative, parsec, process, QuickCheck, quickcheck-io
|
||||
, split, lib, tasty, tasty-golden, tasty-hunit, tasty-quickcheck
|
||||
, text
|
||||
, split, tasty, tasty-golden, tasty-hunit, tasty-quickcheck, text
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "elm-instrument";
|
||||
version = "0.0.7";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/zwilias/elm-instrument";
|
||||
sha256 = "167d7l2547zxdj7i60r6vazznd9ichwc0bqckh3vrh46glkz06jv";
|
||||
rev = "63e15bb5ec5f812e248e61b6944189fa4a0aee4e";
|
||||
sha256 = "14yfzwsyvgc6rzn19sdmwk2mc1vma9hcljnmjnmlig8mp0271v56";
|
||||
rev = "31b527e405a6afdb25bb87ad7bd14f979e65cff7";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
patches = [
|
||||
# Update code after breaking change in optparse-applicative
|
||||
# https://github.com/zwilias/elm-instrument/pull/5
|
||||
(fetchpatch {
|
||||
name = "update-optparse-applicative.patch";
|
||||
url = "https://github.com/mdevlamynck/elm-instrument/commit/c548709d4818aeef315528e842eaf4c5b34b59b4.patch";
|
||||
sha256 = "0ln7ik09n3r3hk7jmwwm46kz660mvxfa71120rkbbaib2falfhsc";
|
||||
})
|
||||
];
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
setupHaskellDepends = [ base Cabal directory filepath process ];
|
||||
@ -37,7 +27,7 @@ mkDerivation {
|
||||
quickcheck-io split tasty tasty-golden tasty-hunit tasty-quickcheck
|
||||
text
|
||||
];
|
||||
homepage = "https://elm-lang.org";
|
||||
homepage = "http://elm-lang.org";
|
||||
description = "Instrumentation library for Elm";
|
||||
license = lib.licenses.bsd3;
|
||||
mainProgram = "elm-instrument";
|
@ -1,15 +1,15 @@
|
||||
{ mkDerivation, aeson, base, binary, bytestring, containers
|
||||
, directory, fetchgit, filepath, ghc-prim, hpack
|
||||
, optparse-applicative, lib, text, unliftio
|
||||
, unordered-containers
|
||||
, directory, fetchgit, filepath, ghc-prim, hpack, lib
|
||||
, optparse-applicative, text, unliftio, unordered-containers
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "elmi-to-json";
|
||||
version = "1.3.0";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/stoeffel/elmi-to-json";
|
||||
rev = "bd18efb59d247439b362272b480e67a16a4e424e";
|
||||
sha256 = "sha256-9fScXRSyTkqzeXwh/Jjza6mnENCThlU6KI366CLFcgY=";
|
||||
sha256 = "0vy678k15rzpsn0aly90fb01pxsbqkgf86pa86w0gd94lka8acwl";
|
||||
rev = "6a42376ef4b6877e130971faf964578cc096e29b";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
@ -23,4 +23,5 @@ mkDerivation {
|
||||
prePatch = "hpack";
|
||||
homepage = "https://github.com/stoeffel/elmi-to-json#readme";
|
||||
license = lib.licenses.bsd3;
|
||||
mainProgram = "elmi-to-json";
|
||||
}
|
53
pkgs/development/compilers/elm/packages/ghc9_2/default.nix
Normal file
53
pkgs/development/compilers/elm/packages/ghc9_2/default.nix
Normal file
@ -0,0 +1,53 @@
|
||||
{ pkgs, lib }:
|
||||
|
||||
self: pkgs.haskell.packages.ghc92.override {
|
||||
overrides = self: super: with pkgs.haskell.lib.compose; with lib;
|
||||
let
|
||||
elmPkgs = rec {
|
||||
/*
|
||||
The elm-format expression is updated via a script in the https://github.com/avh4/elm-format repo:
|
||||
`package/nix/build.sh`
|
||||
*/
|
||||
elm-format = justStaticExecutables (overrideCabal
|
||||
(drv: {
|
||||
jailbreak = true;
|
||||
doHaddock = false;
|
||||
postPatch = ''
|
||||
mkdir -p ./generated
|
||||
cat <<EOHS > ./generated/Build_elm_format.hs
|
||||
module Build_elm_format where
|
||||
gitDescribe :: String
|
||||
gitDescribe = "${drv.version}"
|
||||
EOHS
|
||||
'';
|
||||
|
||||
description = "Formats Elm source code according to a standard set of rules based on the official Elm Style Guide";
|
||||
homepage = "https://github.com/avh4/elm-format";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ avh4 turbomack ];
|
||||
})
|
||||
(self.callPackage ./elm-format/elm-format.nix { }));
|
||||
};
|
||||
|
||||
fixHaddock = overrideCabal (_: {
|
||||
configureFlags = [ "--ghc-option=-Wno-error=unused-packages" ];
|
||||
doHaddock = false;
|
||||
});
|
||||
in
|
||||
elmPkgs // {
|
||||
inherit elmPkgs;
|
||||
|
||||
# Needed for elm-format
|
||||
avh4-lib = fixHaddock (doJailbreak (self.callPackage ./elm-format/avh4-lib.nix { }));
|
||||
elm-format-lib = fixHaddock (doJailbreak (self.callPackage ./elm-format/elm-format-lib.nix { }));
|
||||
elm-format-test-lib = fixHaddock (self.callPackage ./elm-format/elm-format-test-lib.nix { });
|
||||
elm-format-markdown = fixHaddock (self.callPackage ./elm-format/elm-format-markdown.nix { });
|
||||
|
||||
# elm-format requires text >= 2.0
|
||||
text = self.text_2_0_2;
|
||||
# unorderd-container's tests indirectly depend on text < 2.0
|
||||
unordered-containers = overrideCabal (drv: { doCheck = false; }) super.unordered-containers;
|
||||
# relude-1.1.0.0's tests depend on hedgehog < 1.2, which indirectly depends on text < 2.0
|
||||
relude = overrideCabal (drv: { doCheck = false; }) super.relude;
|
||||
};
|
||||
}
|
@ -12,7 +12,6 @@ mkDerivation {
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
postUnpack = "sourceRoot+=/avh4-lib; echo source root reset to $sourceRoot";
|
||||
configureFlags = [ "--ghc-option=-Wno-error=unused-packages" ];
|
||||
libraryHaskellDepends = [
|
||||
array base bytestring directory filepath mtl pooled-io process
|
||||
relude text
|
||||
@ -22,7 +21,6 @@ mkDerivation {
|
||||
relude tasty tasty-hspec tasty-hunit text
|
||||
];
|
||||
testToolDepends = [ tasty-discover ];
|
||||
doHaddock = false;
|
||||
description = "Common code for haskell projects";
|
||||
license = lib.licenses.bsd3;
|
||||
}
|
@ -24,7 +24,6 @@ mkDerivation {
|
||||
text
|
||||
];
|
||||
testToolDepends = [ tasty-discover ];
|
||||
doHaddock = false;
|
||||
description = "Common code used by elm-format and elm-refactor";
|
||||
license = lib.licenses.bsd3;
|
||||
}
|
@ -10,7 +10,6 @@ mkDerivation {
|
||||
};
|
||||
postUnpack = "sourceRoot+=/elm-format-markdown; echo source root reset to $sourceRoot";
|
||||
libraryHaskellDepends = [ base containers mtl text ];
|
||||
doHaddock = false;
|
||||
description = "Markdown parsing for Elm documentation comments";
|
||||
license = lib.licenses.bsd3;
|
||||
}
|
@ -21,7 +21,6 @@ mkDerivation {
|
||||
split tasty tasty-hspec tasty-hunit text
|
||||
];
|
||||
testToolDepends = [ tasty-discover ];
|
||||
doHaddock = false;
|
||||
description = "Test helpers used by elm-format-tests and elm-refactor-tests";
|
||||
license = lib.licenses.bsd3;
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
, optparse-applicative, QuickCheck, quickcheck-io, relude, tasty
|
||||
, tasty-hspec, tasty-hunit, tasty-quickcheck, text
|
||||
}:
|
||||
mkDerivation rec {
|
||||
mkDerivation {
|
||||
pname = "elm-format";
|
||||
version = "0.8.7";
|
||||
src = fetchgit {
|
||||
@ -24,18 +24,8 @@ mkDerivation rec {
|
||||
quickcheck-io relude tasty tasty-hspec tasty-hunit tasty-quickcheck
|
||||
text
|
||||
];
|
||||
doHaddock = false;
|
||||
homepage = "https://elm-lang.org";
|
||||
description = "A source code formatter for Elm";
|
||||
license = lib.licenses.bsd3;
|
||||
mainProgram = "elm-format";
|
||||
postPatch = ''
|
||||
mkdir -p ./generated
|
||||
cat <<EOHS > ./generated/Build_elm_format.hs
|
||||
module Build_elm_format where
|
||||
|
||||
gitDescribe :: String
|
||||
gitDescribe = "${version}"
|
||||
EOHS
|
||||
'';
|
||||
}
|
42
pkgs/development/compilers/elm/packages/ghc9_6/default.nix
Normal file
42
pkgs/development/compilers/elm/packages/ghc9_6/default.nix
Normal file
@ -0,0 +1,42 @@
|
||||
{ pkgs, lib, makeWrapper, nodejs, fetchElmDeps }:
|
||||
|
||||
self: pkgs.haskell.packages.ghc96.override {
|
||||
overrides = self: super: with pkgs.haskell.lib.compose; with lib;
|
||||
let
|
||||
elmPkgs = rec {
|
||||
elm = overrideCabal
|
||||
(drv: {
|
||||
# sadly with parallelism most of the time breaks compilation
|
||||
enableParallelBuilding = false;
|
||||
preConfigure = fetchElmDeps {
|
||||
elmPackages = (import ../elm-srcs.nix);
|
||||
elmVersion = drv.version;
|
||||
registryDat = ../../registry.dat;
|
||||
};
|
||||
buildTools = drv.buildTools or [ ] ++ [ makeWrapper ];
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/elm \
|
||||
--prefix PATH ':' ${lib.makeBinPath [ nodejs ]}
|
||||
'';
|
||||
|
||||
description = "A delightful language for reliable webapps";
|
||||
homepage = "https://elm-lang.org/";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ domenkozar turbomack ];
|
||||
})
|
||||
(self.callPackage ./elm { });
|
||||
|
||||
inherit fetchElmDeps;
|
||||
elmVersion = elmPkgs.elm.version;
|
||||
};
|
||||
in
|
||||
elmPkgs // {
|
||||
inherit elmPkgs;
|
||||
|
||||
ansi-wl-pprint = overrideCabal
|
||||
(drv: {
|
||||
jailbreak = true;
|
||||
})
|
||||
(self.callPackage ./ansi-wl-pprint { });
|
||||
};
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
{ stdenv, lib
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
}:
|
||||
|
139
pkgs/development/compilers/elm/packages/node/default.nix
Normal file
139
pkgs/development/compilers/elm/packages/node/default.nix
Normal file
@ -0,0 +1,139 @@
|
||||
{ pkgs, lib, nodejs, makeWrapper }: self:
|
||||
|
||||
let
|
||||
# Untouched npm-downloaded packages
|
||||
nodePkgs = pkgs.callPackage ./node-composition.nix {
|
||||
inherit pkgs nodejs;
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
};
|
||||
in
|
||||
with self; with elmLib; {
|
||||
inherit (nodePkgs) elm-live elm-upgrade elm-xref elm-analyse elm-git-install;
|
||||
|
||||
elm-verify-examples =
|
||||
let
|
||||
patched = patchBinwrap [ elmi-to-json ] nodePkgs.elm-verify-examples // {
|
||||
meta = with lib; nodePkgs.elm-verify-examples.meta // {
|
||||
description = "Verify examples in your docs";
|
||||
homepage = "https://github.com/stoeffel/elm-verify-examples";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.turbomack ];
|
||||
};
|
||||
};
|
||||
in
|
||||
patched.override (old: {
|
||||
preRebuild = (old.preRebuild or "") + ''
|
||||
# This should not be needed (thanks to binwrap* being nooped) but for some reason it still needs to be done
|
||||
# in case of just this package
|
||||
# TODO: investigate, same as for elm-coverage below
|
||||
sed 's/\"install\".*/\"install\":\"echo no-op\",/g' --in-place node_modules/elmi-to-json/package.json
|
||||
'';
|
||||
});
|
||||
|
||||
elm-coverage =
|
||||
let
|
||||
patched = patchNpmElm (patchBinwrap [ elmi-to-json ] nodePkgs.elm-coverage);
|
||||
in
|
||||
patched.override (old: {
|
||||
# Symlink Elm instrument binary
|
||||
preRebuild = (old.preRebuild or "") + ''
|
||||
# Noop custom installation script
|
||||
sed 's/\"install\".*/\"install\":\"echo no-op\"/g' --in-place package.json
|
||||
|
||||
# This should not be needed (thanks to binwrap* being nooped) but for some reason it still needs to be done
|
||||
# in case of just this package
|
||||
# TODO: investigate
|
||||
sed 's/\"install\".*/\"install\":\"echo no-op\",/g' --in-place node_modules/elmi-to-json/package.json
|
||||
'';
|
||||
postInstall = (old.postInstall or "") + ''
|
||||
mkdir -p unpacked_bin
|
||||
ln -sf ${elm-instrument}/bin/elm-instrument unpacked_bin/elm-instrument
|
||||
'';
|
||||
meta = with lib; nodePkgs.elm-coverage.meta // {
|
||||
description = "Work in progress - Code coverage tooling for Elm";
|
||||
homepage = "https://github.com/zwilias/elm-coverage";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.turbomack ];
|
||||
};
|
||||
});
|
||||
|
||||
create-elm-app = patchNpmElm
|
||||
nodePkgs.create-elm-app // {
|
||||
meta = with lib; nodePkgs.create-elm-app.meta // {
|
||||
description = "Create Elm apps with no build configuration";
|
||||
homepage = "https://github.com/halfzebra/create-elm-app";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.turbomack ];
|
||||
};
|
||||
};
|
||||
|
||||
elm-graphql =
|
||||
nodePkgs."@dillonkearns/elm-graphql" // {
|
||||
meta = with lib; nodePkgs."@dillonkearns/elm-graphql".meta // {
|
||||
description = " Autogenerate type-safe GraphQL queries in Elm.";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.pedrohlc ];
|
||||
};
|
||||
};
|
||||
|
||||
elm-review =
|
||||
nodePkgs.elm-review // {
|
||||
meta = with lib; nodePkgs.elm-review.meta // {
|
||||
description = "Analyzes Elm projects, to help find mistakes before your users find them";
|
||||
homepage = "https://package.elm-lang.org/packages/jfmengels/elm-review/${nodePkgs.elm-review.version}";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.turbomack ];
|
||||
};
|
||||
};
|
||||
|
||||
elm-language-server = nodePkgs."@elm-tooling/elm-language-server" // {
|
||||
meta = with lib; nodePkgs."@elm-tooling/elm-language-server".meta // {
|
||||
description = "Language server implementation for Elm";
|
||||
homepage = "https://github.com/elm-tooling/elm-language-server";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.turbomack ];
|
||||
};
|
||||
};
|
||||
|
||||
elm-spa = nodePkgs."elm-spa".overrideAttrs (
|
||||
old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ makeWrapper old.nodejs.pkgs.node-gyp-build ];
|
||||
|
||||
meta = with lib; nodePkgs."elm-spa".meta // {
|
||||
description = "A tool for building single page apps in Elm";
|
||||
homepage = "https://www.elm-spa.dev/";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.ilyakooo0 ];
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
elm-optimize-level-2 = nodePkgs."elm-optimize-level-2" // {
|
||||
meta = with lib; nodePkgs."elm-optimize-level-2".meta // {
|
||||
description = "A second level of optimization for the Javascript that the Elm Compiler produces";
|
||||
homepage = "https://github.com/mdgriffith/elm-optimize-level-2";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.turbomack ];
|
||||
};
|
||||
};
|
||||
|
||||
elm-pages = import ./elm-pages { inherit nodePkgs pkgs lib makeWrapper; };
|
||||
|
||||
elm-land =
|
||||
let
|
||||
patched = patchNpmElm nodePkgs.elm-land;
|
||||
in
|
||||
patched.override (old: {
|
||||
meta = with lib; nodePkgs."elm-land".meta // {
|
||||
description = "A production-ready framework for building Elm applications.";
|
||||
homepage = "https://elm.land/";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.zupo ];
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
elm-doc-preview = nodePkgs."elm-doc-preview".overrideAttrs (old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ old.nodejs.pkgs.node-gyp-build ];
|
||||
});
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
{ nodePkgs, pkgs, lib, makeWrapper }:
|
||||
|
||||
nodePkgs."elm-pages".overrideAttrs (
|
||||
old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ makeWrapper old.nodejs.pkgs.node-gyp-build ];
|
||||
|
||||
# can't use `patches = [ <patch_file> ]` with a nodePkgs derivation;
|
||||
# need to patch in one of the build phases instead.
|
||||
# see upstream issue https://github.com/dillonkearns/elm-pages/issues/305 for dealing with the read-only problem
|
||||
preFixup = ''
|
||||
patch $out/lib/node_modules/elm-pages/generator/src/codegen.js ${./fix-read-only.patch}
|
||||
patch $out/lib/node_modules/elm-pages/generator/src/init.js ${./fix-init-read-only.patch}
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/elm-pages --prefix PATH : ${
|
||||
with pkgs.elmPackages; lib.makeBinPath [ elm elm-review elm-optimize-level-2 ]
|
||||
}
|
||||
'';
|
||||
|
||||
meta = with lib; nodePkgs."elm-pages".meta // {
|
||||
description = "A statically typed site generator for Elm.";
|
||||
homepage = "https://github.com/dillonkearns/elm-pages";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.turbomack maintainers.jali-clarke ];
|
||||
};
|
||||
}
|
||||
)
|
@ -1,11 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
ROOT="$(realpath "$(dirname -- "$(readlink -f -- "${BASH_SOURCE[0]}")")"/../../../../..)"
|
||||
ROOT="$(realpath "$(dirname -- "$(readlink -f -- "${BASH_SOURCE[0]}")")"/../../../../../..)"
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
$(nix-build $ROOT -A nodePackages.node2nix --no-out-link)/bin/node2nix \
|
||||
--nodejs-18 \
|
||||
-i node-packages.json \
|
||||
-o node-packages.nix \
|
||||
-c node-composition.nix \
|
||||
--no-copy-node-env -e ../../../node-packages/node-env.nix
|
||||
--no-copy-node-env -e ../../../../node-packages/node-env.nix
|
@ -5,7 +5,7 @@
|
||||
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs_18"}:
|
||||
|
||||
let
|
||||
nodeEnv = import ../../../node-packages/node-env.nix {
|
||||
nodeEnv = import ../../../../node-packages/node-env.nix {
|
||||
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
|
||||
inherit pkgs nodejs;
|
||||
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
|
@ -1,13 +1,21 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -p cabal2nix elm2nix -i bash ../../..
|
||||
|
||||
cabal2nix https://github.com/ekmett/ansi-wl-pprint --revision d16e2f6896d76b87b72af7220c2e93ba15c53280 > packages/ansi-wl-pprint.nix
|
||||
# Update all cabal packages.
|
||||
cabal2nix 'https://github.com/zwilias/elm-instrument' --revision '0.0.7' > packages/ghc8_10/elm-instrument/default.nix
|
||||
for subpath in 'avh4-lib' 'elm-format-lib' 'elm-format-markdown' 'elm-format-test-lib'; do
|
||||
cabal2nix 'https://github.com/avh4/elm-format' --revision '0.8.7' \
|
||||
--subpath $subpath > packages/ghc9_2/elm-format/${subpath}.nix
|
||||
done
|
||||
cabal2nix 'https://github.com/avh4/elm-format' --revision '0.8.7' > packages/ghc9_2/elm-format/elm-format.nix
|
||||
cabal2nix 'https://github.com/stoeffel/elmi-to-json' --revision '1.3.0' > packages/ghc8_10/elmi-to-json/default.nix
|
||||
cabal2nix 'https://github.com/ekmett/ansi-wl-pprint' --revision 'v0.6.8.1' > packages/ghc9_6/ansi-wl-pprint/default.nix
|
||||
|
||||
# We're building binaries from commit that npm installer is using since
|
||||
# November 1st release called 0.19.1-6 in npm registry.
|
||||
# These binaries are built with newer ghc version and also support Aarch64 for Linux and Darwin.
|
||||
# Upstream git tag for 0.19.1 is still pointing to original commit from 2019.
|
||||
cabal2nix https://github.com/elm/compiler --revision 2f6dd29258e880dbb7effd57a829a0470d8da48b > packages/elm.nix
|
||||
cabal2nix https://github.com/elm/compiler --revision 2f6dd29258e880dbb7effd57a829a0470d8da48b > packages/ghc9_6/elm/default.nix
|
||||
|
||||
echo "need to manually copy registry.dat from an existing elm project"
|
||||
#elm2nix snapshot > registry.dat
|
||||
|
@ -26,8 +26,6 @@ stdenv.mkDerivation rec {
|
||||
env.NIX_CFLAGS_COMPILE = toString ([
|
||||
# Needed with GCC 12
|
||||
"-Wno-error=array-bounds"
|
||||
] ++ lib.optionals stdenv.hostPlatform.isRiscV [
|
||||
"-Wno-error=free-nonheap-object"
|
||||
]);
|
||||
|
||||
meta = with lib; {
|
||||
|
51
pkgs/development/python-modules/asgi-lifespan/default.nix
Normal file
51
pkgs/development/python-modules/asgi-lifespan/default.nix
Normal file
@ -0,0 +1,51 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pythonOlder
|
||||
, setuptools
|
||||
, setuptools-scm
|
||||
, sniffio
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "asgi-lifespan";
|
||||
version = "2.1.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "florimondmanca";
|
||||
repo = "asgi-lifespan";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-Jgmd/4c1lxHM/qi3MJNN1aSSUJrI7CRNwwHrFwwcCkc=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
sed -i "/--cov/d" setup.cfg
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
sniffio
|
||||
];
|
||||
|
||||
# Circular dependencies, starlette
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"asgi_lifespan"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Programmatic startup/shutdown of ASGI apps";
|
||||
homepage = "https://github.com/florimondmanca/asgi-lifespan";
|
||||
changelog = "https://github.com/florimondmanca/asgi-lifespan/blob/${version}/CHANGELOG.md";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
@ -15,7 +15,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "dbt-bigquery";
|
||||
version = "1.7.6";
|
||||
version = "1.7.7";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@ -24,19 +24,19 @@ buildPythonPackage rec {
|
||||
owner = "dbt-labs";
|
||||
repo = "dbt-bigquery";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-bF2++Bs4pvqA3GW2xJkRNa1HkqnHBbMnKHHjo1TWboM=";
|
||||
hash = "sha256-+UF49ReSxKQ8ouutOv1b9JcU/6CNk7Yw8f1/tlRvwnU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pythonRelaxDepsHook
|
||||
setuptools
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"agate"
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
build-system = [
|
||||
pythonRelaxDepsHook
|
||||
setuptools
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
agate
|
||||
dbt-core
|
||||
google-cloud-bigquery
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "dbt-core";
|
||||
version = "1.7.10";
|
||||
version = "1.7.11";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
@ -42,26 +42,27 @@ buildPythonPackage rec {
|
||||
owner = "dbt-labs";
|
||||
repo = "dbt-core";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-0cKzQjAnj0JMrHyA/gOgYceM6g1URJFgQtp90m09Nkw=";
|
||||
hash = "sha256-r51aki1fuHfp6gWkzOMA92xFeM0MXFPrNq77aKTYYWA=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/core";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pythonRelaxDepsHook
|
||||
setuptools
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"agate"
|
||||
"click"
|
||||
"mashumaro"
|
||||
"networkx"
|
||||
"logbook"
|
||||
"pathspec"
|
||||
"urllib3"
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
build-system = [
|
||||
pythonRelaxDepsHook
|
||||
setuptools
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
agate
|
||||
cffi
|
||||
click
|
||||
|
@ -19,11 +19,11 @@ buildPythonPackage {
|
||||
|
||||
env.DBT_PSYCOPG2_NAME = "psycopg2";
|
||||
|
||||
nativeBuildInputs = [
|
||||
build-system = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dependencies = [
|
||||
agate
|
||||
dbt-core
|
||||
psycopg2
|
||||
|
@ -36,12 +36,12 @@ buildPythonPackage rec {
|
||||
"importlib-metadata"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
build-system = [
|
||||
hatchling
|
||||
pythonRelaxDepsHook
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dependencies = [
|
||||
click
|
||||
dateutils
|
||||
importlib-metadata
|
||||
@ -63,9 +63,9 @@ buildPythonPackage rec {
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
changelog = "https://github.com/dbt-labs/dbt-semantic-interfaces/releases/tag/v${version}";
|
||||
description = "shared interfaces used by dbt-core and MetricFlow projects";
|
||||
description = "Shared interfaces used by dbt-core and MetricFlow projects";
|
||||
homepage = "https://github.com/dbt-labs/dbt-semantic-interfaces";
|
||||
changelog = "https://github.com/dbt-labs/dbt-semantic-interfaces/releases/tag/v${version}";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ pbsds ];
|
||||
};
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "dbt-snowflake";
|
||||
version = "1.7.2";
|
||||
version = "1.7.3";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@ -19,14 +19,14 @@ buildPythonPackage rec {
|
||||
owner = "dbt-labs";
|
||||
repo = "dbt-snowflake";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-OyUBqSNHMedCDsY280O8VAmxeyeF5J0snk5o6XhE2V4=";
|
||||
hash = "sha256-ksnLQdoXR8KVtYTFdlaWT8UYjAsLNyEVVap/QHtm+j8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
build-system = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dependencies = [
|
||||
dbt-core
|
||||
snowflake-connector-python
|
||||
] ++ snowflake-connector-python.optional-dependencies.secure-local-storage;
|
||||
|
@ -2,7 +2,6 @@
|
||||
, stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, fetchpatch2
|
||||
, pythonOlder
|
||||
, substituteAll
|
||||
|
||||
@ -64,11 +63,6 @@ buildPythonPackage rec {
|
||||
# disable test that excpects timezone issues
|
||||
./django_5_disable_failing_tests.patch
|
||||
|
||||
(fetchpatch2 {
|
||||
# fix test on 3.12; https://github.com/django/django/pull/17843
|
||||
url = "https://github.com/django/django/commit/bc8471f0aac8f0c215b9471b594d159783bac19b.patch";
|
||||
hash = "sha256-g1T9b73rmQ0uk1lB+iQy1XwK3Qin3mf5wpRsyYISJaw=";
|
||||
})
|
||||
] ++ lib.optionals withGdal [
|
||||
(substituteAll {
|
||||
src = ./django_5_set_geos_gdal_lib.patch;
|
||||
|
@ -5,23 +5,28 @@
|
||||
, pytest-mock
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, setuptools
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "fjaraskupan";
|
||||
version = "2.2.0";
|
||||
format = "setuptools";
|
||||
version = "2.3.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "elupus";
|
||||
repo = pname;
|
||||
repo = "fjaraskupan";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-0tNLwYckWF9GjhniEkiO+A+xDsUriUsMFZxG/FmUfps=";
|
||||
hash = "sha256-3jw42lsCwNkFptMNpnhtbrPIkZP/8lUCcMigzq8Hbc4=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
nativeBuildInputs = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
bleak
|
||||
];
|
||||
|
||||
@ -37,6 +42,7 @@ buildPythonPackage rec {
|
||||
meta = with lib; {
|
||||
description = "Module for controlling Fjäråskupan kitchen fans";
|
||||
homepage = "https://github.com/elupus/fjaraskupan";
|
||||
changelog = "https://github.com/elupus/fjaraskupan/releases/tag/${version}";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
|
@ -7,21 +7,26 @@
|
||||
, python-dateutil
|
||||
, pythonOlder
|
||||
, requests
|
||||
, setuptools
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "hcloud";
|
||||
version = "1.33.2";
|
||||
format = "setuptools";
|
||||
version = "1.34.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-GCiw+HbN/0na2fiAS16On72nj09VR0Naw6wwCIQ4zl8=";
|
||||
hash = "sha256-8hwr0K+6nLgAVMhXb/08CS7HrlLYQ/SV0K8MWH/PQk0=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
build-system = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
future
|
||||
requests
|
||||
python-dateutil
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "langchain-community";
|
||||
version = "0.0.27";
|
||||
version = "0.0.29";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
@ -25,7 +25,7 @@ buildPythonPackage rec {
|
||||
src = fetchPypi {
|
||||
pname = "langchain_community";
|
||||
inherit version;
|
||||
hash = "sha256-Jm3/vUwWZtsYicrZU/pRAtTev/eCM1NTtteGNqdhd40=";
|
||||
hash = "sha256-2IEH+vqf4sVzPaljDGjZ7lHNM7HIiklQ56LZo49+eqM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "langchain-core";
|
||||
version = "0.1.32";
|
||||
version = "0.1.36";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
@ -24,7 +24,7 @@ buildPythonPackage rec {
|
||||
src = fetchPypi {
|
||||
pname = "langchain_core";
|
||||
inherit version;
|
||||
hash = "sha256-1iaDvsvyD1HxKHV5GgQjIPReqgyHomfTC8A7waB/XsI=";
|
||||
hash = "sha256-qiQyNwyj0qXW3RSoEKpkiL8vYi/3oKPcMPbg7Z1/X6g=";
|
||||
};
|
||||
|
||||
pythonRelaxDeps = [
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "langchain";
|
||||
version = "0.1.11";
|
||||
version = "0.1.13";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
@ -61,7 +61,7 @@ buildPythonPackage rec {
|
||||
owner = "langchain-ai";
|
||||
repo = "langchain";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-I7H8W85WJCt8Dkep5UvFRVuhJS8uAeg0xF9mNPZwm2g=";
|
||||
hash = "sha256-tBEO0GOY1cqO5FOYnBXAOSupSRhcoI9u4Nu4FieId74=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/libs/langchain";
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "langsmith";
|
||||
version = "0.1.33";
|
||||
version = "0.1.36";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
@ -24,7 +24,7 @@ buildPythonPackage rec {
|
||||
owner = "langchain-ai";
|
||||
repo = "langsmith-sdk";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-0yip9oUBjQ4AfaUuejxkFMAaVVXqawNPb4NQeiXb7J8=";
|
||||
hash = "sha256-YHYzC4c7VOPBiBgtJcN/hPccZMJBL5E8VsIAwErhWjg=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/python";
|
||||
|
@ -0,0 +1,45 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, llama-index-core
|
||||
, poetry-core
|
||||
, pythonOlder
|
||||
, sentence-transformers
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "llama-index-embeddings-huggingface";
|
||||
version = "0.2.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "llama_index_embeddings_huggingface";
|
||||
inherit version;
|
||||
hash = "sha256-3PCplFXzfE4aL91c1lyd0aRRu4aMP4DDNcTQybadAHE=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
llama-index-core
|
||||
sentence-transformers
|
||||
];
|
||||
|
||||
# Tests are only available in the mono repo
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"llama_index.embeddings.huggingface"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "LlamaIndex Embeddings Integration for Huggingface";
|
||||
homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/embeddings/llama-index-embeddings-huggingface";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, google-generativeai
|
||||
, llama-index-core
|
||||
, poetry-core
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "llama-index-embeddings-ollama";
|
||||
version = "0.1.2";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "llama_index_embeddings_ollama";
|
||||
inherit version;
|
||||
hash = "sha256-qeCAm93S5K2IjySVGe3H49M5x05OA/xaQMMGDcQdR6k=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
llama-index-core
|
||||
];
|
||||
|
||||
# Tests are only available in the mono repo
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"llama_index.embeddings.ollama"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "LlamaIndex Llms Integration for Ollama";
|
||||
homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/embeddings/llama-index-embeddings-ollama";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, llama-index-core
|
||||
, nebula3-python
|
||||
, poetry-core
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "llama-index-graph-stores-nebula";
|
||||
version = "0.1.2";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "llama_index_graph_stores_nebula";
|
||||
inherit version;
|
||||
hash = "sha256-Xb/0ogj2NlGV4MGC9Be54d/JfalT40jtAe6LOPO1u/8=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
llama-index-core
|
||||
nebula3-python
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"llama_index.graph_stores.nebula"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "LlamaIndex Graph Store Integration for Nebula";
|
||||
homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/graph_stores/llama-index-graph-stores-nebula";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, neo4j
|
||||
, llama-index-core
|
||||
, poetry-core
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "llama-index-graph-stores-neo4j";
|
||||
version = "0.1.3";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "llama_index_graph_stores_neo4j";
|
||||
inherit version;
|
||||
hash = "sha256-AUWezvdONxz5H42VpTjh7NrBkTdWjtBJyMvA8kSh5w4=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
neo4j
|
||||
llama-index-core
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"llama_index.graph_stores.neo4j"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "LlamaIndex Graph Store Integration for Neo4j";
|
||||
homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/graph_stores/llama-index-graph-stores-neo4j";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, boto3
|
||||
, llama-index-core
|
||||
, poetry-core
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "llama-index-graph-stores-neptune";
|
||||
version = "0.1.3";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "llama_index_graph_stores_neptune";
|
||||
inherit version;
|
||||
hash = "sha256-ZveFCJJT7Qal82cuVTs+3AmSuvdc7GsHqqqNvcDb3CY=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
boto3
|
||||
llama-index-core
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"llama_index.graph_stores.neptune"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "LlamaIndex Graph Store Integration for Neptune";
|
||||
homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/graph_stores/llama-index-graph-stores-neptune";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, llama-index-core
|
||||
, poetry-core
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "llama-index-llms-ollama";
|
||||
version = "0.1.2";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "llama_index_llms_ollama";
|
||||
inherit version;
|
||||
hash = "sha256-GexyfQSMhzkV1bA32aL+lWUgwBmxHXq4w8QG3RHzTks=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
llama-index-core
|
||||
];
|
||||
|
||||
# Tests are only available in the mono repo
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"llama_index.llms.ollama"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "LlamaIndex LLMS Integration for ollama";
|
||||
homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/llms/llama-index-llms-ollama";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, llama-index-core
|
||||
, llama-index-llms-openai
|
||||
, poetry-core
|
||||
, pythonOlder
|
||||
, transformers
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "llama-index-llms-openai-like";
|
||||
version = "0.1.3";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "llama_index_llms_openai_like";
|
||||
inherit version;
|
||||
hash = "sha256-w0EjJQd8dSY+N9YNUBMUub3HcPEtiisW51bn2ayPnj8=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
llama-index-core
|
||||
llama-index-llms-openai
|
||||
transformers
|
||||
];
|
||||
|
||||
# Tests are only available in the mono repo
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"llama_index.llms.openai_like"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "LlamaIndex LLMS Integration for OpenAI like";
|
||||
homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/llms/llama-index-llms-openai-like";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, google-generativeai
|
||||
, llama-index-core
|
||||
, poetry-core
|
||||
, pythonOlder
|
||||
, pythonRelaxDepsHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "llama-index-vector-stores-google";
|
||||
version = "0.1.4";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "llama_index_vector_stores_google";
|
||||
inherit version;
|
||||
hash = "sha256-5HjbymV7wdcu/C+ndWCxj3j10QIgVqUaSaZ4cRMJ46U=";
|
||||
};
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"google-generativeai"
|
||||
];
|
||||
|
||||
build-system = [
|
||||
poetry-core
|
||||
pythonRelaxDepsHook
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
google-generativeai
|
||||
llama-index-core
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"llama_index.vector_stores.google"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "LlamaIndex Vector Store Integration for Google";
|
||||
homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/vector_stores/llama-index-vector-stores-google";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
{ lib
|
||||
, asyncpg
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, llama-index-core
|
||||
, pgvector
|
||||
, poetry-core
|
||||
, psycopg2
|
||||
, pythonRelaxDepsHook
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "llama-index-vector-stores-postgres";
|
||||
version = "0.1.3";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "llama_index_vector_stores_postgres";
|
||||
inherit version;
|
||||
hash = "sha256-vWqCcda9dDPLceoOEgMivpBmkLbKs/poEjzCk/q4HwI=";
|
||||
};
|
||||
|
||||
pythonRemoveDeps = [
|
||||
"psycopg2-binary"
|
||||
];
|
||||
|
||||
build-system = [
|
||||
poetry-core
|
||||
pythonRelaxDepsHook
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
asyncpg
|
||||
llama-index-core
|
||||
pgvector
|
||||
psycopg2
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"llama_index.vector_stores.postgres"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "LlamaIndex Vector Store Integration for Postgres";
|
||||
homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/vector_stores/llama-index-vector-stores-postgres";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, llama-index-core
|
||||
, qdrant-client
|
||||
, poetry-core
|
||||
, grpcio
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "llama-index-vector-stores-qdrant";
|
||||
version = "0.1.4";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "llama_index_vector_stores_qdrant";
|
||||
inherit version;
|
||||
hash = "sha256-UIiEL7ZUcGQusyhs9cFsPOZ8qxH7ouoCnQMemlho0lA=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
grpcio
|
||||
llama-index-core
|
||||
qdrant-client
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"llama_index.vector_stores.qdrant"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "LlamaIndex Vector Store Integration for Qdrant";
|
||||
homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/vector_stores/llama-index-vector-stores-qdrant";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
@ -1,34 +1,35 @@
|
||||
{ lib
|
||||
, accelerate
|
||||
, aiohttp
|
||||
, buildPythonPackage
|
||||
, fastapi
|
||||
, fetchFromGitHub
|
||||
, pythonOlder
|
||||
, flask
|
||||
, numpy
|
||||
, pg8000
|
||||
, pillow
|
||||
, pydantic
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, pythonRelaxDepsHook
|
||||
, redis
|
||||
, requests
|
||||
, aiohttp
|
||||
, sentence-transformers
|
||||
, setuptools
|
||||
, sqlalchemy
|
||||
, sqlitedict
|
||||
, tenacity
|
||||
, tiktoken
|
||||
, xxhash
|
||||
, # optional dependencies
|
||||
accelerate
|
||||
, flask
|
||||
, sentence-transformers
|
||||
, torch
|
||||
, transformers
|
||||
, fastapi
|
||||
, uvicorn
|
||||
, pillow
|
||||
, pg8000
|
||||
, sqlalchemy
|
||||
, pytestCheckHook
|
||||
, xxhash
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "manifest-ml";
|
||||
version = "0.1.9";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
@ -41,7 +42,16 @@ buildPythonPackage rec {
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
pythonRelaxDeps = [
|
||||
"pydantic"
|
||||
];
|
||||
|
||||
build-system = [
|
||||
pythonRelaxDepsHook
|
||||
setuptools
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
numpy
|
||||
pydantic
|
||||
redis
|
||||
@ -51,7 +61,7 @@ buildPythonPackage rec {
|
||||
tenacity
|
||||
tiktoken
|
||||
xxhash
|
||||
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
|
||||
];
|
||||
|
||||
passthru.optional-dependencies = {
|
||||
api = [
|
||||
@ -79,7 +89,7 @@ buildPythonPackage rec {
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
|
||||
|
||||
preCheck = ''
|
||||
export HOME=$TMPDIR
|
||||
@ -91,12 +101,17 @@ buildPythonPackage rec {
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# these tests have db access
|
||||
# Tests require DB access
|
||||
"test_init"
|
||||
"test_key_get_and_set"
|
||||
"test_get"
|
||||
# this test has network access
|
||||
# Tests require network access
|
||||
"test_abatch_run"
|
||||
"test_batch_run"
|
||||
"test_retry_handling"
|
||||
"test_run_chat"
|
||||
"test_run"
|
||||
"test_score_run"
|
||||
# Test is time-senstive
|
||||
"test_timing"
|
||||
];
|
||||
|
@ -111,7 +111,7 @@ rec {
|
||||
|
||||
mypy-boto3-backupstorage = buildMypyBoto3Package "backupstorage" "1.34.0" "sha256-Y8kjZ+ov8OsiJ8Sm1LlvP8YbgVc+AkLkbZIhOh4y7ZY=";
|
||||
|
||||
mypy-boto3-batch = buildMypyBoto3Package "batch" "1.34.59" "sha256-rsXdh8f3KRAROftePejdLxChRqtiaDFsJyhctX7jRUQ=";
|
||||
mypy-boto3-batch = buildMypyBoto3Package "batch" "1.34.72" "sha256-ha5OZVVcO/+slxQOPIrd+D1Ehaw6YpGqCWofSgFj5JI=";
|
||||
|
||||
mypy-boto3-billingconductor = buildMypyBoto3Package "billingconductor" "1.34.1" "sha256-uXxQkoe2u3idcYta9YFbjxoK8HsvUiRQSyYrYhVi1kU=";
|
||||
|
||||
@ -119,7 +119,7 @@ rec {
|
||||
|
||||
mypy-boto3-budgets = buildMypyBoto3Package "budgets" "1.34.0" "sha256-gs8JYnpFNOMWppBO2R3DO+c6RecQC0vzaox5DqXCKOA=";
|
||||
|
||||
mypy-boto3-ce = buildMypyBoto3Package "ce" "1.34.52" "sha256-KHimN6KC8V6nyp6ZQbv0XAuWMjGZkg/bPrQ6do5QQE0=";
|
||||
mypy-boto3-ce = buildMypyBoto3Package "ce" "1.34.71" "sha256-VfB823/q+ie97Bv5GXhsBaGxAuXSDbfFq2rO6TjThXY=";
|
||||
|
||||
mypy-boto3-chime = buildMypyBoto3Package "chime" "1.34.0" "sha256-/IBkHJf4t1K/Ubdf/hUw5XToNBTCziMfTSdksxMwA2Q=";
|
||||
|
||||
@ -161,7 +161,7 @@ rec {
|
||||
|
||||
mypy-boto3-codeartifact = buildMypyBoto3Package "codeartifact" "1.34.68" "sha256-Ey0cmx0OxN1/VXIyvn0EOBP9qYIuc/XyFVZniHLaNEY=";
|
||||
|
||||
mypy-boto3-codebuild = buildMypyBoto3Package "codebuild" "1.34.67" "sha256-Kvd8zAHfepA4dulpiQCaT2pfKCH567d6CYd5QlweXIY=";
|
||||
mypy-boto3-codebuild = buildMypyBoto3Package "codebuild" "1.34.70" "sha256-lv69lhMKJHRnooVrmGinfDEi7eVEe7O12GNNo5uZQQc=";
|
||||
|
||||
mypy-boto3-codecatalyst = buildMypyBoto3Package "codecatalyst" "1.34.0" "sha256-TsXVy8bx6kaj84PJiNNU+075Tx3WW0mrtZFOyLx9yT4=";
|
||||
|
||||
@ -251,7 +251,7 @@ rec {
|
||||
|
||||
mypy-boto3-ebs = buildMypyBoto3Package "ebs" "1.34.0" "sha256-xIrrXOayZed+Jcn4CFXXNgKz/G+RdiuwA04wq+Ry/fs=";
|
||||
|
||||
mypy-boto3-ec2 = buildMypyBoto3Package "ec2" "1.34.66" "sha256-Io0ExXqdar+5A4H66ryaApWIQnEcspQysfBsOit4WyY=";
|
||||
mypy-boto3-ec2 = buildMypyBoto3Package "ec2" "1.34.71" "sha256-hjEJNB8/m1yE9f0yxoKZeVySRfCun1NGmL8UeqP8AXs=";
|
||||
|
||||
mypy-boto3-ec2-instance-connect = buildMypyBoto3Package "ec2-instance-connect" "1.34.63" "sha256-kExmGXEJ5jrvOewmWx7AjVb3boD5GU0cEUp/2PQhzlw=";
|
||||
|
||||
@ -259,7 +259,7 @@ rec {
|
||||
|
||||
mypy-boto3-ecr-public = buildMypyBoto3Package "ecr-public" "1.34.0" "sha256-38ZiRVPr9L+KUF6oL23xsIiKMW0pT/nIngFkhSS3z2Y=";
|
||||
|
||||
mypy-boto3-ecs = buildMypyBoto3Package "ecs" "1.34.39" "sha256-s3YTAoZSgDHenHa54DwSNRRAnfCNMcdmZP1FX0hTygE=";
|
||||
mypy-boto3-ecs = buildMypyBoto3Package "ecs" "1.34.71" "sha256-Ka2nMhArorYcIx+MoLN7bIbKl4ptNER6uC9FdLWZBfI=";
|
||||
|
||||
mypy-boto3-efs = buildMypyBoto3Package "efs" "1.34.0" "sha256-VAK7mfnPBPDC8Azm6Bxl86E8CkeArTmfgqYkIcSblYA=";
|
||||
|
||||
@ -267,7 +267,7 @@ rec {
|
||||
|
||||
mypy-boto3-elastic-inference = buildMypyBoto3Package "elastic-inference" "1.34.0" "sha256-gbWKw0zDQf3qBlp1KeO7MX1j/GqRUpFAxLG0BKFrHBk=";
|
||||
|
||||
mypy-boto3-elasticache = buildMypyBoto3Package "elasticache" "1.34.60" "sha256-D3WLH1FS8dddD6WKUmQApvtehGMmjWYzdaMwTHzvzYk=";
|
||||
mypy-boto3-elasticache = buildMypyBoto3Package "elasticache" "1.34.72" "sha256-yZd2KB7wIw23PybblyIlCo/5IEFYxAUfbLD2J91eOzw=";
|
||||
|
||||
mypy-boto3-elasticbeanstalk = buildMypyBoto3Package "elasticbeanstalk" "1.34.0" "sha256-ftVFUwY81mg/9zJ4xxVjhXF1HgKpzj1koIS32cMKRLw=";
|
||||
|
||||
@ -279,7 +279,7 @@ rec {
|
||||
|
||||
mypy-boto3-emr = buildMypyBoto3Package "emr" "1.34.44" "sha256-zM1VpAaBSxqdZiSrNiaAKfvliNRXMLEmvFvXcFmkZO0=";
|
||||
|
||||
mypy-boto3-emr-containers = buildMypyBoto3Package "emr-containers" "1.34.0" "sha256-tGHWoMVrfH35hLgzDGMSJs5kRTWQqjM/e0IAPe4EfiU=";
|
||||
mypy-boto3-emr-containers = buildMypyBoto3Package "emr-containers" "1.34.70" "sha256-uZADsQWfrkoVrQZosfqogcKERWsykIqdk+tJpgmcai4=";
|
||||
|
||||
mypy-boto3-emr-serverless = buildMypyBoto3Package "emr-serverless" "1.34.0" "sha256-YgccYi2+XhKiPGCMimrCooYPRV+iRuA1h120UdqJKUc=";
|
||||
|
||||
@ -291,7 +291,7 @@ rec {
|
||||
|
||||
mypy-boto3-evidently = buildMypyBoto3Package "evidently" "1.34.0" "sha256-MkBB5iTYJYg2cWFYHR3Qu7TcsDglLPEw0MnoHqij6+A=";
|
||||
|
||||
mypy-boto3-finspace = buildMypyBoto3Package "finspace" "1.34.66" "sha256-G5FMKm9HymvRPtkjvYZt6NVhPUVuBwCR4kQq8/naUFs=";
|
||||
mypy-boto3-finspace = buildMypyBoto3Package "finspace" "1.34.71" "sha256-bgPwDXqu73DjQCADmjTig6kLNOWvQ39flwhyYAbTai4=";
|
||||
|
||||
mypy-boto3-finspace-data = buildMypyBoto3Package "finspace-data" "1.34.0" "sha256-8mND5BbdKY5srFwdpxSyfCUTIP4fa9hztP4daUJOB8k=";
|
||||
|
||||
@ -315,7 +315,7 @@ rec {
|
||||
|
||||
mypy-boto3-glacier = buildMypyBoto3Package "glacier" "1.34.0" "sha256-j8LUD8EjjRL1av7UEXBqNPEARaSFgstaioGJtbel4oM=";
|
||||
|
||||
mypy-boto3-globalaccelerator = buildMypyBoto3Package "globalaccelerator" "1.34.0" "sha256-hvQeuu1TuLO9aB1+lWTGPgpGqoZlC8d3Ru5S4OVLgys=";
|
||||
mypy-boto3-globalaccelerator = buildMypyBoto3Package "globalaccelerator" "1.34.70" "sha256-7Su+rgV6KD9I4j630Qybufwn39rp/8tYQ2ldEe2Untc=";
|
||||
|
||||
mypy-boto3-glue = buildMypyBoto3Package "glue" "1.34.35" "sha256-+Kvk8uB9KZp7mw3sMAM6mHdBTnkO5J8nSVClttndMDY=";
|
||||
|
||||
@ -469,7 +469,7 @@ rec {
|
||||
|
||||
mypy-boto3-mediaconvert = buildMypyBoto3Package "mediaconvert" "1.34.33" "sha256-7OwfjcWDE1AHvpyOu3fE5YBwjQscpa+VnE7eylk1unA=";
|
||||
|
||||
mypy-boto3-medialive = buildMypyBoto3Package "medialive" "1.34.47" "sha256-kE93r3oDtz+uwUDeWBJA2yQBx4HFAL49FdpIexVMbrc=";
|
||||
mypy-boto3-medialive = buildMypyBoto3Package "medialive" "1.34.70" "sha256-WMBmgEckAoWpwe/YMJsVRZnbkT8dbr8F1S3AW1PRF+4=";
|
||||
|
||||
mypy-boto3-mediapackage = buildMypyBoto3Package "mediapackage" "1.34.0" "sha256-4DJ2zVk0satmVn+TZdDExx/+ClJpc1bdmbvl72Joe5U=";
|
||||
|
||||
@ -625,7 +625,7 @@ rec {
|
||||
|
||||
mypy-boto3-s3outposts = buildMypyBoto3Package "s3outposts" "1.34.0" "sha256-xLuGP9Fe0S7zRimt1AKd9KOrytmNd/GTRg5OVi5Xpos=";
|
||||
|
||||
mypy-boto3-sagemaker = buildMypyBoto3Package "sagemaker" "1.34.64" "sha256-Sf1T1aqRMIEZmuA2KH5tzuhTDN8yfFID/+h0DCWxws0=";
|
||||
mypy-boto3-sagemaker = buildMypyBoto3Package "sagemaker" "1.34.70" "sha256-WON2j0ZQ9x3qq1mOOzMvT8jJSuJipDHDp4IxsB88GCg=";
|
||||
|
||||
mypy-boto3-sagemaker-a2i-runtime = buildMypyBoto3Package "sagemaker-a2i-runtime" "1.34.0" "sha256-jMZ3aWKQPhNec4A/02S1waQi6Mx9JVdENc3kblhsKjA=";
|
||||
|
||||
@ -647,7 +647,7 @@ rec {
|
||||
|
||||
mypy-boto3-sdb = buildMypyBoto3Package "sdb" "1.34.0" "sha256-13BuAQD8uDwwDhCw+8O3V882H6/oor5Z8mBmjb7HHAU=";
|
||||
|
||||
mypy-boto3-secretsmanager = buildMypyBoto3Package "secretsmanager" "1.34.63" "sha256-oZM3PXGPdH1Th4tcx/7y6bj944kuR4isaQ/SsWo1Vkw=";
|
||||
mypy-boto3-secretsmanager = buildMypyBoto3Package "secretsmanager" "1.34.72" "sha256-0HM8W1Potee9oA9LQu2ErxLjaiDISJF+ScFzoEIu8Dw=";
|
||||
|
||||
mypy-boto3-securityhub = buildMypyBoto3Package "securityhub" "1.34.69" "sha256-2fJx1VaOhYSjTXAEboBhHhMdTH697zcGHmrJsGknDTI=";
|
||||
|
||||
|
0
pkgs/development/python-modules/mypy-boto3/update.sh
Normal file → Executable file
0
pkgs/development/python-modules/mypy-boto3/update.sh
Normal file → Executable file
67
pkgs/development/python-modules/nebula3-python/default.nix
Normal file
67
pkgs/development/python-modules/nebula3-python/default.nix
Normal file
@ -0,0 +1,67 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pdm-backend
|
||||
, future
|
||||
, httplib2
|
||||
, pythonOlder
|
||||
, pytz
|
||||
, pytestCheckHook
|
||||
, six
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "nebula3-python";
|
||||
version = "3.5.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vesoft-inc";
|
||||
repo = "nebula-python";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-T9lZVYov6tQ8QRM2QtOGyolHk3O5FSb3xq70nS2Rr6c=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
pdm-backend
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
future
|
||||
httplib2
|
||||
pytz
|
||||
six
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"nebula3"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# Tests require a running thrift instance
|
||||
"tests/test_connection.py"
|
||||
"tests/test_data_from_server.py"
|
||||
"tests/test_graph_storage_client.py"
|
||||
"tests/test_meta_cache.py"
|
||||
"tests/test_parameter.py"
|
||||
"tests/test_pool.py"
|
||||
"tests/test_session.py"
|
||||
"tests/test_session_pool.py"
|
||||
"tests/test_ssl_connection.py"
|
||||
"tests/test_ssl_pool.py"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Client API of Nebula Graph in Python";
|
||||
homepage = "https://github.com/vesoft-inc/nebula-python";
|
||||
changelog = "https://github.com/vesoft-inc/nebula-python/blob/${version}/CHANGELOG.md";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
@ -25,14 +25,14 @@ buildPythonPackage rec {
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace "--cov=pyecoforest --cov-report=term-missing:skip-covered" ""
|
||||
--replace-fail "--cov=pyecoforest --cov-report=term-missing:skip-covered" ""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
build-system = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dependencies = [
|
||||
httpx
|
||||
];
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
{ lib
|
||||
, aiofiles
|
||||
, aiohttp
|
||||
, async-timeout
|
||||
, async-generator
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
@ -12,31 +13,30 @@
|
||||
, pythonOlder
|
||||
, setuptools
|
||||
, voluptuous
|
||||
, wheel
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyinsteon";
|
||||
version = "1.5.3";
|
||||
format = "pyproject";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
owner = "pyinsteon";
|
||||
repo = "pyinsteon";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-9d6QbekUv63sjKdK+ZogYOkGfFXVW+JB6ITHnehLwtM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
build-system = [
|
||||
setuptools
|
||||
wheel
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dependencies = [
|
||||
aiofiles
|
||||
aiohttp
|
||||
async-timeout
|
||||
pypubsub
|
||||
pyserial
|
||||
pyserial-asyncio
|
||||
@ -48,20 +48,9 @@ buildPythonPackage rec {
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
disabledTests = lib.optionals (pythonAtLeast "3.12") [
|
||||
# AssertionError: Failed test 'read_eeprom_response' with argument 'group' value X vs expected value Z
|
||||
"test_async_send"
|
||||
"test_nak_response"
|
||||
"test_no_direct_ack"
|
||||
"test_on_level"
|
||||
"test_on_level_group"
|
||||
"test_on_level_nak"
|
||||
# AssertionError: Failed test 'read_eeprom_response' with argument 'target' value X vs expected value Y
|
||||
"test_other_status"
|
||||
"test_status_command"
|
||||
"test_status_request_hub"
|
||||
# stuck in epoll
|
||||
"test_read_all_peek"
|
||||
disabledTestPaths = lib.optionals (pythonAtLeast "3.12") [
|
||||
# Tests are blocking or failing
|
||||
"tests/test_handlers/"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
@ -70,7 +59,6 @@ buildPythonPackage rec {
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python library to support Insteon home automation projects";
|
||||
mainProgram = "insteon_tools";
|
||||
longDescription = ''
|
||||
This is a Python package to interface with an Insteon Modem. It has been
|
||||
tested to work with most USB or RS-232 serial based devices such as the
|
||||
@ -80,5 +68,6 @@ buildPythonPackage rec {
|
||||
changelog = "https://github.com/pyinsteon/pyinsteon/releases/tag/${version}";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = with maintainers; [ fab ];
|
||||
mainProgram = "insteon_tools";
|
||||
};
|
||||
}
|
||||
|
@ -4,9 +4,12 @@
|
||||
, huggingface-hub
|
||||
, nltk
|
||||
, numpy
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, scikit-learn
|
||||
, scipy
|
||||
, sentencepiece
|
||||
, setuptools
|
||||
, tokenizers
|
||||
, torch
|
||||
, torchvision
|
||||
@ -16,17 +19,23 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "sentence-transformers";
|
||||
version = "2.5.1";
|
||||
format = "setuptools";
|
||||
version = "2.6.1";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "UKPLab";
|
||||
repo = "sentence-transformers";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-HIOizBf8YnPAj95cG1HopO9B/bhAmT0u3q5CM6POEjQ=";
|
||||
hash = "sha256-09AAuv/yXTbBvjA4gu5ueZrQkVja0BTIGNLZ2tLSyh8=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
build-system = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
huggingface-hub
|
||||
nltk
|
||||
numpy
|
||||
@ -40,14 +49,37 @@ buildPythonPackage rec {
|
||||
transformers
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "sentence_transformers" ];
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
doCheck = false; # tests fail at build_ext
|
||||
pythonImportsCheck = [
|
||||
"sentence_transformers"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# Tests require network access
|
||||
"test_simple_encode"
|
||||
"test_paraphrase_mining"
|
||||
"test_cmnrl_same_grad"
|
||||
"test_LabelAccuracyEvaluator"
|
||||
"test_ParaphraseMiningEvaluator"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# Tests require network access
|
||||
"tests/test_pretrained_stsb.py"
|
||||
"tests/test_sentence_transformer.py"
|
||||
"tests/test_compute_embeddings.py"
|
||||
"tests/test_multi_process.py"
|
||||
"tests/test_cross_encoder.py"
|
||||
"tests/test_train_stsb.py"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Multilingual Sentence & Image Embeddings with BERT";
|
||||
homepage = "https://github.com/UKPLab/sentence-transformers";
|
||||
changelog = "https://github.com/UKPLab/sentence-transformers/releases/tag/${src.rev}";
|
||||
changelog = "https://github.com/UKPLab/sentence-transformers/releases/tag/${version}";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ dit7ya ];
|
||||
};
|
||||
|
67
pkgs/development/python-modules/sse-starlette/default.nix
Normal file
67
pkgs/development/python-modules/sse-starlette/default.nix
Normal file
@ -0,0 +1,67 @@
|
||||
{ lib
|
||||
, anyio
|
||||
, asgi-lifespan
|
||||
, buildPythonPackage
|
||||
, fastapi
|
||||
, fetchFromGitHub
|
||||
, httpx
|
||||
, pdm-backend
|
||||
, psutil
|
||||
, pytest-asyncio
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, starlette
|
||||
, uvicorn
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "sse-starlette";
|
||||
version = "2.0.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sysid";
|
||||
repo = "sse-starlette";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-kDcSG/3foP7fMZKYrkKx6FHvT9c9rSzxyv2EHjQ2WSA=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
pdm-backend
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
anyio
|
||||
starlette
|
||||
uvicorn
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
asgi-lifespan
|
||||
fastapi
|
||||
httpx
|
||||
psutil
|
||||
pytest-asyncio
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"sse_starlette"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# AssertionError
|
||||
"test_stop_server_with_many_consumers"
|
||||
"test_stop_server_conditional"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Server Sent Events for Starlette and FastAPI";
|
||||
homepage = "https://github.com/sysid/sse-starlette";
|
||||
changelog = "https://github.com/sysid/sse-starlette/blob/${version}/CHANGELOG.md";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, httpx
|
||||
, poetry-core
|
||||
, pytest-asyncio
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, starlette
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "starlette-context";
|
||||
version = "0.3.6";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tomwojcik";
|
||||
repo = "starlette-context";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-ZKwE2M86clYKdptd0o/j8VYUOj/Y/72uUnpxFbJ65vw=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
starlette
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
httpx
|
||||
pytest-asyncio
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"starlette_context"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Middleware for Starlette that allows you to store and access the context data of a request";
|
||||
homepage = "https://github.com/tomwojcik/starlette-context";
|
||||
changelog = "https://github.com/tomwojcik/starlette-context/releases/tag/v${version}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
@ -1,13 +1,14 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, click
|
||||
, fetchPypi
|
||||
, ordered-set
|
||||
, pillow
|
||||
, pythonOlder
|
||||
, pythonRelaxDepsHook
|
||||
, pillow
|
||||
, sortedcollections
|
||||
, setuptools
|
||||
, setuptools-dso
|
||||
, sortedcollections
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@ -22,15 +23,16 @@ buildPythonPackage rec {
|
||||
hash = "sha256-uW1g3nlT6Y+1beifo/MOlGxsGL7on/jcAROxSddySHk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pythonRelaxDepsHook
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"pillow"
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
build-system = [
|
||||
pythonRelaxDepsHook
|
||||
setuptools
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
click
|
||||
ordered-set
|
||||
pillow
|
||||
@ -46,9 +48,10 @@ buildPythonPackage rec {
|
||||
|
||||
meta = with lib; {
|
||||
description = "Tool for quantizing image colors using tile-based palette restrictions";
|
||||
mainProgram = "tilequant";
|
||||
homepage = "https://github.com/SkyTemple/tilequant";
|
||||
changelog = "https://github.com/SkyTemple/tilequant/releases/tag/${version}";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ marius851000 xfix ];
|
||||
mainProgram = "tilequant";
|
||||
};
|
||||
}
|
||||
|
@ -53,7 +53,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "transformers";
|
||||
version = "4.39.1";
|
||||
version = "4.39.2";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
@ -62,7 +62,7 @@ buildPythonPackage rec {
|
||||
owner = "huggingface";
|
||||
repo = "transformers";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-OzuiKzhgI9eRTPq3l7x4aw3fxvCe4080pK1RKzcC1RQ=";
|
||||
hash = "sha256-eOtXHKTGVV3hYdSK+p2mTgCaG4akivnuMnB/lSh8Lxc=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -2,18 +2,18 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "go-mockery";
|
||||
version = "2.38.0";
|
||||
version = "2.42.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vektra";
|
||||
repo = "mockery";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-fWS4oF/CWlOX6XgeLxsmEfPDDgp1WBSDC4fx2Aid9p0=";
|
||||
sha256 = "sha256-+D91qWXv+OAZKKXllCv6cpGppzmIlwUTweN2NR/nTqU=";
|
||||
};
|
||||
|
||||
preCheck = ''
|
||||
substituteInPlace ./pkg/generator_test.go --replace 0.0.0-dev ${version}
|
||||
substituteInPlace ./pkg/logging/logging_test.go --replace v0.0 v${lib.versions.majorMinor version}
|
||||
substituteInPlace ./pkg/generator_test.go --replace-fail 0.0.0-dev ${version}
|
||||
substituteInPlace ./pkg/logging/logging_test.go --replace-fail v0.0 v${lib.versions.majorMinor version}
|
||||
'';
|
||||
|
||||
ldflags = [
|
||||
@ -24,7 +24,9 @@ buildGoModule rec {
|
||||
CGO_ENABLED = false;
|
||||
|
||||
proxyVendor = true;
|
||||
vendorHash = "sha256-iAZjWRW2TWKqcs94lepkcIXUPyPl9qlGhxlX84rN3ok=";
|
||||
vendorHash = "sha256-FCl17nywcMoXEA3l0rOzY66Pj51rEEGdK6Zo6Y3/n34=";
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
passthru.tests = {
|
||||
generateMock = runCommand "${pname}-test" {
|
||||
|
@ -11,13 +11,13 @@
|
||||
}:
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "sentry-cli";
|
||||
version = "2.30.2";
|
||||
version = "2.30.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "getsentry";
|
||||
repo = "sentry-cli";
|
||||
rev = version;
|
||||
sha256 = "sha256-ThZb6/Mprz9qgEGsJ+EbENvjmgehDsjVgFGBq4PZMRM=";
|
||||
sha256 = "sha256-J+8/sCFSd2BYQgKOl8OZoxlFLB8scDY5Bl7GAQ54/RM=";
|
||||
};
|
||||
doCheck = false;
|
||||
|
||||
@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec {
|
||||
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ CoreServices Security SystemConfiguration ];
|
||||
nativeBuildInputs = [ installShellFiles pkg-config ];
|
||||
|
||||
cargoHash = "sha256-yoBoPk5PvMLGvhU/kg+WwO5WgwEnfKQlnkCC6IctfAI=";
|
||||
cargoHash = "sha256-622cEaHEMmVspabsIYgQ5ySbaDr9qB1FjxJ5NwbeGx8=";
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd sentry-cli \
|
||||
|
@ -19,8 +19,11 @@ let
|
||||
in
|
||||
buildNodejs {
|
||||
inherit enableNpm;
|
||||
version = "18.20.0";
|
||||
sha256 = "sha256-BMhneaLMfu/fzzeanYWIOqHTsdyJCbYiGxY2hIF4VqQ=";
|
||||
# The change to minor version 18.20.0 breaks compatibility with ffi-napi
|
||||
# This breaks the compilation of some nix packages.
|
||||
# While this is investigated and fixed, do not upgrade the minor version.
|
||||
version = "18.19.1";
|
||||
sha256 = "sha256-CQ+WouzeCAtrOCxtZCvKXQvkcCp4y1Vb578CsgvRbe0=";
|
||||
patches = [
|
||||
./disable-darwin-v8-system-instrumentation.patch
|
||||
./bypass-darwin-xcrun-node16.patch
|
||||
|
@ -756,7 +756,7 @@ if [[ "$action" = switch || "$action" = boot || "$action" = test || "$action" =
|
||||
"-E" "NIXOS_INSTALL_BOOTLOADER=$installBootloader"
|
||||
"--collect"
|
||||
"--no-ask-password"
|
||||
"--pty"
|
||||
"--pipe"
|
||||
"--quiet"
|
||||
"--same-dir"
|
||||
"--service-type=exec"
|
||||
|
@ -72,7 +72,7 @@ buildGoModule rec {
|
||||
authentication.
|
||||
'';
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ jk raitobezarius dit7ya ];
|
||||
maintainers = with maintainers; [ jk dit7ya ];
|
||||
mainProgram = "authelia";
|
||||
};
|
||||
}
|
||||
|
@ -13,10 +13,10 @@ let
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "jibri";
|
||||
version = "8.0-160-g5af7dd7";
|
||||
version = "8.0-169-g1258814";
|
||||
src = fetchurl {
|
||||
url = "https://download.jitsi.org/stable/${pname}_${version}-1_all.deb";
|
||||
sha256 = "UuRGGbga7Yo/rp5PobOxhyUQ8FaZWnMsLL89vt9hKcA=";
|
||||
sha256 = "MAZJq2v25XQE6nbaAHSuxeoZOBwlOxCOIJkzxQVlKog=";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
|
@ -21,16 +21,16 @@ let
|
||||
in
|
||||
buildGoModule rec {
|
||||
pname = "minio";
|
||||
version = "2024-03-10T02-53-48Z";
|
||||
version = "2024-03-15T01-07-19Z";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "minio";
|
||||
repo = "minio";
|
||||
rev = "RELEASE.${version}";
|
||||
hash = "sha256-XcJm5FcX0NNjjY/WDQyR2RF8J3GkqEvpAhFDZj9ztks=";
|
||||
hash = "sha256-El4ddYmd6cVAFS0/s7QcTR9kcZcmNtlXEOpaqmTRdzk=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-0W2D5CQkrZMPlehvmExeQ6txwEyRe3XZl0Bv0Ww5COs=";
|
||||
vendorHash = "sha256-lo91BVswJZl1FI1W4doNvOBXreLQco3/UjQ90HP46FY=";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
@ -17,27 +17,27 @@ let
|
||||
x86_64-linux = {
|
||||
arch = "linux-x64";
|
||||
libc = "glibc";
|
||||
hash = "sha256-I1ceMi7h6flvKBmMIU1qjAU1S6z5MzguHDul3g1zMKw=";
|
||||
hash = "sha256-C5N6VgFtXPLLjZt0ZdRTX095njRIT+12ONuUaBBj7fQ=";
|
||||
};
|
||||
aarch64-linux = {
|
||||
arch = "linux-arm64";
|
||||
libc = "glibc";
|
||||
hash = "sha256-q8BR7kILYV8i8ozDkpcuKarf4s1TgRqOrUeLqjdWEQ0=";
|
||||
hash = "sha256-TerDujO+IkSRnHYlSbAKSP9IS7AT7XnQJsZ8D8pCoGc=";
|
||||
};
|
||||
x86_64-darwin = {
|
||||
arch = "darwin-x64";
|
||||
libc = "unknown";
|
||||
hash = "sha256-ONnXtRxcYFuFz+rmVTg+yEKe6J/vfKahX2i6k8dQStg=";
|
||||
hash = "sha256-gphOONWujbeCCr6dkmMRJP94Dhp1Jvp2yt+g7n1HTv0=";
|
||||
};
|
||||
aarch64-darwin = {
|
||||
arch = "darwin-arm64";
|
||||
libc = "unknown";
|
||||
hash = "sha256-VesAcT/IF2cvJVncJoqZcAvFxw32SN70C60GLU2kmVI=";
|
||||
hash = "sha256-JMnELVUxoU1C57Tzue3Sg6OfDFAjfCnzgDit0BWzmlo=";
|
||||
};
|
||||
};
|
||||
bcryptAttrs = bcryptHostPlatformAttrs."${stdenv.hostPlatform.system}" or
|
||||
(throw "Unsupported architecture: ${stdenv.hostPlatform.system}");
|
||||
bcryptVersion = "5.1.0";
|
||||
bcryptVersion = "5.1.1";
|
||||
bcryptLib = fetchurl {
|
||||
url = "https://github.com/kelektiv/node.bcrypt.js/releases/download/v${bcryptVersion}/bcrypt_lib-v${bcryptVersion}-napi-v3-${bcryptAttrs.arch}-${bcryptAttrs.libc}.tar.gz";
|
||||
inherit (bcryptAttrs) hash;
|
||||
@ -45,51 +45,61 @@ let
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "peertube";
|
||||
version = "5.2.1";
|
||||
version = "6.0.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Chocobozzz";
|
||||
repo = "PeerTube";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-8JzU0JVb+JQCNiro8hPHBwkofNTUy90YkSCzTOoB+/A=";
|
||||
hash = "sha256-Pskxfi+qqVk75hu22niLNFsToCJks1k8w8mTnXjr6jg=";
|
||||
};
|
||||
|
||||
yarnOfflineCacheServer = fetchYarnDeps {
|
||||
yarnLock = "${src}/yarn.lock";
|
||||
hash = "sha256-pzXH6hdDf8O6Kr12Xw0jRcnPRD2TrDGdiEfxVr3KmwY=";
|
||||
};
|
||||
|
||||
yarnOfflineCacheTools = fetchYarnDeps {
|
||||
yarnLock = "${src}/server/tools/yarn.lock";
|
||||
hash = "sha256-maPR8OCiuNlle0JQIkZSgAqW+BrSxPwVm6CkxIrIg5k=";
|
||||
hash = "sha256-RJX92EgEIXWB1wNFRl8FvseOqBT+7m6gs+pMyoodruk=";
|
||||
};
|
||||
|
||||
yarnOfflineCacheClient = fetchYarnDeps {
|
||||
yarnLock = "${src}/client/yarn.lock";
|
||||
hash = "sha256-Ejzk/VEx7YtJpsrkHcXAZnJ+yRx1VhBJGpqquHYULNU=";
|
||||
hash = "sha256-vr9xn5NXwiUS59Kgl8olCtkMgxnI1TKQzibKbb8RNXA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ brotli prefetch-yarn-deps jq nodejs which yarn ];
|
||||
yarnOfflineCacheAppsCli = fetchYarnDeps {
|
||||
yarnLock = "${src}/apps/peertube-cli/yarn.lock";
|
||||
hash = "sha256-xsB71bnaPn/9/f1KHyU3TTwx+Q+1dLjWmNK2aVJgoRY=";
|
||||
};
|
||||
|
||||
yarnOfflineCacheAppsRunner = fetchYarnDeps {
|
||||
yarnLock = "${src}/apps/peertube-runner/yarn.lock";
|
||||
hash = "sha256-9w3aLuiLs7SU00YwuE0ixfiD77gCakXT4YeRpfsgGz0=";
|
||||
};
|
||||
|
||||
outputs = [ "out" "cli" "runner" ];
|
||||
|
||||
nativeBuildInputs = [ brotli prefetch-yarn-deps jq which yarn ];
|
||||
|
||||
buildInputs = [ nodejs ];
|
||||
|
||||
buildPhase = ''
|
||||
# Build node modules
|
||||
export HOME=$PWD
|
||||
fixup-yarn-lock ~/yarn.lock
|
||||
fixup-yarn-lock ~/server/tools/yarn.lock
|
||||
fixup-yarn-lock ~/client/yarn.lock
|
||||
fixup-yarn-lock ~/apps/peertube-cli/yarn.lock
|
||||
fixup-yarn-lock ~/apps/peertube-runner/yarn.lock
|
||||
yarn config --offline set yarn-offline-mirror $yarnOfflineCacheServer
|
||||
yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress
|
||||
cd ~/server/tools
|
||||
yarn config --offline set yarn-offline-mirror $yarnOfflineCacheTools
|
||||
yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress
|
||||
cd ~/client
|
||||
yarn config --offline set yarn-offline-mirror $yarnOfflineCacheClient
|
||||
yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress
|
||||
cd ~/apps/peertube-cli
|
||||
yarn config --offline set yarn-offline-mirror $yarnOfflineCacheAppsCli
|
||||
yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress
|
||||
cd ~/apps/peertube-runner
|
||||
yarn config --offline set yarn-offline-mirror $yarnOfflineCacheAppsRunner
|
||||
yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress
|
||||
|
||||
patchShebangs ~/node_modules
|
||||
patchShebangs ~/server/tools/node_modules
|
||||
patchShebangs ~/client/node_modules
|
||||
patchShebangs ~/scripts
|
||||
patchShebangs ~/{node_modules,client/node_modules,/apps/peertube-cli/node_modules,apps/peertube-runner/node_modules,scripts}
|
||||
|
||||
# Fix bcrypt node module
|
||||
cd ~/node_modules/bcrypt
|
||||
@ -103,28 +113,52 @@ stdenv.mkDerivation rec {
|
||||
cd ~
|
||||
|
||||
# Build PeerTube server
|
||||
npm run tsc -- --build ./tsconfig.json
|
||||
npm run resolve-tspaths:server
|
||||
cp -r "./server/static" "./server/assets" "./dist/server"
|
||||
cp -r "./server/lib/emails" "./dist/server/lib"
|
||||
|
||||
# Build PeerTube tools
|
||||
cp -r "./server/tools/node_modules" "./dist/server/tools"
|
||||
npm run tsc -- --build ./server/tools/tsconfig.json
|
||||
npm run resolve-tspaths:server
|
||||
npm run build:server
|
||||
|
||||
# Build PeerTube client
|
||||
npm run build:client
|
||||
|
||||
# Build PeerTube cli
|
||||
npm run build:peertube-cli
|
||||
patchShebangs ~/apps/peertube-cli/dist/peertube.js
|
||||
|
||||
# Build PeerTube runner
|
||||
npm run build:peertube-runner
|
||||
patchShebangs ~/apps/peertube-runner/dist/peertube-runner.js
|
||||
|
||||
# Clean up declaration files
|
||||
find ~/dist/ \
|
||||
~/packages/core-utils/dist/ \
|
||||
~/packages/ffmpeg/dist/ \
|
||||
~/packages/models/dist/ \
|
||||
~/packages/node-utils/dist/ \
|
||||
~/packages/server-commands/dist/ \
|
||||
~/packages/typescript-utils/dist/ \
|
||||
\( -name '*.d.ts' -o -name '*.d.ts.map' \) -type f -delete
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/dist
|
||||
mv ~/dist $out
|
||||
mv ~/node_modules $out/node_modules
|
||||
mv ~/server/tools/node_modules $out/dist/server/tools/node_modules
|
||||
mkdir $out/client
|
||||
mv ~/client/{dist,node_modules,package.json,yarn.lock} $out/client
|
||||
mv ~/{config,scripts,support,CREDITS.md,FAQ.md,LICENSE,README.md,package.json,tsconfig.json,yarn.lock} $out
|
||||
mkdir -p $out/packages/{core-utils,ffmpeg,models,node-utils,server-commands,typescript-utils}
|
||||
mv ~/packages/core-utils/{dist,package.json} $out/packages/core-utils
|
||||
mv ~/packages/ffmpeg/{dist,package.json} $out/packages/ffmpeg
|
||||
mv ~/packages/models/{dist,package.json} $out/packages/models
|
||||
mv ~/packages/node-utils/{dist,package.json} $out/packages/node-utils
|
||||
mv ~/packages/server-commands/{dist,package.json} $out/packages/server-commands
|
||||
mv ~/packages/typescript-utils/{dist,package.json} $out/packages/typescript-utils
|
||||
mv ~/{config,support,CREDITS.md,FAQ.md,LICENSE,README.md,package.json,yarn.lock} $out
|
||||
|
||||
mkdir -p $cli/bin
|
||||
mv ~/apps/peertube-cli/{dist,node_modules,package.json,yarn.lock} $cli
|
||||
ln -s $cli/dist/peertube.js $cli/bin/peertube-cli
|
||||
|
||||
mkdir -p $runner/bin
|
||||
mv ~/apps/peertube-runner/{dist,node_modules,package.json,yarn.lock} $runner
|
||||
ln -s $runner/dist/peertube-runner.js $runner/bin/peertube-runner
|
||||
|
||||
# Create static gzip and brotli files
|
||||
find $out/client/dist -type f -regextype posix-extended -iregex '.*\.(css|eot|html|js|json|svg|webmanifest|xlf)' | while read file; do
|
||||
|
@ -7,12 +7,12 @@
|
||||
, stdenv
|
||||
}:
|
||||
let
|
||||
version = "23.3.9";
|
||||
version = "23.3.10";
|
||||
src = fetchFromGitHub {
|
||||
owner = "redpanda-data";
|
||||
repo = "redpanda";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-CvHAjUwW1pkagebZQRXY51DazFCWRCD1seB46AwDVX8=";
|
||||
sha256 = "sha256-PW1L+JwKnfeGFqXo+PTuzJS2FfkcoCU+xFjIt6zhn/M=";
|
||||
};
|
||||
server = callPackage ./server.nix { inherit src version; };
|
||||
in
|
||||
@ -21,7 +21,7 @@ buildGoModule rec {
|
||||
inherit doCheck src version;
|
||||
modRoot = "./src/go/rpk";
|
||||
runVend = false;
|
||||
vendorHash = "sha256-qjX0DVAZqr7Ec1dFs4zBlDpu69IkhgLkvy4FA7br7bk=";
|
||||
vendorHash = "sha256-sN21Y1e08gG8z/RfYIPGEeWW58YH66uB+16b2Bzb/3I=";
|
||||
|
||||
ldflags = [
|
||||
''-X "github.com/redpanda-data/redpanda/src/go/rpk/pkg/cli/cmd/version.version=${version}"''
|
||||
|
@ -4,11 +4,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bacula";
|
||||
version = "13.0.4";
|
||||
version = "15.0.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/bacula/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-FOTGLTgaEAhCLj/RSq0ZsmFBA9iQeJJtczf4UOO0c9w=";
|
||||
sha256 = "sha256-VVFcKmavmoa5VdrqQIk3i4ZNBRsubjA4O+825pOs6no=";
|
||||
};
|
||||
|
||||
# libtool.m4 only matches macOS 10.*
|
||||
|
@ -1,7 +1,10 @@
|
||||
{ pkgs, lib, eggDerivation, fetchegg }:
|
||||
|
||||
let
|
||||
eggs = import ./eggs.nix { inherit eggDerivation fetchegg; };
|
||||
in with pkgs; eggDerivation rec {
|
||||
in
|
||||
|
||||
eggDerivation rec {
|
||||
pname = "ugarit-manifest-maker";
|
||||
version = "0.1";
|
||||
name = "${pname}-${version}";
|
||||
|
@ -1,7 +1,10 @@
|
||||
{ pkgs, lib, eggDerivation, fetchegg }:
|
||||
{ lib, eggDerivation, fetchegg, z3 }:
|
||||
|
||||
let
|
||||
eggs = import ./eggs.nix { inherit eggDerivation fetchegg; };
|
||||
in with pkgs; eggDerivation rec {
|
||||
in
|
||||
|
||||
eggDerivation rec {
|
||||
pname = "ugarit";
|
||||
version = "2.0";
|
||||
name = "${pname}-${version}";
|
||||
|
@ -5,11 +5,20 @@
|
||||
, simdExtensions ? null
|
||||
}:
|
||||
|
||||
with rec {
|
||||
let
|
||||
inherit (lib)
|
||||
head
|
||||
licenses
|
||||
maintainers
|
||||
platforms
|
||||
replaceStrings
|
||||
toList
|
||||
;
|
||||
|
||||
# SIMD instruction sets to compile for. If none are specified by the user,
|
||||
# an appropriate one is selected based on the detected host system
|
||||
isas = with stdenv.hostPlatform;
|
||||
if simdExtensions != null then lib.toList simdExtensions
|
||||
if simdExtensions != null then toList simdExtensions
|
||||
else if avx2Support then [ "AVX2" ]
|
||||
else if sse4_1Support then [ "SSE41" ]
|
||||
else if isx86_64 then [ "SSE2" ]
|
||||
@ -21,11 +30,11 @@ with rec {
|
||||
isaFlags = map ( isa: "-DASTCENC_ISA_${isa}=ON" ) isas;
|
||||
|
||||
# The suffix of the binary to link as 'astcenc'
|
||||
mainBinary = builtins.replaceStrings
|
||||
mainBinary = replaceStrings
|
||||
[ "AVX2" "SSE41" "SSE2" "NEON" "NONE" "NATIVE" ]
|
||||
[ "avx2" "sse4.1" "sse2" "neon" "none" "native" ]
|
||||
( builtins.head isas );
|
||||
};
|
||||
( head isas );
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "astc-encoder";
|
||||
@ -57,7 +66,7 @@ stdenv.mkDerivation rec {
|
||||
ln -s $out/bin/astcenc-${mainBinary} $out/bin/astcenc
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
homepage = "https://github.com/ARM-software/astc-encoder";
|
||||
description = "An encoder for the ASTC texture compression format";
|
||||
longDescription = ''
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user