commit
130c469a35
Can't render this file because it has a wrong number of fields in line 72.
|
@ -0,0 +1,493 @@ |
|||||||
|
{ config, lib, pkgs, ... }: |
||||||
|
|
||||||
|
with lib; |
||||||
|
|
||||||
|
let |
||||||
|
cfg = config.services.snipe-it; |
||||||
|
snipe-it = pkgs.snipe-it.override { |
||||||
|
dataDir = cfg.dataDir; |
||||||
|
}; |
||||||
|
db = cfg.database; |
||||||
|
mail = cfg.mail; |
||||||
|
|
||||||
|
user = cfg.user; |
||||||
|
group = cfg.group; |
||||||
|
|
||||||
|
tlsEnabled = cfg.nginx.addSSL || cfg.nginx.forceSSL || cfg.nginx.onlySSL || cfg.nginx.enableACME; |
||||||
|
|
||||||
|
# shell script for local administration |
||||||
|
artisan = pkgs.writeScriptBin "snipe-it" '' |
||||||
|
#! ${pkgs.runtimeShell} |
||||||
|
cd ${snipe-it} |
||||||
|
sudo=exec |
||||||
|
if [[ "$USER" != ${user} ]]; then |
||||||
|
sudo='exec /run/wrappers/bin/sudo -u ${user}' |
||||||
|
fi |
||||||
|
$sudo ${pkgs.php}/bin/php artisan $* |
||||||
|
''; |
||||||
|
in { |
||||||
|
options.services.snipe-it = { |
||||||
|
|
||||||
|
enable = mkEnableOption "A free open source IT asset/license management system"; |
||||||
|
|
||||||
|
user = mkOption { |
||||||
|
default = "snipeit"; |
||||||
|
description = "User snipe-it runs as."; |
||||||
|
type = types.str; |
||||||
|
}; |
||||||
|
|
||||||
|
group = mkOption { |
||||||
|
default = "snipeit"; |
||||||
|
description = "Group snipe-it runs as."; |
||||||
|
type = types.str; |
||||||
|
}; |
||||||
|
|
||||||
|
appKeyFile = mkOption { |
||||||
|
description = '' |
||||||
|
A file containing the Laravel APP_KEY - a 32 character long, |
||||||
|
base64 encoded key used for encryption where needed. Can be |
||||||
|
generated with <code>head -c 32 /dev/urandom | base64</code>. |
||||||
|
''; |
||||||
|
example = "/run/keys/snipe-it/appkey"; |
||||||
|
type = types.path; |
||||||
|
}; |
||||||
|
|
||||||
|
hostName = lib.mkOption { |
||||||
|
type = lib.types.str; |
||||||
|
default = if config.networking.domain != null then |
||||||
|
config.networking.fqdn |
||||||
|
else |
||||||
|
config.networking.hostName; |
||||||
|
defaultText = lib.literalExpression "config.networking.fqdn"; |
||||||
|
example = "snipe-it.example.com"; |
||||||
|
description = '' |
||||||
|
The hostname to serve Snipe-IT on. |
||||||
|
''; |
||||||
|
}; |
||||||
|
|
||||||
|
appURL = mkOption { |
||||||
|
description = '' |
||||||
|
The root URL that you want to host Snipe-IT on. All URLs in Snipe-IT will be generated using this value. |
||||||
|
If you change this in the future you may need to run a command to update stored URLs in the database. |
||||||
|
Command example: <code>snipe-it snipe-it:update-url https://old.example.com https://new.example.com</code> |
||||||
|
''; |
||||||
|
default = "http${lib.optionalString tlsEnabled "s"}://${cfg.hostName}"; |
||||||
|
defaultText = '' |
||||||
|
http''${lib.optionalString tlsEnabled "s"}://''${cfg.hostName} |
||||||
|
''; |
||||||
|
example = "https://example.com"; |
||||||
|
type = types.str; |
||||||
|
}; |
||||||
|
|
||||||
|
dataDir = mkOption { |
||||||
|
description = "snipe-it data directory"; |
||||||
|
default = "/var/lib/snipe-it"; |
||||||
|
type = types.path; |
||||||
|
}; |
||||||
|
|
||||||
|
database = { |
||||||
|
host = mkOption { |
||||||
|
type = types.str; |
||||||
|
default = "localhost"; |
||||||
|
description = "Database host address."; |
||||||
|
}; |
||||||
|
port = mkOption { |
||||||
|
type = types.port; |
||||||
|
default = 3306; |
||||||
|
description = "Database host port."; |
||||||
|
}; |
||||||
|
name = mkOption { |
||||||
|
type = types.str; |
||||||
|
default = "snipeit"; |
||||||
|
description = "Database name."; |
||||||
|
}; |
||||||
|
user = mkOption { |
||||||
|
type = types.str; |
||||||
|
default = user; |
||||||
|
defaultText = literalExpression "user"; |
||||||
|
description = "Database username."; |
||||||
|
}; |
||||||
|
passwordFile = mkOption { |
||||||
|
type = with types; nullOr path; |
||||||
|
default = null; |
||||||
|
example = "/run/keys/snipe-it/dbpassword"; |
||||||
|
description = '' |
||||||
|
A file containing the password corresponding to |
||||||
|
<option>database.user</option>. |
||||||
|
''; |
||||||
|
}; |
||||||
|
createLocally = mkOption { |
||||||
|
type = types.bool; |
||||||
|
default = false; |
||||||
|
description = "Create the database and database user locally."; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
mail = { |
||||||
|
driver = mkOption { |
||||||
|
type = types.enum [ "smtp" "sendmail" ]; |
||||||
|
default = "smtp"; |
||||||
|
description = "Mail driver to use."; |
||||||
|
}; |
||||||
|
host = mkOption { |
||||||
|
type = types.str; |
||||||
|
default = "localhost"; |
||||||
|
description = "Mail host address."; |
||||||
|
}; |
||||||
|
port = mkOption { |
||||||
|
type = types.port; |
||||||
|
default = 1025; |
||||||
|
description = "Mail host port."; |
||||||
|
}; |
||||||
|
encryption = mkOption { |
||||||
|
type = with types; nullOr (enum [ "tls" "ssl" ]); |
||||||
|
default = null; |
||||||
|
description = "SMTP encryption mechanism to use."; |
||||||
|
}; |
||||||
|
user = mkOption { |
||||||
|
type = with types; nullOr str; |
||||||
|
default = null; |
||||||
|
example = "snipeit"; |
||||||
|
description = "Mail username."; |
||||||
|
}; |
||||||
|
passwordFile = mkOption { |
||||||
|
type = with types; nullOr path; |
||||||
|
default = null; |
||||||
|
example = "/run/keys/snipe-it/mailpassword"; |
||||||
|
description = '' |
||||||
|
A file containing the password corresponding to |
||||||
|
<option>mail.user</option>. |
||||||
|
''; |
||||||
|
}; |
||||||
|
backupNotificationAddress = mkOption { |
||||||
|
type = types.str; |
||||||
|
default = "backup@example.com"; |
||||||
|
description = "Email Address to send Backup Notifications to."; |
||||||
|
}; |
||||||
|
from = { |
||||||
|
name = mkOption { |
||||||
|
type = types.str; |
||||||
|
default = "Snipe-IT Asset Management"; |
||||||
|
description = "Mail \"from\" name."; |
||||||
|
}; |
||||||
|
address = mkOption { |
||||||
|
type = types.str; |
||||||
|
default = "mail@example.com"; |
||||||
|
description = "Mail \"from\" address."; |
||||||
|
}; |
||||||
|
}; |
||||||
|
replyTo = { |
||||||
|
name = mkOption { |
||||||
|
type = types.str; |
||||||
|
default = "Snipe-IT Asset Management"; |
||||||
|
description = "Mail \"reply-to\" name."; |
||||||
|
}; |
||||||
|
address = mkOption { |
||||||
|
type = types.str; |
||||||
|
default = "mail@example.com"; |
||||||
|
description = "Mail \"reply-to\" address."; |
||||||
|
}; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
maxUploadSize = mkOption { |
||||||
|
type = types.str; |
||||||
|
default = "18M"; |
||||||
|
example = "1G"; |
||||||
|
description = "The maximum size for uploads (e.g. images)."; |
||||||
|
}; |
||||||
|
|
||||||
|
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 snipe-it PHP pool. See the documentation on <literal>php-fpm.conf</literal> |
||||||
|
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 = [ |
||||||
|
"snipe-it.''${config.networking.domain}" |
||||||
|
]; |
||||||
|
# To enable encryption and let let's encrypt take care of certificate |
||||||
|
forceSSL = true; |
||||||
|
enableACME = true; |
||||||
|
} |
||||||
|
''; |
||||||
|
description = '' |
||||||
|
With this option, you can customize the nginx virtualHost settings. |
||||||
|
''; |
||||||
|
}; |
||||||
|
|
||||||
|
config = mkOption { |
||||||
|
type = with types; |
||||||
|
attrsOf |
||||||
|
(nullOr |
||||||
|
(either |
||||||
|
(oneOf [ |
||||||
|
bool |
||||||
|
int |
||||||
|
port |
||||||
|
path |
||||||
|
str |
||||||
|
]) |
||||||
|
(submodule { |
||||||
|
options = { |
||||||
|
_secret = mkOption { |
||||||
|
type = nullOr (oneOf [ str path ]); |
||||||
|
description = '' |
||||||
|
The path to a file containing the value the |
||||||
|
option should be set to in the final |
||||||
|
configuration file. |
||||||
|
''; |
||||||
|
}; |
||||||
|
}; |
||||||
|
}))); |
||||||
|
default = {}; |
||||||
|
example = literalExpression '' |
||||||
|
{ |
||||||
|
ALLOWED_IFRAME_HOSTS = "https://example.com"; |
||||||
|
WKHTMLTOPDF = "''${pkgs.wkhtmltopdf}/bin/wkhtmltopdf"; |
||||||
|
AUTH_METHOD = "oidc"; |
||||||
|
OIDC_NAME = "MyLogin"; |
||||||
|
OIDC_DISPLAY_NAME_CLAIMS = "name"; |
||||||
|
OIDC_CLIENT_ID = "snipe-it"; |
||||||
|
OIDC_CLIENT_SECRET = {_secret = "/run/keys/oidc_secret"}; |
||||||
|
OIDC_ISSUER = "https://keycloak.example.com/auth/realms/My%20Realm"; |
||||||
|
OIDC_ISSUER_DISCOVER = true; |
||||||
|
} |
||||||
|
''; |
||||||
|
description = '' |
||||||
|
Snipe-IT configuration options to set in the |
||||||
|
<filename>.env</filename> file. |
||||||
|
Refer to <link xlink:href="https://snipe-it.readme.io/docs/configuration"/> |
||||||
|
for details on supported values. |
||||||
|
|
||||||
|
Settings containing secret data should be set to an attribute |
||||||
|
set containing the attribute <literal>_secret</literal> - a |
||||||
|
string pointing to a file containing the value the option |
||||||
|
should be set to. See the example to get a better picture of |
||||||
|
this: in the resulting <filename>.env</filename> file, the |
||||||
|
<literal>OIDC_CLIENT_SECRET</literal> key will be set to the |
||||||
|
contents of the <filename>/run/keys/oidc_secret</filename> |
||||||
|
file. |
||||||
|
''; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
config = mkIf cfg.enable { |
||||||
|
|
||||||
|
assertions = [ |
||||||
|
{ assertion = db.createLocally -> db.user == user; |
||||||
|
message = "services.snipe-it.database.user must be set to ${user} if services.snipe-it.database.createLocally is set true."; |
||||||
|
} |
||||||
|
{ assertion = db.createLocally -> db.passwordFile == null; |
||||||
|
message = "services.snipe-it.database.passwordFile cannot be specified if services.snipe-it.database.createLocally is set to true."; |
||||||
|
} |
||||||
|
]; |
||||||
|
|
||||||
|
environment.systemPackages = [ artisan ]; |
||||||
|
|
||||||
|
services.snipe-it.config = { |
||||||
|
APP_ENV = "production"; |
||||||
|
APP_KEY._secret = cfg.appKeyFile; |
||||||
|
APP_URL = cfg.appURL; |
||||||
|
DB_HOST = db.host; |
||||||
|
DB_PORT = db.port; |
||||||
|
DB_DATABASE = db.name; |
||||||
|
DB_USERNAME = db.user; |
||||||
|
DB_PASSWORD._secret = db.passwordFile; |
||||||
|
MAIL_DRIVER = mail.driver; |
||||||
|
MAIL_FROM_NAME = mail.from.name; |
||||||
|
MAIL_FROM_ADDR = mail.from.address; |
||||||
|
MAIL_REPLYTO_NAME = mail.from.name; |
||||||
|
MAIL_REPLYTO_ADDR = mail.from.address; |
||||||
|
MAIL_BACKUP_NOTIFICATION_ADDRESS = mail.backupNotificationAddress; |
||||||
|
MAIL_HOST = mail.host; |
||||||
|
MAIL_PORT = mail.port; |
||||||
|
MAIL_USERNAME = mail.user; |
||||||
|
MAIL_ENCRYPTION = mail.encryption; |
||||||
|
MAIL_PASSWORD._secret = mail.passwordFile; |
||||||
|
APP_SERVICES_CACHE = "/run/snipe-it/cache/services.php"; |
||||||
|
APP_PACKAGES_CACHE = "/run/snipe-it/cache/packages.php"; |
||||||
|
APP_CONFIG_CACHE = "/run/snipe-it/cache/config.php"; |
||||||
|
APP_ROUTES_CACHE = "/run/snipe-it/cache/routes-v7.php"; |
||||||
|
APP_EVENTS_CACHE = "/run/snipe-it/cache/events.php"; |
||||||
|
SESSION_SECURE_COOKIE = tlsEnabled; |
||||||
|
}; |
||||||
|
|
||||||
|
services.mysql = mkIf db.createLocally { |
||||||
|
enable = true; |
||||||
|
package = mkDefault pkgs.mariadb; |
||||||
|
ensureDatabases = [ db.name ]; |
||||||
|
ensureUsers = [ |
||||||
|
{ name = db.user; |
||||||
|
ensurePermissions = { "${db.name}.*" = "ALL PRIVILEGES"; }; |
||||||
|
} |
||||||
|
]; |
||||||
|
}; |
||||||
|
|
||||||
|
services.phpfpm.pools.snipe-it = { |
||||||
|
inherit user group; |
||||||
|
phpPackage = pkgs.php74; |
||||||
|
phpOptions = '' |
||||||
|
post_max_size = ${cfg.maxUploadSize} |
||||||
|
upload_max_filesize = ${cfg.maxUploadSize} |
||||||
|
''; |
||||||
|
settings = { |
||||||
|
"listen.mode" = "0660"; |
||||||
|
"listen.owner" = user; |
||||||
|
"listen.group" = group; |
||||||
|
} // cfg.poolConfig; |
||||||
|
}; |
||||||
|
|
||||||
|
services.nginx = { |
||||||
|
enable = mkDefault true; |
||||||
|
virtualHosts."${cfg.hostName}" = mkMerge [ cfg.nginx { |
||||||
|
root = mkForce "${snipe-it}/public"; |
||||||
|
extraConfig = optionalString (cfg.nginx.addSSL || cfg.nginx.forceSSL || cfg.nginx.onlySSL || cfg.nginx.enableACME) "fastcgi_param HTTPS on;"; |
||||||
|
locations = { |
||||||
|
"/" = { |
||||||
|
index = "index.php"; |
||||||
|
extraConfig = ''try_files $uri $uri/ /index.php?$query_string;''; |
||||||
|
}; |
||||||
|
"~ \.php$" = { |
||||||
|
extraConfig = '' |
||||||
|
try_files $uri $uri/ /index.php?$query_string; |
||||||
|
include ${config.services.nginx.package}/conf/fastcgi_params; |
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
||||||
|
fastcgi_param REDIRECT_STATUS 200; |
||||||
|
fastcgi_pass unix:${config.services.phpfpm.pools."snipe-it".socket}; |
||||||
|
${optionalString (cfg.nginx.addSSL || cfg.nginx.forceSSL || cfg.nginx.onlySSL || cfg.nginx.enableACME) "fastcgi_param HTTPS on;"} |
||||||
|
''; |
||||||
|
}; |
||||||
|
"~ \.(js|css|gif|png|ico|jpg|jpeg)$" = { |
||||||
|
extraConfig = "expires 365d;"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
}]; |
||||||
|
}; |
||||||
|
|
||||||
|
systemd.services.snipe-it-setup = { |
||||||
|
description = "Preperation tasks for snipe-it"; |
||||||
|
before = [ "phpfpm-snipe-it.service" ]; |
||||||
|
after = optional db.createLocally "mysql.service"; |
||||||
|
wantedBy = [ "multi-user.target" ]; |
||||||
|
serviceConfig = { |
||||||
|
Type = "oneshot"; |
||||||
|
RemainAfterExit = true; |
||||||
|
User = user; |
||||||
|
WorkingDirectory = snipe-it; |
||||||
|
RuntimeDirectory = "snipe-it/cache"; |
||||||
|
RuntimeDirectoryMode = 0700; |
||||||
|
}; |
||||||
|
path = [ pkgs.replace-secret ]; |
||||||
|
script = |
||||||
|
let |
||||||
|
isSecret = v: isAttrs v && v ? _secret && (isString v._secret || builtins.isPath v._secret); |
||||||
|
snipeITEnvVars = lib.generators.toKeyValue { |
||||||
|
mkKeyValue = lib.flip lib.generators.mkKeyValueDefault "=" { |
||||||
|
mkValueString = v: with builtins; |
||||||
|
if isInt v then toString v |
||||||
|
else if isString v then "\"${v}\"" |
||||||
|
else if true == v then "true" |
||||||
|
else if false == v then "false" |
||||||
|
else if isSecret v then |
||||||
|
if (isString v._secret) then |
||||||
|
hashString "sha256" v._secret |
||||||
|
else |
||||||
|
hashString "sha256" (builtins.readFile v._secret) |
||||||
|
else throw "unsupported type ${typeOf v}: ${(lib.generators.toPretty {}) v}"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
secretPaths = lib.mapAttrsToList (_: v: v._secret) (lib.filterAttrs (_: isSecret) cfg.config); |
||||||
|
mkSecretReplacement = file: '' |
||||||
|
replace-secret ${escapeShellArgs [ |
||||||
|
( |
||||||
|
if (isString file) then |
||||||
|
builtins.hashString "sha256" file |
||||||
|
else |
||||||
|
builtins.hashString "sha256" (builtins.readFile file) |
||||||
|
) |
||||||
|
file |
||||||
|
"${cfg.dataDir}/.env" |
||||||
|
]} |
||||||
|
''; |
||||||
|
secretReplacements = lib.concatMapStrings mkSecretReplacement secretPaths; |
||||||
|
filteredConfig = lib.converge (lib.filterAttrsRecursive (_: v: ! elem v [ {} null ])) cfg.config; |
||||||
|
snipeITEnv = pkgs.writeText "snipeIT.env" (snipeITEnvVars filteredConfig); |
||||||
|
in '' |
||||||
|
# error handling |
||||||
|
set -euo pipefail |
||||||
|
|
||||||
|
# set permissions |
||||||
|
umask 077 |
||||||
|
|
||||||
|
# create .env file |
||||||
|
install -T -m 0600 -o ${user} ${snipeITEnv} "${cfg.dataDir}/.env" |
||||||
|
|
||||||
|
# replace secrets |
||||||
|
${secretReplacements} |
||||||
|
|
||||||
|
# prepend `base64:` if it does not exist in APP_KEY |
||||||
|
if ! grep 'APP_KEY=base64:' "${cfg.dataDir}/.env" >/dev/null; then |
||||||
|
sed -i 's/APP_KEY=/APP_KEY=base64:/' "${cfg.dataDir}/.env" |
||||||
|
fi |
||||||
|
|
||||||
|
# purge cache |
||||||
|
rm "${cfg.dataDir}"/bootstrap/cache/*.php || true |
||||||
|
|
||||||
|
# migrate db |
||||||
|
${pkgs.php}/bin/php artisan migrate --force |
||||||
|
''; |
||||||
|
}; |
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [ |
||||||
|
"d ${cfg.dataDir} 0710 ${user} ${group} - -" |
||||||
|
"d ${cfg.dataDir}/bootstrap 0750 ${user} ${group} - -" |
||||||
|
"d ${cfg.dataDir}/bootstrap/cache 0750 ${user} ${group} - -" |
||||||
|
"d ${cfg.dataDir}/public 0750 ${user} ${group} - -" |
||||||
|
"d ${cfg.dataDir}/public/uploads 0750 ${user} ${group} - -" |
||||||
|
"d ${cfg.dataDir}/storage 0700 ${user} ${group} - -" |
||||||
|
"d ${cfg.dataDir}/storage/app 0700 ${user} ${group} - -" |
||||||
|
"d ${cfg.dataDir}/storage/fonts 0700 ${user} ${group} - -" |
||||||
|
"d ${cfg.dataDir}/storage/framework 0700 ${user} ${group} - -" |
||||||
|
"d ${cfg.dataDir}/storage/framework/cache 0700 ${user} ${group} - -" |
||||||
|
"d ${cfg.dataDir}/storage/framework/sessions 0700 ${user} ${group} - -" |
||||||
|
"d ${cfg.dataDir}/storage/framework/views 0700 ${user} ${group} - -" |
||||||
|
"d ${cfg.dataDir}/storage/logs 0700 ${user} ${group} - -" |
||||||
|
"d ${cfg.dataDir}/storage/uploads 0700 ${user} ${group} - -" |
||||||
|
]; |
||||||
|
|
||||||
|
users = { |
||||||
|
users = mkIf (user == "snipeit") { |
||||||
|
snipeit = { |
||||||
|
inherit group; |
||||||
|
isSystemUser = true; |
||||||
|
}; |
||||||
|
"${config.services.nginx.user}".extraGroups = [ group ]; |
||||||
|
}; |
||||||
|
groups = mkIf (group == "snipeit") { |
||||||
|
snipeit = {}; |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
}; |
||||||
|
|
||||||
|
meta.maintainers = with maintainers; [ yayayayaka ]; |
||||||
|
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,56 @@ |
|||||||
|
{ lib |
||||||
|
, mkDerivation |
||||||
|
, fetchFromGitLab |
||||||
|
, cmake |
||||||
|
, extra-cmake-modules |
||||||
|
, applet-window-buttons |
||||||
|
, karchive |
||||||
|
, kcoreaddons |
||||||
|
, ki18n |
||||||
|
, kio |
||||||
|
, kirigami2 |
||||||
|
, mauikit |
||||||
|
, mauikit-filebrowsing |
||||||
|
, mauikit-texteditor |
||||||
|
, qtmultimedia |
||||||
|
, qtquickcontrols2 |
||||||
|
}: |
||||||
|
|
||||||
|
mkDerivation rec { |
||||||
|
pname = "nota"; |
||||||
|
version = "2.1.1"; |
||||||
|
|
||||||
|
src = fetchFromGitLab { |
||||||
|
domain = "invent.kde.org"; |
||||||
|
owner = "maui"; |
||||||
|
repo = "nota"; |
||||||
|
rev = "v${version}"; |
||||||
|
sha256 = "sha256-Sgpm5njhQDe9ohAVFcN5iPNC6v9+QZnGRPYxuLvUno8="; |
||||||
|
}; |
||||||
|
|
||||||
|
nativeBuildInputs = [ |
||||||
|
cmake |
||||||
|
extra-cmake-modules |
||||||
|
]; |
||||||
|
|
||||||
|
buildInputs = [ |
||||||
|
applet-window-buttons |
||||||
|
karchive |
||||||
|
kcoreaddons |
||||||
|
ki18n |
||||||
|
kio |
||||||
|
kirigami2 |
||||||
|
mauikit |
||||||
|
mauikit-filebrowsing |
||||||
|
mauikit-texteditor |
||||||
|
qtmultimedia |
||||||
|
qtquickcontrols2 |
||||||
|
]; |
||||||
|
|
||||||
|
meta = with lib; { |
||||||
|
description = "Multi-platform text editor"; |
||||||
|
homepage = "https://invent.kde.org/maui/nota"; |
||||||
|
license = licenses.gpl3Plus; |
||||||
|
maintainers = with maintainers; [ onny ]; |
||||||
|
}; |
||||||
|
} |
@ -1,59 +0,0 @@ |
|||||||
{ lib, fetchFromGitHub, fetchurl, python2Packages, curl }: |
|
||||||
|
|
||||||
let |
|
||||||
getmodel = name: sha256: { |
|
||||||
inherit name; |
|
||||||
src = fetchurl { |
|
||||||
url = "http://www.tmbdev.net/ocropy/${name}"; |
|
||||||
inherit sha256; |
|
||||||
}; |
|
||||||
}; |
|
||||||
|
|
||||||
models = [ |
|
||||||
(getmodel "en-default.pyrnn.gz" |
|
||||||
"1xyi3k3p81mfw0491gb1haisazfyi2i18f1wjs1m34ak39qfqjdp") |
|
||||||
(getmodel "fraktur.pyrnn.gz" |
|
||||||
"1wlwvxn91ilgmlri1hj81arl3mbzxc24ycdnkf5icq4hdi4c6y8b") |
|
||||||
]; |
|
||||||
|
|
||||||
in |
|
||||||
python2Packages.buildPythonApplication rec { |
|
||||||
pname = "ocropus"; |
|
||||||
version = "1.3.3"; |
|
||||||
|
|
||||||
src = fetchFromGitHub { |
|
||||||
sha256 = "02p1334mic5cfhvpfphfrbim4036yfd8s2zzpwm0xmm829z71nr7"; |
|
||||||
rev = "v${version}"; |
|
||||||
repo = "ocropy"; |
|
||||||
owner = "tmbdev"; |
|
||||||
}; |
|
||||||
|
|
||||||
propagatedBuildInputs = with python2Packages; [ curl numpy scipy pillow |
|
||||||
matplotlib beautifulsoup4 pygtk lxml ]; |
|
||||||
|
|
||||||
enableParallelBuilding = true; |
|
||||||
|
|
||||||
preConfigure = with lib; '' |
|
||||||
${concatStrings (map (x: "cp -R ${x.src} models/`basename ${x.name}`;") |
|
||||||
models)} |
|
||||||
|
|
||||||
substituteInPlace ocrolib/common.py --replace /usr/local $out |
|
||||||
substituteInPlace ocrolib/default.py --replace /usr/local $out |
|
||||||
''; |
|
||||||
|
|
||||||
doCheck = false; # fails |
|
||||||
checkPhase = '' |
|
||||||
patchShebangs . |
|
||||||
substituteInPlace ./run-test \ |
|
||||||
--replace 'ocropus-rpred' 'ocropus-rpred -Q $NIX_BUILD_CORES' |
|
||||||
PATH=".:$PATH" ./run-test |
|
||||||
''; |
|
||||||
|
|
||||||
meta = with lib; { |
|
||||||
description = "Open source document analysis and OCR system"; |
|
||||||
license = licenses.asl20; |
|
||||||
homepage = "https://github.com/tmbdev/ocropy/"; |
|
||||||
maintainers = with maintainers; [ domenkozar ]; |
|
||||||
platforms = platforms.linux; |
|
||||||
}; |
|
||||||
} |
|
@ -0,0 +1,38 @@ |
|||||||
|
{ lib, fetchurl, appimageTools }: |
||||||
|
|
||||||
|
let |
||||||
|
pname = "raven-reader"; |
||||||
|
version = "1.0.72"; |
||||||
|
src = fetchurl { |
||||||
|
url = "https://github.com/hello-efficiency-inc/raven-reader/releases/download/v${version}/Raven-Reader-${version}.AppImage"; |
||||||
|
sha256 = "sha256-Sx02VMAgmncT9f5Hvs0LugzhD6Z8cWXHx4kn8IG9seU="; |
||||||
|
}; |
||||||
|
appimageContents = appimageTools.extractType2 { inherit pname version src; }; |
||||||
|
|
||||||
|
in |
||||||
|
appimageTools.wrapType2 { |
||||||
|
inherit pname version src; |
||||||
|
|
||||||
|
extraInstallCommands = '' |
||||||
|
mv $out/bin/${pname}-${version} $out/bin/${pname} |
||||||
|
|
||||||
|
mkdir -p $out/share/${pname} |
||||||
|
cp -a ${appimageContents}/locales $out/share/${pname} |
||||||
|
cp -a ${appimageContents}/resources $out/share/${pname} |
||||||
|
|
||||||
|
install -m 444 -D ${appimageContents}/raven-reader.desktop -t $out/share/applications |
||||||
|
|
||||||
|
cp -a ${appimageContents}/usr/share/icons $out/share/ |
||||||
|
|
||||||
|
substituteInPlace $out/share/applications/raven-reader.desktop \ |
||||||
|
--replace 'Exec=AppRun' 'Exec=raven-reader' |
||||||
|
''; |
||||||
|
|
||||||
|
meta = with lib; { |
||||||
|
description = "Open source desktop news reader with flexible settings to optimize your experience"; |
||||||
|
homepage = "https://ravenreader.app/"; |
||||||
|
license = licenses.mit; |
||||||
|
maintainers = with maintainers; [ wolfangaukang ]; |
||||||
|
platforms = [ "x86_64-linux" ]; |
||||||
|
}; |
||||||
|
} |
@ -0,0 +1,58 @@ |
|||||||
|
{ lib |
||||||
|
, mkDerivation |
||||||
|
, fetchFromGitLab |
||||||
|
, cmake |
||||||
|
, extra-cmake-modules |
||||||
|
, applet-window-buttons |
||||||
|
, karchive |
||||||
|
, kcoreaddons |
||||||
|
, ki18n |
||||||
|
, kio |
||||||
|
, kirigami2 |
||||||
|
, mauikit |
||||||
|
, mauikit-filebrowsing |
||||||
|
, qtmultimedia |
||||||
|
, qtquickcontrols2 |
||||||
|
, taglib |
||||||
|
, ffmpeg |
||||||
|
}: |
||||||
|
|
||||||
|
mkDerivation rec { |
||||||
|
pname = "clip"; |
||||||
|
version = "2.1.1"; |
||||||
|
|
||||||
|
src = fetchFromGitLab { |
||||||
|
domain = "invent.kde.org"; |
||||||
|
owner = "maui"; |
||||||
|
repo = "clip"; |
||||||
|
rev = "v${version}"; |
||||||
|
sha256 = "sha256-vW3A0PKJSC2QNs+QVZ9w0g4aVmcndhahrpkd4wWoUko="; |
||||||
|
}; |
||||||
|
|
||||||
|
nativeBuildInputs = [ |
||||||
|
cmake |
||||||
|
extra-cmake-modules |
||||||
|
]; |
||||||
|
|
||||||
|
buildInputs = [ |
||||||
|
applet-window-buttons |
||||||
|
karchive |
||||||
|
kcoreaddons |
||||||
|
ki18n |
||||||
|
kio |
||||||
|
kirigami2 |
||||||
|
mauikit |
||||||
|
mauikit-filebrowsing |
||||||
|
qtmultimedia |
||||||
|
qtquickcontrols2 |
||||||
|
taglib |
||||||
|
ffmpeg |
||||||
|
]; |
||||||
|
|
||||||
|
meta = with lib; { |
||||||
|
description = "Video player and video collection manager"; |
||||||
|
homepage = "https://invent.kde.org/maui/clip"; |
||||||
|
license = licenses.gpl3Plus; |
||||||
|
maintainers = with maintainers; [ onny ]; |
||||||
|
}; |
||||||
|
} |
@ -0,0 +1,59 @@ |
|||||||
|
{ lib |
||||||
|
, mkDerivation |
||||||
|
, fetchFromGitLab |
||||||
|
, cmake |
||||||
|
, extra-cmake-modules |
||||||
|
, applet-window-buttons |
||||||
|
, karchive |
||||||
|
, kcoreaddons |
||||||
|
, ki18n |
||||||
|
, kio |
||||||
|
, kirigami2 |
||||||
|
, mauikit |
||||||
|
, mauikit-accounts |
||||||
|
, mauikit-filebrowsing |
||||||
|
, qtmultimedia |
||||||
|
, qtquickcontrols2 |
||||||
|
, taglib |
||||||
|
}: |
||||||
|
|
||||||
|
mkDerivation rec { |
||||||
|
pname = "vvave"; |
||||||
|
version = "2.1.1"; |
||||||
|
|
||||||
|
src = fetchFromGitLab { |
||||||
|
domain = "invent.kde.org"; |
||||||
|
owner = "maui"; |
||||||
|
repo = "vvave"; |
||||||
|
rev = "v${version}"; |
||||||
|
sha256 = "sha256-ykX1kd3106KTDTJQIGk6miSgbj+oROiXQl/nkCjTphE="; |
||||||
|
}; |
||||||
|
|
||||||
|
nativeBuildInputs = [ |
||||||
|
cmake |
||||||
|
extra-cmake-modules |
||||||
|
]; |
||||||
|
|
||||||
|
buildInputs = [ |
||||||
|
applet-window-buttons |
||||||
|
karchive |
||||||
|
kcoreaddons |
||||||
|
ki18n |
||||||
|
kio |
||||||
|
kirigami2 |
||||||
|
mauikit |
||||||
|
mauikit-accounts |
||||||
|
mauikit-filebrowsing |
||||||
|
qtmultimedia |
||||||
|
qtquickcontrols2 |
||||||
|
taglib |
||||||
|
]; |
||||||
|
|
||||||
|
meta = with lib; { |
||||||
|
description = "Multi-platform media player"; |
||||||
|
homepage = "https://invent.kde.org/maui/vvave"; |
||||||
|
license = licenses.gpl3Plus; |
||||||
|
maintainers = with maintainers; [ onny ]; |
||||||
|
}; |
||||||
|
} |
||||||
|
|
@ -0,0 +1,306 @@ |
|||||||
|
From 86f2f767ddffd9f7c6f1470b987ae7b0d251b988 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Liu Hao <lh_mouse@126.com>
|
||||||
|
Date: Wed, 25 Apr 2018 21:54:19 +0800
|
||||||
|
Subject: [PATCH] Added 'mcf' thread model support from mcfgthread.
|
||||||
|
|
||||||
|
Signed-off-by: Liu Hao <lh_mouse@126.com>
|
||||||
|
---
|
||||||
|
config/gthr.m4 | 1 +
|
||||||
|
gcc/config.gcc | 3 +++
|
||||||
|
gcc/config/i386/mingw-mcfgthread.h | 1 +
|
||||||
|
gcc/config/i386/mingw-w64.h | 2 +-
|
||||||
|
gcc/config/i386/mingw32.h | 11 ++++++++++-
|
||||||
|
gcc/configure | 2 +-
|
||||||
|
gcc/configure.ac | 2 +-
|
||||||
|
libatomic/configure.tgt | 2 +-
|
||||||
|
libgcc/config.host | 6 ++++++
|
||||||
|
libgcc/config/i386/gthr-mcf.h | 1 +
|
||||||
|
libgcc/config/i386/t-mingw-mcfgthread | 2 ++
|
||||||
|
libgcc/configure | 1 +
|
||||||
|
libstdc++-v3/configure | 1 +
|
||||||
|
libstdc++-v3/libsupc++/atexit_thread.cc | 18 ++++++++++++++++++
|
||||||
|
libstdc++-v3/libsupc++/guard.cc | 23 +++++++++++++++++++++++
|
||||||
|
libstdc++-v3/src/c++11/thread.cc | 9 +++++++++
|
||||||
|
16 files changed, 80 insertions(+), 5 deletions(-)
|
||||||
|
create mode 100644 gcc/config/i386/mingw-mcfgthread.h
|
||||||
|
create mode 100644 libgcc/config/i386/gthr-mcf.h
|
||||||
|
create mode 100644 libgcc/config/i386/t-mingw-mcfgthread
|
||||||
|
|
||||||
|
diff --git a/config/gthr.m4 b/config/gthr.m4
|
||||||
|
index 7b29f1f3327..82e21fe1709 100644
|
||||||
|
--- a/config/gthr.m4
|
||||||
|
+++ b/config/gthr.m4
|
||||||
|
@@ -21,6 +21,7 @@ case $1 in
|
||||||
|
tpf) thread_header=config/s390/gthr-tpf.h ;;
|
||||||
|
vxworks) thread_header=config/gthr-vxworks.h ;;
|
||||||
|
win32) thread_header=config/i386/gthr-win32.h ;;
|
||||||
|
+ mcf) thread_header=config/i386/gthr-mcf.h ;;
|
||||||
|
esac
|
||||||
|
AC_SUBST(thread_header)
|
||||||
|
])
|
||||||
|
diff --git a/gcc/config.gcc b/gcc/config.gcc
|
||||||
|
index 46a9029acec..112c24e95a3 100644
|
||||||
|
--- a/gcc/config.gcc
|
||||||
|
+++ b/gcc/config.gcc
|
||||||
|
@@ -1758,6 +1758,9 @@ i[34567]86-*-mingw* | x86_64-*-mingw*)
|
||||||
|
if test x$enable_threads = xposix ; then
|
||||||
|
tm_file="${tm_file} i386/mingw-pthread.h"
|
||||||
|
fi
|
||||||
|
+ if test x$enable_threads = xmcf ; then
|
||||||
|
+ tm_file="${tm_file} i386/mingw-mcfgthread.h"
|
||||||
|
+ fi
|
||||||
|
tm_file="${tm_file} i386/mingw32.h"
|
||||||
|
# This makes the logic if mingw's or the w64 feature set has to be used
|
||||||
|
case ${target} in
|
||||||
|
diff --git a/gcc/config/i386/mingw-mcfgthread.h b/gcc/config/i386/mingw-mcfgthread.h
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000000..ec381a7798f
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gcc/config/i386/mingw-mcfgthread.h
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+#define TARGET_USE_MCFGTHREAD 1
|
||||||
|
diff --git a/gcc/config/i386/mingw-w64.h b/gcc/config/i386/mingw-w64.h
|
||||||
|
index 484dc7a9e9f..a15bbeea500 100644
|
||||||
|
--- a/gcc/config/i386/mingw-w64.h
|
||||||
|
+++ b/gcc/config/i386/mingw-w64.h
|
||||||
|
@@ -48,7 +48,7 @@ along with GCC; see the file COPYING3. If not see
|
||||||
|
"%{mwindows:-lgdi32 -lcomdlg32} " \
|
||||||
|
"%{fvtable-verify=preinit:-lvtv -lpsapi; \
|
||||||
|
fvtable-verify=std:-lvtv -lpsapi} " \
|
||||||
|
- "-ladvapi32 -lshell32 -luser32 -lkernel32"
|
||||||
|
+ LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32"
|
||||||
|
|
||||||
|
#undef SPEC_32
|
||||||
|
#undef SPEC_64
|
||||||
|
diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h
|
||||||
|
index 0612b87199a..76cea94f3b7 100644
|
||||||
|
--- a/gcc/config/i386/mingw32.h
|
||||||
|
+++ b/gcc/config/i386/mingw32.h
|
||||||
|
@@ -32,6 +32,14 @@ along with GCC; see the file COPYING3. If not see
|
||||||
|
| MASK_STACK_PROBE | MASK_ALIGN_DOUBLE \
|
||||||
|
| MASK_MS_BITFIELD_LAYOUT)
|
||||||
|
|
||||||
|
+#ifndef TARGET_USE_MCFGTHREAD
|
||||||
|
+#define CPP_MCFGTHREAD() ((void)0)
|
||||||
|
+#define LIB_MCFGTHREAD ""
|
||||||
|
+#else
|
||||||
|
+#define CPP_MCFGTHREAD() (builtin_define("__USING_MCFGTHREAD__"))
|
||||||
|
+#define LIB_MCFGTHREAD " -lmcfgthread "
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/* See i386/crtdll.h for an alternative definition. _INTEGRAL_MAX_BITS
|
||||||
|
is for compatibility with native compiler. */
|
||||||
|
#define EXTRA_OS_CPP_BUILTINS() \
|
||||||
|
@@ -50,6 +58,7 @@ along with GCC; see the file COPYING3. If not see
|
||||||
|
builtin_define_std ("WIN64"); \
|
||||||
|
builtin_define ("_WIN64"); \
|
||||||
|
} \
|
||||||
|
+ CPP_MCFGTHREAD(); \
|
||||||
|
} \
|
||||||
|
while (0)
|
||||||
|
|
||||||
|
@@ -93,7 +102,7 @@ along with GCC; see the file COPYING3. If not see
|
||||||
|
"%{mwindows:-lgdi32 -lcomdlg32} " \
|
||||||
|
"%{fvtable-verify=preinit:-lvtv -lpsapi; \
|
||||||
|
fvtable-verify=std:-lvtv -lpsapi} " \
|
||||||
|
- "-ladvapi32 -lshell32 -luser32 -lkernel32"
|
||||||
|
+ LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32"
|
||||||
|
|
||||||
|
/* Weak symbols do not get resolved if using a Windows dll import lib.
|
||||||
|
Make the unwind registration references strong undefs. */
|
||||||
|
diff --git a/gcc/configure b/gcc/configure
|
||||||
|
index 6121e163259..52f0e00efe6 100755
|
||||||
|
--- a/gcc/configure
|
||||||
|
+++ b/gcc/configure
|
||||||
|
@@ -11693,7 +11693,7 @@ case ${enable_threads} in
|
||||||
|
target_thread_file='single'
|
||||||
|
;;
|
||||||
|
aix | dce | lynx | mipssde | posix | rtems | \
|
||||||
|
- single | tpf | vxworks | win32)
|
||||||
|
+ single | tpf | vxworks | win32 | mcf)
|
||||||
|
target_thread_file=${enable_threads}
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
diff --git a/gcc/configure.ac b/gcc/configure.ac
|
||||||
|
index b066cc609e1..4ecdba88de7 100644
|
||||||
|
--- a/gcc/configure.ac
|
||||||
|
+++ b/gcc/configure.ac
|
||||||
|
@@ -1612,7 +1612,7 @@ case ${enable_threads} in
|
||||||
|
target_thread_file='single'
|
||||||
|
;;
|
||||||
|
aix | dce | lynx | mipssde | posix | rtems | \
|
||||||
|
- single | tpf | vxworks | win32)
|
||||||
|
+ single | tpf | vxworks | win32 | mcf)
|
||||||
|
target_thread_file=${enable_threads}
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt
|
||||||
|
index ea8c34f8c71..23134ad7363 100644
|
||||||
|
--- a/libatomic/configure.tgt
|
||||||
|
+++ b/libatomic/configure.tgt
|
||||||
|
@@ -145,7 +145,7 @@ case "${target}" in
|
||||||
|
*-*-mingw*)
|
||||||
|
# OS support for atomic primitives.
|
||||||
|
case ${target_thread_file} in
|
||||||
|
- win32)
|
||||||
|
+ win32 | mcf)
|
||||||
|
config_path="${config_path} mingw"
|
||||||
|
;;
|
||||||
|
posix)
|
||||||
|
diff --git a/libgcc/config.host b/libgcc/config.host
|
||||||
|
index 11b4acaff55..9fbd38650bd 100644
|
||||||
|
--- a/libgcc/config.host
|
||||||
|
+++ b/libgcc/config.host
|
||||||
|
@@ -737,6 +737,9 @@ i[34567]86-*-mingw*)
|
||||||
|
posix)
|
||||||
|
tmake_file="i386/t-mingw-pthread $tmake_file"
|
||||||
|
;;
|
||||||
|
+ mcf)
|
||||||
|
+ tmake_file="i386/t-mingw-mcfgthread $tmake_file"
|
||||||
|
+ ;;
|
||||||
|
esac
|
||||||
|
# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
|
||||||
|
if test x$ac_cv_sjlj_exceptions = xyes; then
|
||||||
|
@@ -761,6 +764,9 @@ x86_64-*-mingw*)
|
||||||
|
posix)
|
||||||
|
tmake_file="i386/t-mingw-pthread $tmake_file"
|
||||||
|
;;
|
||||||
|
+ mcf)
|
||||||
|
+ tmake_file="i386/t-mingw-mcfgthread $tmake_file"
|
||||||
|
+ ;;
|
||||||
|
esac
|
||||||
|
# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
|
||||||
|
if test x$ac_cv_sjlj_exceptions = xyes; then
|
||||||
|
diff --git a/libgcc/config/i386/gthr-mcf.h b/libgcc/config/i386/gthr-mcf.h
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000000..5ea2908361f
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/libgcc/config/i386/gthr-mcf.h
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+#include <mcfgthread/gthread.h>
|
||||||
|
diff --git a/libgcc/config/i386/t-mingw-mcfgthread b/libgcc/config/i386/t-mingw-mcfgthread
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000000..4b9b10e32d6
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/libgcc/config/i386/t-mingw-mcfgthread
|
||||||
|
@@ -0,0 +1,2 @@
|
||||||
|
+SHLIB_PTHREAD_CFLAG =
|
||||||
|
+SHLIB_PTHREAD_LDFLAG = -lmcfgthread
|
||||||
|
diff --git a/libgcc/configure b/libgcc/configure
|
||||||
|
index b2f3f870844..eff889dc3b3 100644
|
||||||
|
--- a/libgcc/configure
|
||||||
|
+++ b/libgcc/configure
|
||||||
|
@@ -5451,6 +5451,7 @@ case $target_thread_file in
|
||||||
|
tpf) thread_header=config/s390/gthr-tpf.h ;;
|
||||||
|
vxworks) thread_header=config/gthr-vxworks.h ;;
|
||||||
|
win32) thread_header=config/i386/gthr-win32.h ;;
|
||||||
|
+ mcf) thread_header=config/i386/gthr-mcf.h ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
|
||||||
|
index ba094be6f15..979a5ab9ace 100755
|
||||||
|
--- a/libstdc++-v3/configure
|
||||||
|
+++ b/libstdc++-v3/configure
|
||||||
|
@@ -15187,6 +15187,7 @@ case $target_thread_file in
|
||||||
|
tpf) thread_header=config/s390/gthr-tpf.h ;;
|
||||||
|
vxworks) thread_header=config/gthr-vxworks.h ;;
|
||||||
|
win32) thread_header=config/i386/gthr-win32.h ;;
|
||||||
|
+ mcf) thread_header=config/i386/gthr-mcf.h ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/libstdc++-v3/libsupc++/atexit_thread.cc b/libstdc++-v3/libsupc++/atexit_thread.cc
|
||||||
|
index de920d714c6..665fb74bd6b 100644
|
||||||
|
--- a/libstdc++-v3/libsupc++/atexit_thread.cc
|
||||||
|
+++ b/libstdc++-v3/libsupc++/atexit_thread.cc
|
||||||
|
@@ -25,6 +25,22 @@
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <new>
|
||||||
|
#include "bits/gthr.h"
|
||||||
|
+
|
||||||
|
+#ifdef __USING_MCFGTHREAD__
|
||||||
|
+
|
||||||
|
+#include <mcfgthread/gthread.h>
|
||||||
|
+namespace __cxxabiv1 {
|
||||||
|
+extern "C" int
|
||||||
|
+__cxa_thread_atexit (void (_GLIBCXX_CDTOR_CALLABI *dtor)(void *),
|
||||||
|
+ void *obj, void *dso_handle)
|
||||||
|
+ _GLIBCXX_NOTHROW
|
||||||
|
+{
|
||||||
|
+ return ::_MCFCRT_AtThreadExit((void (*)(_MCFCRT_STD intptr_t))dtor, (_MCFCRT_STD intptr_t)obj) ? 0 : -1;
|
||||||
|
+ (void)dso_handle;
|
||||||
|
+}
|
||||||
|
+}
|
||||||
|
+#else // __USING_MCFGTHREAD__
|
||||||
|
+
|
||||||
|
#ifdef _GLIBCXX_THREAD_ATEXIT_WIN32
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#include <windows.h>
|
||||||
|
@@ -167,3 +183,5 @@ __cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), void *obj, void */*dso_ha
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
|
||||||
|
+
|
||||||
|
+#endif // __USING_MCFGTHREAD__
|
||||||
|
diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc
|
||||||
|
index 3a2ec3ad0d6..8b4cc96199b 100644
|
||||||
|
--- a/libstdc++-v3/libsupc++/guard.cc
|
||||||
|
+++ b/libstdc++-v3/libsupc++/guard.cc
|
||||||
|
@@ -28,6 +28,27 @@
|
||||||
|
#include <cxxabi.h>
|
||||||
|
#include <exception>
|
||||||
|
#include <new>
|
||||||
|
+
|
||||||
|
+#ifdef __USING_MCFGTHREAD__
|
||||||
|
+
|
||||||
|
+#include <mcfgthread/gthread.h>
|
||||||
|
+
|
||||||
|
+namespace __cxxabiv1 {
|
||||||
|
+
|
||||||
|
+extern "C" int __cxa_guard_acquire(__guard *g){
|
||||||
|
+ return ::_MCFCRT_WaitForOnceFlagForever((::_MCFCRT_OnceFlag *)g) == ::_MCFCRT_kOnceResultInitial;
|
||||||
|
+}
|
||||||
|
+extern "C" void __cxa_guard_abort(__guard *g) throw() {
|
||||||
|
+ ::_MCFCRT_SignalOnceFlagAsAborted((::_MCFCRT_OnceFlag *)g);
|
||||||
|
+}
|
||||||
|
+extern "C" void __cxa_guard_release(__guard *g) throw() {
|
||||||
|
+ ::_MCFCRT_SignalOnceFlagAsFinished((::_MCFCRT_OnceFlag *)g);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#else // __USING_MCFGTHREAD__
|
||||||
|
+
|
||||||
|
#include <ext/atomicity.h>
|
||||||
|
#include <ext/concurrence.h>
|
||||||
|
#include <bits/atomic_lockfree_defines.h>
|
||||||
|
@@ -425,3 +446,5 @@ namespace __cxxabiv1
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+#endif
|
||||||
|
diff --git a/libstdc++-v3/src/c++11/thread.cc b/libstdc++-v3/src/c++11/thread.cc
|
||||||
|
index 8238817c2e9..0c6a1f85f6f 100644
|
||||||
|
--- a/libstdc++-v3/src/c++11/thread.cc
|
||||||
|
+++ b/libstdc++-v3/src/c++11/thread.cc
|
||||||
|
@@ -55,6 +55,15 @@ static inline int get_nprocs()
|
||||||
|
#elif defined(_GLIBCXX_USE_SC_NPROC_ONLN)
|
||||||
|
# include <unistd.h>
|
||||||
|
# define _GLIBCXX_NPROCS sysconf(_SC_NPROC_ONLN)
|
||||||
|
+#elif defined(_WIN32)
|
||||||
|
+# include <windows.h>
|
||||||
|
+static inline int get_nprocs()
|
||||||
|
+{
|
||||||
|
+ SYSTEM_INFO sysinfo;
|
||||||
|
+ GetSystemInfo(&sysinfo);
|
||||||
|
+ return (int)sysinfo.dwNumberOfProcessors;
|
||||||
|
+}
|
||||||
|
+# define _GLIBCXX_NPROCS get_nprocs()
|
||||||
|
#else
|
||||||
|
# define _GLIBCXX_NPROCS 0
|
||||||
|
#endif
|
||||||
|
--
|
||||||
|
2.17.0
|
||||||
|
|
@ -0,0 +1,294 @@ |
|||||||
|
{ lib, stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs |
||||||
|
, langC ? true, langCC ? true, langFortran ? false |
||||||
|
, langAda ? false |
||||||
|
, langObjC ? stdenv.targetPlatform.isDarwin |
||||||
|
, langObjCpp ? stdenv.targetPlatform.isDarwin |
||||||
|
, langGo ? false |
||||||
|
, reproducibleBuild ? true |
||||||
|
, profiledCompiler ? false |
||||||
|
, langJit ? false |
||||||
|
, staticCompiler ? false |
||||||
|
, enableShared ? !stdenv.targetPlatform.isStatic |
||||||
|
, enableLTO ? !stdenv.hostPlatform.isStatic |
||||||
|
, texinfo ? null |
||||||
|
, perl ? null # optional, for texi2pod (then pod2man) |
||||||
|
, gmp, mpfr, libmpc, gettext, which, patchelf |
||||||
|
, libelf # optional, for link-time optimizations (LTO) |
||||||
|
, isl ? null # optional, for the Graphite optimization framework. |
||||||
|
, zlib ? null |
||||||
|
, gnatboot ? null |
||||||
|
, enableMultilib ? false |
||||||
|
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins |
||||||
|
, name ? "gcc" |
||||||
|
, libcCross ? null |
||||||
|
, threadsCross ? null # for MinGW |
||||||
|
, crossStageStatic ? false |
||||||
|
, # Strip kills static libs of other archs (hence no cross) |
||||||
|
stripped ? stdenv.hostPlatform.system == stdenv.buildPlatform.system |
||||||
|
&& stdenv.targetPlatform.system == stdenv.hostPlatform.system |
||||||
|
, gnused ? null |
||||||
|
, cloog # unused; just for compat with gcc4, as we override the parameter on some places |
||||||
|
, buildPackages |
||||||
|
}: |
||||||
|
|
||||||
|
# LTO needs libelf and zlib. |
||||||
|
assert libelf != null -> zlib != null; |
||||||
|
|
||||||
|
# Make sure we get GNU sed. |
||||||
|
assert stdenv.hostPlatform.isDarwin -> gnused != null; |
||||||
|
|
||||||
|
# The go frontend is written in c++ |
||||||
|
assert langGo -> langCC; |
||||||
|
assert langAda -> gnatboot != null; |
||||||
|
|
||||||
|
# threadsCross is just for MinGW |
||||||
|
assert threadsCross != null -> stdenv.targetPlatform.isWindows; |
||||||
|
|
||||||
|
# profiledCompiler builds inject non-determinism in one of the compilation stages. |
||||||
|
# If turned on, we can't provide reproducible builds anymore |
||||||
|
assert reproducibleBuild -> profiledCompiler == false; |
||||||
|
|
||||||
|
with lib; |
||||||
|
with builtins; |
||||||
|
|
||||||
|
let majorVersion = "12"; |
||||||
|
version = "${majorVersion}.1.0"; |
||||||
|
|
||||||
|
inherit (stdenv) buildPlatform hostPlatform targetPlatform; |
||||||
|
|
||||||
|
patches = |
||||||
|
optional (targetPlatform != hostPlatform) ../libstdc++-target.patch |
||||||
|
++ optional noSysDirs ../gcc-12-no-sys-dirs.patch |
||||||
|
++ optional noSysDirs ../no-sys-dirs-riscv.patch |
||||||
|
++ [ |
||||||
|
../gnat-cflags-11.patch |
||||||
|
../gcc-12-gfortran-driving.patch |
||||||
|
../ppc-musl.patch |
||||||
|
] ++ optional (stdenv.isDarwin && stdenv.isAarch64) (fetchpatch { |
||||||
|
url = "https://github.com/fxcoudert/gcc/compare/releases/gcc-11.1.0...gcc-11.1.0-arm-20210504.diff"; |
||||||
|
sha256 = "sha256-JqCGJAfbOxSmkNyq49aFHteK/RFsCSLQrL9mzUCnaD0="; |
||||||
|
}) |
||||||
|
|
||||||
|
# Obtain latest patch with ../update-mcfgthread-patches.sh |
||||||
|
++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch; |
||||||
|
|
||||||
|
/* Cross-gcc settings (build == host != target) */ |
||||||
|
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; |
||||||
|
stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; |
||||||
|
crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; |
||||||
|
|
||||||
|
in |
||||||
|
|
||||||
|
stdenv.mkDerivation ({ |
||||||
|
pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}"; |
||||||
|
inherit version; |
||||||
|
|
||||||
|
builder = ../builder.sh; |
||||||
|
|
||||||
|
src = fetchurl { |
||||||
|
url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz"; |
||||||
|
sha256 = "sha256-Yv1jSInzHAK2SvLEaPBktHrRynhBHEWr5qxLX43RnHs="; |
||||||
|
}; |
||||||
|
|
||||||
|
inherit patches; |
||||||
|
|
||||||
|
outputs = [ "out" "man" "info" ] ++ lib.optional (!langJit) "lib"; |
||||||
|
setOutputFlags = false; |
||||||
|
NIX_NO_SELF_RPATH = true; |
||||||
|
|
||||||
|
libc_dev = stdenv.cc.libc_dev; |
||||||
|
|
||||||
|
hardeningDisable = [ "format" "pie" ]; |
||||||
|
|
||||||
|
postPatch = '' |
||||||
|
configureScripts=$(find . -name configure) |
||||||
|
for configureScript in $configureScripts; do |
||||||
|
patchShebangs $configureScript |
||||||
|
done |
||||||
|
'' |
||||||
|
# This should kill all the stdinc frameworks that gcc and friends like to |
||||||
|
# insert into default search paths. |
||||||
|
+ lib.optionalString hostPlatform.isDarwin '' |
||||||
|
substituteInPlace gcc/config/darwin-c.c \ |
||||||
|
--replace 'if (stdinc)' 'if (0)' |
||||||
|
|
||||||
|
substituteInPlace libgcc/config/t-slibgcc-darwin \ |
||||||
|
--replace "-install_name @shlib_slibdir@/\$(SHLIB_INSTALL_NAME)" "-install_name ''${!outputLib}/lib/\$(SHLIB_INSTALL_NAME)" |
||||||
|
|
||||||
|
substituteInPlace libgfortran/configure \ |
||||||
|
--replace "-install_name \\\$rpath/\\\$soname" "-install_name ''${!outputLib}/lib/\\\$soname" |
||||||
|
'' |
||||||
|
+ ( |
||||||
|
if targetPlatform != hostPlatform || stdenv.cc.libc != null then |
||||||
|
# On NixOS, use the right path to the dynamic linker instead of |
||||||
|
# `/lib/ld*.so'. |
||||||
|
let |
||||||
|
libc = if libcCross != null then libcCross else stdenv.cc.libc; |
||||||
|
in |
||||||
|
( |
||||||
|
'' echo "fixing the \`GLIBC_DYNAMIC_LINKER', \`UCLIBC_DYNAMIC_LINKER', and \`MUSL_DYNAMIC_LINKER' macros..." |
||||||
|
for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h |
||||||
|
do |
||||||
|
grep -q _DYNAMIC_LINKER "$header" || continue |
||||||
|
echo " fixing \`$header'..." |
||||||
|
sed -i "$header" \ |
||||||
|
-e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g' \ |
||||||
|
-e 's|define[[:blank:]]*MUSL_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define MUSL_DYNAMIC_LINKER\1 "${libc.out}\2"|g' |
||||||
|
done |
||||||
|
'' |
||||||
|
+ lib.optionalString (targetPlatform.libc == "musl") |
||||||
|
'' |
||||||
|
sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR' |
||||||
|
'' |
||||||
|
) |
||||||
|
else "") |
||||||
|
+ lib.optionalString targetPlatform.isAvr '' |
||||||
|
makeFlagsArray+=( |
||||||
|
'-s' # workaround for hitting hydra log limit |
||||||
|
'LIMITS_H_TEST=false' |
||||||
|
) |
||||||
|
''; |
||||||
|
|
||||||
|
inherit noSysDirs staticCompiler crossStageStatic |
||||||
|
libcCross crossMingw; |
||||||
|
|
||||||
|
depsBuildBuild = [ buildPackages.stdenv.cc ]; |
||||||
|
nativeBuildInputs = [ texinfo which gettext ] |
||||||
|
++ (optional (perl != null) perl) |
||||||
|
++ (optional langAda gnatboot) |
||||||
|
; |
||||||
|
|
||||||
|
# For building runtime libs |
||||||
|
depsBuildTarget = |
||||||
|
( |
||||||
|
if hostPlatform == buildPlatform then [ |
||||||
|
targetPackages.stdenv.cc.bintools # newly-built gcc will be used |
||||||
|
] else assert targetPlatform == hostPlatform; [ # build != host == target |
||||||
|
stdenv.cc |
||||||
|
] |
||||||
|
) |
||||||
|
++ optional targetPlatform.isLinux patchelf; |
||||||
|
|
||||||
|
buildInputs = [ |
||||||
|
gmp mpfr libmpc libelf |
||||||
|
targetPackages.stdenv.cc.bintools # For linking code at run-time |
||||||
|
] ++ (optional (isl != null) isl) |
||||||
|
++ (optional (zlib != null) zlib) |
||||||
|
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with |
||||||
|
# "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. |
||||||
|
++ (optional hostPlatform.isDarwin gnused) |
||||||
|
; |
||||||
|
|
||||||
|
depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross; |
||||||
|
|
||||||
|
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl"; |
||||||
|
|
||||||
|
preConfigure = import ../common/pre-configure.nix { |
||||||
|
inherit lib; |
||||||
|
inherit version targetPlatform hostPlatform gnatboot langAda langGo langJit; |
||||||
|
}; |
||||||
|
|
||||||
|
dontDisableStatic = true; |
||||||
|
|
||||||
|
configurePlatforms = [ "build" "host" "target" ]; |
||||||
|
|
||||||
|
configureFlags = import ../common/configure-flags.nix { |
||||||
|
inherit |
||||||
|
lib |
||||||
|
stdenv |
||||||
|
targetPackages |
||||||
|
crossStageStatic libcCross |
||||||
|
version |
||||||
|
|
||||||
|
gmp mpfr libmpc libelf isl |
||||||
|
|
||||||
|
enableLTO |
||||||
|
enableMultilib |
||||||
|
enablePlugin |
||||||
|
enableShared |
||||||
|
|
||||||
|
langC |
||||||
|
langCC |
||||||
|
langFortran |
||||||
|
langAda |
||||||
|
langGo |
||||||
|
langObjC |
||||||
|
langObjCpp |
||||||
|
langJit |
||||||
|
; |
||||||
|
}; |
||||||
|
|
||||||
|
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; |
||||||
|
|
||||||
|
buildFlags = optional |
||||||
|
(targetPlatform == hostPlatform && hostPlatform == buildPlatform) |
||||||
|
(if profiledCompiler then "profiledbootstrap" else "bootstrap"); |
||||||
|
|
||||||
|
dontStrip = !stripped; |
||||||
|
|
||||||
|
installTargets = optional stripped "install-strip"; |
||||||
|
|
||||||
|
# https://gcc.gnu.org/install/specific.html#x86-64-x-solaris210 |
||||||
|
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64"; |
||||||
|
|
||||||
|
# Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the |
||||||
|
# library headers and binaries, regarless of the language being compiled. |
||||||
|
# |
||||||
|
# Likewise, the LTO code doesn't find zlib. |
||||||
|
# |
||||||
|
# Cross-compiling, we need gcc not to read ./specs in order to build the g++ |
||||||
|
# compiler (after the specs for the cross-gcc are created). Having |
||||||
|
# LIBRARY_PATH= makes gcc read the specs from ., and the build breaks. |
||||||
|
|
||||||
|
CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([] |
||||||
|
++ optional (zlib != null) zlib |
||||||
|
)); |
||||||
|
|
||||||
|
LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath (optional (zlib != null) zlib)); |
||||||
|
|
||||||
|
inherit |
||||||
|
(import ../common/extra-target-flags.nix { |
||||||
|
inherit lib stdenv crossStageStatic libcCross threadsCross; |
||||||
|
}) |
||||||
|
EXTRA_FLAGS_FOR_TARGET |
||||||
|
EXTRA_LDFLAGS_FOR_TARGET |
||||||
|
; |
||||||
|
|
||||||
|
passthru = { |
||||||
|
inherit langC langCC langObjC langObjCpp langAda langFortran langGo version; |
||||||
|
isGNU = true; |
||||||
|
}; |
||||||
|
|
||||||
|
enableParallelBuilding = true; |
||||||
|
inherit enableShared enableMultilib; |
||||||
|
|
||||||
|
inherit (stdenv) is64bit; |
||||||
|
|
||||||
|
meta = { |
||||||
|
homepage = "https://gcc.gnu.org/"; |
||||||
|
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+ |
||||||
|
description = "GNU Compiler Collection, version ${version}" |
||||||
|
+ (if stripped then "" else " (with debugging info)"); |
||||||
|
|
||||||
|
longDescription = '' |
||||||
|
The GNU Compiler Collection includes compiler front ends for C, C++, |
||||||
|
Objective-C, Fortran, OpenMP for C/C++/Fortran, and Ada, as well as |
||||||
|
libraries for these languages (libstdc++, libgomp,...). |
||||||
|
|
||||||
|
GCC development is a part of the GNU Project, aiming to improve the |
||||||
|
compiler used in the GNU system including the GNU/Linux variant. |
||||||
|
''; |
||||||
|
|
||||||
|
maintainers = lib.teams.gcc.members; |
||||||
|
|
||||||
|
platforms = lib.platforms.unix; |
||||||
|
}; |
||||||
|
} |
||||||
|
|
||||||
|
// optionalAttrs (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt" && crossStageStatic) { |
||||||
|
makeFlags = [ "all-gcc" "all-target-libgcc" ]; |
||||||
|
installTargets = "install-gcc install-target-libgcc"; |
||||||
|
} |
||||||
|
|
||||||
|
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; } |
||||||
|
) |
@ -0,0 +1,20 @@ |
|||||||
|
This patch fixes interaction with Libtool.
|
||||||
|
See <http://thread.gmane.org/gmane.comp.gcc.patches/258777>, for details.
|
||||||
|
|
||||||
|
--- a/gcc/fortran/gfortranspec.cc
|
||||||
|
+++ b/gcc/fortran/gfortranspec.cc
|
||||||
|
@@ -461,8 +461,15 @@ For more information about these matters, see the file named COPYING\n\n"));
|
||||||
|
{
|
||||||
|
fprintf (stderr, _("Driving:"));
|
||||||
|
for (i = 0; i < g77_newargc; i++)
|
||||||
|
+ {
|
||||||
|
+ if (g77_new_decoded_options[i].opt_index == OPT_l)
|
||||||
|
+ /* Make sure no white space is inserted after `-l'. */
|
||||||
|
+ fprintf (stderr, " -l%s",
|
||||||
|
+ g77_new_decoded_options[i].canonical_option[1]);
|
||||||
|
+ else
|
||||||
|
fprintf (stderr, " %s",
|
||||||
|
g77_new_decoded_options[i].orig_option_with_args_text);
|
||||||
|
+ }
|
||||||
|
fprintf (stderr, "\n");
|
||||||
|
}
|
@ -0,0 +1,26 @@ |
|||||||
|
--- a/gcc/cppdefault.cc 2013-01-10 21:38:27.000000000 +0100
|
||||||
|
+++ b/gcc/cppdefault.cc 2014-08-18 16:20:32.893944536 +0200
|
||||||
|
@@ -35,6 +35,8 @@
|
||||||
|
# undef CROSS_INCLUDE_DIR
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#undef LOCAL_INCLUDE_DIR
|
||||||
|
+
|
||||||
|
const struct default_include cpp_include_defaults[]
|
||||||
|
#ifdef INCLUDE_DEFAULTS
|
||||||
|
= INCLUDE_DEFAULTS;
|
||||||
|
--- a/gcc/gcc.cc 2014-03-23 12:30:57.000000000 +0100
|
||||||
|
+++ b/gcc/gcc.cc 2014-08-18 13:19:32.689201690 +0200
|
||||||
|
@@ -1162,10 +1162,10 @@
|
||||||
|
/* Default prefixes to attach to command names. */
|
||||||
|
|
||||||
|
#ifndef STANDARD_STARTFILE_PREFIX_1
|
||||||
|
-#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
|
||||||
|
+#define STANDARD_STARTFILE_PREFIX_1 ""
|
||||||
|
#endif
|
||||||
|
#ifndef STANDARD_STARTFILE_PREFIX_2
|
||||||
|
-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
|
||||||
|
+#define STANDARD_STARTFILE_PREFIX_2 ""
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */
|
@ -1,287 +0,0 @@ |
|||||||
{ stdenv |
|
||||||
, lib |
|
||||||
, fetchurl |
|
||||||
, clojure |
|
||||||
, gnutar |
|
||||||
, nodejs |
|
||||||
, jre |
|
||||||
, unzip |
|
||||||
, nodePackages |
|
||||||
, xcbuild |
|
||||||
, python2 |
|
||||||
, openssl |
|
||||||
, pkgs |
|
||||||
, fetchgit |
|
||||||
, darwin |
|
||||||
}: |
|
||||||
let |
|
||||||
version = "1.10.1"; |
|
||||||
nodeVersion = "11.13.0"; |
|
||||||
nodeSources = fetchurl { |
|
||||||
url = "https://nodejs.org/dist/v${nodeVersion}/node-v${nodeVersion}.tar.gz"; |
|
||||||
sha256 = "1cjzjbshxnysxkvbf41p3m8298cnhs9kfvdczgvvvlp6w16x4aac"; |
|
||||||
}; |
|
||||||
lumo-internal-classpath = "LUMO__INTERNAL__CLASSPATH"; |
|
||||||
|
|
||||||
# as found in cljs/snapshot/lumo/repl.cljs |
|
||||||
requireDeps = '' \ |
|
||||||
cljs.analyzer \ |
|
||||||
cljs.compiler \ |
|
||||||
cljs.env \ |
|
||||||
cljs.js \ |
|
||||||
cljs.reader \ |
|
||||||
cljs.repl \ |
|
||||||
cljs.source-map \ |
|
||||||
cljs.source-map.base64 \ |
|
||||||
cljs.source-map.base64-vlq \ |
|
||||||
cljs.spec.alpha \ |
|
||||||
cljs.spec.gen.alpha \ |
|
||||||
cljs.tagged-literals \ |
|
||||||
cljs.tools.reader \ |
|
||||||
cljs.tools.reader.reader-types \ |
|
||||||
cljs.tools.reader.impl.commons \ |
|
||||||
cljs.tools.reader.impl.utils \ |
|
||||||
clojure.core.rrb-vector \ |
|
||||||
clojure.core.rrb-vector.interop \ |
|
||||||
clojure.core.rrb-vector.nodes \ |
|
||||||
clojure.core.rrb-vector.protocols \ |
|
||||||
clojure.core.rrb-vector.rrbt \ |
|
||||||
clojure.core.rrb-vector.transients \ |
|
||||||
clojure.core.rrb-vector.trees \ |
|
||||||
clojure.string \ |
|
||||||
clojure.set \ |
|
||||||
clojure.walk \ |
|
||||||
cognitect.transit \ |
|
||||||
fipp.visit \ |
|
||||||
fipp.engine \ |
|
||||||
fipp.deque \ |
|
||||||
lazy-map.core \ |
|
||||||
lumo.pprint.data \ |
|
||||||
lumo.repl \ |
|
||||||
lumo.repl-resources \ |
|
||||||
lumo.js-deps \ |
|
||||||
lumo.common ''; |
|
||||||
|
|
||||||
compileClojurescript = (simple: '' |
|
||||||
(require '[cljs.build.api :as cljs]) |
|
||||||
(cljs/build \"src/cljs/snapshot\" |
|
||||||
{:optimizations ${if simple then ":simple" else ":none"} |
|
||||||
:main 'lumo.core |
|
||||||
:cache-analysis true |
|
||||||
:source-map false |
|
||||||
:dump-core false |
|
||||||
:static-fns true |
|
||||||
:optimize-constants false |
|
||||||
:npm-deps false |
|
||||||
:verbose true |
|
||||||
:closure-defines {'cljs.core/*target* \"nodejs\" |
|
||||||
'lumo.core/*lumo-version* \"${version}\"} |
|
||||||
:compiler-stats true |
|
||||||
:process-shim false |
|
||||||
:fn-invoke-direct true |
|
||||||
:parallel-build false |
|
||||||
:browser-repl false |
|
||||||
:target :nodejs |
|
||||||
:hashbang false |
|
||||||
;; :libs [ \"src/cljs/bundled\" \"src/js\" ] |
|
||||||
:output-dir ${if simple |
|
||||||
then ''\"cljstmp\"'' |
|
||||||
else ''\"target\"''} |
|
||||||
:output-to ${if simple |
|
||||||
then ''\"cljstmp/main.js\"'' |
|
||||||
else ''\"target/deleteme.js\"'' }}) |
|
||||||
'' |
|
||||||
); |
|
||||||
|
|
||||||
|
|
||||||
cacheToJsons = '' |
|
||||||
(import [java.io ByteArrayOutputStream FileInputStream]) |
|
||||||
(require '[cognitect.transit :as transit] |
|
||||||
'[clojure.edn :as edn] |
|
||||||
'[clojure.string :as str]) |
|
||||||
|
|
||||||
(defn write-transit-json [cache] |
|
||||||
(let [out (ByteArrayOutputStream. 1000000) |
|
||||||
writer (transit/writer out :json)] |
|
||||||
(transit/write writer cache) |
|
||||||
(.toString out))) |
|
||||||
|
|
||||||
(defn process-caches [] |
|
||||||
(let [cache-aot-path \"target/cljs/core.cljs.cache.aot.edn\" |
|
||||||
cache-aot-edn (edn/read-string (slurp cache-aot-path)) |
|
||||||
cache-macros-path \"target/cljs/core\$macros.cljc.cache.json\" |
|
||||||
cache-macros-stream (FileInputStream. cache-macros-path) |
|
||||||
cache-macros-edn (transit/read (transit/reader cache-macros-stream :json)) |
|
||||||
caches [[cache-aot-path cache-aot-edn] |
|
||||||
[cache-macros-path cache-macros-edn]]] |
|
||||||
(doseq [[path cache-edn] caches] |
|
||||||
(doseq [key (keys cache-edn)] |
|
||||||
(let [out-path (str/replace path #\"(\.json|\.edn)\$\" |
|
||||||
(str \".\" (munge key) \".json\")) |
|
||||||
tr-json (write-transit-json (key cache-edn))] |
|
||||||
(spit out-path tr-json)))))) |
|
||||||
|
|
||||||
(process-caches) |
|
||||||
''; |
|
||||||
|
|
||||||
trimMainJsEnd = '' |
|
||||||
(let [string (slurp \"target/main.js\")] |
|
||||||
(spit \"target/main.js\" |
|
||||||
(subs string 0 (.indexOf string \"cljs.nodejs={};\")))) |
|
||||||
''; |
|
||||||
|
|
||||||
|
|
||||||
cljdeps = import ./deps.nix { inherit pkgs; }; |
|
||||||
classp = cljdeps.makeClasspaths { |
|
||||||
extraClasspaths = [ "src/js" "src/cljs/bundled" "src/cljs/snapshot" ]; |
|
||||||
}; |
|
||||||
|
|
||||||
|
|
||||||
getJarPath = jarName: (lib.findFirst (p: p.name == jarName) null cljdeps.packages).path.jar; |
|
||||||
in |
|
||||||
stdenv.mkDerivation { |
|
||||||
inherit version; |
|
||||||
pname = "lumo"; |
|
||||||
|
|
||||||
src = fetchgit { |
|
||||||
url = "https://github.com/anmonteiro/lumo.git"; |
|
||||||
rev = version; |
|
||||||
sha256 = "12agi6bacqic2wq6q3l28283badzamspajmajzqm7fbdl2aq1a4p"; |
|
||||||
}; |
|
||||||
|
|
||||||
nativeBuildInputs = [ unzip ]; |
|
||||||
buildInputs = [ |
|
||||||
nodejs |
|
||||||
clojure |
|
||||||
jre |
|
||||||
python2 |
|
||||||
openssl |
|
||||||
gnutar |
|
||||||
nodePackages."lumo-build-deps-../interpreters/clojurescript/lumo" |
|
||||||
] |
|
||||||
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ |
|
||||||
ApplicationServices |
|
||||||
xcbuild |
|
||||||
] |
|
||||||
); |
|
||||||
|
|
||||||
patches = [ ./no_mangle.patch ./mkdir_promise.patch ]; |
|
||||||
|
|
||||||
postPatch = '' |
|
||||||
substituteInPlace $NIX_BUILD_TOP/lumo/vendor/nexe/exe.js \ |
|
||||||
--replace 'glob.sync(dir + "/*")' 'glob.sync(dir + "/../*")' |
|
||||||
''; |
|
||||||
|
|
||||||
buildPhase = '' |
|
||||||
# Copy over lumo-build-deps environment |
|
||||||
rm yarn.lock |
|
||||||
cp -rf ${nodePackages."lumo-build-deps-../interpreters/clojurescript/lumo"}/lib/node_modules/lumo-build-deps/* ./ |
|
||||||
|
|
||||||
# configure clojure-cli |
|
||||||
mkdir ./.cpcache |
|
||||||
export CLJ_CONFIG=`pwd` |
|
||||||
export CLJ_CACHE=`pwd`/.cpcache |
|
||||||
|
|
||||||
# require more namespaces for cljs-bundle |
|
||||||
sed -i "s!ns lumo.core! \ |
|
||||||
ns lumo.core \ |
|
||||||
(:require ${requireDeps}) \ |
|
||||||
(:require-macros [clojure.template :as temp] \ |
|
||||||
[cljs.test :as test])!g" \ |
|
||||||
./src/cljs/snapshot/lumo/core.cljs |
|
||||||
|
|
||||||
# Step 1: compile clojurescript with :none and :simple |
|
||||||
${clojure}/bin/clojure -Scp ${classp} -e "${compileClojurescript true}" |
|
||||||
${clojure}/bin/clojure -Scp ${classp} -e "${compileClojurescript false}" |
|
||||||
cp -f cljstmp/main.js target/main.js |
|
||||||
${clojure}/bin/clojure -Scp ${classp} -e "${trimMainJsEnd}" |
|
||||||
|
|
||||||
# Step 2: sift files |
|
||||||
unzip -o ${getJarPath "org.clojure/clojurescript"} -d ./target |
|
||||||
unzip -j ${getJarPath "org.clojure/clojure"} "clojure/template.clj" -d ./target/clojure |
|
||||||
unzip -o ${getJarPath "org.clojure/google-closure-library"} -d ./target |
|
||||||
unzip -o ${getJarPath "org.clojure/google-closure-library-third-party"} -d ./target |
|
||||||
unzip -o ${getJarPath "org.clojure/tools.reader"} -d ./target |
|
||||||
unzip -o ${getJarPath "org.clojure/test.check"} -d ./target |
|
||||||
cp -rf ./src/cljs/bundled/lumo/* ./target/lumo/ |
|
||||||
cp -rf ./src/cljs/snapshot/lumo/repl.clj ./target/lumo/ |
|
||||||
# cleanup |
|
||||||
mv ./target/main.js ./target/main |
|
||||||
rm ./target/*\.js |
|
||||||
mv ./target/main ./target/main.js |
|
||||||
rm ./target/AUTHORS |
|
||||||
rm ./target/LICENSE |
|
||||||
rm ./target/*.edn |
|
||||||
rm ./target/*.md |
|
||||||
rm -rf ./target/css |
|
||||||
rm -rf ./target/META-INF |
|
||||||
rm -rf ./target/com |
|
||||||
rm -rf ./target/cljs/build |
|
||||||
rm -rf ./target/cljs/repl |
|
||||||
rm ./target/cljs/core\.cljs\.cache.aot\.json |
|
||||||
rm ./target/cljs/source_map\.clj |
|
||||||
rm ./target/cljs/repl\.cljc |
|
||||||
rm ./target/cljs/externs\.clj |
|
||||||
rm ./target/cljs/closure\.clj |
|
||||||
rm ./target/cljs/util\.cljc |
|
||||||
rm ./target/cljs/js_deps\.cljc |
|
||||||
rm ./target/cljs/analyzer/utils\.clj |
|
||||||
rm ./target/cljs/core/macros\.clj |
|
||||||
rm ./target/cljs/compiler/api.clj |
|
||||||
rm ./target/goog/test_module* |
|
||||||
rm ./target/goog/transpile\.js |
|
||||||
rm ./target/goog/base_* |
|
||||||
find ./target -type f -name '*.class' -delete |
|
||||||
find ./target -type d -empty -delete |
|
||||||
|
|
||||||
# Step 3: generate munged cache jsons |
|
||||||
${clojure}/bin/clojure -Scp ${classp} -e "${cacheToJsons}" |
|
||||||
rm ./target/cljs/core\$macros\.cljc\.cache\.json |
|
||||||
|
|
||||||
|
|
||||||
# Step 4: Bunde javascript |
|
||||||
NODE_ENV=production node scripts/bundle.js |
|
||||||
node scripts/bundleForeign.js |
|
||||||
|
|
||||||
# Step 5: Backup resources |
|
||||||
cp -R target resources_bak |
|
||||||
|
|
||||||
# Step 6: Package executeable 1st time |
|
||||||
# fetch node sources and copy to palce that nexe will find |
|
||||||
mkdir -p tmp/node/${nodeVersion} |
|
||||||
cp ${nodeSources} tmp/node/${nodeVersion}/node-${nodeVersion}.tar.gz |
|
||||||
tar -C ./tmp/node/${nodeVersion} -xf ${nodeSources} --warning=no-unknown-keyword |
|
||||||
mv ./tmp/node/${nodeVersion}/node-v${nodeVersion}/* ./tmp/node/${nodeVersion}/ |
|
||||||
rm -rf ${lumo-internal-classpath} |
|
||||||
cp -rf target ${lumo-internal-classpath} |
|
||||||
node scripts/package.js ${nodeVersion} |
|
||||||
rm -rf target |
|
||||||
mv ${lumo-internal-classpath} target |
|
||||||
|
|
||||||
# Step 7: AOT Macros |
|
||||||
sh scripts/aot-bundle-macros.sh |
|
||||||
|
|
||||||
# Step 8: Package executeable 2nd time |
|
||||||
node scripts/package.js ${nodeVersion} |
|
||||||
''; |
|
||||||
|
|
||||||
dontStrip = true; |
|
||||||
|
|
||||||
installPhase = '' |
|
||||||
mkdir -p $out/bin |
|
||||||
cp build/lumo $out/bin |
|
||||||
''; |
|
||||||
|
|
||||||
meta = { |
|
||||||
description = "Fast, cross-platform, standalone ClojureScript environment"; |
|
||||||
longDescription = '' |
|
||||||
Lumo is a fast, standalone ClojureScript REPL that runs on Node.js and V8. |
|
||||||
Thanks to V8's custom startup snapshots, Lumo starts up instantaneously, |
|
||||||
making it the fastest Clojure REPL in existence. |
|
||||||
''; |
|
||||||
homepage = "https://github.com/anmonteiro/lumo"; |
|
||||||
license = lib.licenses.epl10; |
|
||||||
maintainers = [ lib.maintainers.hlolli ]; |
|
||||||
platforms = lib.platforms.linux ++ lib.platforms.darwin; |
|
||||||
}; |
|
||||||
} |
|
@ -1,12 +0,0 @@ |
|||||||
{:deps |
|
||||||
{org.clojure/clojure {:mvn/version "1.10.1"} |
|
||||||
org.clojure/clojurescript {:mvn/version "1.10.520"} |
|
||||||
org.clojure/test.check {:mvn/version "0.10.0-alpha4"} |
|
||||||
org.clojure/tools.reader {:mvn/version "1.3.2" |
|
||||||
:exclusions [org.clojure/clojure org.clojure/clojurescript]} |
|
||||||
com.cognitect/transit-cljs {:mvn/version "0.8.256" |
|
||||||
:exclusions [org.clojure/clojure org.clojure/clojurescript]} |
|
||||||
malabarba/lazy-map {:mvn/version "1.3" |
|
||||||
:exclusions [org.clojure/clojure org.clojure/clojurescript]} |
|
||||||
fipp {:mvn/version "0.6.17" |
|
||||||
:exclusions [org.clojure/clojure org.clojure/clojurescript]}}} |
|
@ -1,392 +0,0 @@ |
|||||||
# generated by clj2nix-1.0.4 |
|
||||||
{ pkgs }: |
|
||||||
|
|
||||||
let repos = [ |
|
||||||
"https://repo.clojars.org/" |
|
||||||
"https://repo1.maven.org/" |
|
||||||
"https://oss.sonatype.org/content/repositories/releases/" |
|
||||||
"https://oss.sonatype.org/content/repositories/public/" |
|
||||||
"https://repo.typesafe.com/typesafe/releases/" |
|
||||||
]; |
|
||||||
|
|
||||||
in rec { |
|
||||||
makePaths = {extraClasspaths ? []}: (builtins.map (dep: if builtins.hasAttr "jar" dep.path then dep.path.jar else dep.path) packages) ++ extraClasspaths; |
|
||||||
makeClasspaths = {extraClasspaths ? []}: builtins.concatStringsSep ":" (makePaths {inherit extraClasspaths;}); |
|
||||||
|
|
||||||
packages = [ |
|
||||||
{ |
|
||||||
name = "com.cognitect/transit-java"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "transit-java"; |
|
||||||
groupId = "com.cognitect"; |
|
||||||
sha512 = "80365a4f244e052b6c4fdfd2fd3b91288835599cb4dd88e0e0dae19883dcda39afee83966810ed81beff342111c3a45a66f5601c443f3ad49904908c43631708"; |
|
||||||
version = "0.8.332"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "org.clojure/data.json"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "data.json"; |
|
||||||
groupId = "org.clojure"; |
|
||||||
sha512 = "ce526bef01bedd31b772954d921a61832ae60af06121f29080853f7932326438b33d183240a9cffbe57e00dc3744700220753948da26b8973ee21c30e84227a6"; |
|
||||||
version = "0.2.6"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "org.clojure/clojure"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "clojure"; |
|
||||||
groupId = "org.clojure"; |
|
||||||
sha512 = "f28178179483531862afae13e246386f8fda081afa523d3c4ea3a083ab607d23575d38ecb9ec0ee7f4d65cbe39a119f680e6de4669bc9cf593aa92be0c61562b"; |
|
||||||
version = "1.10.1"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "commons-codec/commons-codec"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "commons-codec"; |
|
||||||
groupId = "commons-codec"; |
|
||||||
sha512 = "8edecc0faf38e8620460909d8191837f34e2bb2ce853677c486c5e79bb79e88d043c3aed69c11f1365c4884827052ee4e1c18ca56e38d1a5bc0ce15c57daeee3"; |
|
||||||
version = "1.10"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "com.google.errorprone/error_prone_annotations"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "error_prone_annotations"; |
|
||||||
groupId = "com.google.errorprone"; |
|
||||||
sha512 = "bd2135cc9eb2c652658a2814ec9c565fa3e071d4cff590cbe17b853885c78c9f84c1b7b24ba736f4f30ed8cec60a6af983827fcbed61ff142f27ac808e97fc6b"; |
|
||||||
version = "2.1.3"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "org.clojure/core.specs.alpha"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "core.specs.alpha"; |
|
||||||
groupId = "org.clojure"; |
|
||||||
sha512 = "348c0ea0911bc0dcb08655e61b97ba040649b4b46c32a62aa84d0c29c245a8af5c16d44a4fa5455d6ab076f4bb5bbbe1ad3064a7befe583f13aeb9e32a169bf4"; |
|
||||||
version = "0.2.44"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "org.clojure/spec.alpha"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "spec.alpha"; |
|
||||||
groupId = "org.clojure"; |
|
||||||
sha512 = "18c97fb2b74c0bc2ff4f6dc722a3edec539f882ee85d0addf22bbf7e6fe02605d63f40c2b8a2905868ccd6f96cfc36a65f5fb70ddac31c6ec93da228a456edbd"; |
|
||||||
version = "0.2.176"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "org.codehaus.mojo/animal-sniffer-annotations"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "animal-sniffer-annotations"; |
|
||||||
groupId = "org.codehaus.mojo"; |
|
||||||
sha512 = "9e5e3ea9e06e0ac9463869fd0e08ed38f7042784995a7b50c9bfd7f692a53f0e1430b9e1367dc772d0d4eafe5fd2beabbcc60da5008bd792f9e7ec8436c0f136"; |
|
||||||
version = "1.14"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "com.googlecode.json-simple/json-simple"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "json-simple"; |
|
||||||
groupId = "com.googlecode.json-simple"; |
|
||||||
sha512 = "f8798bfbcc8ab8001baf90ce47ec2264234dc1da2d4aa97fdcdc0990472a6b5a5a32f828e776140777d598a99d8a0c0f51c6d0767ae1a829690ab9200ae35742"; |
|
||||||
version = "1.1.1"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "com.cognitect/transit-cljs"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "transit-cljs"; |
|
||||||
groupId = "com.cognitect"; |
|
||||||
sha512 = "318b98ddd63629f37b334bb90e625bc31ab6abcf0b1fa80d8e097551658f2d9219b5ee35869a31f2976d7d385da83bea0c07b0d097babcae241ecbd0fe8a7ecd"; |
|
||||||
version = "0.8.256"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "org.clojure/google-closure-library"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "google-closure-library"; |
|
||||||
groupId = "org.clojure"; |
|
||||||
sha512 = "75631182ef12f21723fe3eba1003d8cf9b8348a51512961e4e1b87bc24d8f3abb14a70c856f08cdaa5588a2d7c2b1b0c03aeaa3c4c5f2ed745a85f59ceeab83a"; |
|
||||||
version = "0.0-20170809-b9c14c6b"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "fipp"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "fipp"; |
|
||||||
groupId = "fipp"; |
|
||||||
sha512 = "d844ab63d28cb5e31657cc38e574bbc7072a78419c997f25445ac6ea4a719904a4f4844b37e3f664a8d2e49bd38ff1006a9e8c6e63fb4e2f0a2322d6c2638275"; |
|
||||||
version = "0.6.17"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "org.clojure/clojurescript"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "clojurescript"; |
|
||||||
groupId = "org.clojure"; |
|
||||||
sha512 = "b241959d6bd2ab659920965d301508226e26b3edcee469e4cd516cd4ed014b1a6b132c17ee7d96a8e66fe27fd01a74813ac8b85958d260f9fdbbeb4348d57ff1"; |
|
||||||
version = "1.10.520"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "com.google.jsinterop/jsinterop-annotations"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "jsinterop-annotations"; |
|
||||||
groupId = "com.google.jsinterop"; |
|
||||||
sha512 = "b6fd98a9167d031f6bff571567d4658fda62c132dc74d47ca85e02c9bb3ce8812b1012c67f4c81501ab0cbd9ccd9cda5dcf32d306e04368ace7a173cecae975d"; |
|
||||||
version = "1.0.0"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "com.fasterxml.jackson.core/jackson-core"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "jackson-core"; |
|
||||||
groupId = "com.fasterxml.jackson.core"; |
|
||||||
sha512 = "a1bd6c264b9ab07aad3d0f26b65757e35ff47904ab895bb7f997e3e1fd063129c177ad6f69876907b04ff8a43c6b1770a26f53a811633a29e66a5dce57194f64"; |
|
||||||
version = "2.8.7"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "malabarba/lazy-map"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "lazy-map"; |
|
||||||
groupId = "malabarba"; |
|
||||||
sha512 = "ce56d6f03ac344579e15f062cdd4c477c0323da716d4d4106c4edb746959699e0b294b25aacf8ecf1579a6bdd5556a60f4bcb1648d22832984c069a0431c840f"; |
|
||||||
version = "1.3"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "com.cognitect/transit-js"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "transit-js"; |
|
||||||
groupId = "com.cognitect"; |
|
||||||
sha512 = "6ca0978e633e41b45ff5a76df79099ba7c4900a8ca9f6acd2a903e4ab10a1ec0c83d4127009df9dac1337debaba01f7ff1d5cced1c2159c05ef94845f73f0623"; |
|
||||||
version = "0.8.846"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "org.mozilla/rhino"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "rhino"; |
|
||||||
groupId = "org.mozilla"; |
|
||||||
sha512 = "466e7a76303ea191802b5e7adb3dff64c1d6283a25ce87447296b693b87b166f4cdd191ef7dc130a5739bfa0e4a81b08550f607c84eec167406d9be2225562dc"; |
|
||||||
version = "1.7R5"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "org.clojure/google-closure-library-third-party"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "google-closure-library-third-party"; |
|
||||||
groupId = "org.clojure"; |
|
||||||
sha512 = "57fa84fbbca3eb9e612d2842e4476b74f64d13dd076ffca6c9d9e15c4ca8a2f2c56cc19307bcad0ab5b4f9cb0c3e7900ccc845bd570ebc92e2633885ab621f35"; |
|
||||||
version = "0.0-20170809-b9c14c6b"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "com.google.javascript/closure-compiler-externs"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "closure-compiler-externs"; |
|
||||||
groupId = "com.google.javascript"; |
|
||||||
sha512 = "1a47c8559144095c0b23a8e40acd7185625cea5a4c103eb75fbacd32d5809d087bfb60aaf57066329649c6017ec5f993756024e767a5b8f84926371ba6183a82"; |
|
||||||
version = "v20180805"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "org.javassist/javassist"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "javassist"; |
|
||||||
groupId = "org.javassist"; |
|
||||||
sha512 = "ad65ee383ed83bedecc2073118cb3780b68b18d5fb79a1b2b665ff8529df02446ad11e68f9faaf4f2e980065f5946761a59ada379312cbb22d002625abed6a4f"; |
|
||||||
version = "3.18.1-GA"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "com.google.guava/guava"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "guava"; |
|
||||||
groupId = "com.google.guava"; |
|
||||||
sha512 = "429ceeec0350ba98e2b089b8b70ded2ec570c3a684894a7545d10592c1c7be42dacd1fad8b2cb9123aa3612575ce1b56e1bb54923443fc293f8e9adeac2762ee"; |
|
||||||
version = "25.1-jre"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "org.msgpack/msgpack"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "msgpack"; |
|
||||||
groupId = "org.msgpack"; |
|
||||||
sha512 = "a2741bed01f9c37ba3dbe6a7ab9ce936d36d4da97c35e215250ac89ac0851fc5948d83975ea6257d5dce1d43b6b5147254ecfb4b33f9bbdc489500b3ff060449"; |
|
||||||
version = "0.6.12"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "com.google.j2objc/j2objc-annotations"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "j2objc-annotations"; |
|
||||||
groupId = "com.google.j2objc"; |
|
||||||
sha512 = "a4a0b58ffc2d9f9b516f571bcd0ac14e4d3eec15aacd6320a4a1a12045acce8c6081e8ce922c4e882221cedb2cc266399ab468487ae9a08124d65edc07ae30f0"; |
|
||||||
version = "1.1"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "com.cognitect/transit-clj"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "transit-clj"; |
|
||||||
groupId = "com.cognitect"; |
|
||||||
sha512 = "ad838d9e5688c8cebe54972ad0c9a6db428ec1cece8c8b078e8e8d4b0c7870b328239d2bc9dd8fcbedcba56ca0de9afb5a0a843ff5f630dc039118de7eb45eba"; |
|
||||||
version = "0.8.309"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "args4j/args4j"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "args4j"; |
|
||||||
groupId = "args4j"; |
|
||||||
sha512 = "5f0651234c8f8b130fddb39fa832c6da47d3e21bc3434307554314c47e672c28d005c64e9effe85d552190cfc27966b1f005740ffd40b4e1bec2cb257d7feedb"; |
|
||||||
version = "2.0.26"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "org.clojure/core.rrb-vector"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "core.rrb-vector"; |
|
||||||
groupId = "org.clojure"; |
|
||||||
sha512 = "4e410c4a90a869e98d5d69a8a6dd6427e9d77b70e1a2b54cf24baf23389f22e7a208375783c2fdc5c1a5acfb8511a5c5ed57ad1a946d5bffd203f453d90a6155"; |
|
||||||
version = "0.0.14"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "org.checkerframework/checker-qual"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "checker-qual"; |
|
||||||
groupId = "org.checkerframework"; |
|
||||||
sha512 = "3c38b0b9e0bde464268cff5fdb1894a048240b039093ee3abe5b32976a22737d26b355f8793f630a7f0b319fdb019a6fcd9ee1d5219676f0f10c0b0f496b61b7"; |
|
||||||
version = "2.0.0"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "org.clojure/tools.reader"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "tools.reader"; |
|
||||||
groupId = "org.clojure"; |
|
||||||
sha512 = "290a2d98b2eec08a8affc2952006f43c0459c7e5467dc454f5fb5670ea7934fa974e6be19f7e7c91dadcfed62082d0fbcc7788455b7446a2c9c5af02f7fc52b6"; |
|
||||||
version = "1.3.2"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "com.google.javascript/closure-compiler-unshaded"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "closure-compiler-unshaded"; |
|
||||||
groupId = "com.google.javascript"; |
|
||||||
sha512 = "4fa7029aabd9ff84255d56004707486726db9c770f43cb10dc44fb53a3254d588a0f47f937f55401d7f319267ec2362c87f5ea709bcfa06f12a66fe22cb8c53d"; |
|
||||||
version = "v20180805"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "org.clojure/test.check"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "test.check"; |
|
||||||
groupId = "org.clojure"; |
|
||||||
sha512 = "60fa3bd38c32cf193c573f1bd47c6abd7e7a5bb2fc7f7f9f97aa9dcd54d5e2eab9e351f5f83b01bb96b32811a9f2f5ab384c6b7b7ebbb6c86d1ad4f2789351bf"; |
|
||||||
version = "0.10.0-alpha4"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "com.google.protobuf/protobuf-java"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "protobuf-java"; |
|
||||||
groupId = "com.google.protobuf"; |
|
||||||
sha512 = "230fc4360b8b2ee10eb73d756c58478b6c779433aa4ca91938404bbfd0ada516d3215664dbe953c96649e33bbef293958e4ad4616671f0c246883196ece92998"; |
|
||||||
version = "3.0.2"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "com.google.code.findbugs/jsr305"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "jsr305"; |
|
||||||
groupId = "com.google.code.findbugs"; |
|
||||||
sha512 = "bb09db62919a50fa5b55906013be6ca4fc7acb2e87455fac5eaf9ede2e41ce8bbafc0e5a385a561264ea4cd71bbbd3ef5a45e02d63277a201d06a0ae1636f804"; |
|
||||||
version = "3.0.2"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
name = "com.google.code.gson/gson"; |
|
||||||
path = pkgs.fetchMavenArtifact { |
|
||||||
inherit repos; |
|
||||||
artifactId = "gson"; |
|
||||||
groupId = "com.google.code.gson"; |
|
||||||
sha512 = "c3cdaf66a99e6336abc80ff23374f6b62ac95ab2ae874c9075805e91d849b18e3f620cc202b4978fc92b73d98de96089c8714b1dd096b2ae1958cfa085715f7a"; |
|
||||||
version = "2.7"; |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
]; |
|
||||||
} |
|
@ -1,20 +0,0 @@ |
|||||||
diff --git a/vendor/nexe/exe.js b/vendor/nexe/exe.js
|
|
||||||
index 21e78bb..ecbfca4 100644
|
|
||||||
--- a/vendor/nexe/exe.js
|
|
||||||
+++ b/vendor/nexe/exe.js
|
|
||||||
@@ -254,9 +254,7 @@ return initModule._compile(${JSON.stringify(source)}, process.execPath);
|
|
||||||
*/
|
|
||||||
|
|
||||||
function makeOutputDirectory(next) {
|
|
||||||
- mkdirp(path.dirname(options.output), function() {
|
|
||||||
- next();
|
|
||||||
- });
|
|
||||||
+ mkdirp(path.dirname(options.output)).then(() => next());
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
@@ -1107,4 +1105,3 @@ exports.package = function(path, options) {
|
|
||||||
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
-
|
|
@ -1,13 +0,0 @@ |
|||||||
diff --git a/scripts/bundle.js b/scripts/bundle.js
|
|
||||||
index 16425a4..0d510fc 100644
|
|
||||||
--- a/scripts/bundle.js
|
|
||||||
+++ b/scripts/bundle.js
|
|
||||||
@@ -73,6 +73,8 @@ const plugins = [
|
|
||||||
if (!isDevBuild) {
|
|
||||||
plugins.push(
|
|
||||||
babelMinify({
|
|
||||||
+ evaluate: false,
|
|
||||||
+ mangle: false,
|
|
||||||
comments: false,
|
|
||||||
removeConsole: true,
|
|
||||||
removeDebugger: true,
|
|
@ -1,51 +0,0 @@ |
|||||||
{ |
|
||||||
"name": "lumo-build-deps", |
|
||||||
"version": "1.10.1", |
|
||||||
"dependencies": { |
|
||||||
"@babel/core": "^7.1.5", |
|
||||||
"@babel/plugin-external-helpers": "7.8.3", |
|
||||||
"@babel/plugin-proposal-class-properties": "^7.1.0", |
|
||||||
"@babel/plugin-proposal-object-rest-spread": "^7.0.0", |
|
||||||
"@babel/plugin-transform-runtime": "^7.1.0", |
|
||||||
"@babel/preset-env": "^7.1.5", |
|
||||||
"@babel/preset-stage-2": "7.8.3", |
|
||||||
"@babel/runtime": "^7.1.5", |
|
||||||
"async": "^3.1.1", |
|
||||||
"async-retry": "^1.2.3", |
|
||||||
"babel-core": "^7.0.0-bridge.0", |
|
||||||
"babel-eslint": "10.0.3", |
|
||||||
"babel-jest": "^25.1.0", |
|
||||||
"babel-loader": "^8.0.4", |
|
||||||
"babel-plugin-transform-flow-strip-types": "6.22.0", |
|
||||||
"browserify": "^16.2.3", |
|
||||||
"chalk": "^3.0.0", |
|
||||||
"colors": "^1.3.3", |
|
||||||
"cross-env": "7.0.0", |
|
||||||
"death": "^1.1.0", |
|
||||||
"flow-bin": "0.118.0", |
|
||||||
"google-closure-compiler-js": "20170910.0.1", |
|
||||||
"glob": "^7.1.3", |
|
||||||
"gunzip-maybe": "^1.4.1", |
|
||||||
"insert-module-globals": "^7.2.0", |
|
||||||
"jszip": "2.x", |
|
||||||
"mkdirp": "^1.0.3", |
|
||||||
"ncp": "^2.0.0", |
|
||||||
"node-fetch": "^2.2.1", |
|
||||||
"paredit.js": "0.3.6", |
|
||||||
"posix-getopt": "github:anmonteiro/node-getopt#master", |
|
||||||
"prettier": "1.19.1", |
|
||||||
"progress": "^2.0.0", |
|
||||||
"read-pkg": "^5.2.0", |
|
||||||
"request": "^2.88.0", |
|
||||||
"rollup": "^1.9.0", |
|
||||||
"rollup-plugin-babel": "^4.3.2", |
|
||||||
"rollup-plugin-babel-minify": "^9.1.1", |
|
||||||
"rollup-plugin-commonjs": "^10.0.0", |
|
||||||
"rollup-plugin-node-resolve": "^5.0.0", |
|
||||||
"rollup-plugin-replace": "^2.1.1", |
|
||||||
"tar-stream": "^2.0.1", |
|
||||||
"webpack": "^4.25.1", |
|
||||||
"webpack-cli": "^3.2.3", |
|
||||||
"which-promise": "^1.0.0" |
|
||||||
} |
|
||||||
} |
|
@ -1,24 +0,0 @@ |
|||||||
{ lib, stdenv, fetchFromGitHub, cmake, curl }: |
|
||||||
|
|
||||||
stdenv.mkDerivation rec { |
|
||||||
pname = "curlcpp"; |
|
||||||
version = "1.4"; |
|
||||||
|
|
||||||
src = fetchFromGitHub { |
|
||||||
owner = "JosephP91"; |
|
||||||
repo = "curlcpp"; |
|
||||||
rev = version; |
|
||||||
sha256 = "1zx76jcddqk4zkcdb6p7rsmkjbbjm2cj6drj0c8hdd61ms1d0f3n"; |
|
||||||
}; |
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ]; |
|
||||||
buildInputs = [ curl ]; |
|
||||||
|
|
||||||
meta = with lib; { |
|
||||||
homepage = "https://josephp91.github.io/curlcpp/"; |
|
||||||
description = "Object oriented C++ wrapper for CURL"; |
|
||||||
platforms = platforms.unix; |
|
||||||
license = licenses.mit; |
|
||||||
maintainers = with maintainers; [ rszibele ]; |
|
||||||
}; |
|
||||||
} |
|
@ -0,0 +1,61 @@ |
|||||||
|
{ lib |
||||||
|
, stdenv |
||||||
|
, fetchFromGitHub |
||||||
|
, cmake |
||||||
|
, zlib |
||||||
|
, libpng |
||||||
|
, libjpeg |
||||||
|
, libGL |
||||||
|
, libX11 |
||||||
|
, libXxf86vm |
||||||
|
, withTouchSupport ? false |
||||||
|
, libXi |
||||||
|
, libXext |
||||||
|
, Cocoa |
||||||
|
, Kernel |
||||||
|
}: |
||||||
|
stdenv.mkDerivation rec { |
||||||
|
pname = "irrlichtmt"; |
||||||
|
version = "1.9.0mt4"; |
||||||
|
|
||||||
|
src = fetchFromGitHub { |
||||||
|
owner = "minetest"; |
||||||
|
repo = "irrlicht"; |
||||||
|
rev = version; |
||||||
|
sha256 = "sha256-YlXn9LrfGkjdb8+zQGDgrInolUYj9nVSF2AXWFpEEkw="; |
||||||
|
}; |
||||||
|
|
||||||
|
nativeBuildInputs = [ |
||||||
|
cmake |
||||||
|
]; |
||||||
|
|
||||||
|
# https://github.com/minetest/minetest/pull/10729 |
||||||
|
postPatch = lib.optionalString withTouchSupport '' |
||||||
|
substituteInPlace include/IrrCompileConfig.h \ |
||||||
|
--replace '//#define _IRR_LINUX_X11_XINPUT2_' '#define _IRR_LINUX_X11_XINPUT2_' |
||||||
|
''; |
||||||
|
|
||||||
|
buildInputs = [ |
||||||
|
zlib |
||||||
|
libpng |
||||||
|
libjpeg |
||||||
|
libGL |
||||||
|
libX11 |
||||||
|
libXxf86vm |
||||||
|
] ++ lib.optionals withTouchSupport [ |
||||||
|
libXi |
||||||
|
libXext |
||||||
|
] ++ lib.optionals stdenv.isDarwin [ |
||||||
|
Cocoa |
||||||
|
Kernel |
||||||
|
]; |
||||||
|
|
||||||
|
outputs = [ "out" "dev" ]; |
||||||
|
|
||||||
|
meta = { |
||||||
|
homepage = "https://github.com/minetest/irrlicht"; |
||||||
|
license = lib.licenses.zlib; |
||||||
|
maintainers = with lib.maintainers; [ DeeUnderscore ]; |
||||||
|
description = "Minetest project's fork of Irrlicht, a realtime 3D engine written in C++"; |
||||||
|
}; |
||||||
|
} |
@ -1,39 +0,0 @@ |
|||||||
{lib, stdenv, fetchurl, ocaml, findlib, easy-format}: |
|
||||||
let |
|
||||||
pname = "biniou"; |
|
||||||
version = "1.0.9"; |
|
||||||
webpage = "http://mjambon.com/${pname}.html"; |
|
||||||
in |
|
||||||
|
|
||||||
assert lib.versionAtLeast (lib.getVersion ocaml) "3.11"; |
|
||||||
|
|
||||||
stdenv.mkDerivation rec { |
|
||||||
|
|
||||||
name = "${pname}-${version}"; |
|
||||||
|
|
||||||
src = fetchurl { |
|
||||||
url = "http://mjambon.com/releases/${pname}/${name}.tar.gz"; |
|
||||||
sha256 = "14j3hrhbjqxbizr1pr8fcig9dmfzhbjjwzwyc99fcsdic67w8izb"; |
|
||||||
}; |
|
||||||
|
|
||||||
nativeBuildInputs = [ ocaml findlib ]; |
|
||||||
buildInputs = [ easy-format ]; |
|
||||||
|
|
||||||
strictDeps = true; |
|
||||||
|
|
||||||
createFindlibDestdir = true; |
|
||||||
|
|
||||||
makeFlags = [ "PREFIX=$(out)" ]; |
|
||||||
|
|
||||||
preBuild = '' |
|
||||||
mkdir -p $out/bin |
|
||||||
''; |
|
||||||
|
|
||||||
meta = with lib; { |
|
||||||
description = "A binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve"; |
|
||||||
homepage = webpage; |
|
||||||
license = licenses.bsd3; |
|
||||||
maintainers = [ maintainers.vbgl ]; |
|
||||||
platforms = ocaml.meta.platforms or []; |
|
||||||
}; |
|
||||||
} |
|
@ -0,0 +1,43 @@ |
|||||||
|
{ lib |
||||||
|
, buildPythonPackage |
||||||
|
, fetchFromGitHub |
||||||
|
, appdirs |
||||||
|
, pytz |
||||||
|
, requests |
||||||
|
, pytestCheckHook |
||||||
|
, requests-mock |
||||||
|
}: |
||||||
|
|
||||||
|
buildPythonPackage rec { |
||||||
|
pname = "datapoint"; |
||||||
|
version = "0.9.8"; |
||||||
|
|
||||||
|
src = fetchFromGitHub { |
||||||
|
owner = "ejep"; |
||||||
|
repo = "datapoint-python"; |
||||||
|
rev = "v${version}"; |
||||||
|
hash = "sha256-YC8KFTv6lnCqMfDw1LSova7XBgmKbR3TpPDAAbH9imw="; |
||||||
|
}; |
||||||
|
|
||||||
|
propagatedBuildInputs = [ |
||||||
|
appdirs |
||||||
|
pytz |
||||||
|
requests |
||||||
|
]; |
||||||
|
|
||||||
|
checkInputs = [ |
||||||
|
pytestCheckHook |
||||||
|
requests-mock |
||||||
|
]; |
||||||
|
|
||||||
|
pytestFlagsArray = [ "tests/unit" ]; |
||||||
|
|
||||||
|
pythonImportsCheck = [ "datapoint" ]; |
||||||
|
|
||||||
|
meta = { |
||||||
|
description = "Python interface to the Met Office's Datapoint API"; |
||||||
|
homepage = "https://github.com/ejep/datapoint-python"; |
||||||
|
license = lib.licenses.gpl3Only; |
||||||
|
maintainers = with lib.maintainers; [ dotlambda ]; |
||||||
|
}; |
||||||
|
} |
@ -1,28 +1,39 @@ |
|||||||
{ lib, fetchPypi, buildPythonPackage, aenum, isPy3k, pythonOlder, enum34, python }: |
{ lib |
||||||
|
, fetchPypi |
||||||
|
, buildPythonPackage |
||||||
|
, aenum |
||||||
|
, pythonOlder |
||||||
|
, python |
||||||
|
}: |
||||||
|
|
||||||
buildPythonPackage rec { |
buildPythonPackage rec { |
||||||
pname = "dbf"; |
pname = "dbf"; |
||||||
version = "0.99.1"; |
version = "0.99.2"; |
||||||
|
format = "setuptools"; |
||||||
|
|
||||||
src = fetchPypi { |
disabled = pythonOlder "3.7"; |
||||||
inherit pname version; |
|
||||||
sha256 = "4ed598a3866dfe7761b8099cf53ab44cb6ed5e4a7dbffb0da8c67a4af8d62fc5"; |
|
||||||
}; |
|
||||||
|
|
||||||
propagatedBuildInputs = [ aenum ] ++ lib.optional (pythonOlder "3.4") enum34; |
src = fetchPypi { |
||||||
|
inherit pname version; |
||||||
|
hash = "sha256-aeutAP2y+bUmUOZ39TpXULP+egeBcjyDmtoCheGzw+0="; |
||||||
|
}; |
||||||
|
|
||||||
doCheck = !isPy3k; |
propagatedBuildInputs = [ |
||||||
# tests are not yet ported. |
aenum |
||||||
# https://groups.google.com/forum/#!topic/python-dbase/96rx2xmCG4w |
]; |
||||||
|
|
||||||
checkPhase = '' |
checkPhase = '' |
||||||
${python.interpreter} dbf/test.py |
${python.interpreter} dbf/test.py |
||||||
''; |
''; |
||||||
|
|
||||||
meta = with lib; { |
pythonImportsCheck = [ |
||||||
description = "Pure python package for reading/writing dBase, FoxPro, and Visual FoxPro .dbf files"; |
"dbf" |
||||||
homepage = "https://pypi.python.org/pypi/dbf"; |
]; |
||||||
license = licenses.bsd2; |
|
||||||
maintainers = with maintainers; [ vrthra ]; |
meta = with lib; { |
||||||
}; |
description = "Module for reading/writing dBase, FoxPro, and Visual FoxPro .dbf files"; |
||||||
|
homepage = "https://github.com/ethanfurman/dbf"; |
||||||
|
license = licenses.bsd2; |
||||||
|
maintainers = with maintainers; [ vrthra ]; |
||||||
|
}; |
||||||
} |
} |
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue