Merge staging-next into staging

This commit is contained in:
github-actions[bot] 2023-10-16 12:01:54 +00:00 committed by GitHub
commit de49fc16bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
120 changed files with 3042 additions and 1234 deletions

View File

@ -538,7 +538,7 @@ To get a sense for what changes are considered mass rebuilds, see [previously me
When adding yourself as maintainer, in the same pull request, make a separate
commit with the message `maintainers: add <handle>`.
Add the commit before those making changes to the package or module.
See [Nixpkgs Maintainers](../maintainers/README.md) for details.
See [Nixpkgs Maintainers](./maintainers/README.md) for details.
### Writing good commit messages

View File

@ -4424,6 +4424,15 @@
githubId = 14034137;
name = "Mostly Void";
};
ditsuke = {
name = "Tushar";
email = "hello@ditsuke.com";
github = "ditsuke";
githubId = 72784348;
keys = [{
fingerprint = "8FD2 153F 4889 541A 54F1 E09E 71B6 C31C 8A5A 9D21";
}];
};
djacu = {
email = "daniel.n.baker@gmail.com";
github = "djacu";
@ -18024,6 +18033,12 @@
githubId = 1983821;
name = "Eric Wolf";
};
u2x1 = {
email = "u2x1@outlook.com";
github = "u2x1";
githubId = 30677291;
name = "u2x1";
};
uakci = {
name = "uakci";
email = "uakci@uakci.pl";

View File

@ -327,7 +327,6 @@ def run_nix_expr(expr, nixpkgs: str):
:param expr nix expression to fetch current plugins
:param nixpkgs Path towards a nixpkgs checkout
'''
# local_pkgs = str(Path(__file__).parent.parent.parent)
with CleanEnvironment(nixpkgs) as nix_path:
cmd = [
"nix",
@ -341,8 +340,8 @@ def run_nix_expr(expr, nixpkgs: str):
"--nix-path",
nix_path,
]
log.debug("Running command %s", " ".join(cmd))
out = subprocess.check_output(cmd)
log.debug("Running command: %s", " ".join(cmd))
out = subprocess.check_output(cmd, timeout=90)
data = json.loads(out)
return data
@ -572,7 +571,6 @@ class CleanEnvironment(object):
self.empty_config = NamedTemporaryFile()
self.empty_config.write(b"{}")
self.empty_config.flush()
# os.environ["NIXPKGS_CONFIG"] = self.empty_config.name
return f"localpkgs={self.local_pkgs}"
def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None:

View File

@ -70,6 +70,8 @@
- [Prometheus MySQL exporter](https://github.com/prometheus/mysqld_exporter), a MySQL server exporter for Prometheus. Available as [services.prometheus.exporters.mysqld](#opt-services.prometheus.exporters.mysqld.enable).
- [LibreNMS](https://www.librenms.org), a auto-discovering PHP/MySQL/SNMP based network monitoring. Available as [services.librenms](#opt-services.librenms.enable).
- [sitespeed-io](https://sitespeed.io), a tool that can generate metrics (timings, diagnostics) for websites. Available as [services.sitespeed-io](#opt-services.sitespeed-io.enable).
- [stalwart-mail](https://stalw.art), an all-in-one email server (SMTP, IMAP, JMAP). Available as [services.stalwart-mail](#opt-services.stalwart-mail.enable).
@ -95,6 +97,8 @@
- [Honk](https://humungus.tedunangst.com/r/honk), a complete ActivityPub server with minimal setup and support costs.
Available as [services.honk](#opt-services.honk.enable).
- [ferretdb](https://www.ferretdb.io/), an open-source proxy, converting the MongoDB 6.0+ wire protocol queries to PostgreSQL or SQLite. Available as [services.ferretdb](options.html#opt-services.ferretdb.enable).
- [NNCP](http://www.nncpgo.org/). Added nncp-daemon and nncp-caller services. Configuration is set with [programs.nncp.settings](#opt-programs.nncp.settings) and the daemons are enabled at [services.nncp](#opt-services.nncp.caller.enable).
- [tuxedo-rs](https://github.com/AaronErhardt/tuxedo-rs), Rust utilities for interacting with hardware from TUXEDO Computers.
@ -275,6 +279,8 @@
- Package `noto-fonts-emoji` was renamed to `noto-fonts-color-emoji`;
see [#221181](https://github.com/NixOS/nixpkgs/issues/221181).
- Package `cloud-sql-proxy` was renamed to `google-cloud-sql-proxy` as it cannot be used with other cloud providers.;
- Package `pash` was removed due to being archived upstream. Use `powershell` as an alternative.
- `security.sudo.extraRules` now includes `root`'s default rule, with ordering

View File

@ -415,6 +415,7 @@
./services/databases/couchdb.nix
./services/databases/dgraph.nix
./services/databases/dragonflydb.nix
./services/databases/ferretdb.nix
./services/databases/firebird.nix
./services/databases/foundationdb.nix
./services/databases/hbase-standalone.nix
@ -774,6 +775,7 @@
./services/monitoring/kapacitor.nix
./services/monitoring/karma.nix
./services/monitoring/kthxbye.nix
./services/monitoring/librenms.nix
./services/monitoring/loki.nix
./services/monitoring/longview.nix
./services/monitoring/mackerel-agent.nix
@ -1163,6 +1165,7 @@
./services/security/sshguard.nix
./services/security/sslmate-agent.nix
./services/security/step-ca.nix
./services/security/tang.nix
./services/security/tor.nix
./services/security/torify.nix
./services/security/torsocks.nix

View File

@ -0,0 +1,79 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.services.ferretdb;
in
{
meta.maintainers = with lib.maintainers; [ julienmalka camillemndn ];
options = {
services.ferretdb = {
enable = mkEnableOption "FerretDB, an Open Source MongoDB alternative.";
package = mkOption {
type = types.package;
example = literalExpression "pkgs.ferretdb";
default = pkgs.ferretdb;
defaultText = "pkgs.ferretdb";
description = "FerretDB package to use.";
};
settings = lib.mkOption {
type =
lib.types.submodule { freeformType = with lib.types; attrsOf str; };
example = {
FERRETDB_LOG_LEVEL = "warn";
FERRETDB_MODE = "normal";
};
description = ''
Additional configuration for FerretDB, see
<https://docs.ferretdb.io/flags/>
for supported values.
'';
};
};
};
config = mkIf cfg.enable
{
services.ferretdb.settings = {
FERRETDB_HANDLER = lib.mkDefault "sqlite";
FERRETDB_SQLITE_URL = lib.mkDefault "file:/var/lib/ferretdb/";
};
systemd.services.ferretdb = {
description = "FerretDB";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
environment = cfg.settings;
serviceConfig = {
Type = "simple";
StateDirectory = "ferretdb";
WorkingDirectory = "/var/lib/ferretdb";
ExecStart = "${cfg.package}/bin/ferretdb";
Restart = "on-failure";
ProtectHome = true;
ProtectSystem = "strict";
PrivateTmp = true;
PrivateDevices = true;
ProtectHostname = true;
ProtectClock = true;
ProtectKernelTunables = true;
ProtectKernelModules = true;
ProtectKernelLogs = true;
ProtectControlGroups = true;
NoNewPrivileges = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
RemoveIPC = true;
PrivateMounts = true;
DynamicUser = true;
};
};
};
}

View File

@ -0,0 +1,624 @@
{ config, lib, pkgs, ... }:
let
cfg = config.services.librenms;
settingsFormat = pkgs.formats.json {};
configJson = settingsFormat.generate "librenms-config.json" cfg.settings;
package = pkgs.librenms.override {
logDir = cfg.logDir;
dataDir = cfg.dataDir;
};
phpOptions = ''
log_errors = on
post_max_size = 100M
upload_max_filesize = 100M
date.timezone = "${config.time.timeZone}"
'';
phpIni = pkgs.runCommand "php.ini" {
inherit (package) phpPackage;
inherit phpOptions;
preferLocalBuild = true;
passAsFile = [ "phpOptions" ];
} ''
cat $phpPackage/etc/php.ini $phpOptionsPath > $out
'';
artisanWrapper = pkgs.writeShellScriptBin "librenms-artisan" ''
cd ${package}
sudo=exec
if [[ "$USER" != ${cfg.user} ]]; then
sudo='exec /run/wrappers/bin/sudo -u ${cfg.user}'
fi
$sudo ${package}/artisan $*
'';
lnmsWrapper = pkgs.writeShellScriptBin "lnms" ''
cd ${package}
exec ${package}/lnms $*
'';
configFile = pkgs.writeText "config.php" ''
<?php
$new_config = json_decode(file_get_contents("${cfg.dataDir}/config.json"), true);
$config = ($config == null) ? $new_config : array_merge($config, $new_config);
${lib.optionalString (cfg.extraConfig != null) cfg.extraConfig}
'';
in {
options.services.librenms = with lib; {
enable = mkEnableOption "LibreNMS network monitoring system";
user = mkOption {
type = types.str;
default = "librenms";
description = ''
Name of the LibreNMS user.
'';
};
group = mkOption {
type = types.str;
default = "librenms";
description = ''
Name of the LibreNMS group.
'';
};
hostname = mkOption {
type = types.str;
default = config.networking.fqdnOrHostName;
defaultText = literalExpression "config.networking.fqdnOrHostName";
description = ''
The hostname to serve LibreNMS on.
'';
};
pollerThreads = mkOption {
type = types.int;
default = 16;
description = ''
Amount of threads of the cron-poller.
'';
};
enableOneMinutePolling = mkOption {
type = types.bool;
default = false;
description = ''
Enables the [1-Minute Polling](https://docs.librenms.org/Support/1-Minute-Polling/).
Changing this option will automatically convert your existing rrd files.
'';
};
useDistributedPollers = mkOption {
type = types.bool;
default = false;
description = ''
Enables (distributed pollers)[https://docs.librenms.org/Extensions/Distributed-Poller/]
for this LibreNMS instance. This will enable a local `rrdcached` and `memcached` server.
To use this feature, make sure to configure your firewall that the distributed pollers
can reach the local `mysql`, `rrdcached` and `memcached` ports.
'';
};
distributedPoller = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Configure this LibreNMS instance as a (distributed poller)[https://docs.librenms.org/Extensions/Distributed-Poller/].
This will disable all web features and just configure the poller features.
Use the `mysql` database of your main LibreNMS instance in the database settings.
'';
};
name = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
Custom name of this poller.
'';
};
group = mkOption {
type = types.str;
default = "0";
example = "1,2";
description = ''
Group(s) of this poller.
'';
};
distributedBilling = mkOption {
type = types.bool;
default = false;
description = ''
Enable distributed billing on this poller.
'';
};
memcachedHost = mkOption {
type = types.str;
description = ''
Hostname or IP of the `memcached` server.
'';
};
memcachedPort = mkOption {
type = types.port;
default = 11211;
description = ''
Port of the `memcached` server.
'';
};
rrdcachedHost = mkOption {
type = types.str;
description = ''
Hostname or IP of the `rrdcached` server.
'';
};
rrdcachedPort = mkOption {
type = types.port;
default = 42217;
description = ''
Port of the `memcached` server.
'';
};
};
poolConfig = mkOption {
type = with types; attrsOf (oneOf [ str int bool ]);
default = {
"pm" = "dynamic";
"pm.max_children" = 32;
"pm.start_servers" = 2;
"pm.min_spare_servers" = 2;
"pm.max_spare_servers" = 4;
"pm.max_requests" = 500;
};
description = ''
Options for the LibreNMS PHP pool. See the documentation on `php-fpm.conf`
for details on configuration directives.
'';
};
nginx = mkOption {
type = types.submodule (
recursiveUpdate
(import ../web-servers/nginx/vhost-options.nix { inherit config lib; }) {}
);
default = { };
example = literalExpression ''
{
serverAliases = [
"librenms.''${config.networking.domain}"
];
# To enable encryption and let let's encrypt take care of certificate
forceSSL = true;
enableACME = true;
# To set the LibreNMS virtualHost as the default virtualHost;
default = true;
}
'';
description = ''
With this option, you can customize the nginx virtualHost settings.
'';
};
dataDir = mkOption {
type = types.path;
default = "/var/lib/librenms";
description = ''
Path of the LibreNMS state directory.
'';
};
logDir = mkOption {
type = types.path;
default = "/var/log/librenms";
description = ''
Path of the LibreNMS logging directory.
'';
};
database = {
createLocally = mkOption {
type = types.bool;
default = false;
description = ''
Whether to create a local database automatically.
'';
};
host = mkOption {
default = "localhost";
description = ''
Hostname or IP of the MySQL/MariaDB server.
'';
};
port = mkOption {
type = types.port;
default = 3306;
description = ''
Port of the MySQL/MariaDB server.
'';
};
database = mkOption {
type = types.str;
default = "librenms";
description = ''
Name of the database on the MySQL/MariaDB server.
'';
};
username = mkOption {
type = types.str;
default = "librenms";
description = ''
Name of the user on the MySQL/MariaDB server.
'';
};
passwordFile = mkOption {
type = types.path;
example = "/run/secrets/mysql.pass";
description = ''
A file containing the password for the user of the MySQL/MariaDB server.
Must be readable for the LibreNMS user.
'';
};
};
environmentFile = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
File containing env-vars to be substituted into the final config. Useful for secrets.
Does not apply to settings defined in `extraConfig`.
'';
};
settings = mkOption {
type = types.submodule {
freeformType = settingsFormat.type;
options = {};
};
description = ''
Attrset of the LibreNMS configuration.
See https://docs.librenms.org/Support/Configuration/ for reference.
All possible options are listed [here](https://github.com/librenms/librenms/blob/master/misc/config_definitions.json).
See https://docs.librenms.org/Extensions/Authentication/ for setting other authentication methods.
'';
default = { };
example = {
base_url = "/librenms/";
top_devices = true;
top_ports = false;
};
};
extraConfig = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
Additional config for LibreNMS that will be appended to the `config.php`. See
https://github.com/librenms/librenms/blob/master/misc/config_definitions.json
for possible options. Useful if you want to use PHP-Functions in your config.
'';
};
};
config = lib.mkIf cfg.enable {
assertions = [
{
assertion = config.time.timeZone != null;
message = "You must set `time.timeZone` to use the LibreNMS module.";
}
{
assertion = cfg.database.createLocally -> cfg.database.host == "localhost";
message = "The database host must be \"localhost\" if services.librenms.database.createLocally is set to true.";
}
{
assertion = !(cfg.useDistributedPollers && cfg.distributedPoller.enable);
message = "The LibreNMS instance can't be a distributed poller and a full instance at the same time.";
}
];
users.users.${cfg.user} = {
group = "${cfg.group}";
isSystemUser = true;
};
users.groups.${cfg.group} = { };
services.librenms.settings = {
# basic configs
"user" = cfg.user;
"own_hostname" = cfg.hostname;
"base_url" = lib.mkDefault "/";
"auth_mechanism" = lib.mkDefault "mysql";
# disable auto update function (won't work with NixOS)
"update" = false;
# enable fast ping by default
"ping_rrd_step" = 60;
# one minute polling
"rrd.step" = if cfg.enableOneMinutePolling then 60 else 300;
"rrd.heartbeat" = if cfg.enableOneMinutePolling then 120 else 600;
} // (lib.optionalAttrs cfg.distributedPoller.enable {
"distributed_poller" = true;
"distributed_poller_name" = lib.mkIf (cfg.distributedPoller.name != null) cfg.distributedPoller.name;
"distributed_poller_group" = cfg.distributedPoller.group;
"distributed_billing" = cfg.distributedPoller.distributedBilling;
"distributed_poller_memcached_host" = cfg.distributedPoller.memcachedHost;
"distributed_poller_memcached_port" = cfg.distributedPoller.memcachedPort;
"rrdcached" = "${cfg.distributedPoller.rrdcachedHost}:${toString cfg.distributedPoller.rrdcachedPort}";
}) // (lib.optionalAttrs cfg.useDistributedPollers {
"distributed_poller" = true;
# still enable a local poller with distributed polling
"distributed_poller_group" = lib.mkDefault "0";
"distributed_billing" = lib.mkDefault true;
"distributed_poller_memcached_host" = "localhost";
"distributed_poller_memcached_port" = 11211;
"rrdcached" = "localhost:42217";
});
services.memcached = lib.mkIf cfg.useDistributedPollers {
enable = true;
listen = "0.0.0.0";
};
systemd.services.rrdcached = lib.mkIf cfg.useDistributedPollers {
description = "rrdcached";
after = [ "librenms-setup.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "forking";
User = cfg.user;
Group = cfg.group;
LimitNOFILE = 16384;
RuntimeDirectory = "rrdcached";
PidFile = "/run/rrdcached/rrdcached.pid";
# rrdcached params from https://docs.librenms.org/Extensions/Distributed-Poller/#config-sample
ExecStart = "${pkgs.rrdtool}/bin/rrdcached -l 0:42217 -R -j ${cfg.dataDir}/rrdcached-journal/ -F -b ${cfg.dataDir}/rrd -B -w 1800 -z 900 -p /run/rrdcached/rrdcached.pid";
};
};
services.mysql = lib.mkIf cfg.database.createLocally {
enable = true;
package = lib.mkDefault pkgs.mariadb;
settings.mysqld = {
innodb_file_per_table = 1;
lower_case_table_names = 0;
} // (lib.optionalAttrs cfg.useDistributedPollers {
bind-address = "0.0.0.0";
});
ensureDatabases = [ cfg.database.database ];
ensureUsers = [
{
name = cfg.database.username;
ensurePermissions = {
"${cfg.database.database}.*" = "ALL PRIVILEGES";
};
}
];
initialScript = lib.mkIf cfg.useDistributedPollers (pkgs.writeText "mysql-librenms-init" ''
CREATE USER IF NOT EXISTS '${cfg.database.username}'@'%';
GRANT ALL PRIVILEGES ON ${cfg.database.database}.* TO '${cfg.database.username}'@'%';
'');
};
services.nginx = lib.mkIf (!cfg.distributedPoller.enable) {
enable = true;
virtualHosts."${cfg.hostname}" = lib.mkMerge [
cfg.nginx
{
root = lib.mkForce "${package}/html";
locations."/" = {
index = "index.php";
tryFiles = "$uri $uri/ /index.php?$query_string";
};
locations."~ .php$".extraConfig = ''
fastcgi_pass unix:${config.services.phpfpm.pools."librenms".socket};
fastcgi_split_path_info ^(.+\.php)(/.+)$;
'';
}
];
};
services.phpfpm.pools.librenms = lib.mkIf (!cfg.distributedPoller.enable) {
user = cfg.user;
group = cfg.group;
inherit (package) phpPackage;
inherit phpOptions;
settings = {
"listen.mode" = "0660";
"listen.owner" = config.services.nginx.user;
"listen.group" = config.services.nginx.group;
} // cfg.poolConfig;
};
systemd.services.librenms-scheduler = {
description = "LibreNMS Scheduler";
path = [ pkgs.unixtools.whereis ];
serviceConfig = {
Type = "oneshot";
WorkingDirectory = package;
User = cfg.user;
Group = cfg.group;
ExecStart = "${artisanWrapper}/bin/librenms-artisan schedule:run";
};
};
systemd.timers.librenms-scheduler = {
description = "LibreNMS Scheduler";
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "minutely";
AccuracySec = "1second";
};
};
systemd.services.librenms-setup = {
description = "Preparation tasks for LibreNMS";
before = [ "phpfpm-librenms.service" ];
after = [ "systemd-tmpfiles-setup.service" ]
++ (lib.optional (cfg.database.host == "localhost") "mysql.service");
wantedBy = [ "multi-user.target" ];
restartTriggers = [ package configFile ];
path = [ pkgs.mariadb pkgs.unixtools.whereis pkgs.gnused ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
EnvironmentFile = lib.mkIf (cfg.environmentFile != null) [ cfg.environmentFile ];
User = cfg.user;
Group = cfg.group;
ExecStartPre = lib.mkIf cfg.database.createLocally [ "!${pkgs.writeShellScript "librenms-db-init" ''
DB_PASSWORD=$(cat ${cfg.database.passwordFile} | tr -d '\n')
echo "ALTER USER '${cfg.database.username}'@'localhost' IDENTIFIED BY '$DB_PASSWORD';" | ${pkgs.mariadb}/bin/mysql
${lib.optionalString cfg.useDistributedPollers ''
echo "ALTER USER '${cfg.database.username}'@'%' IDENTIFIED BY '$DB_PASSWORD';" | ${pkgs.mariadb}/bin/mysql
''}
''}"];
};
script = ''
set -euo pipefail
# config setup
ln -sf ${configFile} ${cfg.dataDir}/config.php
${pkgs.envsubst}/bin/envsubst -i ${configJson} -o ${cfg.dataDir}/config.json
export PHPRC=${phpIni}
if [[ ! -s ${cfg.dataDir}/.env ]]; then
# init .env file
echo "APP_KEY=" > ${cfg.dataDir}/.env
${artisanWrapper}/bin/librenms-artisan key:generate --ansi
${artisanWrapper}/bin/librenms-artisan webpush:vapid
echo "" >> ${cfg.dataDir}/.env
echo -n "NODE_ID=" >> ${cfg.dataDir}/.env
${package.phpPackage}/bin/php -r "echo uniqid();" >> ${cfg.dataDir}/.env
echo "" >> ${cfg.dataDir}/.env
else
# .env file already exists --> only update database and cache config
${pkgs.gnused}/bin/sed -i /^DB_/d ${cfg.dataDir}/.env
${pkgs.gnused}/bin/sed -i /^CACHE_DRIVER/d ${cfg.dataDir}/.env
fi
${lib.optionalString (cfg.useDistributedPollers || cfg.distributedPoller.enable) ''
echo "CACHE_DRIVER=memcached" >> ${cfg.dataDir}/.env
''}
echo "DB_HOST=${cfg.database.host}" >> ${cfg.dataDir}/.env
echo "DB_PORT=${toString cfg.database.port}" >> ${cfg.dataDir}/.env
echo "DB_DATABASE=${cfg.database.database}" >> ${cfg.dataDir}/.env
echo "DB_USERNAME=${cfg.database.username}" >> ${cfg.dataDir}/.env
echo -n "DB_PASSWORD=" >> ${cfg.dataDir}/.env
cat ${cfg.database.passwordFile} >> ${cfg.dataDir}/.env
# clear cache after update
OLD_VERSION=$(cat ${cfg.dataDir}/version)
if [[ $OLD_VERSION != "${package.version}" ]]; then
rm -r ${cfg.dataDir}/cache/*
echo "${package.version}" > ${cfg.dataDir}/version
fi
# convert rrd files when the oneMinutePolling option is changed
OLD_ENABLED=$(cat ${cfg.dataDir}/one_minute_enabled)
if [[ $OLD_ENABLED != "${lib.boolToString cfg.enableOneMinutePolling}" ]]; then
${package}/scripts/rrdstep.php -h all
echo "${lib.boolToString cfg.enableOneMinutePolling}" > ${cfg.dataDir}/one_minute_enabled
fi
# migrate db
${artisanWrapper}/bin/librenms-artisan migrate --force --no-interaction
'';
};
programs.mtr.enable = true;
services.logrotate = {
enable = true;
settings."${cfg.logDir}/librenms.log" = {
su = "${cfg.user} ${cfg.group}";
create = "0640 ${cfg.user} ${cfg.group}";
rotate = 6;
frequency = "weekly";
compress = true;
delaycompress = true;
missingok = true;
notifempty = true;
};
};
services.cron = {
enable = true;
systemCronJobs = let
env = "PHPRC=${phpIni}";
in [
# based on crontab provided by LibreNMS
"33 */6 * * * ${cfg.user} ${env} ${package}/cronic ${package}/discovery-wrapper.py 1"
"*/5 * * * * ${cfg.user} ${env} ${package}/discovery.php -h new >> /dev/null 2>&1"
"${if cfg.enableOneMinutePolling then "*" else "*/5"} * * * * ${cfg.user} ${env} ${package}/cronic ${package}/poller-wrapper.py ${toString cfg.pollerThreads}"
"* * * * * ${cfg.user} ${env} ${package}/alerts.php >> /dev/null 2>&1"
"*/5 * * * * ${cfg.user} ${env} ${package}/poll-billing.php >> /dev/null 2>&1"
"01 * * * * ${cfg.user} ${env} ${package}/billing-calculate.php >> /dev/null 2>&1"
"*/5 * * * * ${cfg.user} ${env} ${package}/check-services.php >> /dev/null 2>&1"
# extra: fast ping
"* * * * * ${cfg.user} ${env} ${package}/ping.php >> /dev/null 2>&1"
# daily.sh tasks are split to exclude update
"19 0 * * * ${cfg.user} ${env} ${package}/daily.sh cleanup >> /dev/null 2>&1"
"19 0 * * * ${cfg.user} ${env} ${package}/daily.sh notifications >> /dev/null 2>&1"
"19 0 * * * ${cfg.user} ${env} ${package}/daily.sh peeringdb >> /dev/null 2>&1"
"19 0 * * * ${cfg.user} ${env} ${package}/daily.sh mac_oui >> /dev/null 2>&1"
];
};
security.wrappers = {
fping = {
setuid = true;
owner = "root";
group = "root";
source = "${pkgs.fping}/bin/fping";
};
};
environment.systemPackages = [ artisanWrapper lnmsWrapper ];
systemd.tmpfiles.rules = [
"d ${cfg.logDir} 0750 ${cfg.user} ${cfg.group} - -"
"f ${cfg.logDir}/librenms.log 0640 ${cfg.user} ${cfg.group} - -"
"d ${cfg.dataDir} 0750 ${cfg.user} ${cfg.group} - -"
"f ${cfg.dataDir}/.env 0600 ${cfg.user} ${cfg.group} - -"
"f ${cfg.dataDir}/version 0600 ${cfg.user} ${cfg.group} - -"
"f ${cfg.dataDir}/one_minute_enabled 0600 ${cfg.user} ${cfg.group} - -"
"f ${cfg.dataDir}/config.json 0600 ${cfg.user} ${cfg.group} - -"
"d ${cfg.dataDir}/storage 0700 ${cfg.user} ${cfg.group} - -"
"d ${cfg.dataDir}/storage/app 0700 ${cfg.user} ${cfg.group} - -"
"d ${cfg.dataDir}/storage/debugbar 0700 ${cfg.user} ${cfg.group} - -"
"d ${cfg.dataDir}/storage/framework 0700 ${cfg.user} ${cfg.group} - -"
"d ${cfg.dataDir}/storage/framework/cache 0700 ${cfg.user} ${cfg.group} - -"
"d ${cfg.dataDir}/storage/framework/sessions 0700 ${cfg.user} ${cfg.group} - -"
"d ${cfg.dataDir}/storage/framework/views 0700 ${cfg.user} ${cfg.group} - -"
"d ${cfg.dataDir}/storage/logs 0700 ${cfg.user} ${cfg.group} - -"
"d ${cfg.dataDir}/rrd 0700 ${cfg.user} ${cfg.group} - -"
"d ${cfg.dataDir}/cache 0700 ${cfg.user} ${cfg.group} - -"
] ++ lib.optionals cfg.useDistributedPollers [
"d ${cfg.dataDir}/rrdcached-journal 0700 ${cfg.user} ${cfg.group} - -"
];
};
meta.maintainers = lib.teams.wdz.members;
}

View File

@ -0,0 +1,95 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.tang;
in
{
options.services.tang = {
enable = mkEnableOption "tang";
package = mkOption {
type = types.package;
default = pkgs.tang;
defaultText = literalExpression "pkgs.tang";
description = mdDoc "The tang package to use.";
};
listenStream = mkOption {
type = with types; listOf str;
default = [ "7654" ];
example = [ "198.168.100.1:7654" "[2001:db8::1]:7654" "7654" ];
description = mdDoc ''
Addresses and/or ports on which tang should listen.
For detailed syntax see ListenStream in {manpage}`systemd.socket(5)`.
'';
};
ipAddressAllow = mkOption {
example = [ "192.168.1.0/24" ];
type = types.listOf types.str;
description = ''
Whitelist a list of address prefixes.
Preferably, internal addresses should be used.
'';
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
systemd.services."tangd@" = {
description = "Tang server";
path = [ cfg.package ];
serviceConfig = {
StandardInput = "socket";
StandardOutput = "socket";
StandardError = "journal";
DynamicUser = true;
StateDirectory = "tang";
RuntimeDirectory = "tang";
StateDirectoryMode = "700";
UMask = "0077";
CapabilityBoundingSet = [ "" ];
ExecStart = "${cfg.package}/libexec/tangd %S/tang";
LockPersonality = true;
MemoryDenyWriteExecute = true;
NoNewPrivileges = true;
DeviceAllow = [ "/dev/stdin" ];
RestrictAddressFamilies = [ "AF_UNIX" ];
DevicePolicy = "strict";
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";
RestrictNamespaces = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
SystemCallArchitectures = "native";
SystemCallFilter = [ "@system-service" "~@privileged" "~@resources" ];
IPAddressDeny = "any";
IPAddressAllow = cfg.ipAddressAllow;
};
};
systemd.sockets.tangd = {
description = "Tang server";
wantedBy = [ "sockets.target" ];
socketConfig = {
ListenStream = cfg.listenStream;
Accept = "yes";
IPAddressDeny = "any";
IPAddressAllow = cfg.ipAddressAllow;
};
};
};
meta.maintainers = with lib.maintainers; [ jfroche julienmalka ];
}

View File

@ -145,9 +145,7 @@ in {
};
ui = {
enable = lib.mkEnableOption (lib.mdDoc ''
Enables the (experimental) LXD UI.
'');
enable = lib.mkEnableOption (lib.mdDoc "(experimental) LXD UI");
package = lib.mkPackageOption pkgs.lxd-unwrapped "ui" { };
};

View File

@ -274,6 +274,7 @@ in {
fcitx5 = handleTest ./fcitx5 {};
fenics = handleTest ./fenics.nix {};
ferm = handleTest ./ferm.nix {};
ferretdb = handleTest ./ferretdb.nix {};
firefox = handleTest ./firefox.nix { firefoxPackage = pkgs.firefox; };
firefox-beta = handleTest ./firefox.nix { firefoxPackage = pkgs.firefox-beta; };
firefox-devedition = handleTest ./firefox.nix { firefoxPackage = pkgs.firefox-devedition; };
@ -432,6 +433,7 @@ in {
lemmy = handleTest ./lemmy.nix {};
libinput = handleTest ./libinput.nix {};
libreddit = handleTest ./libreddit.nix {};
librenms = handleTest ./librenms.nix {};
libresprite = handleTest ./libresprite.nix {};
libreswan = handleTest ./libreswan.nix {};
librewolf = handleTest ./firefox.nix { firefoxPackage = pkgs.librewolf; };
@ -806,6 +808,7 @@ in {
systemd-userdbd = handleTest ./systemd-userdbd.nix {};
systemd-homed = handleTest ./systemd-homed.nix {};
tandoor-recipes = handleTest ./tandoor-recipes.nix {};
tang = handleTest ./tang.nix {};
taskserver = handleTest ./taskserver.nix {};
tayga = handleTest ./tayga.nix {};
teeworlds = handleTest ./teeworlds.nix {};

View File

@ -1,11 +1,6 @@
# Test ensures buildbot master comes up correctly and workers can connect
{ system ? builtins.currentSystem,
config ? {},
pkgs ? import ../.. { inherit system config; }
}:
import ./make-test-python.nix {
import ./make-test-python.nix ({ pkgs, ... }: {
name = "buildbot";
nodes = {
@ -110,4 +105,4 @@ import ./make-test-python.nix {
'';
meta.maintainers = with pkgs.lib.maintainers; [ ];
} {}
})

64
nixos/tests/ferretdb.nix Normal file
View File

@ -0,0 +1,64 @@
{ system ? builtins.currentSystem
, pkgs ? import ../.. { inherit system; }
, ...
}:
let
lib = pkgs.lib;
testScript = ''
machine.start()
machine.wait_for_unit("ferretdb.service")
machine.wait_for_open_port(27017)
machine.succeed("mongosh --eval 'use myNewDatabase;' --eval 'db.myCollection.insertOne( { x: 1 } );'")
'';
in
with import ../lib/testing-python.nix { inherit system; };
{
postgresql = makeTest
{
inherit testScript;
name = "ferretdb-postgresql";
meta.maintainers = with lib.maintainers; [ julienmalka ];
nodes.machine =
{ pkgs, ... }:
{
services.ferretdb = {
enable = true;
settings.FERRETDB_HANDLER = "pg";
settings.FERRETDB_POSTGRESQL_URL = "postgres://ferretdb@localhost/ferretdb?host=/run/postgresql";
};
systemd.services.ferretdb.serviceConfig = {
Requires = "postgresql.service";
After = "postgresql.service";
};
services.postgresql = {
enable = true;
ensureDatabases = [ "ferretdb" ];
ensureUsers = [{
name = "ferretdb";
ensurePermissions."DATABASE ferretdb" = "ALL PRIVILEGES";
}];
};
environment.systemPackages = with pkgs; [ mongosh ];
};
};
sqlite = makeTest
{
inherit testScript;
name = "ferretdb-sqlite";
meta.maintainers = with lib.maintainers; [ julienmalka ];
nodes.machine =
{ pkgs, ... }:
{
services.ferretdb.enable = true;
environment.systemPackages = with pkgs; [ mongosh ];
};
};
}

108
nixos/tests/librenms.nix Normal file
View File

@ -0,0 +1,108 @@
import ./make-test-python.nix ({ pkgs, lib, ... }:
let
api_token = "f87f42114e44b63ad1b9e3c3d33d6fbe"; # random md5 hash
wrong_api_token = "e68ba041fcf1eab923a7a6de3af5f726"; # another random md5 hash
in {
name = "librenms";
meta.maintainers = lib.teams.wdz.members;
nodes.librenms = {
time.timeZone = "Europe/Berlin";
environment.systemPackages = with pkgs; [
curl
jq
];
services.librenms = {
enable = true;
hostname = "librenms";
database = {
createLocally = true;
host = "localhost";
database = "librenms";
username = "librenms";
passwordFile = pkgs.writeText "librenms-db-pass" "librenmsdbpass";
};
nginx = {
default = true;
};
enableOneMinutePolling = true;
settings = {
enable_billing = true;
};
};
# systemd oneshot to create a dummy admin user and a API token for testing
systemd.services.lnms-api-init = {
description = "LibreNMS API init";
after = [ "librenms-setup.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
User = "root";
Group = "root";
};
script = ''
API_USER_NAME=api
API_TOKEN=${api_token} # random md5 hash
# we don't need to know the password, it just has to exist
API_USER_PASS=$(${pkgs.pwgen}/bin/pwgen -s 64 1)
${pkgs.librenms}/artisan user:add $API_USER_NAME -r admin -p $API_USER_PASS
API_USER_ID=$(${pkgs.mariadb}/bin/mysql -D librenms -N -B -e "SELECT user_id FROM users WHERE username = '$API_USER_NAME';")
${pkgs.mariadb}/bin/mysql -D librenms -e "INSERT INTO api_tokens (user_id, token_hash, description) VALUES ($API_USER_ID, '$API_TOKEN', 'API User')"
'';
};
};
nodes.snmphost = {
networking.firewall.allowedUDPPorts = [ 161 ];
systemd.services.snmpd = {
description = "snmpd";
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "forking";
User = "root";
Group = "root";
ExecStart = let
snmpd-config = pkgs.writeText "snmpd-config" ''
com2sec readonly default public
group MyROGroup v2c readonly
view all included .1 80
access MyROGroup "" any noauth exact all none none
syslocation Testcity, Testcountry
syscontact Testi mc Test <test@example.com>
'';
in "${pkgs.net-snmp}/bin/snmpd -c ${snmpd-config} -C";
};
};
};
testScript = ''
start_all()
snmphost.wait_until_succeeds("pgrep snmpd")
librenms.wait_for_unit("lnms-api-init.service")
librenms.wait_for_open_port(80)
# Test that we can authenticate against the API
librenms.succeed("curl --fail -H 'X-Auth-Token: ${api_token}' http://localhost/api/v0")
librenms.fail("curl --fail -H 'X-Auth-Token: ${wrong_api_token}' http://localhost/api/v0")
# add snmphost as a device
librenms.succeed("curl --fail -X POST -d '{\"hostname\":\"snmphost\",\"version\":\"v2c\",\"community\":\"public\"}' -H 'X-Auth-Token: ${api_token}' http://localhost/api/v0/devices")
# wait until snmphost gets polled
librenms.wait_until_succeeds("test $(curl -H 'X-Auth-Token: ${api_token}' http://localhost/api/v0/devices/snmphost | jq -Mr .devices[0].last_polled) != 'null'")
'';
})

81
nixos/tests/tang.nix Normal file
View File

@ -0,0 +1,81 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "tang";
meta = with pkgs.lib.maintainers; {
maintainers = [ jfroche ];
};
nodes.server =
{ config
, pkgs
, modulesPath
, ...
}: {
imports = [
"${modulesPath}/../tests/common/auto-format-root-device.nix"
];
virtualisation = {
emptyDiskImages = [ 512 ];
useBootLoader = true;
useEFIBoot = true;
# This requires to have access
# to a host Nix store as
# the new root device is /dev/vdb
# an empty 512MiB drive, containing no Nix store.
mountHostNixStore = true;
};
boot.loader.systemd-boot.enable = true;
networking.interfaces.eth1.ipv4.addresses = [
{ address = "192.168.0.1"; prefixLength = 24; }
];
environment.systemPackages = with pkgs; [ clevis tang cryptsetup ];
services.tang = {
enable = true;
ipAddressAllow = [ "127.0.0.1/32" ];
};
};
testScript = ''
start_all()
machine.wait_for_unit("sockets.target")
with subtest("Check keys are generated"):
machine.wait_until_succeeds("curl -v http://127.0.0.1:7654/adv")
key = machine.wait_until_succeeds("tang-show-keys 7654")
with subtest("Check systemd access list"):
machine.succeed("ping -c 3 192.168.0.1")
machine.fail("curl -v --connect-timeout 3 http://192.168.0.1:7654/adv")
with subtest("Check basic encrypt and decrypt message"):
machine.wait_until_succeeds(f"""echo 'Hello World' | clevis encrypt tang '{{ "url": "http://127.0.0.1:7654", "thp":"{key}"}}' > /tmp/encrypted""")
decrypted = machine.wait_until_succeeds("clevis decrypt < /tmp/encrypted")
assert decrypted.strip() == "Hello World"
machine.wait_until_succeeds("tang-show-keys 7654")
with subtest("Check encrypt and decrypt disk"):
machine.succeed("cryptsetup luksFormat --force-password --batch-mode /dev/vdb <<<'password'")
machine.succeed(f"""clevis luks bind -s1 -y -f -d /dev/vdb tang '{{ "url": "http://127.0.0.1:7654", "thp":"{key}" }}' <<< 'password' """)
clevis_luks = machine.succeed("clevis luks list -d /dev/vdb")
assert clevis_luks.strip() == """1: tang '{"url":"http://127.0.0.1:7654"}'"""
machine.succeed("clevis luks unlock -d /dev/vdb")
machine.succeed("find /dev/mapper -name 'luks*' -exec cryptsetup close {} +")
machine.succeed("clevis luks unlock -d /dev/vdb")
machine.succeed("find /dev/mapper -name 'luks*' -exec cryptsetup close {} +")
# without tang available, unlock should fail
machine.succeed("systemctl stop tangd.socket")
machine.fail("clevis luks unlock -d /dev/vdb")
machine.succeed("systemctl start tangd.socket")
with subtest("Rotate server keys"):
machine.succeed("${pkgs.tang}/libexec/tangd-rotate-keys -d /var/lib/tang")
machine.succeed("clevis luks unlock -d /dev/vdb")
machine.succeed("find /dev/mapper -name 'luks*' -exec cryptsetup close {} +")
with subtest("Test systemd service security"):
output = machine.succeed("systemd-analyze security tangd@.service")
machine.log(output)
assert output[-9:-1] == "SAFE :-}"
'';
})

View File

@ -1,95 +0,0 @@
{ stdenv, fetchurl, alsa-lib, bzip2, cairo, dpkg, freetype, gdk-pixbuf
, wrapGAppsHook, gtk2, gtk3, harfbuzz, jdk, lib, xorg
, libbsd, libjack2, libpng, ffmpeg
, libxkbcommon
, makeWrapper, pixman, autoPatchelfHook
, xdg-utils, zenity, zlib }:
stdenv.mkDerivation rec {
pname = "bitwig-studio";
version = "1.3.16";
src = fetchurl {
url = "https://downloads.bitwig.com/stable/${version}/bitwig-studio-${version}.deb";
sha256 = "0n0fxh9gnmilwskjcayvjsjfcs3fz9hn00wh7b3gg0cv3qqhich8";
};
nativeBuildInputs = [ dpkg makeWrapper autoPatchelfHook wrapGAppsHook ];
unpackCmd = "mkdir root ; dpkg-deb -x $curSrc root";
dontBuild = true;
dontWrapGApps = true; # we only want $gappsWrapperArgs here
buildInputs = with xorg; [
alsa-lib bzip2.out cairo freetype gdk-pixbuf gtk2 gtk3 harfbuzz libX11 libXau
libXcursor libXdmcp libXext libXfixes libXrender libbsd libjack2 libpng libxcb
libxkbfile pixman xcbutil xcbutilwm zlib
];
installPhase = ''
mkdir -p $out
cp -r opt/bitwig-studio $out/libexec
# Use NixOS versions of these libs instead of the bundled ones.
(
cd $out/libexec/lib/bitwig-studio
rm libbz2.so* libxkbfile.so* libXcursor.so* libXau.so* \
libXdmcp.so* libpng16.so* libxcb*.so* libharfbuzz.so* \
libcairo.so* libfreetype.so*
ln -s ${bzip2.out}/lib/libbz2.so.1.0.6 libbz2.so.1.0
)
# Use our OpenJDK instead of Bitwigs bundled—and commercial!—one.
rm -rf $out/libexec/lib/jre
ln -s ${jdk.home}/jre $out/libexec/lib/jre
mkdir -p $out/bin
ln -s $out/libexec/bitwig-studio $out/bin/bitwig-studio
cp -r usr/share $out/share
substitute usr/share/applications/bitwig-studio.desktop \
$out/share/applications/bitwig-studio.desktop \
--replace /usr/bin/bitwig-studio $out/bin/bitwig-studio
'';
postFixup = ''
# Bitwigs `libx11-windowing-system.so` has several problems:
#
# • has some old version of libxkbcommon linked statically (ಠ_ಠ),
#
# • hardcodes path to `/usr/share/X11/xkb`,
#
# • even if we redirected it with libredirect (after adding
# `eaccess()` to libredirect!), their version of libxkbcommon
# is unable to parse our xkeyboardconfig. Been there, done that.
#
# However, it suffices to override theirs with our libxkbcommon
# in LD_PRELOAD. :-)
find $out -type f -executable \
-not -name '*.so.*' \
-not -name '*.so' \
-not -path '*/resources/*' | \
while IFS= read -r f ; do
wrapProgram $f \
--suffix PATH : "${lib.makeBinPath [ ffmpeg zenity ]}" \
--prefix PATH : "${lib.makeBinPath [ xdg-utils ]}" \
"''${gappsWrapperArgs[@]}" \
--set LD_PRELOAD "${libxkbcommon.out}/lib/libxkbcommon.so" || true
done
'';
meta = with lib; {
description = "A digital audio workstation";
longDescription = ''
Bitwig Studio is a multi-platform music-creation system for
production, performance and DJing, with a focus on flexible
editing tools and a super-fast workflow.
'';
homepage = "https://www.bitwig.com/";
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ michalrus mrVanDalo ];
};
}

View File

@ -1,16 +0,0 @@
{ fetchurl, bitwig-studio1,
pulseaudio }:
bitwig-studio1.overrideAttrs (oldAttrs: rec {
pname = "bitwig-studio";
version = "2.5";
src = fetchurl {
url = "https://downloads.bitwig.com/stable/${version}/bitwig-studio-${version}.deb";
sha256 = "1zkiz36lhck3qvl0cp0dq6pwbv4lx4sh9wh0ga92kx5zhvbjm098";
};
runtimeDependencies = [
pulseaudio
];
})

View File

@ -1,13 +1,13 @@
{ stdenv, lib, fetchFromGitHub, faust2jaqt, faust2lv2 }:
stdenv.mkDerivation rec {
pname = "faustPhysicalModeling";
version = "2.60.3";
version = "2.68.1";
src = fetchFromGitHub {
owner = "grame-cncm";
repo = "faust";
rev = version;
sha256 = "sha256-kaKDZKs/UsrqYlGmGgpSRcqN7FypxLCcIF72klovD4k=";
sha256 = "sha256-jD6/ZeS0xdtajCg5e95E0Jo2lfXOn4OIVf4LJgAfPbo=";
};
buildInputs = [ faust2jaqt faust2lv2 ];

View File

@ -24,13 +24,13 @@
stdenv.mkDerivation rec {
pname = "giada";
version = "0.25.1";
version = "0.26.0";
src = fetchFromGitHub {
owner = "monocasual";
repo = pname;
rev = version;
sha256 = "sha256-SW2qT+pMKTMBnkaL+Dg87tqutcLTqaY4nCeFfJjHIw4=";
sha256 = "sha256-q3Lu3UaEKfS7F59G6rPx+5cKcsaXk+xcdtJRIXPwVIs=";
fetchSubmodules = true;
};

View File

@ -7,7 +7,7 @@ let
meta = with lib; {
license = licenses.agpl3Plus;
maintainers = with maintainers; [ davidak ];
platforms = platforms.linux;
platforms = platforms.all;
description = "Speech synthesizer based on the concatenation of diphones";
homepage = "https://github.com/numediart/MBROLA";
};

View File

@ -11,16 +11,16 @@
rustPlatform.buildRustPackage rec {
pname = "songrec";
version = "0.3.2";
version = "0.3.3";
src = fetchFromGitHub {
owner = "marin-m";
repo = pname;
rev = version;
sha256 = "sha256-cUiy8ApeUv1K8SEH4APMTvbieGTt4kZYhyB9iGJd/IY=";
hash = "sha256-K80uoMfwkyH/K8t6zdkq1ZYTpI0dAIvO2K2kzpzDoN0=";
};
cargoSha256 = "sha256-Tlq4qDp56PXP4N1UyHjtQoRgDrc/19vIv8uml/lAqqc=";
cargoHash = "sha256-Xmey+goHGTWMgKIJRzKMi9Y1bv677Yo2sfDaMauvZsM=";
nativeBuildInputs = [ pkg-config ];

View File

@ -13,11 +13,11 @@
let
platform_major = "4";
platform_minor = "28";
platform_minor = "29";
year = "2023";
month = "06"; #release month
buildmonth = "06"; #sometimes differs from release month
timestamp = "${year}${buildmonth}050440";
month = "09"; #release month
buildmonth = "09"; #sometimes differs from release month
timestamp = "${year}${buildmonth}031000";
gtk = gtk3;
arch = if stdenv.hostPlatform.isx86_64 then
"x86_64"
@ -43,8 +43,8 @@ in rec {
fetchurl {
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-cpp-${year}-${month}-R-linux-gtk-${arch}.tar.gz";
hash = {
x86_64 = "sha256-0VFg68+M84SEPbLv2f3hNTK1tvUjN3u0X3DYFCMAFX8=";
aarch64 = "sha256-K1e1Q//X+R4FfY60eE4nPgEaF0wUkUIO/AFzzjIrGRY=";
x86_64 = "sha256-r9ZDt1D7Wt0Gp2JvW4Qwkw0Rj8F4IhUiNpVgm8FDdbY=";
aarch64 = "sha256-fyIvDY9jQfLwwNL4iaLb80X2eWaYqkLqtMd09yOQGo4=";
}.${arch};
};
};
@ -58,8 +58,8 @@ in rec {
fetchurl {
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-modeling-${year}-${month}-R-linux-gtk-${arch}.tar.gz";
hash = {
x86_64 = "sha256-wdZninKynNQ5o2nxyOxA7GDQ75tWs1TB2jh21O0fEpg=";
aarch64 = "sha256-5iAoMyesBjmdAy/eSMkgtuYv5rnXAEjgLb0yNX02mdw=";
x86_64 = "sha256-eO+fnoN0jZCURwmy6M0Okb9U4R3z8u1gzfm2mGp+Chc=";
aarch64 = "sha256-gN0wu7QOyVslvWum9SIkptADtQoX47UPentEupJBnQ8=";
}.${arch};
};
};
@ -73,8 +73,8 @@ in rec {
fetchurl {
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops${platform_major}/R-${platform_major}.${platform_minor}-${timestamp}/eclipse-platform-${platform_major}.${platform_minor}-linux-gtk-${arch}.tar.gz";
hash = {
x86_64 = "sha256-SYeCXWGSi8bPbqngGC+ZSBQaKyZrDTFeT+RLKC+ZsDk=";
aarch64 = "sha256-DN6fl7p+q96wsg9Mq6v3lTV0/7b87MFKTJSFuNrjLgs=";
x86_64 = "sha256-+0yzlB89v8KrhDfo5oqT0NKY/3hPk+Pkp2yGQ0silEg=";
aarch64 = "sha256-CvzDldzcmLzL7z9ZRxHQblmvkzza4wQYeDIZf6V6uXk=";
}.${arch};
};
};
@ -105,8 +105,8 @@ in rec {
fetchurl {
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops${platform_major}/R-${platform_major}.${platform_minor}-${timestamp}/eclipse-SDK-${platform_major}.${platform_minor}-linux-gtk-${arch}.tar.gz";
hash = {
x86_64 = "sha256-QY16KSNZj6rq7YL+gOajI80XVtSdCh7MJGPscRJuf1o=";
aarch64 = "sha256-oZXx87dlLZ61ezwDD0WnV48ZMjcK0FkSGl83LhkJvmc=";
x86_64 = "sha256-Qp9yKSNWVPH8SX1D4PMfSv3XqiKAQCVXWFcSyQaMFmA=";
aarch64 = "sha256-cp8/BiewoNt4txhHmpiBTSXZ2sXXPu6zxuAYi24DF9I=";
}.${arch};
};
};
@ -120,8 +120,8 @@ in rec {
fetchurl {
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-java-${year}-${month}-R-linux-gtk-${arch}.tar.gz";
hash = {
x86_64 = "sha256-FC4zgx+75S9TJVp0azWgON/wNmoEy0074tj+DOdvNOg=";
aarch64 = "sha256-wnRQKqg1V4hrD9VAg6sw8yypB97Wcivt4cH6MFP4KPs=";
x86_64 = "sha256-TX8LbbBxRGWJ7lmf3tfK+Eux54dSapCsP7OmLfDw4Do=";
aarch64 = "sha256-AltrVmCuSTAoRgVsw98oNiR1HPpbYovz3UNGRXQgiVs=";
}.${arch};
};
};
@ -135,8 +135,8 @@ in rec {
fetchurl {
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-jee-${year}-${month}-R-linux-gtk-${arch}.tar.gz";
hash = {
x86_64 = "sha256-eSYWuw6s3H1ht4zPDwjd4oZ49KhIn1OaywtwKHyS0wI=";
aarch64 = "sha256-9O0+S3G3vtjN1Vd4euf3gYRPPtrVxoBB+Uj7BlDAS5M=";
x86_64 = "sha256-kMEeY27Q97+5/pbl3of93p43dMXE1NQmuESCsK5sK3g=";
aarch64 = "sha256-sf+l/BjJ1VAyrc94oJUKYEInG7wEivbYEhpEXLi4C+w=";
}.${arch};
};
};
@ -150,8 +150,8 @@ in rec {
fetchurl {
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-committers-${year}-${month}-R-linux-gtk-${arch}.tar.gz";
hash = {
x86_64 = "sha256-kJoXaSwsjArpe4tqeSkZiU4AcR5dLBvdsyU7tBTiTdc=";
aarch64 = "sha256-qydFxa0lQEwsxZQPlBXV/wiuXGuIcBHRasKZEmXJaOk=";
x86_64 = "sha256-K9+Up4nDXZCBKxzj2LX7F9ioPocHnxPdpHMQuc5oehs=";
aarch64 = "sha256-ibB3D+0UuX2c+Cbr0L5r8Rh6BfpmOyXNnSk13m2Q7Zk=";
}.${arch};
};
};
@ -165,8 +165,8 @@ in rec {
fetchurl {
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-rcp-${year}-${month}-R-linux-gtk-${arch}.tar.gz";
hash = {
x86_64 = "sha256-BAEXN6sx4f+BJnKz0lkPoAmRXnlbl5s5ETAyfE/AZak=";
aarch64 = "sha256-xayvsFAglBxAB49j2tnt52d6KX6LxMBRfx0wR/p8K70=";
x86_64 = "sha256-J+8UbkDiG9F+mDBZwr4HVGJWqeSBGMsl3EIRtA7+fK0=";
aarch64 = "sha256-+oYY37fBjEi2GJCZVaCsUyWwAhsPPD6nAstUDGmywwo=";
}.${arch};
};
};

View File

@ -255,12 +255,12 @@ rec {
cdt = buildEclipseUpdateSite rec {
name = "cdt-${version}";
# find current version at https://github.com/eclipse-cdt/cdt/releases
version = "11.2.0";
version = "11.3.0";
src = fetchzip {
stripRoot = false;
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/tools/cdt/releases/${lib.versions.majorMinor version}/${name}/${name}.zip";
hash = "sha256-YEmoAFzyGOyreg8FiL/gcwXROHT5VoLb1DfHhBp1tsQ=";
hash = "sha256-jmHiIohn8Ol0QhTCOVRStIAKmMzOPcQ5i5QNz6hKQ4M=";
};
meta = with lib; {

View File

@ -4,11 +4,11 @@
mkDerivation rec {
pname = "okteta";
version = "0.26.10";
version = "0.26.13";
src = fetchurl {
url = "mirror://kde/stable/okteta/${version}/src/${pname}-${version}.tar.xz";
sha256 = "sha256-KKYU9+DDK0kXperKfgxuysqHsTGRq1NKtAT1Vps8M/o=";
sha256 = "0wlpv0rk4ys4rbcpf8lqpkm0yr5dxkaz60qk2lvm27w1s489ir8l";
};
nativeBuildInputs = [ qtscript extra-cmake-modules kdoctools ];
@ -31,6 +31,7 @@ mkDerivation rec {
meta = with lib; {
license = licenses.gpl2;
description = "A hex editor";
homepage = "https://apps.kde.org/okteta/";
maintainers = with maintainers; [ peterhoeg bkchr ];
platforms = platforms.linux;
};

View File

@ -2,34 +2,20 @@
#!nix-shell update-shell.nix -i python
import json
import logging
import subprocess
from concurrent.futures import ThreadPoolExecutor
from os import environ
from os.path import dirname, join
import os
import sys
from os.path import join
configs = json.loads(
subprocess.check_output(
[
"nvim",
"--headless",
"-u",
"NONE",
"+lua io.write(vim.json.encode(require('nvim-treesitter.parsers').get_parser_configs()))",
"+quit!",
]
)
)
log = logging.getLogger("vim-updater")
def generate_grammar(item):
lang, lock = item
cfg = configs.get(lang)
if not cfg:
return ""
def generate_grammar(lang, rev, cfg):
"""Generate grammar for a language"""
info = cfg["install_info"]
url = info["url"]
rev = lock["revision"]
generated = f""" {lang} = buildGrammar {{
language = "{lang}";
@ -56,7 +42,24 @@ def generate_grammar(item):
return generated
def update_grammars(lockfile: str):
def update_grammars(nvim_treesitter_dir: str):
"""
The lockfile contains just revisions so we start neovim to dump the
grammar information in a better format
"""
# the lockfile
cmd = [
"nvim",
"--headless",
"-u",
"NONE",
"--cmd",
f"set rtp^={nvim_treesitter_dir}",
"+lua io.write(vim.json.encode(require('nvim-treesitter.parsers').get_parser_configs()))",
"+quit!",
]
log.debug("Running command: %s", ' '.join(cmd))
configs = json.loads(subprocess.check_output(cmd))
generated_file = """# generated by pkgs/applications/editors/vim/plugins/nvim-treesitter/update.py
@ -68,14 +71,27 @@ def update_grammars(lockfile: str):
{
"""
for generated in ThreadPoolExecutor().map(generate_grammar, lockfile.items()):
lockfile_path = os.path.join(nvim_treesitter_dir, "lockfile.json")
log.debug("Opening %s", lockfile_path)
with open(lockfile_path) as lockfile_fd:
lockfile = json.load(lockfile_fd)
def _generate_grammar(item):
lang, lock = item
cfg = configs.get(lang)
if not cfg:
return ""
return generate_grammar(lang, lock["revision"], cfg)
for generated in ThreadPoolExecutor(max_workers=5).map(
_generate_grammar, lockfile.items()
):
generated_file += generated
generated_file += "}\n"
generated_file += "}\n"
open(join(dirname(__file__), "generated.nix"), "w").write(generated_file)
return generated_file
if __name__ == "__main__":
# TODO add lockfile
update_grammars()
generated = update_grammars(sys.args[1])
open(join(os.path.dirname(__file__), "generated.nix"), "w").write(generated)

View File

@ -23,11 +23,12 @@ import os
import logging
import textwrap
import json
import subprocess
from typing import List, Tuple
from pathlib import Path
log = logging.getLogger()
log = logging.getLogger("vim-updater")
sh = logging.StreamHandler()
formatter = logging.Formatter("%(name)s:%(levelname)s: %(message)s")
@ -39,15 +40,14 @@ ROOT = Path(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe
import pluginupdate
import importlib
from pluginupdate import run_nix_expr, PluginDesc
from treesitter import update_grammars
import treesitter
HEADER = (
"# GENERATED by ./pkgs/applications/editors/vim/plugins/update.py. Do not edit!"
)
NIXPKGS_NVIMTREESITTER_FOLDER = \
"pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix"
NIXPKGS_NVIMTREESITTER_FOLDER = "pkgs/applications/editors/vim/plugins/nvim-treesitter"
class VimEditor(pluginupdate.Editor):
@ -58,8 +58,7 @@ class VimEditor(pluginupdate.Editor):
):
sorted_plugins = sorted(plugins, key=lambda v: v[0].name.lower())
nvim_treesitter_rev = pluginupdate.run_nix_expr(
"(import <localpkgs> { }).vimPlugins.nvim-treesitter.src.rev",
self.nixpkgs
"(import <localpkgs> { }).vimPlugins.nvim-treesitter.src.rev", self.nixpkgs
)
with open(outfile, "w+") as f:
@ -78,7 +77,8 @@ class VimEditor(pluginupdate.Editor):
content = self.plugin2nix(pdesc, plugin)
f.write(content)
if (
plugin.name == "nvim-treesitter" and plugin.commit != nvim_treesitter_rev
plugin.name == "nvim-treesitter"
and plugin.commit != nvim_treesitter_rev
):
self.nvim_treesitter_updated = True
f.write("\n}\n")
@ -126,13 +126,19 @@ class VimEditor(pluginupdate.Editor):
def update(self, args):
pluginupdate.update_plugins(self, args)
# TODO this should probably be skipped when running outside a nixpkgs checkout
if self.nvim_treesitter_updated:
print("updating nvim-treesitter grammars")
nvim_treesitter_dir = ROOT.joinpath("nvim-treesitter")
lockfile = os.path.join(args.nixpkgs.join(NIXPKGS_NVIMTREESITTER_FOLDER, "lockfile.json"))
lockfile = json.load(open(lockfile))
cmd = [
"nix", "build",
"vimPlugins.nvim-treesitter.src", "-f", self.nixpkgs
, "--print-out-paths"
]
log.debug("Running command: %s", " ".join(cmd))
nvim_treesitter_dir = subprocess.check_output(cmd, text=True, timeout=90).strip()
nvim_treesitter.update_grammars(lockfile)
generated = treesitter.update_grammars(nvim_treesitter_dir)
open(os.path.join(args.nixpkgs, "generated.nix"), "w").write(generated)
if self.nixpkgs_repo:
index = self.nixpkgs_repo.index
@ -147,13 +153,14 @@ class VimEditor(pluginupdate.Editor):
def main():
global luaPlugins
log.debug(f"Loading from {ROOT}/../get-plugins.nix")
with open(f"{ROOT}/../get-plugins.nix") as f:
GET_PLUGINS = f.read()
editor = VimEditor("vim", Path("pkgs/applications/editors/vim/plugins"), GET_PLUGINS)
editor = VimEditor(
"vim", Path("pkgs/applications/editors/vim/plugins"), GET_PLUGINS
)
editor.run()

View File

@ -4,17 +4,12 @@
, python3Packages
, lib
, nix-prefetch-git
, nurl
# optional
, vimPlugins
, neovim
}:
let
my_neovim = neovim.override {
configure.packages.all.start = [ vimPlugins.nvim-treesitter ];
};
in
buildPythonApplication {
format = "other";
pname = "vim-plugins-updater";
@ -39,7 +34,8 @@ buildPythonApplication {
cp ${../../../../../maintainers/scripts/pluginupdate.py} $out/lib/pluginupdate.py
# wrap python scripts
makeWrapperArgs+=( --prefix PATH : "${lib.makeBinPath [ nix nix-prefetch-git my_neovim ]}" --prefix PYTHONPATH : "$out/lib" )
makeWrapperArgs+=( --prefix PATH : "${lib.makeBinPath [
nix nix-prefetch-git neovim nurl ]}" --prefix PYTHONPATH : "$out/lib" )
wrapPythonPrograms
'';

View File

@ -2,10 +2,10 @@
stdenv.mkDerivation rec {
pname = "dcw-gmt";
version = "2.1.1";
version = "2.1.2";
src = fetchurl {
url = "ftp://ftp.soest.hawaii.edu/gmt/dcw-gmt-${version}.tar.gz";
sha256 = "sha256-q3LIJTB2OAyEd6EiU3C8QfSv+BHCjS9k11BS/z2QA68=";
sha256 = "sha256-S7hA0HXIuj4UrrQc8XwkI2v/eHVmMU+f91irmXd0XZk=";
};
installPhase = ''

View File

@ -1,110 +0,0 @@
{ autoPatchelfHook
, dpkg
, fetchurl
, makeDesktopItem
, makeWrapper
, lib
, stdenv
, udev
, alsa-lib
, mesa
, nss
, nspr
, systemd
, wrapGAppsHook
, xorg
}:
let
inherit (stdenv.hostPlatform) system;
throwSystem = throw "Unsupported system: ${system}";
pname = "simplenote";
version = "2.9.0";
sha256 = {
x86_64-linux = "sha256-uwd9fYqZepJ/BBttprqkJhswqMepGsHDTd5Md9gjI68=";
}.${system} or throwSystem;
meta = with lib; {
description = "The simplest way to keep notes";
homepage = "https://github.com/Automattic/simplenote-electron";
license = licenses.gpl2;
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
maintainers = with maintainers; [
kiwi
];
platforms = [
"x86_64-linux"
];
};
linux = stdenv.mkDerivation rec {
inherit pname version meta;
src = fetchurl {
url = "https://github.com/Automattic/simplenote-electron/releases/download/v${version}/Simplenote-linux-${version}-amd64.deb";
inherit sha256;
};
desktopItem = makeDesktopItem {
categories = [ "Development" ];
comment = "Simplenote for Linux";
desktopName = "Simplenote";
exec = "simplenote %U";
icon = "simplenote";
name = "simplenote";
startupNotify = true;
};
dontBuild = true;
dontConfigure = true;
dontPatchELF = true;
dontWrapGApps = true;
# TODO: migrate off autoPatchelfHook and use nixpkgs' electron
nativeBuildInputs = [
autoPatchelfHook
dpkg
makeWrapper
wrapGAppsHook
];
buildInputs = [
alsa-lib
mesa
xorg.libXScrnSaver
xorg.libXtst
nss
nspr
stdenv.cc.cc
systemd
];
unpackPhase = "dpkg-deb -x $src .";
installPhase = ''
mkdir -p "$out/bin"
cp -R "opt" "$out"
cp -R "usr/share" "$out/share"
chmod -R g-w "$out"
mkdir -p "$out/share/applications"
cp "${desktopItem}/share/applications/"* "$out/share/applications"
'';
runtimeDependencies = [
(lib.getLib udev)
];
postFixup = ''
makeWrapper $out/opt/Simplenote/simplenote $out/bin/simplenote \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc ] }" \
"''${gappsWrapperArgs[@]}"
'';
};
in
linux

View File

@ -1,4 +1,5 @@
{ stdenv, lib, fetchurl, fetchpatch
, fetchzip, zstd
, buildPackages
, pkgsBuildBuild
, pkgsBuildTarget
@ -152,9 +153,30 @@ let
inherit (upstream-info) version;
inherit packageName buildType buildPath;
src = fetchurl {
src = fetchzip {
name = "chromium-${version}.tar.zstd";
url = "https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${version}.tar.xz";
inherit (upstream-info) sha256;
nativeBuildInputs = [ zstd ];
postFetch = ''
echo removing unused code from tarball to stay under hydra limit
rm -r $out/third_party/{rust-src,llvm}
echo moving remains out of \$out
mv $out source
echo recompressing final contents into new tarball
# try to make a deterministic tarball
tar \
--use-compress-program "zstd -T$NIX_BUILD_CORES" \
--sort name \
--mtime 1970-01-01 \
--owner=root --group=root \
--numeric-owner --mode=go=rX,u+rw,a-s \
-cf $out source
'';
};
nativeBuildInputs = [

View File

@ -8,7 +8,7 @@
version = "2023-08-01";
};
};
sha256 = "1wf0j189cxpayy6ffmj5j6h5yg3amivryilimjc2ap0jkyj4xrbi";
sha256 = "0c3adrrgpnhm8g1546ask9pf17qj1sjgb950mj0rv4snxvddi75j";
sha256bin64 = "11w1di146mjb9ql30df9yk9x4b9amc6514jzyfbf09mqsrw88dvr";
version = "117.0.5938.22";
};
@ -21,7 +21,7 @@
version = "2023-08-10";
};
};
sha256 = "1z01b6w4sgndrlcd26jgimk3rhv3wzpn67nv1fd5ln7dwfwkyq20";
sha256 = "16dq27lsywrn2xlgr5g46gdv15p30sihfamli4vkv3zxzfxdjisv";
sha256bin64 = "11y09hsy7y1vg65xfilq44ffsmn15dqy80fa57psj1kin4a52v2x";
version = "118.0.5966.0";
};
@ -41,7 +41,7 @@
version = "2023-08-10";
};
};
sha256 = "0gcrnvm3ar7x0fv38kjvdzgb8lflx1sckcqy89yawgfy6jkh1vj9";
sha256 = "1g8rllmnmhmmpjzrmi3cww0nszxicq0kim2wd0l0ip2mzk2p8qlp";
sha256bin64 = "1bq170l0g9yq17x6xlg6fjar6gv3hdi0zijwmx4s02pmw6727484";
version = "118.0.5993.70";
};
@ -58,7 +58,7 @@
sha256 = "0k6684cy1ks6yba2bdz17g244f05qy9769cvis4h2jzhgbf5rysh";
};
};
sha256 = "0gcrnvm3ar7x0fv38kjvdzgb8lflx1sckcqy89yawgfy6jkh1vj9";
sha256 = "1g8rllmnmhmmpjzrmi3cww0nszxicq0kim2wd0l0ip2mzk2p8qlp";
sha256bin64 = "1bq170l0g9yq17x6xlg6fjar6gv3hdi0zijwmx4s02pmw6727484";
version = "118.0.5993.70";
};

View File

@ -23,7 +23,7 @@ let
in
python.pkgs.buildPythonApplication rec {
pname = "flexget";
version = "3.9.11";
version = "3.9.13";
format = "pyproject";
# Fetch from GitHub in order to use `requirements.in`
@ -31,7 +31,7 @@ python.pkgs.buildPythonApplication rec {
owner = "Flexget";
repo = "Flexget";
rev = "refs/tags/v${version}";
hash = "sha256-0ONjRIMSfHKvaO05hhurfnS/waNNRZEVq7BodeV00kU=";
hash = "sha256-7qHJqxKGHgj/Th513EfFbk5CLEAX24AtWJF2uS1dRLs=";
};
postPatch = ''

View File

@ -0,0 +1,44 @@
{ buildPythonApplication
, lib
, fetchFromGitHub
, setuptools
, setuptools-rust
, rustPlatform
, cargo
, rustc
, breezy
, dulwich
, jinja2
, pyyaml
, ruamel-yaml
}:
buildPythonApplication rec {
pname = "silver-platter";
version = "0.5.12";
pyproject = true;
src = fetchFromGitHub {
owner = "jelmer";
repo = "silver-platter";
rev = version;
hash = "sha256-QkTT9UcJuGDAwpp/CtXobPvfTYQzFakBR72MhF//Bpo=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-QLnKu9D23FVp1jCSuxN3odPZ1ToAZ6i/FNS8BkmNuQw=";
};
propagatedBuildInputs = [ setuptools breezy dulwich jinja2 pyyaml ruamel-yaml ];
nativeBuildInputs = [ setuptools-rust rustPlatform.cargoSetupHook cargo rustc ];
meta = with lib; {
description = "Automate the creation of merge proposals for scriptable changes";
homepage = "https://jelmer.uk/code/silver-platter";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ lukegb ];
mainProgram = "svp";
};
}

View File

@ -257,9 +257,15 @@ make_deterministic_repo(){
cd "$repo"
# Remove files that contain timestamps or otherwise have non-deterministic
# properties.
rm -rf .git/logs/ .git/hooks/ .git/index .git/FETCH_HEAD .git/ORIG_HEAD \
.git/refs/remotes/origin/HEAD .git/config
if [ -f .git ]; then
local dotgit_content=$(<.git)
local dotgit_dir="${dotgit_content#gitdir: }"
else
local dotgit_dir=".git"
fi
pushd "$dotgit_dir"
rm -rf logs/ hooks/ index FETCH_HEAD ORIG_HEAD refs/remotes/origin/HEAD config
popd
# Remove all remote branches.
git branch -r | while read -r branch; do
clean_git branch -rD "$branch"
@ -277,7 +283,7 @@ make_deterministic_repo(){
# Do a full repack. Must run single-threaded, or else we lose determinism.
clean_git config pack.threads 1
clean_git repack -A -d -f
rm -f .git/config
rm -f "$dotgit_dir/config"
# Garbage collect unreferenced objects.
# Note: --keep-largest-pack prevents non-deterministic ordering of packs
@ -323,7 +329,7 @@ clone_user_rev() {
find "$dir" -name .git -print0 | xargs -0 rm -rf
else
find "$dir" -name .git | while read -r gitdir; do
make_deterministic_repo "$(readlink -f "$gitdir/..")"
make_deterministic_repo "$(readlink -f "$(dirname "$gitdir")")"
done
fi
}

View File

@ -1,29 +1,44 @@
{ lib
, stdenv
, fetchurl
, curl
, gmp
, gsl
, mpfr
, ncurses
, plotutils
, postgresql
, pkg-config
, withPDFDoc ? true
}:
stdenv.mkDerivation (finalAttrs: {
pname = "algol68g";
version = "3.3.24";
version = "3.4.2";
src = fetchurl {
url = "https://jmvdveer.home.xs4all.nl/algol68g-${finalAttrs.version}.tar.gz";
hash = "sha256-vSbj3YlyCs4bADpDqxAkcSC1VsoQZ2j+jIKe577WtDU=";
hash = "sha256-hKiRMU98sZhGgHhjgtwUNSIv2iPgb4T+dgYw58IGK8Q=";
};
outputs = [ "out" "man" ] ++ lib.optional withPDFDoc "doc";
outputs = [ "out" "man" ] ++ lib.optionals withPDFDoc [ "doc" ];
nativeBuildInputs = [
pkg-config
];
buildInputs = [
curl
mpfr
ncurses
gmp
gsl
plotutils
postgresql
];
strictDeps = true;
postInstall = let
pdfdoc = fetchurl {
url = "https://jmvdveer.home.xs4all.nl/learning-algol-68-genie.pdf";
@ -47,8 +62,8 @@ stdenv.mkDerivation (finalAttrs: {
scientific library and PostgreSQL.
'';
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ AndersonTorres ];
mainProgram = "a68g";
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.unix;
};
})

View File

@ -0,0 +1,65 @@
{ lib
, stdenv
, fetchFromGitHub
, runCommand
}:
stdenv.mkDerivation (finalAttrs: {
pname = "cbmbasic";
version = "unstable-2022-12-18";
src = fetchFromGitHub {
owner = "mist64";
repo = "cbmbasic";
rev = "352a313313dd0a15a47288c8f8031b54ac8c92a2";
hash = "sha256-aA/ivRap+aDd2wi6KWXam9eP/21lOn6OWTeZ4i/S9Bs=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/bin/
mv cbmbasic $out/bin/
runHook postInstall
'';
# NOTE: cbmbasic uses microsoft style linebreaks `\r\n`, and testing has to
# accommodate that, else you get very cryptic diffs
passthru = {
tests.run = runCommand "cbmbasic-test-run" {
nativeBuildInputs = [finalAttrs.finalPackage];
} ''
echo '#!${lib.getExe finalAttrs.finalPackage}' > helloI.bas;
echo 'PRINT"Hello, World!"' >> helloI.bas;
chmod +x helloI.bas
diff -U3 --color=auto <(./helloI.bas) <(echo -e "Hello, World!\r");
echo '#!/usr/bin/env cbmbasic' > hello.bas;
echo 'PRINT"Hello, World!"' >> hello.bas;
chmod +x hello.bas
diff -U3 --color=auto <(cbmbasic ./hello.bas) <(echo -e "Hello, World!\r");
touch $out;
'';
};
meta = with lib; {
description = "Portable version of Commodore's version of Microsoft BASIC 6502 as found on the Commodore 64";
longDescription = ''
"Commodore BASIC" (cbmbasic) is a 100% compatible version of Commodore's
version of Microsoft BASIC 6502 as found on the Commodore 64. You can use
it in interactive mode or pass a BASIC file as a command line parameter.
This source does not emulate 6502 code; all code is completely native. On
a 1 GHz CPU you get about 1000x speed compared to a 1 MHz 6502.
'';
homepage = "https://github.com/mist64/cbmbasic";
license = licenses.bsd2;
maintainers = [ maintainers.cafkafk ];
mainProgram = "cbmbasic";
platforms = platforms.all;
};
})

View File

@ -0,0 +1,57 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, boost
, rdkafka
, gtest
, rapidjson
}:
stdenv.mkDerivation rec {
pname = "modern-cpp-kafka";
version = "2023.03.07";
src = fetchFromGitHub {
repo = "modern-cpp-kafka";
owner = "morganstanley";
rev = "v${version}";
hash = "sha256-7hkwM1YbveQpDRqwMZ3MXM88LTwlAT7uB8NL0t409To=";
};
patches = [
(fetchpatch {
name = "fix-avoid-overwriting-library-paths.patch";
url = "https://github.com/morganstanley/modern-cpp-kafka/pull/221.patch";
hash = "sha256-UsQcMvJoRTn5kgXhmXOyqfW3n59kGKO596U2WjtdqAY=";
})
(fetchpatch {
name = "add-pkg-config-cmake-config.patch";
url = "https://github.com/morganstanley/modern-cpp-kafka/pull/222.patch";
hash = "sha256-OjoSttnpgEwSZjCVKc888xJb5f1Dulu/rQqoGmqXNM4=";
})
];
nativeBuildInputs = [ cmake ];
buildInputs = [ boost ];
propagatedBuildInputs = [ rdkafka ];
cmakeFlags = [
"-DLIBRDKAFKA_INCLUDE_DIR=${rdkafka.out}/include"
"-DGTEST_LIBRARY_DIR=${gtest.out}/lib"
"-DGTEST_INCLUDE_DIR=${gtest.dev}/include"
"-DRAPIDJSON_INCLUDE_DIRS=${rapidjson.out}/include"
"-DCMAKE_CXX_FLAGS=-Wno-uninitialized"
];
checkInputs = [ gtest rapidjson ];
meta = with lib; {
description = "A C++ API for Kafka clients (i.e. KafkaProducer, KafkaConsumer, AdminClient)";
homepage = "https://github.com/morganstanley/modern-cpp-kafka";
license = licenses.asl20;
maintainers = with maintainers; [ ditsuke ];
platforms = platforms.unix;
};
}

View File

@ -10,16 +10,16 @@
, wrapGAppsHook
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "waycheck";
version = "0.1.3";
version = "1.0.0";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "serebit";
repo = "waycheck";
rev = "v${version}";
hash = "sha256-DbXc1Q/ZIqlIMocFld3fOmUp44rU3fEzazHKSDdqMNs=";
rev = "v${finalAttrs.version}";
hash = "sha256-oGpiFwbPBQHF0wRHliltU8B+QmClcoFfbjpAYzOFPqs=";
};
nativeBuildInputs = [
@ -51,8 +51,8 @@ stdenv.mkDerivation rec {
description = "Simple GUI that displays the protocols implemented by a Wayland compositor";
homepage = "https://gitlab.freedesktop.org/serebit/waycheck";
license = licenses.asl20;
maintainers = with maintainers; [ julienmalka ];
maintainers = with maintainers; [ julienmalka federicoschonborn ];
mainProgram = "waycheck";
platforms = platforms.linux;
};
}
})

View File

@ -1,12 +1,12 @@
{ lib, stdenv, fetchurl, pkg-config, xorgproto }:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "rgb";
version = "1.0.6";
version = "1.1.0";
src = fetchurl {
url = "https://xorg.freedesktop.org/archive/individual/app/rgb-${version}.tar.bz2";
sha256 = "1c76zcjs39ljil6f6jpx1x17c8fnvwazz7zvl3vbjfcrlmm7rjmv";
url = "https://xorg.freedesktop.org/archive/individual/app/rgb-${finalAttrs.version}.tar.xz";
hash = "sha256-/APX9W5bKmF2aBZ/iSeUjM5U+TCX58zZ8FYHf0ee03s=";
};
nativeBuildInputs = [ pkg-config ];
@ -15,8 +15,8 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "X11 colorname to RGB mapping database";
license = licenses.mit;
maintainers = [ maintainers.raskin ];
maintainers = with maintainers; [ raskin ];
platforms = platforms.linux;
homepage = "https://xorg.freedesktop.org/";
};
}
})

View File

@ -5,7 +5,8 @@
stampYmd ? 0, stampHms ? 0,
gambit-support,
optimizationSetting ? "-O1",
gambit-params ? pkgs.gambit-support.stable-params }:
gambit-params ? pkgs.gambit-support.stable-params,
rev ? git-version }:
# Note that according to a benchmark run by Marc Feeley on May 2018,
# clang is 10x (with default settings) to 15% (with -O2) slower than GCC at compiling
@ -30,6 +31,11 @@ gccStdenv.mkDerivation rec {
inherit src version git-version;
bootstrap = gambit-support.gambit-bootstrap;
passthru = {
inherit src version git-version rev stampYmd stampHms optimizationSetting openssl;
};
nativeBuildInputs = [ git autoconf ];
# TODO: if/when we can get all the library packages we depend on to have static versions,
@ -47,6 +53,7 @@ gccStdenv.mkDerivation rec {
"--enable-c-opt=${optimizationSetting}"
"--enable-c-opt-rts=-O2"
"--enable-gcc-opts"
"--enable-trust-c-tco"
"--enable-shared"
"--enable-absolute-shared-libs" # Yes, NixOS will want an absolute path, and fix it.
"--enable-openssl"
@ -70,6 +77,9 @@ gccStdenv.mkDerivation rec {
# "--enable-char-size=1" # default is 4
# "--enable-march=native" # Nope, makes it not work on machines older than the builder
] ++ gambit-params.extraOptions
# TODO: pick an appropriate architecture to optimize on on x86-64?
# https://gcc.gnu.org/onlinedocs/gcc-4.8.4/gcc/i386-and-x86-64-Options.html#i386-and-x86-64-Options
# ++ lib.optional pkgs.stdenv.isx86_64 "--enable-march=core-avx2"
# Do not enable poll on darwin due to https://github.com/gambit/gambit/issues/498
++ lib.optional (!gccStdenv.isDarwin) "--enable-poll";

View File

@ -2,7 +2,7 @@
callPackage ./build.nix rec {
version = "4.9.5";
git-version = version;
git-version = "v${version}";
src = fetchurl {
url = "https://gambitscheme.org/4.9.5/gambit-v4_9_5.tgz";
sha256 = "sha256-4o74218OexFZcgwVAFPcq498TK4fDlyDiUR5cHP4wdw=";

View File

@ -13,16 +13,17 @@ rec {
--replace "$(grep '^PACKAGE_VERSION=.*$' configure)" 'PACKAGE_VERSION="v${git-version}"' \
--replace "$(grep '^PACKAGE_STRING=.*$' configure)" 'PACKAGE_STRING="Gambit v${git-version}"' ;
substituteInPlace include/makefile.in \
--replace "echo > stamp.h;" "(echo '#define ___STAMP_VERSION \"${git-version}\"'; echo '#define ___STAMP_YMD ${toString stampYmd}'; echo '#define ___STAMP_HMS ${toString stampHms}';) > stamp.h;";
--replace "\$\$(\$(GIT) describe --tag --always | sed 's/-bootstrap\$\$//')" "v${git-version}" \
--replace "echo > stamp.h;" "(echo '#define ___STAMP_VERSION \"v${git-version}\"'; echo '#define ___STAMP_YMD ${toString stampYmd}'; echo '#define ___STAMP_HMS ${toString stampHms}';) > stamp.h;";
grep -i ' version=\|echo..#define ___STAMP_VERSION' include/makefile.in # XXX DEBUG -- REMOVE ME
'';
modules = true;
#extraOptions = [];
extraOptions = ["--enable-trust-c-tco" "CFLAGS=-foptimize-sibling-calls"];
extraOptions = ["CFLAGS=-foptimize-sibling-calls"];
};
unstable-params = stable-params // {
stable = false;
extraOptions = ["--enable-trust-c-tco"]; # "CFLAGS=-foptimize-sibling-calls" not necessary in latest unstable
extraOptions = []; # "CFLAGS=-foptimize-sibling-calls" not necessary in latest unstable
};
export-gambopt = params : "export GAMBOPT=${params.buildRuntimeOptions} ;";

View File

@ -1,15 +1,16 @@
{ callPackage, fetchFromGitHub, gambit-support }:
callPackage ./build.nix {
version = "unstable-2023-08-06";
git-version = "4.9.5-5-gf1fbe9aa";
stampYmd = 20230806;
stampHms = 195822;
callPackage ./build.nix rec {
version = "unstable-2023-10-07";
git-version = "4.9.5-59-g342399c7";
stampYmd = 20231007;
stampHms = 170745;
rev = "342399c736ec560c0ff4faeaeb9599b45633f26c";
src = fetchFromGitHub {
owner = "gambit";
repo = "gambit";
rev = "f1fbe9aa0f461e89f2a91bc050c1373ee6d66482";
sha256 = "0b0gd6cwj8zxwcqglpsnmanysiq4mvma2mrgdfr6qy99avhbhzxm";
inherit rev;
sha256 = "121pj6lxihjjnfq33lq4m5hi461xbs9f41qd4l46556dr15cyf8f";
};
gambit-params = gambit-support.unstable-params;
}

View File

@ -1,8 +1,11 @@
{ pkgs, gccStdenv, lib, coreutils,
openssl, zlib, sqlite, libxml2, libyaml, libmysqlclient, lmdb, leveldb, postgresql,
version, git-version,
openssl, zlib, sqlite,
version, git-version, src,
gambit-support,
gambit ? pkgs.gambit, gambit-params ? pkgs.gambit-support.stable-params, src }:
gambit-git-version,
gambit-stampYmd,
gambit-stampHms,
gambit-params }:
# We use Gambit, that works 10x better with GCC than Clang. See ../gambit/build.nix
let stdenv = gccStdenv; in
@ -12,16 +15,13 @@ stdenv.mkDerivation rec {
inherit version;
inherit src;
buildInputs_libraries = [ openssl zlib sqlite libxml2 libyaml libmysqlclient lmdb leveldb postgresql ];
buildInputs_libraries = [ openssl zlib sqlite ];
# TODO: either fix all of Gerbil's dependencies to provide static libraries,
# or give up and delete all tentative support for static libraries.
#buildInputs_staticLibraries = map makeStaticLibraries buildInputs_libraries;
buildInputs = [ gambit ]
++ buildInputs_libraries; # ++ buildInputs_staticLibraries;
env.NIX_CFLAGS_COMPILE = "-I${libmysqlclient}/include/mysql -L${libmysqlclient}/lib/mysql";
buildInputs = buildInputs_libraries;
postPatch = ''
echo '(define (gerbil-version-string) "v${git-version}")' > src/gerbil/runtime/gx-version.scm ;
@ -29,6 +29,17 @@ stdenv.mkDerivation rec {
grep -Fl '#!/usr/bin/env' `find . -type f -executable` | while read f ; do
substituteInPlace "$f" --replace '#!/usr/bin/env' '#!${coreutils}/bin/env' ;
done ;
substituteInPlace ./configure --replace 'set -e' 'set -e ; git () { echo "v${git-version}" ;}' ;
substituteInPlace ./src/build/build-version.scm --replace "with-exception-catcher" '(lambda _ "v${git-version}")' ;
#rmdir src/gambit
#cp -a ${pkgs.gambit-unstable.src} ./src/gambit
chmod -R u+w ./src/gambit
( cd src/gambit ; ${gambit-params.fixStamp gambit-git-version gambit-stampYmd gambit-stampHms} )
for f in src/bootstrap/gerbil/compiler/driver__0.scm \
src/build/build-libgerbil.ss \
src/gerbil/compiler/driver.ss ; do
substituteInPlace "$f" --replace '"gcc"' '"${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}gcc"' ;
done
'';
## TODO: make static compilation work.
@ -40,26 +51,42 @@ stdenv.mkDerivation rec {
# OPENSSL_LIBSSL=${makeStaticLibraries openssl}/lib/libssl.a # MISSING!
# ZLIB=${makeStaticLibraries zlib}/lib/libz.a
# SQLITE=${makeStaticLibraries sqlite}/lib/sqlite.a # MISSING!
# LIBXML2=${makeStaticLibraries libxml2}/lib/libxml2.a # MISSING!
# YAML=${makeStaticLibraries libyaml}/lib/libyaml.a # MISSING!
# MYSQL=${makeStaticLibraries libmysqlclient}/lib/mariadb/libmariadb.a
# LMDB=${makeStaticLibraries lmdb}/lib/mysql/libmysqlclient_r.a # MISSING!
# LEVELDB=${makeStaticLibraries leveldb}/lib/libleveldb.a
# EOF
configureFlags = [
"--prefix=$out/gerbil"
"--enable-zlib"
"--enable-sqlite"
"--enable-shared"
"--disable-deprecated"
"--enable-march=" # Avoid non-portable invalid instructions
];
configurePhase = ''
(cd src && ./configure \
--prefix=$out/gerbil \
--with-gambit=${gambit}/gambit \
--enable-libxml \
--enable-libyaml \
--enable-zlib \
--enable-sqlite \
--enable-mysql \
--enable-lmdb \
--enable-leveldb)
export CC=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}gcc \
CXX=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}g++ \
CPP=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}cpp \
CXXCPP=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}cpp \
LD=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}ld \
XMKMF=${coreutils}/bin/false
unset CFLAGS LDFLAGS LIBS CPPFLAGS CXXFLAGS
(cd src/gambit ; ${gambit-params.fixStamp gambit-git-version gambit-stampYmd gambit-stampHms})
./configure ${builtins.concatStringsSep " " configureFlags}
(cd src/gambit ;
substituteInPlace config.status \
${lib.optionalString (gccStdenv.isDarwin && !gambit-params.stable)
''--replace "/usr/local/opt/openssl@1.1" "${lib.getLib openssl}"''} \
--replace "/usr/local/opt/openssl" "${lib.getLib openssl}"
./config.status
)
'';
extraLdOptions = [
"-L${zlib}/lib"
"-L${openssl.out}/lib"
"-L${sqlite.out}/lib"
];
buildPhase = ''
runHook preBuild
@ -68,7 +95,7 @@ stdenv.mkDerivation rec {
export GERBIL_BUILD_CORES=$NIX_BUILD_CORES
export GERBIL_GXC=$PWD/bin/gxc
export GERBIL_BASE=$PWD
export GERBIL_HOME=$PWD
export GERBIL_PREFIX=$PWD
export GERBIL_PATH=$PWD/lib
export PATH=$PWD/bin:$PATH
${gambit-support.export-gambopt gambit-params}
@ -76,13 +103,17 @@ stdenv.mkDerivation rec {
# Build, replacing make by build.sh
( cd src && sh build.sh )
f=build/lib/libgerbil.so.ldd ; [ -f $f ] && :
substituteInPlace "$f" --replace '(' \
'(${lib.strings.concatStrings (map (x: "\"${x}\" " ) extraLdOptions)}'
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/gerbil $out/bin
(cd src; ./install)
./install.sh
(cd $out/bin ; ln -s ../gerbil/bin/* .)
runHook postInstall
'';
@ -98,4 +129,6 @@ stdenv.mkDerivation rec {
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ fare ];
};
outputsToInstall = [ "out" ];
}

View File

@ -1,12 +1,18 @@
{ callPackage, fetchFromGitHub }:
{ callPackage, fetchFromGitHub, gambit-unstable, gambit-support, pkgs, gccStdenv }:
callPackage ./build.nix rec {
version = "0.17";
git-version = version;
version = "0.18";
git-version = "0.18";
src = fetchFromGitHub {
owner = "vyzo";
owner = "mighty-gerbils";
repo = "gerbil";
rev = "v${version}";
sha256 = "0xzi9mhrmzcajhlz5qcnz4yjlljvbkbm9426iifgjn47ac0965zw";
rev = "8ca36a928bc9345f9d28e5f2dfcb55ca558e85f9";
sha256 = "sha256-EMiYgQM/Gl+dh6AxLYRZ0BKZ+VKFd+Lkyy9Pw11ivE8=";
fetchSubmodules = true;
};
inherit gambit-support;
gambit-params = gambit-support.unstable-params;
gambit-git-version = "4.9.5-40-g24201248"; # pkgs.gambit-unstable.passthru.git-version
gambit-stampYmd = "20230917"; # pkgs.gambit-unstable.passthru.git-stampYmd
gambit-stampHms = "182043"; # pkgs.gambit-unstable.passthru.git-stampHms
}

View File

@ -2,8 +2,8 @@
{
pname = "gerbil-crypto";
version = "unstable-2023-03-27";
git-version = "0.0-18-ge57f887";
version = "unstable-2023-09-27";
git-version = "0.0-23-g341e09d";
gerbil-package = "clan/crypto";
gerbilInputs = with gerbilPackages; [ gerbil-utils gerbil-poo ];
nativeBuildInputs = [ pkgs.pkg-config ];
@ -13,10 +13,10 @@
pre-src = {
fun = fetchFromGitHub;
owner = "fare";
owner = "mighty-gerbils";
repo = "gerbil-crypto";
rev = "e57f88742d9b41640b4a7d9bd3e86c688d4a83f9";
sha256 = "08hrk3s82hbigvza75vgx9kc7qf64yhhn3xm5calc859sy6ai4ka";
rev = "341e09dcb15c09c836eae18093c0f63f71c0a72f";
sha256 = "1rq50q4p4vhr5drjvirmdkxaa4wszj1rxnhjaqz98bfpjm90yk4j";
};
meta = with lib; {

View File

@ -2,24 +2,25 @@
rec {
pname = "gerbil-ethereum";
version = "unstable-2023-05-30";
git-version = "0.0-375-g989a5ca";
version = "unstable-2023-10-06";
git-version = "0.1-1-g08b08fc";
softwareName = "Gerbil-ethereum";
gerbil-package = "mukn/ethereum";
gerbil-package = "clan/ethereum";
version-path = "version";
gerbilInputs = with gerbilPackages; [ gerbil-utils gerbil-crypto gerbil-poo gerbil-persist ];
gerbilInputs = with gerbilPackages; [
gerbil-utils gerbil-crypto gerbil-poo gerbil-persist gerbil-leveldb ];
pre-src = {
fun = fetchFromGitHub;
owner = "fare";
owner = "mighty-gerbils";
repo = "gerbil-ethereum";
rev = "989a5ca78958e42c4a1ec242786ade89f1887e48";
sha256 = "0bs2knhx3hy3k72yidgaplwjd48y86arqscdik8hgxwmhm9z8kwp";
rev = "08b08fce8c83cb59bfb532eebb1c7a2dd4bd57ab";
sha256 = "1sy7l869d2xqhq2qflsmkvr343jfhzsq43ixx75rqfpr3cdljz0b";
};
postInstall = ''
cp scripts/{croesus.prv,genesis.json,logback.xml,yolo-evm.conf,yolo-kevm.conf,run-ethereum-test-net.ss} $out/gerbil/lib/mukn/ethereum/scripts/
cp scripts/{croesus.prv,genesis.json,logback.xml,yolo-evm.conf,yolo-kevm.conf,run-ethereum-test-net.ss} $out/gerbil/lib/clan/ethereum/scripts/
mkdir -p $out/bin
cat > $out/bin/run-ethereum-test-net <<EOF
#!/bin/sh
@ -33,7 +34,7 @@ rec {
export GERBIL_PATH GERBIL_LOADPATH GLOW_SOURCE ORIG_GERBIL_PATH ORIG_GERBIL_LOADPATH
exec ${gerbil}/bin/gxi "\$0" "\$@"
|#
(import :mukn/ethereum/scripts/run-ethereum-test-net :clan/multicall)
(import :clan/ethereum/scripts/run-ethereum-test-net :clan/multicall)
(apply call-entry-point (cdr (command-line)))
EOF
chmod a+x $out/bin/run-ethereum-test-net

View File

@ -0,0 +1,31 @@
{ pkgs, lib, fetchFromGitHub, gerbilPackages, leveldb, ... }:
{
pname = "gerbil-leveldb";
version = "unstable-2023-09-23";
git-version = "c62e47f";
gerbil-package = "clan";
gerbilInputs = [ ];
nativeBuildInputs = [ pkgs.pkg-config ];
buildInputs = [ leveldb ];
version-path = "";
softwareName = "Gerbil-LevelDB";
pre-src = {
fun = fetchFromGitHub;
owner = "mighty-gerbils";
repo = "gerbil-leveldb";
rev = "c62e47f352377b6843fb3e4b27030762a510a0d8";
sha256 = "177zn1smv2zq97mlryf8fi7v5gbjk07v5i0dix3r2wsanphaawvl";
};
meta = with lib; {
description = "LevelDB bindings for Gerbil";
homepage = "https://github.com/mighty-gerbils/gerbil-leveldb";
license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ fare ];
};
# "-L${leveldb}/lib"
}

View File

@ -0,0 +1,29 @@
{ pkgs, lib, fetchFromGitHub, gerbilPackages, libxml2, ... }:
{
pname = "gerbil-libxml";
version = "unstable-2023-09-23";
git-version = "b08e5d8";
gerbil-package = "clan";
gerbilInputs = [ ];
nativeBuildInputs = [ pkgs.pkg-config ];
buildInputs = [ libxml2 ];
version-path = "";
softwareName = "Gerbil-LibXML";
pre-src = {
fun = fetchFromGitHub;
owner = "mighty-gerbils";
repo = "gerbil-libxml";
rev = "b08e5d8fe4688a162824062579ce152a10adb4cf";
sha256 = "1zfccqaibwy2b3srwmwwgv91dwy1xl18cfimxhcsxl6mxvgm61pd";
};
meta = with lib; {
description = "libxml bindings for Gerbil";
homepage = "https://github.com/mighty-gerbils/gerbil-libxml";
license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ fare ];
};
}

View File

@ -0,0 +1,31 @@
{ pkgs, lib, fetchFromGitHub, gerbilPackages, libyaml, ... }:
{
pname = "gerbil-libyaml";
version = "unstable-2023-09-23";
git-version = "398a197";
gerbil-package = "clan";
gerbilInputs = [ ];
nativeBuildInputs = [ pkgs.pkg-config ];
buildInputs = [ libyaml ];
version-path = "";
softwareName = "Gerbil-LibYAML";
pre-src = {
fun = fetchFromGitHub;
owner = "mighty-gerbils";
repo = "gerbil-libyaml";
rev = "398a19782b1526de94b70de165c027d4b6029dac";
sha256 = "0plmwx1i23c9nzzg6zxz2xi0y92la97mak9hg6h3c6d8kxvajb5c";
};
meta = with lib; {
description = "libyaml bindings for Gerbil";
homepage = "https://github.com/mighty-gerbils/gerbil-libyaml";
license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ fare ];
};
# "-L${libyaml}/lib"
}

View File

@ -0,0 +1,31 @@
{ pkgs, lib, fetchFromGitHub, gerbilPackages, lmdb, ... }:
{
pname = "gerbil-lmdb";
version = "unstable-2023-09-23";
git-version = "6d64813";
gerbil-package = "clan";
gerbilInputs = [ ];
nativeBuildInputs = [ pkgs.pkg-config ];
buildInputs = [ lmdb ];
version-path = "";
softwareName = "Gerbil-LMDB";
pre-src = {
fun = fetchFromGitHub;
owner = "mighty-gerbils";
repo = "gerbil-lmdb";
rev = "6d64813afe5766776a0d7ef45f80c784b820742c";
sha256 = "12kywxx4qjxchmhcd66700r2yfqjnh12ijgqnpqaccvigi07iq9b";
};
meta = with lib; {
description = "LMDB bindings for Gerbil";
homepage = "https://github.com/mighty-gerbils/gerbil-lmdb";
license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ fare ];
};
# "-L${lmdb.out}/lib"
}

View File

@ -0,0 +1,31 @@
{ pkgs, lib, fetchFromGitHub, gerbilPackages, mariadb-connector-c, ... }:
{
pname = "gerbil-mysql";
version = "unstable-2023-09-23";
git-version = "ecec94c";
gerbil-package = "clan";
gerbilInputs = [ ];
nativeBuildInputs = [ pkgs.pkg-config ];
buildInputs = [ mariadb-connector-c ];
version-path = "";
softwareName = "Gerbil-MySQL";
pre-src = {
fun = fetchFromGitHub;
owner = "mighty-gerbils";
repo = "gerbil-mysql";
rev = "ecec94c76d7aa23331b7e02ac7732a7923f100a5";
sha256 = "01506r0ivgp6cxvwracmg7pwr735ngb7899ga3lxy181lzkp6b2c";
};
meta = with lib; {
description = "MySQL bindings for Gerbil";
homepage = "https://github.com/mighty-gerbils/gerbil-mysql";
license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ fare ];
};
# "-L${mariadb-connector-c}/lib/mariadb"
}

View File

@ -1,20 +1,20 @@
{ lib, fetchFromGitHub, gerbilPackages, ... }:
{
pname = "gerbil-persist";
version = "unstable-2023-03-02";
git-version = "0.1.0-24-ge2305f5";
version = "unstable-2023-10-07";
git-version = "0.1.1-1-g3ce1d4a";
softwareName = "Gerbil-persist";
gerbil-package = "clan/persist";
version-path = "version";
gerbilInputs = with gerbilPackages; [ gerbil-utils gerbil-crypto gerbil-poo ];
gerbilInputs = with gerbilPackages; [ gerbil-utils gerbil-crypto gerbil-poo gerbil-leveldb ];
pre-src = {
fun = fetchFromGitHub;
owner = "fare";
owner = "mighty-gerbils";
repo = "gerbil-persist";
rev = "e2305f53571e55292179286ca2d88e046ec6638b";
sha256 = "1vsi4rfzpqg4hhn53d2r26iw715vzwz0hiai9r34z4diwzqixfgn";
rev = "3ce1d4a4b1d7be290e54f884d780c02ceee8f10e";
sha256 = "1kzvgpqkpq4wlc0hlfxy314fbv6215aksrrlrrpq9w97wdibmv7x";
};
meta = with lib; {

View File

@ -2,8 +2,8 @@
{
pname = "gerbil-poo";
version = "unstable-2023-04-28";
git-version = "0.0-106-g418b582";
version = "unstable-2023-10-07";
git-version = "0.1-1-g367ab43";
softwareName = "Gerbil-POO";
gerbil-package = "clan/poo";
version-path = "version";
@ -12,10 +12,10 @@
pre-src = {
fun = fetchFromGitHub;
owner = "fare";
owner = "mighty-gerbils";
repo = "gerbil-poo";
rev = "418b582ae72e1494cf3a5f334d31d4f6503578f5";
sha256 = "0qdzs7l6hp45dji5bc3879k4c8k9x6cj4qxz68cskjhn8wrc5lr8";
rev = "367ab4376fdd6fc0b0892da2becef35a5039c583";
sha256 = "0ci88zqi7gb55ahl0n7dk1ihij2j6dn8jb6rzfiilck773x46kdh";
};
meta = with lib; {

View File

@ -1,15 +1,22 @@
{ pkgs, lib, callPackage, ... }:
with pkgs.gerbil-support; {
with pkgs.gerbil-support; {
pppToName = ppp: lib.removeSuffix ".nix" (baseNameOf ppp); # from pre-package path to name
callPpp = ppp: callPackage ppp prePackage-defaults; # from pre-package path to pre-package
pppToKV = ppp: { name = pppToName ppp; value = callPpp ppp; }; # from pre-package path to name
ppplToPpa = ppps: builtins.listToAttrs (map pppToKV ppps); # from pre-package path list to name/pre-package attr
prePackages-unstable =
let pks = [ ./gerbil-libp2p.nix ./smug-gerbil.nix ./ftw.nix
ppplToPpa
[ ./gerbil-leveldb.nix ./gerbil-lmdb.nix ./gerbil-mysql.nix
./gerbil-libxml.nix ./gerbil-libyaml.nix
./smug-gerbil.nix # ./ftw.nix
./gerbil-utils.nix ./gerbil-crypto.nix ./gerbil-poo.nix
./gerbil-persist.nix ./gerbil-ethereum.nix ./glow-lang.nix ];
call = pkg: callPackage pkg prePackage-defaults;
pkgName = pkg: lib.removeSuffix ".nix" (baseNameOf pkg);
f = pkg: { name = pkgName pkg; value = call pkg; }; in
builtins.listToAttrs (map f pks);
./gerbil-persist.nix ./gerbil-ethereum.nix
# ./gerbil-libp2p.nix
./glow-lang.nix
];
prePackage-defaults = {
gerbil = pkgs.gerbil-unstable;
@ -25,24 +32,23 @@
softwareName = "";
};
gerbilPackages-unstable =
builtins.mapAttrs (_: gerbilPackage) prePackages-unstable;
ppaToPl = builtins.mapAttrs (_: gerbilPackage);
gerbilPackages-unstable = ppaToPl prePackages-unstable;
resolve-pre-src = pre-src: pre-src.fun (removeAttrs pre-src ["fun"]);
gerbilVersionFromGit = pkg:
let version-path = "${pkg.passthru.pre-pkg.version-path}.ss"; in
if builtins.pathExists version-path then
gerbilVersionFromGit = srcDir: version-path:
let version-file = "${srcDir}/${version-path}.ss"; in
if builtins.pathExists version-file then
let m =
builtins.match "\\(import :clan/versioning.*\\)\n\\(register-software \"([-_.A-Za-z0-9]+)\" \"([-_.A-Za-z0-9]+)\"\\) ;; ([-0-9]+)\n"
(builtins.readFile version-path); in
{ version = builtins.elemAt m 2; git-version = builtins.elemAt m 1; }
else { version = "0.0";
git-version = let gitpath = "${toString pkg.src}/.git"; in
(builtins.readFile version-file); in
{ version = "${builtins.elemAt m 2}-git"; git-version = builtins.elemAt m 1; }
else { version = "0.0-git";
git-version = let gitpath = "${srcDir}/.git"; in
if builtins.pathExists gitpath then lib.commitIdFromGitRepo gitpath else "0"; };
gerbilSkippableFiles = [".git" ".build" ".build_outputs" "run" "result" "dep" "BLAH"
"version.ss" "tmp.nix"];
gerbilSkippableFiles = [".git" ".build" ".build_outputs" "run" "result" "dep" "BLAH" "tmp.nix"];
gerbilSourceFilter = path: type:
let baseName = baseNameOf path; in
@ -68,7 +74,10 @@
{ ${name} = super.${name} // {
pre-src = new-pre-src;
version = "override";
git-version = if new-pre-src ? rev then lib.substring 0 7 new-pre-src.rev else "unknown";};};
git-version = if new-pre-src ? rev
then lib.substring 0 7 new-pre-src.rev
else "unknown";};
};
pkgsOverrideGerbilPackageSrc = name: pre-src: pkgs: super: {
gerbil-support = (super-support:

View File

@ -2,18 +2,18 @@
{
pname = "gerbil-utils";
version = "unstable-2023-07-22";
git-version = "0.2-198-g2fb01ce";
version = "unstable-2023-10-08";
git-version = "0.3-3-g2914428";
softwareName = "Gerbil-utils";
gerbil-package = "clan";
version-path = "version";
pre-src = {
fun = fetchFromGitHub;
owner = "fare";
owner = "mighty-gerbils";
repo = "gerbil-utils";
rev = "2fb01ce0b302f232f5c4daf4987457b6357d609d";
sha256 = "127q98gk1x6y1nlkkpnbnkz989ybpszy7aiy43hzai2q6xn4nv72";
rev = "29144289b40ce624adf30eab23b796ddd6b6b55d";
sha256 = "0qysw2zs5acgri3wrjb3ngnnhd17xpr9hcdr4ya383k8k7jacr8a";
};
meta = with lib; {

View File

@ -2,22 +2,23 @@
rec {
pname = "glow-lang";
version = "unstable-2023-04-26";
git-version = "0.3.2-222-gb19cd980";
version = "unstable-2023-10-06";
git-version = "0.3.2-232-ga1a7a9e5";
softwareName = "Glow";
gerbil-package = "mukn/glow";
version-path = "version";
gerbilInputs = with gerbilPackages;
[ gerbil-utils gerbil-crypto gerbil-poo gerbil-persist gerbil-ethereum
gerbil-libp2p smug-gerbil ftw ];
smug-gerbil gerbil-leveldb # gerbil-libp2p ftw
];
pre-src = {
fun = fetchFromGitHub;
owner = "Glow-Lang";
repo = "glow";
rev = "b19cd98082dfc5156d1b4fc83cde161572d6a211";
sha256 = "0k3qy5826pxqr9ylnnpq4iikxf4j50987vhpa5qiv99j0p643xr3";
rev = "a1a7a9e51ba9a466d91c397d9da55af90076110c";
sha256 = "0wgav4gbg6mlxgisjjbyhvhz94b29vv2rkjkjy1jl7v0hs3wbm52";
};
postPatch = ''

View File

@ -1,15 +1,18 @@
{ callPackage, fetchFromGitHub, gambit-unstable, gambit-support }:
{ callPackage, fetchFromGitHub, gambit-unstable, gambit-support, pkgs, gccStdenv }:
callPackage ./build.nix rec {
version = "unstable-2023-08-07";
git-version = "0.17.0-187-gba545b77";
version = "unstable-2023-10-13";
git-version = "0.18-2-g8ed012ff";
src = fetchFromGitHub {
owner = "vyzo";
owner = "mighty-gerbils";
repo = "gerbil";
rev = "ba545b77e8e85118089232e3cd263856e414b24b";
sha256 = "1f4v1qawx2i8333kshj4pbj5r21z0868pwrr3r710n6ng3pd9gqn";
rev = "8ed012ff9571fcfebcc07815813001a3f356150d";
sha256 = "056kmjn7sd0hjwikmg7v3a1kvgsgvfi7pi9xcx3ixym9g3bqa4mx";
fetchSubmodules = true;
};
inherit gambit-support;
gambit = gambit-unstable;
gambit-params = gambit-support.unstable-params;
gambit-git-version = "4.9.5-40-g24201248"; # pkgs.gambit-unstable.passthru.git-version
gambit-stampYmd = "20230917"; # pkgs.gambit-unstable.passthru.git-stampYmd
gambit-stampHms = "182043"; # pkgs.gambit-unstable.passthru.git-stampHms
}

View File

@ -1,4 +1,4 @@
import ./generic.nix {
version = "1.34.0";
sha256 = "sha256-MAXG6ceSWFOMg5eXZnZ6WePXTzy5CsLLDc5ddXO+txk=";
version = "1.35.0";
sha256 = "sha256-bilpk3BsdsCT5gkTmqCz+HBDVfoPN1b2dY141EIm36A=";
}

View File

@ -1,5 +1,5 @@
{ version, sha256 }:
{ lib, stdenv, fetchurl, cmake, ninja, llvm_14, curl, tzdata
{ lib, stdenv, fetchurl, cmake, ninja, llvm_16, curl, tzdata
, libconfig, lit, gdb, unzip, darwin, bash
, callPackage, makeWrapper, runCommand, targetPackages
, ldcBootstrap ? callPackage ./bootstrap.nix { }
@ -54,7 +54,7 @@ stdenv.mkDerivation rec {
'';
nativeBuildInputs = [
cmake ldcBootstrap lit lit.python llvm_14.dev makeWrapper ninja unzip
cmake ldcBootstrap lit lit.python llvm_16.dev makeWrapper ninja unzip
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Foundation

View File

@ -29,6 +29,7 @@
, x11Support ? (stdenv.hostPlatform.isx86 && ! stdenv.hostPlatform.isDarwin)
, dllSupport ? true
, withModules ? [
"asdf"
"pcre"
"rawsock"
]
@ -41,6 +42,8 @@ assert x11Support -> (libX11 != null && libXau != null && libXt != null
let
ffcallAvailable = stdenv.isLinux && (libffcall != null);
# Some modules need autoreconf called in their directory.
shouldReconfModule = name: name != "asdf";
in
stdenv.mkDerivation {
@ -92,7 +95,7 @@ stdenv.mkDerivation {
cd modules/${x}
autoreconf -f -i -I "$root/src" -I "$root/src/m4" -I "$root/src/glm4"
)
'') withModules);
'') (builtins.filter shouldReconfModule withModules));
configureFlags = [ "builddir" ]
++ lib.optional (!dllSupport) "--without-dynamic-modules"

View File

@ -0,0 +1,113 @@
{ lib
, config
, stdenv
, fetchFromGitHub
, cmake
, libiconv
, llvmPackages
, ninja
, openssl
, python3Packages
, ragel
, yasm
, zlib
, cudaSupport ? config.cudaSupport
, cudaPackages ? {}
, pythonSupport ? false
}:
stdenv.mkDerivation (finalAttrs: {
pname = "catboost";
version = "1.2.2";
src = fetchFromGitHub {
owner = "catboost";
repo = "catboost";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-A1zCIqPOW21dHKBQHRtS+/sstZ2o6F8k71lmJFGn0+g=";
};
patches = [
./remove-conan.patch
];
postPatch = ''
substituteInPlace cmake/common.cmake \
--replace "\''${RAGEL_BIN}" "${ragel}/bin/ragel" \
--replace "\''${YASM_BIN}" "${yasm}/bin/yasm"
shopt -s globstar
for cmakelists in **/CMakeLists.*; do
sed -i "s/OpenSSL::OpenSSL/OpenSSL::SSL/g" $cmakelists
${lib.optionalString (lib.versionOlder cudaPackages.cudaVersion "11.8") ''
sed -i 's/-gencode=arch=compute_89,code=sm_89//g' $cmakelists
sed -i 's/-gencode=arch=compute_90,code=sm_90//g' $cmakelists
''}
done
'';
outputs = [ "out" "dev" ];
nativeBuildInputs = [
cmake
llvmPackages.bintools
ninja
(python3Packages.python.withPackages (ps: with ps; [ six ]))
ragel
yasm
] ++ lib.optionals cudaSupport (with cudaPackages; [
cuda_nvcc
]);
buildInputs = [
openssl
zlib
] ++ lib.optionals stdenv.isDarwin [
libiconv
] ++ lib.optionals cudaSupport (with cudaPackages; [
cuda_cudart
cuda_cccl
libcublas
]);
env = {
CUDAHOSTCXX = lib.optionalString cudaSupport "${stdenv.cc}/bin/cc";
NIX_CFLAGS_LINK = lib.optionalString stdenv.isLinux "-fuse-ld=lld";
NIX_LDFLAGS = "-lc -lm";
};
cmakeFlags = [
"-DCMAKE_BINARY_DIR=$out"
"-DCMAKE_POSITION_INDEPENDENT_CODE=on"
"-DCATBOOST_COMPONENTS=app;libs${lib.optionalString pythonSupport ";python-package"}"
] ++ lib.optionals cudaSupport [
"-DHAVE_CUDA=on"
];
installPhase = ''
runHook preInstall
mkdir $dev
cp -r catboost $dev
install -Dm555 catboost/app/catboost -t $out/bin
install -Dm444 catboost/libs/model_interface/static/lib/libmodel_interface-static-lib.a -t $out/lib
install -Dm444 catboost/libs/model_interface/libcatboostmodel${stdenv.hostPlatform.extensions.sharedLibrary} -t $out/lib
install -Dm444 catboost/libs/train_interface/libcatboost${stdenv.hostPlatform.extensions.sharedLibrary} -t $out/lib
runHook postInstall
'';
meta = with lib; {
description = "High-performance library for gradient boosting on decision trees";
longDescription = ''
A fast, scalable, high performance Gradient Boosting on Decision Trees
library, used for ranking, classification, regression and other machine
learning tasks for Python, R, Java, C++. Supports computation on CPU and GPU.
'';
license = licenses.asl20;
platforms = platforms.unix;
homepage = "https://catboost.ai";
maintainers = with maintainers; [ PlushBeaver natsukium ];
mainProgram = "catboost";
};
})

View File

@ -0,0 +1,34 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index becd2ad03c..7e3c8c99b1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,7 +27,6 @@ cmake_policy(SET CMP0104 OLD)
include(cmake/archive.cmake)
include(cmake/common.cmake)
-include(cmake/conan.cmake)
include(cmake/cuda.cmake)
include(cmake/cython.cmake)
include(cmake/fbs.cmake)
@@ -37,21 +36,6 @@ include(cmake/recursive_library.cmake)
include(cmake/swig.cmake)
include(cmake/global_vars.cmake)
-if (CMAKE_CROSSCOMPILING)
- include(${CMAKE_BINARY_DIR}/conan_paths.cmake)
-else()
- conan_cmake_autodetect(settings)
- conan_cmake_install(
- PATH_OR_REFERENCE ${CMAKE_SOURCE_DIR}
- INSTALL_FOLDER ${CMAKE_BINARY_DIR}
- BUILD missing
- REMOTE conancenter
- SETTINGS ${settings}
- ENV "CONAN_CMAKE_GENERATOR=${CMAKE_GENERATOR}"
- CONF "tools.cmake.cmaketoolchain:generator=${CMAKE_GENERATOR}"
- )
-endif()
-
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND NOT HAVE_CUDA)
include(CMakeLists.linux-x86_64.txt)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND HAVE_CUDA)

View File

@ -180,14 +180,16 @@ index d9fc8251..d8ddb96e 100755
@@ -1,10 +1,10 @@
#!/bin/sh
if command -v gtk-update-icon-cache >/dev/null && test -d "$1/exports/share/icons/hicolor"; then
-if command -v gtk-update-icon-cache >/dev/null && test -d "$1/exports/share/icons/hicolor"; then
- cp /usr/share/icons/hicolor/index.theme "$1/exports/share/icons/hicolor/"
+ cp @hicolorIconTheme@/share/icons/hicolor/index.theme "$1/exports/share/icons/hicolor/"
+if test -d "$1/exports/share/icons/hicolor"; then
+ @coreutils@/bin/cp -f @hicolorIconTheme@/share/icons/hicolor/index.theme "$1/exports/share/icons/hicolor/"
for dir in "$1"/exports/share/icons/*; do
if test -f "$dir/index.theme"; then
- if ! gtk-update-icon-cache --quiet "$dir"; then
- echo "Failed to run gtk-update-icon-cache for $dir"
+ if ! @gtk3@/bin/gtk-update-icon-cache --quiet "$dir"; then
echo "Failed to run gtk-update-icon-cache for $dir"
+ @coreutils@/bin/echo "Failed to run gtk-update-icon-cache for $dir"
exit 1
fi
diff --git a/triggers/mime-database.trigger b/triggers/mime-database.trigger

View File

@ -1,6 +1,6 @@
{ lib, stdenv, fetchFromGitHub, cmake, curl }:
let version = "1.10.4"; in
let version = "1.10.5"; in
stdenv.mkDerivation {
pname = "libcpr";
inherit version;
@ -11,7 +11,7 @@ stdenv.mkDerivation {
owner = "libcpr";
repo = "cpr";
rev = version;
hash = "sha256-8qRNlZgBB71t/FSFPnxFhr02OuD2erLVeoc6wAx3LKk=";
hash = "sha256-mAuU2uF8d+aHvCmotgIrBi/pUp1jkP6G0f98M76zjOw=";
};
nativeBuildInputs = [ cmake ];

View File

@ -1,39 +0,0 @@
{ lib, stdenv, fetchurl, pkg-config, bison, flex, xkeyboard_config, libxcb, libX11 }:
stdenv.mkDerivation rec {
pname = "libxkbcommon";
version = "0.7.2";
src = fetchurl {
url = "http://xkbcommon.org/download/libxkbcommon-${version}.tar.xz";
sha256 = "1n5rv5n210kjnkyrvbh04gfwaa7zrmzy1393p8nyqfw66lkxr918";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ bison flex xkeyboard_config libxcb ];
configureFlags = [
"--with-xkb-config-root=${xkeyboard_config}/etc/X11/xkb"
"--with-x-locale-root=${libX11.out}/share/X11/locale"
];
env.NIX_CFLAGS_COMPILE = toString [
# Needed with GCC 12
"-Wno-error=array-bounds"
];
preBuild = lib.optionalString stdenv.isDarwin ''
sed -i 's/,--version-script=.*$//' Makefile
'';
meta = with lib; {
description = "A library to handle keyboard descriptions";
homepage = "https://xkbcommon.org";
license = licenses.mit;
maintainers = with maintainers; [ ttuegel ];
mainProgram = "xkbcli";
platforms = with platforms; unix;
};
}

View File

@ -1,4 +1,13 @@
{ lib, stdenv, fetchurl, alsa-lib, ncurses }:
{ lib
, stdenv
, fetchurl
, fetchpatch
, ncurses
, alsa-lib
, CoreServices
, AudioUnit
, Cocoa
}:
stdenv.mkDerivation rec {
pname = "speech_tools";
@ -9,7 +18,25 @@ stdenv.mkDerivation rec {
sha256 = "1k2xh13miyv48gh06rgsq2vj25xwj7z6vwq9ilsn8i7ig3nrgzg4";
};
buildInputs = [ alsa-lib ncurses ];
patches = [
# Fix build on Apple Silicon. Remove in the next release.
(fetchpatch {
url = "https://github.com/festvox/speech_tools/commit/06141f69d21bf507a9becb5405265dc362edb0df.patch";
hash = "sha256-tRestCBuRhak+2ccsB6mvDxGm/TIYX4eZ3oppCOEP9s=";
})
];
buildInputs = [
ncurses
] ++ lib.optionals stdenv.isLinux [
alsa-lib
] ++ lib.optionals stdenv.isDarwin [
CoreServices
AudioUnit
Cocoa
];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "CXX=${stdenv.cc.targetPrefix}c++" ];
# Workaround build failure on -fno-common toolchains:
# ld: libestools.a(editline.o):(.bss+0x28): multiple definition of
@ -42,7 +69,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "Text-to-speech engine";
maintainers = with maintainers; [ raskin ];
platforms = platforms.linux;
platforms = platforms.unix;
license = licenses.free;
};

View File

@ -19,14 +19,14 @@
buildPythonPackage rec {
pname = "apprise";
version = "1.5.0";
version = "1.6.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-PFgRQQd6EBeQ7eDKsW+ig60DKpsvl9xtNWX7LZGBP9c=";
hash = "sha256-Pu+rHF15eLDmXFCR0c2+kgaGXcPLXRnKXPvdt26Kr/4=";
};
nativeBuildInputs = [

View File

@ -1,6 +1,7 @@
{ lib
, stdenv
, buildPythonPackage
, fetchpatch
, fetchPypi
, cargo
, configobj
@ -8,6 +9,7 @@
, dulwich
, fastbencode
, fastimport
, pygithub
, libiconv
, merge3
, patiencediff
@ -37,6 +39,14 @@ buildPythonPackage rec {
hash = "sha256-fEEvOfo8YWhx+xuiqD/KNstlso5/K1XJnGY64tkLIwE=";
};
patches = [
# Explicitly track which URLs are used for GitLab
(fetchpatch {
url = "https://github.com/breezy-team/breezy/commit/cc9fdf3774253183f726127c2ee191c24640d898.patch";
hash = "sha256-HTDAW3CPEZ1YBe0wnv6ncWEd0QRHwHawfTplbVDiOGc=";
})
];
cargoDeps = rustPlatform.importCargoLock {
lockFile = ./Cargo.lock;
};
@ -66,7 +76,8 @@ buildPythonPackage rec {
pyyaml
urllib3
] ++ passthru.optional-dependencies.launchpad
++ passthru.optional-dependencies.fastimport;
++ passthru.optional-dependencies.fastimport
++ passthru.optional-dependencies.github;
nativeCheckInputs = [
testtools
@ -109,6 +120,9 @@ buildPythonPackage rec {
fastimport = [
fastimport
];
github = [
pygithub
];
};
};

View File

@ -1,64 +1,50 @@
{ buildPythonPackage, fetchFromGitHub, lib, pythonOlder
, clang_12, python
, graphviz, matplotlib, numpy, pandas, plotly, scipy, six
, withCuda ? false, cudatoolkit }:
{ lib
, buildPythonPackage
, catboost
, python
, graphviz
, matplotlib
, numpy
, pandas
, plotly
, scipy
, setuptools
, six
, wheel
}:
buildPythonPackage rec {
pname = "catboost";
# nixpkgs-update: no auto update
version = "1.0.5";
buildPythonPackage {
inherit (catboost) pname version src meta;
format = "pyproject";
disabled = pythonOlder "3.4";
sourceRoot = "source/catboost/python-package";
src = fetchFromGitHub {
owner = "catboost";
repo = "catboost";
rev = "refs/tags/v${version}";
hash = "sha256-ILemeZUBI9jPb9G6F7QX/T1HaVhQ+g6y7YmsT6DFCJk";
};
nativeBuildInputs = [ clang_12 ];
propagatedBuildInputs = [ graphviz matplotlib numpy pandas scipy plotly six ]
++ lib.optionals withCuda [ cudatoolkit ];
patches = [
./nix-support.patch
nativeBuildInputs = [
setuptools
wheel
];
postPatch = ''
# substituteInPlace is too slow for these large files, and the target has lots of numbers in it that change often.
sed -e 's|\$(YMAKE_PYTHON3-.*)/python3|${python.interpreter}|' -i make/*.makefile
propagatedBuildInputs = [
graphviz
matplotlib
numpy
pandas
plotly
scipy
six
];
buildPhase = ''
runHook preBuild
# these arguments must set after bdist_wheel
${python.pythonForBuild.interpreter} setup.py bdist_wheel --no-widget --prebuilt-extensions-build-root-dir=${lib.getDev catboost}
runHook postBuild
'';
preBuild = ''
cd catboost/python-package
'';
setupPyBuildFlags = [ "--with-ymake=no" ];
CUDA_ROOT = lib.optional withCuda cudatoolkit;
enableParallelBuilding = true;
# setup a test is difficult
doCheck = false;
# Tests use custom "ya" tool, not yet supported.
dontUseSetuptoolsCheck = true;
pythonImportsCheck = [ "catboost" ];
passthru = {
# Do not update to catboost 1.1.x because the patch doesn't apply cleanly
skipBulkUpdate = true;
};
meta = with lib; {
description = "High-performance library for gradient boosting on decision trees.";
longDescription = ''
A fast, scalable, high performance Gradient Boosting on Decision Trees
library, used for ranking, classification, regression and other machine
learning tasks for Python, R, Java, C++. Supports computation on CPU and GPU.
'';
license = licenses.asl20;
platforms = [ "x86_64-linux" ];
homepage = "https://catboost.ai";
maintainers = with maintainers; [ PlushBeaver ];
# _catboost.pyx.cpp:226822:19: error: use of undeclared identifier '_PyGen_Send'
broken = withCuda;
};
}

View File

@ -1,173 +0,0 @@
diff --git a/catboost/python-package/setup.py b/catboost/python-package/setup.py
index fe9251a21f..86b880c5d0 100644
--- a/catboost/python-package/setup.py
+++ b/catboost/python-package/setup.py
@@ -80,7 +80,7 @@ class Helper(object):
self.with_cuda = os.environ.get('CUDA_PATH') or os.environ.get('CUDA_ROOT') or None
self.os_sdk = 'local'
self.with_ymake = True
- self.parallel = None
+ self.parallel = os.environ.get('NIX_BUILD_CORES') or None
def finalize_options(self):
if os.path.exists(str(self.with_cuda)):
@@ -222,11 +222,12 @@ class build_ext(_build_ext):
def build_with_make(self, topsrc_dir, build_dir, catboost_ext, put_dir, verbose, dry_run):
logging.info('Buildling {} with gnu make'.format(catboost_ext))
- makefile = 'python{}.{}CLANG11-LINUX-X86_64.makefile'.format(python_version()[0], 'CUDA.' if self.with_cuda else '')
+ makefile = 'python{}.{}CLANG12-LINUX-X86_64.makefile'.format(python_version()[0], 'CUDA.' if self.with_cuda else '')
make_cmd = [
'make', '-f', '../../make/' + makefile,
- 'CC=clang-11',
- 'CXX=clang++-11',
+ 'CC=clang',
+ 'CXX=clang++',
+ 'PYTHON=python{}'.format(python_version()[0]),
'BUILD_ROOT=' + build_dir,
'SOURCE_ROOT=' + topsrc_dir,
]
diff --git a/make/python2.CLANG12-LINUX-X86_64.makefile b/make/python2.CLANG12-LINUX-X86_64.makefile
index b49a36fb3f..33996af995 100644
--- a/make/python2.CLANG12-LINUX-X86_64.makefile
+++ b/make/python2.CLANG12-LINUX-X86_64.makefile
@@ -4,31 +4,6 @@ BUILD_ROOT = $(shell pwd)
SOURCE_ROOT = $(shell pwd)
PYTHON = $(shell which python)
-ifneq ($(MAKECMDGOALS),help)
-define _CC_TEST
-__clang_major__ __clang_minor__
-endef
-
-_CC_VERSION = $(shell echo '$(_CC_TEST)' | $(CC) -E -P -)
-$(info _CC_VERSION = '$(_CC_VERSION)')
-
-ifneq '$(_CC_VERSION)' '12 0'
- $(error clang 12.0 is required)
-endif
-endif
-
-ifneq ($(MAKECMDGOALS),help)
-define _CXX_TEST
-__clang_major__ __clang_minor__
-endef
-
-_CXX_VERSION = $(shell echo '$(_CXX_TEST)' | $(CXX) -E -P -)
-$(info _CXX_VERSION = '$(_CXX_VERSION)')
-
-ifneq '$(_CXX_VERSION)' '12 0'
- $(error clang 12.0 is required)
-endif
-endif
all\
diff --git a/make/python2.CUDA.CLANG12-LINUX-X86_64.makefile b/make/python2.CUDA.CLANG12-LINUX-X86_64.makefile
index 82935b297e..093cc86532 100644
--- a/make/python2.CUDA.CLANG12-LINUX-X86_64.makefile
+++ b/make/python2.CUDA.CLANG12-LINUX-X86_64.makefile
@@ -4,31 +4,6 @@ BUILD_ROOT = $(shell pwd)
SOURCE_ROOT = $(shell pwd)
PYTHON = $(shell which python)
-ifneq ($(MAKECMDGOALS),help)
-define _CC_TEST
-__clang_major__ __clang_minor__
-endef
-
-_CC_VERSION = $(shell echo '$(_CC_TEST)' | $(CC) -E -P -)
-$(info _CC_VERSION = '$(_CC_VERSION)')
-
-ifneq '$(_CC_VERSION)' '12 0'
- $(error clang 12.0 is required)
-endif
-endif
-
-ifneq ($(MAKECMDGOALS),help)
-define _CXX_TEST
-__clang_major__ __clang_minor__
-endef
-
-_CXX_VERSION = $(shell echo '$(_CXX_TEST)' | $(CXX) -E -P -)
-$(info _CXX_VERSION = '$(_CXX_VERSION)')
-
-ifneq '$(_CXX_VERSION)' '12 0'
- $(error clang 12.0 is required)
-endif
-endif
all\
diff --git a/make/python3.CLANG12-LINUX-X86_64.makefile b/make/python3.CLANG12-LINUX-X86_64.makefile
index 1c5d646ae4..6c091fbe17 100644
--- a/make/python3.CLANG12-LINUX-X86_64.makefile
+++ b/make/python3.CLANG12-LINUX-X86_64.makefile
@@ -4,31 +4,6 @@ BUILD_ROOT = $(shell pwd)
SOURCE_ROOT = $(shell pwd)
PYTHON = $(shell which python)
-ifneq ($(MAKECMDGOALS),help)
-define _CC_TEST
-__clang_major__ __clang_minor__
-endef
-
-_CC_VERSION = $(shell echo '$(_CC_TEST)' | $(CC) -E -P -)
-$(info _CC_VERSION = '$(_CC_VERSION)')
-
-ifneq '$(_CC_VERSION)' '12 0'
- $(error clang 12.0 is required)
-endif
-endif
-
-ifneq ($(MAKECMDGOALS),help)
-define _CXX_TEST
-__clang_major__ __clang_minor__
-endef
-
-_CXX_VERSION = $(shell echo '$(_CXX_TEST)' | $(CXX) -E -P -)
-$(info _CXX_VERSION = '$(_CXX_VERSION)')
-
-ifneq '$(_CXX_VERSION)' '12 0'
- $(error clang 12.0 is required)
-endif
-endif
all\
diff --git a/make/python3.CUDA.CLANG12-LINUX-X86_64.makefile b/make/python3.CUDA.CLANG12-LINUX-X86_64.makefile
index fcdb75a719..4e1dbc3cd7 100644
--- a/make/python3.CUDA.CLANG12-LINUX-X86_64.makefile
+++ b/make/python3.CUDA.CLANG12-LINUX-X86_64.makefile
@@ -4,31 +4,6 @@ BUILD_ROOT = $(shell pwd)
SOURCE_ROOT = $(shell pwd)
PYTHON = $(shell which python)
-ifneq ($(MAKECMDGOALS),help)
-define _CC_TEST
-__clang_major__ __clang_minor__
-endef
-
-_CC_VERSION = $(shell echo '$(_CC_TEST)' | $(CC) -E -P -)
-$(info _CC_VERSION = '$(_CC_VERSION)')
-
-ifneq '$(_CC_VERSION)' '12 0'
- $(error clang 12.0 is required)
-endif
-endif
-
-ifneq ($(MAKECMDGOALS),help)
-define _CXX_TEST
-__clang_major__ __clang_minor__
-endef
-
-_CXX_VERSION = $(shell echo '$(_CXX_TEST)' | $(CXX) -E -P -)
-$(info _CXX_VERSION = '$(_CXX_VERSION)')
-
-ifneq '$(_CXX_VERSION)' '12 0'
- $(error clang 12.0 is required)
-endif
-endif
all\

View File

@ -4,7 +4,6 @@
, pythonAtLeast
, pythonOlder
, fetchFromGitHub
, fetchpatch
, duet
, matplotlib
, networkx
@ -35,7 +34,7 @@ buildPythonPackage rec {
version = "1.2.0";
format = "setuptools";
disabled = pythonOlder "3.7";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "quantumlib";
@ -94,6 +93,8 @@ buildPythonPackage rec {
"test_json_and_repr_data"
# Tests for some changed error handling behavior in SymPy 1.12
"test_custom_value_not_implemented"
# Calibration issue
"test_xeb_to_calibration_layer"
];
meta = with lib; {

View File

@ -0,0 +1,36 @@
{ attrs
, buildPythonPackage
, cachetools
, cirq-core
, ipython
, ipywidgets
, nbconvert
, nbformat
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "cirq-ft";
inherit (cirq-core) version src meta;
sourceRoot = "${src.name}/${pname}";
propagatedBuildInputs = [
attrs
cachetools
cirq-core
ipython
ipywidgets
nbconvert
nbformat
];
nativeCheckInputs = [
ipython
pytestCheckHook
];
# cirq's importlib hook doesn't work here
#pythonImportsCheck = [ "cirq_ft" ];
}

View File

@ -4,6 +4,7 @@
, protobuf
, pytestCheckHook
, freezegun
, pythonRelaxDepsHook
}:
buildPythonPackage rec {
@ -18,6 +19,10 @@ buildPythonPackage rec {
--replace "protobuf >= 3.15.0, < 4" "protobuf >= 3.15.0"
'';
nativeBuildInputs = [
pythonRelaxDepsHook
];
propagatedBuildInputs = [
cirq-core
google-api-core
@ -40,6 +45,8 @@ buildPythonPackage rec {
# unittest.mock.InvalidSpecError: Cannot autospec attr 'QuantumEngineServiceClient'
"test_get_engine_sampler_explicit_project_id"
"test_get_engine_sampler"
# Calibration issue
"test_xeb_to_calibration_layer"
];
}

View File

@ -31,20 +31,22 @@ buildPythonPackage rec {
sourceRoot = "${src.name}/${pname}";
pythonRelaxDeps = [
"attrs"
"certifi"
"h11"
"httpcore"
"httpx"
"idna"
"iso8601"
"pydantic"
"pyjwt"
"pyquil"
"qcs-api-client"
"rfc3986"
];
postPatch = ''
substituteInPlace requirements.txt \
--replace "attrs~=20.3.0" "attrs" \
--replace "certifi~=2021.5.30" "certifi" \
--replace "h11~=0.9.0" "h11" \
--replace "httpcore~=0.11.1" "httpcore" \
--replace "httpx~=0.15.5" "httpx" \
--replace "idna~=2.10" "idna" \
--replace "pyjwt~=1.7.1" "pyjwt" \
--replace "qcs-api-client~=0.8.0" "qcs-api-client" \
--replace "iso8601~=0.1.14" "iso8601" \
--replace "rfc3986~=1.5.0" "rfc3986" \
--replace "pyquil~=3.0.0" "pyquil" \
--replace "pydantic~=1.8.2" "pydantic"
# Remove outdated test
rm cirq_rigetti/service_test.py
'';

View File

@ -1,6 +1,7 @@
{ buildPythonPackage
, cirq-aqt
, cirq-core
, cirq-ft
, cirq-google
, cirq-ionq
, cirq-pasqal
@ -16,6 +17,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [
cirq-aqt
cirq-core
cirq-ft
cirq-ionq
cirq-google
cirq-rigetti
@ -32,6 +34,7 @@ buildPythonPackage rec {
disabledTestPaths = [
"cirq-aqt"
"cirq-core"
"cirq-ft"
"cirq-google"
"cirq-ionq"
"cirq-pasqal"

View File

@ -0,0 +1,23 @@
{ lib, buildPythonPackage, fetchPypi, psutil }:
buildPythonPackage rec {
pname = "command_runner";
version = "1.5.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-UIDzLLIm69W53jvS9M2LVclM+OqRYmLtvuXVAv54ltg=";
};
propagatedBuildInputs = [ psutil ];
meta = with lib; {
homepage = "https://github.com/netinvent/command_runner";
description = ''
Platform agnostic command execution, timed background jobs with live
stdout/stderr output capture, and UAC/sudo elevation
'';
license = licenses.bsd3;
maintainers = teams.wdz.members;
};
}

View File

@ -1,22 +1,37 @@
{ lib, buildPythonPackage, sphinx, fetchPypi }:
{ lib
, buildPythonPackage
, fetchPypi
, setuptools
, sphinx
}:
buildPythonPackage rec {
pname = "guzzle_sphinx_theme";
pname = "guzzle-sphinx-theme";
version = "0.7.11";
pyproject = true;
src = fetchPypi {
inherit pname version;
sha256 = "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v";
pname = "guzzle_sphinx_theme";
inherit version;
hash = "sha256-m4wWOcNDwCw/PbffZg3fb1M7VFTukqX3sC7apXP+0+Y=";
};
nativeBuildInputs = [
setuptools
];
doCheck = false; # no tests
propagatedBuildInputs = [ sphinx ];
pythonImportsCheck = [
"guzzle_sphinx_theme"
];
meta = with lib; {
description = "Sphinx theme used by Guzzle: http://guzzlephp.org";
homepage = "https://github.com/guzzle/guzzle_sphinx_theme/";
license = licenses.mit;
maintainers = with maintainers; [ flokli ];
platforms = platforms.unix;
};
}

View File

@ -6,7 +6,7 @@
, packaging
}:
let
pname = "lazy_imports";
pname = "lazy-imports";
version = "0.3.1";
in
buildPythonPackage {

View File

@ -15,7 +15,7 @@
buildPythonPackage rec {
pname = "mkdocs-jupyter";
version = "0.24.2";
version = "0.24.5";
format = "pyproject";
disabled = pythonOlder "3.7";
@ -23,12 +23,12 @@ buildPythonPackage rec {
src = fetchPypi {
pname = "mkdocs_jupyter";
inherit version;
hash = "sha256-XgwQnVNdSHlyMHGbaUH00I3pWno8lb8VhmLEEvwVyy4=";
hash = "sha256-+ngEh5pidwJJfir66kCj2xy90qOroORBd4LdJMqJm7M=";
};
postPatch = ''
sed -i "/--cov/d" pyproject.toml
substituteInPlace mkdocs_jupyter/tests/test_base_usage.py \
substituteInPlace src/mkdocs_jupyter/tests/test_base_usage.py \
--replace "[\"mkdocs\"," "[\"${mkdocs.out}/bin/mkdocs\","
'';

View File

@ -1,6 +1,6 @@
{ lib
, buildPythonPackage
, et_xmlfile
, et-xmlfile
, fetchFromGitLab
, jdcal
, lxml
@ -26,7 +26,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [
jdcal
et_xmlfile
et-xmlfile
lxml
];

View File

@ -18,7 +18,7 @@
buildPythonPackage rec {
pname = "pyinfra";
version = "2.7";
version = "2.8";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -27,7 +27,7 @@ buildPythonPackage rec {
owner = "Fizzadar";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-drfxNpdhqSxCeB0SbwyKOd3DDA7bFkmDmFQJS3JwOlA=";
hash = "sha256-BYd2UYQJD/HsmpnlQjZvjfg17ShPuA3j4rtv6fTQK/A=";
};
propagatedBuildInputs = [

View File

@ -14,7 +14,7 @@
buildPythonPackage rec {
pname = "pytest-playwright";
version = "0.4.2";
version = "0.4.3";
format = "setuptools";
disabled = pythonOlder "3.8";
@ -23,7 +23,7 @@ buildPythonPackage rec {
owner = "microsoft";
repo = "playwright-pytest";
rev = "refs/tags/v${version}";
hash = "sha256-yYFzaIPYOsuvS8bGcuwQQNS/CtvGUe1XQdORmfEJQmU=";
hash = "sha256-5qjfZGDM1OqXXNyj81O49ClKKGiAPdgyZZu6TgpskGs=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;

View File

@ -35,7 +35,7 @@
buildPythonPackage rec {
pname = "python-lsp-server";
version = "1.8.1";
version = "1.8.2";
format = "pyproject";
disabled = pythonOlder "3.8";
@ -44,7 +44,7 @@ buildPythonPackage rec {
owner = "python-lsp";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-8wFLZuGWt3qIRUkprxzFgxh+rtmIyMBjeCnzCNTbXzA=";
hash = "sha256-jD/8Xy/o9U/qtjz5FABg5krMIvbnrT+MlK0OvXFTJkI=";
};
postPatch = ''

View File

@ -11,14 +11,14 @@
}:
buildPythonPackage rec {
pname = "python-youtube";
version = "0.9.1";
version = "0.9.2";
format = "pyproject";
src = fetchFromGitHub {
owner = "sns-sdks";
repo = "python-youtube";
rev = "v${version}";
hash = "sha256-PbPdvUv7I9NKW6w4OJbiUoRNVJ1SoXychSXBH/y5nzY=";
rev = "refs/tags/v${version}";
hash = "sha256-jUs6n8j1coA37V0RTYqr7pqt+LRABieX7gbyWsXQpUM=";
};
postPatch = ''

View File

@ -12,11 +12,11 @@
let
pname = "pythonnet";
version = "3.0.2";
version = "3.0.3";
src = fetchPypi {
pname = "pythonnet";
inherit version;
sha256 = "sha256-LN0cztxkp8m9cRvj0P0MSniTJHQTncVKppe+3edBx0Y=";
hash = "sha256-jUsulxWKAjh1+GR0WKWPOIF/T+Oa9gq91rDYrfHXfnU=";
};
# This buildDotnetModule is used only to get nuget sources, the actual
@ -70,6 +70,7 @@ buildPythonPackage {
meta = with lib; {
description = ".NET integration for Python";
homepage = "https://pythonnet.github.io";
changelog = "https://github.com/pythonnet/pythonnet/releases/tag/v${version}";
license = licenses.mit;
# <https://github.com/pythonnet/pythonnet/issues/898>
badPlatforms = [ "aarch64-linux" ];

View File

@ -18,7 +18,7 @@
buildPythonPackage rec {
pname = "qdrant-client";
version = "1.5.4";
version = "1.6.0";
format = "pyproject";
disabled = pythonOlder "3.7";
@ -27,7 +27,7 @@ buildPythonPackage rec {
owner = "qdrant";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-9aZBUrGCNRQjYRF1QmIwVqeT5Tdgv7CCkyOUsbZbmVM=";
hash = "sha256-N1qvckOzmCKLoHumeFSs2293eZGhrbfOWhN9/vxeX8s=";
};
nativeBuildInputs = [

View File

@ -19,7 +19,7 @@
buildPythonPackage rec {
pname = "radish-bdd";
version = "0.16.2";
version = "0.17.0";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -28,7 +28,7 @@ buildPythonPackage rec {
owner = pname;
repo = "radish";
rev = "refs/tags/v${version}";
hash = "sha256-ZWAHPZmyPq/BRVT6pHkTRjp2SA36+wD6x6GW9OyfG7k=";
hash = "sha256-4cGUF4Qh5+mxHtKNnAjh37Q6hEFCQ9zmntya98UHx+0=";
};
propagatedBuildInputs = [

View File

@ -21,16 +21,16 @@
let
external = {
avalon = fetchFromGitHub {
owner = "rohdebe1";
owner = "rdkit";
repo = "ava-formake";
rev = "AvalonToolkit_2.0.4a";
hash = "sha256-ZyhrDBBv9XuXe1NY/Djiad86tGIJwCSTrxEMICHgSqk=";
rev = "AvalonToolkit_2.0.5-pre.3";
hash = "sha256-2MuFZgRIHXnkV7Nc1da4fa7wDx57VHUtwLthrmjk+5o=";
};
yaehmop = fetchFromGitHub {
owner = "greglandrum";
repo = "yaehmop";
rev = "v2022.09.1";
hash = "sha256-QMnc5RyHlY3giw9QmrkGntiA+Srs7OhCIKs9GGo5DfQ=";
rev = "v2023.03.1";
hash = "sha256-K9//cDN69U4sLETfIZq9NUaBE3RXOReH53qfiCzutqM=";
};
freesasa = fetchFromGitHub {
owner = "mittinatten";
@ -42,7 +42,7 @@ let
in
buildPythonPackage rec {
pname = "rdkit";
version = "2023.03.3";
version = "2023.09.1";
format = "other";
src =
@ -53,7 +53,7 @@ buildPythonPackage rec {
owner = pname;
repo = pname;
rev = "Release_${versionTag}";
hash = "sha256-5M7nDUWORbepDGaf2G6Cd79Hu0au3DNRc9KuONoCWK0=";
hash = "sha256-qaYD/46oCTnso1FbD08zr2JuatKmSSqNBhOYlfeIiAA=";
};
unpackPhase = ''

View File

@ -10,7 +10,7 @@
buildPythonPackage rec {
pname = "riscv-config";
version = "3.13.1";
version = "3.13.3";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -19,7 +19,7 @@ buildPythonPackage rec {
owner = "riscv-software-src";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-SnUt6bsTEC7abdQr0nWyNOAJbW64B1K3yy1McfkdxAc=";
hash = "sha256-tMV5mRqOLURkr8HQN1yvq5Cf3yz2NRBY6uaaxNKCy2c=";
};
propagatedBuildInputs = [

View File

@ -32,14 +32,14 @@
buildPythonPackage rec {
pname = "streamlit";
version = "1.26.0";
version = "1.27.2";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version format;
hash = "sha256-JUdfsVo8yfsYSUXz/JNvARmYvYOG4MiS/r4UyWJb9Ho=";
hash = "sha256-M/muDeW31ZzX2rqHdUxU7IN6dsJKz8QdH45RSPIJA+4=";
};
nativeBuildInputs = [ pythonRelaxDepsHook ];

View File

@ -1,30 +0,0 @@
{ lib, stdenv, fetchurl, guile }:
stdenv.mkDerivation rec {
pname = "guile-lint";
version = "14";
src = fetchurl {
url = "https://download.tuxfamily.org/user42/${pname}-${version}.tar.bz2";
sha256 = "1gnhnmki05pkmzpbfc07vmb2iwza6vhy75y03bw2x2rk4fkggz2v";
};
buildInputs = [ guile ];
unpackPhase = ''tar xjvf "$src" && sourceRoot="$PWD/${pname}-${version}"'';
prePatch = ''
substituteInPlace guile-lint.in --replace \
"exec guile" "exec ${guile}/bin/guile"
'';
doCheck = !stdenv.isDarwin;
meta = with lib; {
description = "Checks syntax and semantics in a Guile program or module";
homepage = "https://user42.tuxfamily.org/guile-lint/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ vyp ];
platforms = platforms.all;
};
}

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "ktlint";
version = "1.0.0";
version = "1.0.1";
src = fetchurl {
url = "https://github.com/pinterest/ktlint/releases/download/${version}/ktlint";
sha256 = "1pc1ck87l849xfy1lcdr1v3p84qyxn9725pvh09czvlqs58yy6ax";
sha256 = "15bvk6sv6fjvfq2a5yyxh3kvpkyws0pxdqbygkkrxxsl8bnr3409";
};
nativeBuildInputs = [ makeWrapper ];

View File

@ -12,13 +12,13 @@
buildNpmPackage rec {
pname = "vsce";
version = "2.21.0";
version = "2.21.1";
src = fetchFromGitHub {
owner = "microsoft";
repo = "vscode-vsce";
rev = "v${version}";
hash = "sha256-iBbKVfkmt8n06JJ8TSO8BDCeiird9gTkOQhlREtZ5Cw=";
hash = "sha256-cFqjoWQu/6cvbT1vxReERybuKpeL4LCVl5qhvSwr6fs=";
};
npmDepsHash = "sha256-Difk9a9TYmfwzP9SawEuaxm7iHVjdfO+FxFCE7aEMzM=";

View File

@ -1,45 +0,0 @@
{ fetchurl, lib, stdenv, SDL, SDL_image, SDL_mixer, SDL_ttf, guile, gettext }:
stdenv.mkDerivation rec {
pname = "ballandpaddle";
version = "0.8.1";
src = fetchurl {
url = "mirror://gnu/ballandpaddle/ballandpaddle-${version}.tar.gz";
sha256 = "0zgpydad0mj7fbkippw3n9hlda6nac084dq5xfbsks9jn1xd30ny";
};
buildInputs = [ SDL SDL_image SDL_mixer SDL_ttf guile gettext ];
patches = [ ./getenv-decl.patch ];
preConfigure = ''
sed -i "Makefile.in" \
-e "s|desktopdir *=.*$|desktopdir = $out/share/applications|g ;
s|pixmapsdir *=.*$|pixmapsdir = $out/share/pixmaps|g"
'';
meta = {
description = "GNU Ball and Paddle, an old-fashioned ball and paddle game";
longDescription = ''
GNU Ball and Paddle is an old-fashioned ball and paddle game
with a set amount of blocks to destroy on each level, while
moving a paddle left and right at the bottom of the
screen. Various powerups may make different things occur.
It now uses GNU Guile for extension and the levels are written
with Guile. Follow the example level sets and the documentation.
'';
license = lib.licenses.gpl3Plus;
homepage = "https://www.gnu.org/software/ballandpaddle/";
maintainers = [ ];
platforms = lib.platforms.unix;
hydraPlatforms = lib.platforms.linux; # sdl-config times out on darwin
};
}

View File

@ -1,13 +0,0 @@
Make the getenv(3) declaration visible.
--- ballandpaddle-0.8.1/src/settingsmanager.cpp 2009-07-08 02:13:16.000000000 +0200
+++ ballandpaddle-0.8.1/src/settingsmanager.cpp 2009-07-16 23:30:28.000000000 +0200
@@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
**/
+#include <stdlib.h>
#include "settingsmanager.h"
SettingsManager::SettingsManager ()

View File

@ -7,21 +7,21 @@
let
pname = "osu-lazer-bin";
version = "2023.1008.0";
version = "2023.1008.1";
name = "${pname}-${version}";
osu-lazer-bin-src = {
aarch64-darwin = {
url = "https://github.com/ppy/osu/releases/download/${version}/osu.app.Apple.Silicon.zip";
sha256 = "sha256-gtXbccVrQ2edEcDR7wG2Upv4b4a64tvu+/fiKghMquM=";
sha256 = "sha256-eL5UVZqAH7Ta442xIDjaOPu3NXJmck+lS+BoD/qnOMs=";
};
x86_64-darwin = {
url = "https://github.com/ppy/osu/releases/download/${version}/osu.app.Intel.zip";
sha256 = "sha256-qo4EovNt158XXfYOek4lmil2Qwv185fLjZIaBsXzw74=";
sha256 = "sha256-x/HL73Fao11GVj7uMFpx4uOKv8Gmiy1PEgee2sP1fvg=";
};
x86_64-linux = {
url = "https://github.com/ppy/osu/releases/download/${version}/osu.AppImage";
sha256 = "sha256-aZDRwZeCC4qBNktLeD7ezbp1Bydf6mP8crtpdayUiqI=";
sha256 = "sha256-QqyymPkeRcedK75O9S0zO8DrUmPKuC7Mp4SbXT+QM9I=";
};
}.${stdenv.system} or (throw "${pname}-${version}: ${stdenv.system} is unsupported.");

View File

@ -1,16 +1,18 @@
{ lib, stdenv
{ lib
, stdenv
, fetchurl
, jdk8
, unzip
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "xmage";
version = "1.4.42V6";
version = "1.4.50V2";
src = fetchurl {
url = "https://github.com/magefree/mage/releases/download/xmage_1.4.42V6/xmage_${version}.zip";
sha256 = "14s4885ldi0rplqmab5m775plsqmmm0m89j402caiqm2q9mzvkhd";
url =
"https://github.com/magefree/mage/releases/download/xmage_${finalAttrs.version}/xmage_${finalAttrs.version}.zip";
sha256 = "sha256-t1peHYwCRy3wiIIwOD3nUyoxSOxbw6B/g++A1ofIbmg=";
};
preferLocalBuild = true;
@ -19,13 +21,15 @@ stdenv.mkDerivation rec {
${unzip}/bin/unzip $src
'';
installPhase = ''
installPhase = let
strVersion = lib.substring 0 6 finalAttrs.version;
in ''
mkdir -p $out/bin
cp -rv ./* $out
cat << EOS > $out/bin/xmage
exec ${jdk8}/bin/java -Xms256m -Xmx512m -XX:MaxPermSize=384m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -jar $out/mage-client/lib/mage-client-1.4.42.jar
EOS
exec ${jdk8}/bin/java -Xms256m -Xmx512m -XX:MaxPermSize=384m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -jar $out/mage-client/lib/mage-client-${strVersion}.jar
EOS
chmod +x $out/bin/xmage
'';
@ -38,5 +42,5 @@ EOS
homepage = "http://xmage.de/";
};
}
})

View File

@ -0,0 +1,89 @@
{ lib, stdenv, fetchurl, cups, dpkg, gnused, makeWrapper, ghostscript, coreutils, perl, gnugrep, which
, debugLvl ? "0"
}:
let
version = "3.2.0-1";
lprdeb = fetchurl {
url = "https://download.brother.com/welcome/dlf102692/hl2260dlpr-${version}.i386.deb";
hash = "sha256-R+cM2SKc/MP6keo3PUrKXPC6a2dEQQdBunrpNtAHlH0=";
};
cupsdeb = fetchurl {
url = "https://download.brother.com/welcome/dlf102693/hl2260dcupswrapper-${version}.i386.deb";
hash = "sha256-k6+ulZVoFTpEY6WJ9TO9Rzp2c4dwPqL3NY5/XYJpvOc=";
};
in
stdenv.mkDerivation {
pname = "cups-brother-hl2260d";
inherit version;
nativeBuildInputs = [ makeWrapper dpkg ];
buildInputs = [ cups ghostscript perl ];
dontPatchELF = true;
dontBuild = true;
unpackPhase = ''
mkdir -p $out
dpkg-deb -x ${cupsdeb} $out
dpkg-deb -x ${lprdeb} $out
'';
patchPhase = ''
# Patch lpr
INFDIR=$out/opt/brother/Printers/HL2260D/inf
LPDDIR=$out/opt/brother/Printers/HL2260D/lpd
substituteInPlace $LPDDIR/filter_HL2260D \
--replace "BR_PRT_PATH =~" "BR_PRT_PATH = \"$out/opt/brother/Printers/HL2260D\"; #" \
--replace "PRINTER =~" "PRINTER = \"HL2260D\"; #"
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
$INFDIR/braddprinter
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
$LPDDIR/brprintconflsr3
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
$LPDDIR/rawtobr3
# Patch cupswrapper
WRAPPER=$out/opt/brother/Printers/HL2260D/cupswrapper/brother_lpdwrapper_HL2260D
PAPER_CFG=$out/opt/brother/Printers/HL2260D/cupswrapper/paperconfigml1
substituteInPlace $WRAPPER \
--replace "basedir =~" "basedir = \"$out/opt/brother/Printers/HL2260D\"; #" \
--replace "PRINTER =~" "PRINTER = \"HL2260D\"; #" \
--replace "\$DEBUG=0;" "\$DEBUG=${debugLvl};"
substituteInPlace $WRAPPER \
--replace "\`cp " "\`cp -p " \
--replace "\$TEMPRC\`" "\$TEMPRC; chmod a+rw \$TEMPRC\`" \
--replace "\`mv " "\`cp -p "
# This config script make this assumption that the *.ppd are found in a global location `/etc/cups/ppd`.
substituteInPlace $PAPER_CFG \
--replace "/etc/cups/ppd" "$out/share/cups/model"
'';
installPhase = ''
mkdir -p $out/share/cups/model
ln -s $out/opt/brother/Printers/HL2260D/cupswrapper/brother-HL2260D-cups-en.ppd $out/share/cups/model
mkdir -p $out/lib/cups/filter/
makeWrapper \
$out/opt/brother/Printers/HL2260D/cupswrapper/brother_lpdwrapper_HL2260D \
$out/lib/cups/filter/brother_lpdwrapper_HL2260D \
--prefix PATH : ${lib.makeBinPath [coreutils gnugrep gnused]}
wrapProgram $out/opt/brother/Printers/HL2260D/lpd/filter_HL2260D \
--prefix PATH ":" ${ lib.makeBinPath [ ghostscript which ] }
'';
meta = with lib; {
homepage = "http://www.brother.com/";
description = "Brother HL-2260D printer driver";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
platforms = [ "x86_64-linux" "i686-linux" ];
downloadPage = "https://support.brother.com/g/b/downloadtop.aspx?c=cn_ot&lang=en&prod=hl2260d_cn";
maintainers = with maintainers; [ u2x1 ];
};
}

View File

@ -17,7 +17,7 @@
let
pname = "yabai";
version = "5.0.9";
version = "6.0.0";
test-version = testers.testVersion {
package = yabai;
@ -53,7 +53,7 @@ in
src = fetchzip {
url = "https://github.com/koekeishiya/yabai/releases/download/v${version}/yabai-v${version}.tar.gz";
hash = "sha256-6dqQ+kau/aUAM4oPSkcgZJlJModcjKOXPlTB32MvoLQ=";
hash = "sha256-KeZ5srx9dfQN9u6Fgg9BtIhLhFWp975iz72m78bWINo=";
};
nativeBuildInputs = [
@ -89,7 +89,7 @@ in
owner = "koekeishiya";
repo = "yabai";
rev = "v${version}";
hash = "sha256-uy1KOBJa9BNK5bd+5q5okMouAV0H3DUXrG3Mvr5U6oc=";
hash = "sha256-BQhFTn9KDBv9oG8kT2TFFpPZGHARg7DfN+IeQNNDE84=";
};
nativeBuildInputs = [

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