Merge staging-next into staging

This commit is contained in:
Frederik Rietdijk 2019-08-03 07:48:19 +02:00
commit 4afe7a7bf3
172 changed files with 107512 additions and 184323 deletions

View File

@ -21,7 +21,7 @@ At the moment we support three different methods for managing plugins:
Adding custom .vimrc lines can be done using the following code:
```
```nix
vim_configurable.customize {
# `name` specifies the name of the executable and package
name = "vim-with-plugins";
@ -32,11 +32,11 @@ vim_configurable.customize {
}
```
This configuration is used when vim is invoked with the command specified as name, in this case `vim-with-plugins`.
This configuration is used when Vim is invoked with the command specified as name, in this case `vim-with-plugins`.
For Neovim the `configure` argument can be overridden to achieve the same:
```
```nix
neovim.override {
configure = {
customRC = ''
@ -46,10 +46,10 @@ neovim.override {
}
```
If you want to use `neovim-qt` as a graphical editor, you can configure it by overriding neovim in an overlay
or passing it an overridden neovimn:
If you want to use `neovim-qt` as a graphical editor, you can configure it by overriding Neovim in an overlay
or passing it an overridden Neovimn:
```
```nix
neovim-qt.override {
neovim = neovim.override {
configure = {
@ -63,16 +63,16 @@ neovim-qt.override {
## Managing plugins with Vim packages
To store you plugins in Vim packages (the native vim plugin manager, see `:help packages`) the following example can be used:
To store you plugins in Vim packages (the native Vim plugin manager, see `:help packages`) the following example can be used:
```
```nix
vim_configurable.customize {
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
# loaded on launch
start = [ youcompleteme fugitive ];
# manually loadable by calling `:packadd $plugin-name`
# however, if a vim plugin has a dependency that is not explicitly listed in
# opt that dependency will always be added to start to avoid confusion.
# however, if a Vim plugin has a dependency that is not explicitly listed in
# opt that dependency will always be added to start to avoid confusion.
opt = [ phpCompletion elm-vim ];
# To automatically load a plugin when opening a filetype, add vimrc lines like:
# autocmd FileType php :packadd phpCompletion
@ -83,7 +83,7 @@ vim_configurable.customize {
`myVimPackage` is an arbitrary name for the generated package. You can choose any name you like.
For Neovim the syntax is:
```
```nix
neovim.override {
configure = {
customRC = ''
@ -92,7 +92,7 @@ neovim.override {
packages.myVimPackage = with pkgs.vimPlugins; {
# see examples below how to use custom packages
start = [ ];
# If a vim plugin has a dependency that is not explicitly listed in
# If a Vim plugin has a dependency that is not explicitly listed in
# opt that dependency will always be added to start to avoid confusion.
opt = [ ];
};
@ -102,7 +102,7 @@ neovim.override {
The resulting package can be added to `packageOverrides` in `~/.nixpkgs/config.nix` to make it installable:
```
```nix
{
packageOverrides = pkgs: with pkgs; {
myVim = vim_configurable.customize {
@ -126,7 +126,7 @@ After that you can install your special grafted `myVim` or `myNeovim` packages.
To use [vim-plug](https://github.com/junegunn/vim-plug) to manage your Vim
plugins the following example can be used:
```
```nix
vim_configurable.customize {
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
# loaded on launch
@ -137,7 +137,7 @@ vim_configurable.customize {
For Neovim the syntax is:
```
```nix
neovim.override {
configure = {
customRC = ''
@ -161,89 +161,112 @@ assuming that "using latest version" is ok most of the time.
First create a vim-scripts file having one plugin name per line. Example:
"tlib"
{'name': 'vim-addon-sql'}
{'filetype_regex': '\%(vim)$', 'names': ['reload', 'vim-dev-plugin']}
```
"tlib"
{'name': 'vim-addon-sql'}
{'filetype_regex': '\%(vim)$', 'names': ['reload', 'vim-dev-plugin']}
```
Such vim-scripts file can be read by VAM as well like this:
call vam#Scripts(expand('~/.vim-scripts'), {})
```vim
call vam#Scripts(expand('~/.vim-scripts'), {})
```
Create a default.nix file:
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc7102" }:
nixpkgs.vim_configurable.customize { name = "vim"; vimrcConfig.vam.pluginDictionaries = [ "vim-addon-vim2nix" ]; }
```nix
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc7102" }:
nixpkgs.vim_configurable.customize { name = "vim"; vimrcConfig.vam.pluginDictionaries = [ "vim-addon-vim2nix" ]; }
```
Create a generate.vim file:
ActivateAddons vim-addon-vim2nix
let vim_scripts = "vim-scripts"
call nix#ExportPluginsForNix({
\ 'path_to_nixpkgs': eval('{"'.substitute(substitute(substitute($NIX_PATH, ':', ',', 'g'), '=',':', 'g'), '\([:,]\)', '"\1"',"g").'"}')["nixpkgs"],
\ 'cache_file': '/tmp/vim2nix-cache',
\ 'try_catch': 0,
\ 'plugin_dictionaries': ["vim-addon-manager"]+map(readfile(vim_scripts), 'eval(v:val)')
\ })
```vim
ActivateAddons vim-addon-vim2nix
let vim_scripts = "vim-scripts"
call nix#ExportPluginsForNix({
\ 'path_to_nixpkgs': eval('{"'.substitute(substitute(substitute($NIX_PATH, ':', ',', 'g'), '=',':', 'g'), '\([:,]\)', '"\1"',"g").'"}')["nixpkgs"],
\ 'cache_file': '/tmp/vim2nix-cache',
\ 'try_catch': 0,
\ 'plugin_dictionaries': ["vim-addon-manager"]+map(readfile(vim_scripts), 'eval(v:val)')
\ })
```
Then run
nix-shell -p vimUtils.vim_with_vim2nix --command "vim -c 'source generate.vim'"
```bash
nix-shell -p vimUtils.vim_with_vim2nix --command "vim -c 'source generate.vim'"
```
You should get a Vim buffer with the nix derivations (output1) and vam.pluginDictionaries (output2).
You can add your vim to your system's configuration file like this and start it by "vim-my":
You can add your Vim to your system's configuration file like this and start it by "vim-my":
my-vim =
let plugins = let inherit (vimUtils) buildVimPluginFrom2Nix; in {
copy paste output1 here
}; in vim_configurable.customize {
name = "vim-my";
```
my-vim =
let plugins = let inherit (vimUtils) buildVimPluginFrom2Nix; in {
copy paste output1 here
}; in vim_configurable.customize {
name = "vim-my";
vimrcConfig.vam.knownPlugins = plugins; # optional
vimrcConfig.vam.pluginDictionaries = [
copy paste output2 here
];
# Pathogen would be
# vimrcConfig.pathogen.knownPlugins = plugins; # plugins
# vimrcConfig.pathogen.pluginNames = ["tlib"];
};
vimrcConfig.vam.knownPlugins = plugins; # optional
vimrcConfig.vam.pluginDictionaries = [
copy paste output2 here
];
# Pathogen would be
# vimrcConfig.pathogen.knownPlugins = plugins; # plugins
# vimrcConfig.pathogen.pluginNames = ["tlib"];
};
```
Sample output1:
"reload" = buildVimPluginFrom2Nix { # created by nix#NixDerivation
name = "reload";
src = fetchgit {
url = "git://github.com/xolox/vim-reload";
rev = "0a601a668727f5b675cb1ddc19f6861f3f7ab9e1";
sha256 = "0vb832l9yxj919f5hfg6qj6bn9ni57gnjd3bj7zpq7d4iv2s4wdh";
};
dependencies = ["nim-misc"];
```
"reload" = buildVimPluginFrom2Nix { # created by nix#NixDerivation
name = "reload";
src = fetchgit {
url = "git://github.com/xolox/vim-reload";
rev = "0a601a668727f5b675cb1ddc19f6861f3f7ab9e1";
sha256 = "0vb832l9yxj919f5hfg6qj6bn9ni57gnjd3bj7zpq7d4iv2s4wdh";
};
dependencies = ["nim-misc"];
};
[...]
};
[...]
```
Sample output2:
[
''vim-addon-manager''
''tlib''
{ "name" = ''vim-addon-sql''; }
{ "filetype_regex" = ''\%(vim)$$''; "names" = [ ''reload'' ''vim-dev-plugin'' ]; }
]
```nix
[
''vim-addon-manager''
''tlib''
{ "name" = ''vim-addon-sql''; }
{ "filetype_regex" = ''\%(vim)$$''; "names" = [ ''reload'' ''vim-dev-plugin'' ]; }
]
```
## Adding new plugins to nixpkgs
In `pkgs/misc/vim-plugins/vim-plugin-names` we store the plugin names
for all vim plugins we automatically generate plugins for.
The format of this file `github username/github repository`:
For example https://github.com/scrooloose/nerdtree becomes `scrooloose/nerdtree`.
After adding your plugin to this file run the `./update.py` in the same folder.
This will updated a file called `generated.nix` and make your plugin accessible in the
`vimPlugins` attribute set (`vimPlugins.nerdtree` in our example).
If additional steps to the build process of the plugin are required, add an
override to the `pkgs/misc/vim-plugins/default.nix` in the same directory.
Nix expressions for Vim plugins are stored in [pkgs/misc/vim-plugins](/pkgs/misc/vim-plugins). For the vast majority of plugins, Nix expressions are automatically generated by running [`./update.py`](/pkgs/misc/vim-plugins/update.py). This creates a [generated.nix](/pkgs/misc/vim-plugins/generated.nix) file based on the plugins listed in [vim-plugin-names](/pkgs/misc/vim-plugins/vim-plugin-names). Plugins are listed in alphabetical order in `vim-plugin-names` using the format `[github username]/[repository]`. For example https://github.com/scrooloose/nerdtree becomes `scrooloose/nerdtree`.
Some plugins require overrides in order to function properly. Overrides are placed in [overrides.nix](/pkgs/misc/vim-plugins/overrides.nix). Overrides are most often required when a plugin requires some dependencies, or extra steps are required during the build process. For example `deoplete-fish` requires both `deoplete-nvim` and `vim-fish`, and so the following override was added:
```
deoplete-fish = super.deoplete-fish.overrideAttrs(old: {
dependencies = with super; [ deoplete-nvim vim-fish ];
});
```
Sometimes plugins require an override that must be changed when the plugin is updated. This can cause issues when Vim plugins are auto-updated but the associated override isn't updated. For these plugins, the override should be written so that it specifies all information required to install the plugin, and running `./update.py` doesn't change the derivation for the plugin. Manually updating the override is required to update these types of plugins. An example of such a plugin is `LanguageClient-neovim`.
To add a new plugin:
1. run `./update.py` and create a commit named "vimPlugins: Update",
2. add the new plugin to [vim-plugin-names](/pkgs/misc/vim-plugins/vim-plugin-names) and add overrides if required to [overrides.nix](/pkgs/misc/vim-plugins/overrides.nix),
3. run `./update.py` again and create a commit named "vimPlugins.[name]: init at [version]" (where `name` and `version` can be found in [generated.nix](/pkgs/misc/vim-plugins/generated.nix)), and
4. create a pull request.
## Important repositories
@ -252,4 +275,3 @@ override to the `pkgs/misc/vim-plugins/default.nix` in the same directory.
- [vim2nix](https://github.com/MarcWeber/vim-addon-vim2nix) which generates the
.nix code

View File

@ -393,6 +393,11 @@
github = "aneeshusa";
name = "Aneesh Agrawal";
};
angristan = {
email = "angristan@pm.me";
github = "angristan";
name = "Stanislas Lange";
};
ankhers = {
email = "justin.k.wood@gmail.com";
github = "ankhers";
@ -4214,9 +4219,13 @@
name = "Ben Hamlin";
};
prusnak = {
email = "stick@gk2.sk";
email = "pavol@rusnak.io";
github = "prusnak";
name = "Pavol Rusnak";
keys = [{
longkeyid = "rsa4096/0x91F3B339B9A02A3D";
fingerprint = "86E6 792F C27B FD47 8860 C110 91F3 B339 B9A0 2A3D";
}];
};
pshendry = {
email = "paul@pshendry.com";

View File

@ -6,7 +6,7 @@
<author><personname><firstname>Eelco</firstname><surname>Dolstra</surname></personname>
<contrib>Author</contrib>
</author>
<copyright><year>2007-2018</year><holder>Eelco Dolstra</holder>
<copyright><year>2007-2019</year><holder>Eelco Dolstra</holder>
</copyright>
</info>
<xi:include href="man-configuration.xml" />

View File

@ -214,6 +214,18 @@
have a look at the <link xlink:href="https://github.com/nginxinc/nginx-prometheus-exporter">official repo</link>.
</para>
</listitem>
<listitem>
<para>
Nodejs 8 is scheduled EOL under the lifetime of 19.09 and has been dropped.
</para>
</listitem>
<listitem>
<para>
By default, prometheus exporters are now run with <literal>DynamicUser</literal> enabled.
Exporters that need a real user, now run under a seperate user and group which follow the pattern <literal>&lt;exporter-name&gt;-exporter</literal>, instead of the previous default <literal>nobody</literal> and <literal>nogroup</literal>.
Only some exporters are affected by the latter, namely the exporters <literal>dovecot</literal>, <literal>node</literal>, <literal>postfix</literal> and <literal>varnish</literal>.
</para>
</listitem>
</itemizedlist>
</section>

View File

@ -51,7 +51,7 @@ with lib;
systemd.packages = packages;
environment.variables = {
GTK_USE_PORTAL = optional cfg.gtkUsePortal "1";
GTK_USE_PORTAL = mkIf cfg.gtkUsePortal "1";
XDG_DESKTOP_PORTAL_PATH = map (p: "${p}/share/xdg-desktop-portal/portals") cfg.extraPortals;
};
};

View File

@ -235,6 +235,7 @@ in
systemd.user.services.ssh-agent = mkIf cfg.startAgent
{ description = "SSH Agent";
wantedBy = [ "default.target" ];
unitConfig.ConditionUser = "!@system";
serviceConfig =
{ ExecStartPre = "${pkgs.coreutils}/bin/rm -f %t/ssh-agent";
ExecStart =

View File

@ -502,6 +502,7 @@ in {
"d ${cfg.statePath} 0750 ${cfg.user} ${cfg.group} -"
"d ${cfg.statePath}/builds 0750 ${cfg.user} ${cfg.group} -"
"d ${cfg.statePath}/config 0750 ${cfg.user} ${cfg.group} -"
"d ${cfg.statePath}/config/initializers 0750 ${cfg.user} ${cfg.group} -"
"d ${cfg.statePath}/db 0750 ${cfg.user} ${cfg.group} -"
"d ${cfg.statePath}/log 0750 ${cfg.user} ${cfg.group} -"
"d ${cfg.statePath}/repositories 2770 ${cfg.user} ${cfg.group} -"

View File

@ -28,10 +28,12 @@ let
"dovecot"
"fritzbox"
"json"
"mail"
"minio"
"nginx"
"node"
"postfix"
"postgres"
"snmp"
"surfboard"
"tor"
@ -86,7 +88,7 @@ let
};
user = mkOption {
type = types.str;
default = "nobody";
default = "${name}-exporter";
description = ''
User name under which the ${name} exporter shall be run.
Has no effect when <option>systemd.services.prometheus-${name}-exporter.serviceConfig.DynamicUser</option> is true.
@ -94,7 +96,7 @@ let
};
group = mkOption {
type = types.str;
default = "nobody";
default = "${name}-exporter";
description = ''
Group under which the ${name} exporter shall be run.
Has no effect when <option>systemd.services.prometheus-${name}-exporter.serviceConfig.DynamicUser</option> is true.
@ -125,8 +127,23 @@ let
);
mkExporterConf = { name, conf, serviceOpts }:
let
enableDynamicUser = serviceOpts.serviceConfig.DynamicUser or true;
in
mkIf conf.enable {
warnings = conf.warnings or [];
users.users = (mkIf (conf.user == "${name}-exporter" && !enableDynamicUser) {
"${name}-exporter" = {
description = ''
Prometheus ${name} exporter service user
'';
isSystemUser = true;
inherit (conf) group;
};
});
users.groups = (mkIf (conf.group == "${name}-exporter" && !enableDynamicUser) {
"${name}-exporter" = {};
});
networking.firewall.extraCommands = mkIf conf.openFirewall (concatStrings [
"ip46tables -A nixos-fw ${conf.firewallFilter} "
"-m comment --comment ${name}-exporter -j nixos-fw-accept"
@ -137,7 +154,8 @@ let
serviceConfig.Restart = mkDefault "always";
serviceConfig.PrivateTmp = mkDefault true;
serviceConfig.WorkingDirectory = mkDefault /tmp;
} serviceOpts ] ++ optional (!(serviceOpts.serviceConfig.DynamicUser or false)) {
serviceConfig.DynamicUser = mkDefault enableDynamicUser;
} serviceOpts ] ++ optional (!enableDynamicUser) {
serviceConfig.User = conf.user;
serviceConfig.Group = conf.group;
});
@ -162,13 +180,19 @@ in
};
config = mkMerge ([{
assertions = [{
assertions = [ {
assertion = (cfg.snmp.configurationPath == null) != (cfg.snmp.configuration == null);
message = ''
Please ensure you have either `services.prometheus.exporters.snmp.configuration'
or `services.prometheus.exporters.snmp.configurationPath' set!
'';
}];
} {
assertion = (cfg.mail.configFile == null) != (cfg.mail.configuration == {});
message = ''
Please specify either 'services.prometheus.exporters.mail.configuration'
or 'services.prometheus.exporters.mail.configFile'.
'';
} ];
}] ++ [(mkIf config.services.minio.enable {
services.prometheus.exporters.minio.minioAddress = mkDefault "http://localhost:9000";
services.prometheus.exporters.minio.minioAccessKey = mkDefault config.services.minio.accessKey;

View File

@ -159,8 +159,10 @@ in
# `serviceOpts.script` and `serviceOpts.serviceConfig.ExecStart`
# has to be specified here. This will be merged with the default
# service confiuration.
# Note that by default 'DynamicUser' is 'true'.
serviceOpts = {
serviceConfig = {
DynamicUser = false;
ExecStart = ''
${pkgs.prometheus-postfix-exporter}/bin/postfix_exporter \
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \

View File

@ -39,7 +39,6 @@ in
};
serviceOpts = {
serviceConfig = {
DynamicUser = true;
ExecStart = ''
${pkgs.prometheus-bind-exporter}/bin/bind_exporter \
-web.listen-address ${cfg.listenAddress}:${toString cfg.port} \

View File

@ -18,7 +18,6 @@ in
serviceOpts = {
serviceConfig = {
AmbientCapabilities = [ "CAP_NET_RAW" ]; # for ping probes
DynamicUser = true;
ExecStart = ''
${pkgs.prometheus-blackbox-exporter}/bin/blackbox_exporter \
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \

View File

@ -64,7 +64,6 @@ in
'' else "";
in {
serviceConfig = {
DynamicUser = true;
ExecStart = ''
${pkgs.prometheus-collectd-exporter}/bin/collectd_exporter \
-log.format ${cfg.logFormat} \

View File

@ -26,7 +26,6 @@ in
};
serviceOpts = {
serviceConfig = {
DynamicUser = true;
ExecStart = ''
${pkgs.prometheus-dnsmasq-exporter}/bin/dnsmasq_exporter \
--listen ${cfg.listenAddress}:${toString cfg.port} \

View File

@ -39,8 +39,8 @@ in
mail_plugins = $mail_plugins old_stats
service old-stats {
unix_listener old-stats {
user = nobody
group = nobody
user = dovecot-exporter
group = dovecot-exporter
}
}
''';
@ -59,6 +59,7 @@ in
};
serviceOpts = {
serviceConfig = {
DynamicUser = false;
ExecStart = ''
${pkgs.prometheus-dovecot-exporter}/bin/dovecot_exporter \
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \

View File

@ -26,7 +26,6 @@ in
};
serviceOpts = {
serviceConfig = {
DynamicUser = true;
ExecStart = ''
${pkgs.prometheus-fritzbox-exporter}/bin/exporter \
-listen-address ${cfg.listenAddress}:${toString cfg.port} \

View File

@ -24,7 +24,6 @@ in
};
serviceOpts = {
serviceConfig = {
DynamicUser = true;
ExecStart = ''
${pkgs.prometheus-json-exporter}/bin/prometheus-json-exporter \
--port ${toString cfg.port} \

View File

@ -0,0 +1,157 @@
{ config, lib, pkgs, options }:
with lib;
let
cfg = config.services.prometheus.exporters.mail;
configurationFile = pkgs.writeText "prometheus-mail-exporter.conf" (builtins.toJSON (
# removes the _module attribute, null values and converts attrNames to lowercase
mapAttrs' (name: value:
if name == "servers"
then nameValuePair (toLower name)
((map (srv: (mapAttrs' (n: v: nameValuePair (toLower n) v)
(filterAttrs (n: v: !(n == "_module" || v == null)) srv)
))) value)
else nameValuePair (toLower name) value
) (filterAttrs (n: _: !(n == "_module")) cfg.configuration)
));
serverOptions.options = {
name = mkOption {
type = types.str;
description = ''
Value for label 'configname' which will be added to all metrics.
'';
};
server = mkOption {
type = types.str;
description = ''
Hostname of the server that should be probed.
'';
};
port = mkOption {
type = types.int;
example = 587;
description = ''
Port to use for SMTP.
'';
};
from = mkOption {
type = types.str;
example = "exporteruser@domain.tld";
description = ''
Content of 'From' Header for probing mails.
'';
};
to = mkOption {
type = types.str;
example = "exporteruser@domain.tld";
description = ''
Content of 'To' Header for probing mails.
'';
};
detectionDir = mkOption {
type = types.path;
example = "/var/spool/mail/exporteruser/new";
description = ''
Directory in which new mails for the exporter user are placed.
Note that this needs to exist when the exporter starts.
'';
};
login = mkOption {
type = types.nullOr types.str;
default = null;
example = "exporteruser@domain.tld";
description = ''
Username to use for SMTP authentication.
'';
};
passphrase = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
Password to use for SMTP authentication.
'';
};
};
exporterOptions.options = {
monitoringInterval = mkOption {
type = types.str;
example = "10s";
description = ''
Time interval between two probe attempts.
'';
};
mailCheckTimeout = mkOption {
type = types.str;
description = ''
Timeout until mails are considered "didn't make it".
'';
};
disableFileDelition = mkOption {
type = types.bool;
default = false;
description = ''
Disables the exporter's function to delete probing mails.
'';
};
servers = mkOption {
type = types.listOf (types.submodule serverOptions);
default = [];
example = literalExample ''
[ {
name = "testserver";
server = "smtp.domain.tld";
port = 587;
from = "exporteruser@domain.tld";
to = "exporteruser@domain.tld";
detectionDir = "/path/to/Maildir/new";
} ]
'';
description = ''
List of servers that should be probed.
'';
};
};
in
{
port = 9225;
extraOpts = {
configFile = mkOption {
type = types.nullOr types.path;
default = null;
description = ''
Specify the mailexporter configuration file to use.
'';
};
configuration = mkOption {
type = types.submodule exporterOptions;
default = {};
description = ''
Specify the mailexporter configuration file to use.
'';
};
telemetryPath = mkOption {
type = types.str;
default = "/metrics";
description = ''
Path under which to expose metrics.
'';
};
};
serviceOpts = {
serviceConfig = {
DynamicUser = false;
ExecStart = ''
${pkgs.prometheus-mail-exporter}/bin/mailexporter \
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
--config.file ${
if cfg.configuration != {} then configurationFile else cfg.configFile
} \
${concatStringsSep " \\\n " cfg.extraFlags}
'';
};
};
}

View File

@ -50,7 +50,6 @@ in
};
serviceOpts = {
serviceConfig = {
DynamicUser = true;
ExecStart = ''
${pkgs.prometheus-minio-exporter}/bin/minio-exporter \
-web.listen-address ${cfg.listenAddress}:${toString cfg.port} \

View File

@ -34,7 +34,6 @@ in
};
serviceOpts = {
serviceConfig = {
DynamicUser = true;
ExecStart = ''
${pkgs.prometheus-nginx-exporter}/bin/nginx-prometheus-exporter \
--nginx.scrape-uri '${cfg.scrapeUri}' \

View File

@ -27,6 +27,7 @@ in
};
serviceOpts = {
serviceConfig = {
DynamicUser = false;
RuntimeDirectory = "prometheus-node-exporter";
ExecStart = ''
${pkgs.prometheus-node-exporter}/bin/node_exporter \

View File

@ -62,6 +62,7 @@ in
};
serviceOpts = {
serviceConfig = {
DynamicUser = false;
ExecStart = ''
${pkgs.prometheus-postfix-exporter}/bin/postfix_exporter \
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \

View File

@ -0,0 +1,47 @@
{ config, lib, pkgs, options }:
with lib;
let
cfg = config.services.prometheus.exporters.postgres;
in
{
port = 9187;
extraOpts = {
telemetryPath = mkOption {
type = types.str;
default = "/metrics";
description = ''
Path under which to expose metrics.
'';
};
dataSourceName = mkOption {
type = types.str;
default = "user=postgres database=postgres host=/run/postgresql sslmode=disable";
example = "postgresql://username:password@localhost:5432/postgres?sslmode=disable";
description = ''
Accepts PostgreSQL URI form and key=value form arguments.
'';
};
runAsLocalSuperUser = mkOption {
type = types.bool;
default = false;
description = ''
Whether to run the exporter as the local 'postgres' super user.
'';
};
};
serviceOpts = {
environment.DATA_SOURCE_NAME = cfg.dataSourceName;
serviceConfig = {
DynamicUser = false;
User = mkIf cfg.runAsLocalSuperUser (mkForce "postgres");
ExecStart = ''
${pkgs.prometheus-postgres-exporter}/bin/postgres_exporter \
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
--web.telemetry-path ${cfg.telemetryPath} \
${concatStringsSep " \\\n " cfg.extraFlags}
'';
};
};
}

View File

@ -57,7 +57,6 @@ in
else "${pkgs.writeText "snmp-eporter-conf.yml" (builtins.toJSON cfg.configuration)}";
in {
serviceConfig = {
DynamicUser = true;
ExecStart = ''
${pkgs.prometheus-snmp-exporter.bin}/bin/snmp_exporter \
--config.file=${configFile} \

View File

@ -20,7 +20,6 @@ in
description = "Prometheus exporter for surfboard cable modem";
unitConfig.Documentation = "https://github.com/ipstatic/surfboard_exporter";
serviceConfig = {
DynamicUser = true;
ExecStart = ''
${pkgs.prometheus-surfboard-exporter}/bin/surfboard_exporter \
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \

View File

@ -26,7 +26,6 @@ in
};
serviceOpts = {
serviceConfig = {
DynamicUser = true;
ExecStart = ''
${pkgs.prometheus-tor-exporter}/bin/prometheus-tor-exporter \
-b ${cfg.listenAddress} \

View File

@ -51,7 +51,6 @@ in
};
serviceOpts = {
serviceConfig = {
DynamicUser = true;
ExecStart = ''
${pkgs.prometheus-unifi-exporter}/bin/unifi_exporter \
-telemetry.addr ${cfg.listenAddress}:${toString cfg.port} \

View File

@ -69,6 +69,7 @@ in
path = [ pkgs.varnish ];
serviceConfig = {
RestartSec = mkDefault 1;
DynamicUser = false;
ExecStart = ''
${pkgs.prometheus-varnish-exporter}/bin/prometheus_varnish_exporter \
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \

View File

@ -36,19 +36,17 @@ in {
};
};
serviceOpts = {
script = ''
${pkgs.prometheus-wireguard-exporter}/bin/prometheus_wireguard_exporter \
-p ${toString cfg.port} \
${optionalString cfg.verbose "-v"} \
${optionalString cfg.singleSubnetPerField "-s"} \
${optionalString (cfg.wireguardConfig != null) "-n ${cfg.wireguardConfig}"}
'';
path = [ pkgs.wireguard-tools ];
serviceConfig = {
DynamicUser = true;
AmbientCapabilities = [ "CAP_NET_ADMIN" ];
ExecStart = ''
${pkgs.prometheus-wireguard-exporter}/bin/prometheus_wireguard_exporter \
-p ${toString cfg.port} \
${optionalString cfg.verbose "-v"} \
${optionalString cfg.singleSubnetPerField "-s"} \
${optionalString (cfg.wireguardConfig != null) "-n ${cfg.wireguardConfig}"}
'';
};
};
}

View File

@ -48,6 +48,7 @@ in {
requires = [ "keybase.service" ];
after = [ "keybase.service" ];
path = [ "/run/wrappers" ];
unitConfig.ConditionUser = "!@system";
serviceConfig = {
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p ${cfg.mountPoint}";
ExecStart = "${pkgs.kbfs}/bin/kbfsfuse ${toString cfg.extraFlags} ${cfg.mountPoint}";

View File

@ -26,6 +26,7 @@ in {
systemd.user.services.keybase = {
description = "Keybase service";
unitConfig.ConditionUser = "!@system";
serviceConfig = {
ExecStart = ''
${pkgs.keybase}/bin/keybase service --auto-forked

View File

@ -372,16 +372,18 @@ in {
systemd.packages = [ pkgs.syncthing ];
users = mkIf (cfg.systemService && cfg.user == defaultUser) {
users."${defaultUser}" =
users.users = mkIf (cfg.systemService && cfg.user == defaultUser) {
"${defaultUser}" =
{ group = cfg.group;
home = cfg.dataDir;
createHome = true;
uid = config.ids.uids.syncthing;
description = "Syncthing daemon user";
};
};
groups."${defaultUser}".gid =
users.groups = mkIf (cfg.systemService && cfg.group == defaultUser) {
"${defaultUser}".gid =
config.ids.gids.syncthing;
};

View File

@ -188,6 +188,47 @@ let
'';
};
mail = {
exporterConfig = {
enable = true;
configuration = {
monitoringInterval = "2s";
mailCheckTimeout = "10s";
servers = [ {
name = "testserver";
server = "localhost";
port = 25;
from = "mail-exporter@localhost";
to = "mail-exporter@localhost";
detectionDir = "/var/spool/mail/mail-exporter/new";
} ];
};
};
metricProvider = {
services.postfix.enable = true;
systemd.services.prometheus-mail-exporter = {
after = [ "postfix.service" ];
requires = [ "postfix.service" ];
preStart = ''
mkdir -p 0600 mail-exporter/new
'';
serviceConfig = {
ProtectHome = true;
ReadOnlyPaths = "/";
ReadWritePaths = "/var/spool/mail";
WorkingDirectory = "/var/spool/mail";
};
};
users.users.mailexporter.isSystemUser = true;
};
exporterTest = ''
waitForUnit("postfix.service")
waitForUnit("prometheus-mail-exporter.service")
waitForOpenPort(9225)
waitUntilSucceeds("curl -sSf http://localhost:9225/metrics | grep -q 'mail_deliver_success{configname=\"testserver\"} 1'")
'';
};
nginx = {
exporterConfig = {
enable = true;
@ -232,6 +273,30 @@ let
'';
};
postgres = {
exporterConfig = {
enable = true;
runAsLocalSuperUser = true;
};
metricProvider = {
services.postgresql.enable = true;
};
exporterTest = ''
waitForUnit("prometheus-postgres-exporter.service");
waitForOpenPort(9187);
waitForUnit("postgresql.service");
succeed("curl -sSf http://localhost:9187/metrics | grep -q 'pg_exporter_last_scrape_error 0'");
succeed("curl -sSf http://localhost:9187/metrics | grep -q 'pg_up 1'");
systemctl("stop postgresql.service");
succeed("curl -sSf http://localhost:9187/metrics | grep -qv 'pg_exporter_last_scrape_error 0'");
succeed("curl -sSf http://localhost:9187/metrics | grep -q 'pg_up 0'");
systemctl("start postgresql.service");
waitForUnit("postgresql.service");
succeed("curl -sSf http://localhost:9187/metrics | grep -q 'pg_exporter_last_scrape_error 0'");
succeed("curl -sSf http://localhost:9187/metrics | grep -q 'pg_up 1'");
'';
};
snmp = {
exporterConfig = {
enable = true;

View File

@ -1,7 +1,7 @@
{ fetchurl, stdenv, squashfsTools, xorg, alsaLib, makeWrapper, openssl, freetype
, glib, pango, cairo, atk, gdk-pixbuf, gtk2, cups, nspr, nss, libpng, libnotify
, libgcrypt, systemd, fontconfig, dbus, expat, ffmpeg_3, curl, zlib, gnome3
, at-spi2-atk
, at-spi2-atk, at-spi2-core, apulse
}:
let
@ -10,20 +10,22 @@ let
# If an update breaks things, one of those might have valuable info:
# https://aur.archlinux.org/packages/spotify/
# https://community.spotify.com/t5/Desktop-Linux
version = "1.0.96.181.gf6bc1b6b-12";
version = "1.1.10.546.ge08ef575-19";
# To get the latest stable revision:
# curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/spotify?channel=stable' | jq '.download_url,.version,.last_updated'
# To get general information:
# curl -H 'Snap-Device-Series: 16' 'https://api.snapcraft.io/v2/snaps/info/spotify' | jq '.'
# More examples of api usage:
# https://github.com/canonical-websites/snapcraft.io/blob/master/webapp/publisher/snaps/views.py
rev = "30";
rev = "36";
deps = [
alsaLib
apulse
atk
at-spi2-atk
at-spi2-core
cairo
cups
curl
@ -72,7 +74,7 @@ stdenv.mkDerivation {
# https://community.spotify.com/t5/Desktop-Linux/Redistribute-Spotify-on-Linux-Distributions/td-p/1695334
src = fetchurl {
url = "https://api.snapcraft.io/api/v1/snaps/download/pOBIoZ2LrCB3rDohMxoYGnbN14EHOgD7_${rev}.snap";
sha512 = "859730fbc80067f0828f7e13eee9a21b13b749f897a50e17c2da4ee672785cfd79e1af6336e609529d105e040dc40f61b6189524783ac93d49f991c4ea8b3c56";
sha512 = "c49f1a86a9b737e64a475bbe62754a36f607669e908eb725a2395f0a0a6b95968e0c8ce27ab2c8b6c92fe8cbacb1ef58de11c79b92dc0f58c2c6d3a140706a1f";
};
buildInputs = [ squashfsTools makeWrapper ];
@ -134,6 +136,8 @@ stdenv.mkDerivation {
librarypath="${stdenv.lib.makeLibraryPath deps}:$libdir"
wrapProgram $out/share/spotify/spotify \
--prefix LD_LIBRARY_PATH : "$librarypath" \
--prefix LD_LIBRARY_PATH : "${apulse}/lib/apulse" \
--set APULSE_PLAYBACK_DEVICE plug:dmix \
--prefix PATH : "${gnome3.zenity}/bin"
# fix Icon line in the desktop file (#48062)
@ -158,7 +162,7 @@ stdenv.mkDerivation {
homepage = https://www.spotify.com/;
description = "Play music from the Spotify music service";
license = licenses.unfree;
maintainers = with maintainers; [ eelco ftrvxmtrx sheenobu mudri timokau ];
maintainers = with maintainers; [ eelco ftrvxmtrx sheenobu mudri timokau angristan ];
platforms = [ "x86_64-linux" ];
};
}

View File

@ -0,0 +1,90 @@
lib: self:
let
fetcherGenerators = { repo ? null
, url ? null
, ... }:
{ sha256
, commit
, ...}: {
github = self.callPackage ({ fetchFromGitHub }:
fetchFromGitHub {
owner = lib.head (lib.splitString "/" repo);
repo = lib.head (lib.tail (lib.splitString "/" repo));
rev = commit;
inherit sha256;
}
) {};
gitlab = self.callPackage ({ fetchFromGitLab }:
fetchFromGitLab {
owner = lib.head (lib.splitString "/" repo);
repo = lib.head (lib.tail (lib.splitString "/" repo));
rev = commit;
inherit sha256;
}
) {};
git = self.callPackage ({ fetchgit }:
fetchgit {
rev = commit;
inherit sha256 url;
}
) {};
bitbucket = self.callPackage ({ fetchhg }:
fetchhg {
rev = commit;
url = "https://bitbucket.com/${repo}";
inherit sha256;
}
) {};
hg = self.callPackage ({ fetchhg }:
fetchhg {
rev = commit;
inherit sha256 url;
}
) {};
};
in {
melpaDerivation = variant:
{ ename, fetcher
, commit ? null
, sha256 ? null
, ... }@args:
let
sourceArgs = args."${variant}";
version = sourceArgs.version or null;
deps = sourceArgs.deps or null;
error = sourceArgs.error or args.error or null;
hasSource = lib.hasAttr variant args;
pname = builtins.replaceStrings [ "@" ] [ "at" ] ename;
broken = ! isNull error;
in
lib.nameValuePair ename (if hasSource then (
self.callPackage ({ melpaBuild, fetchurl, ... }@pkgargs:
melpaBuild {
inherit pname;
ename = ename;
version = if isNull version then "" else
lib.concatStringsSep "." (map toString version);
# TODO: Broken should not result in src being null (hack to avoid eval errors)
src = if (isNull sha256 || broken) then null else
lib.getAttr fetcher (fetcherGenerators args sourceArgs);
recipe = if isNull commit then null else
fetchurl {
name = pname + "-recipe";
url = "https://raw.githubusercontent.com/melpa/melpa/${commit}/recipes/${ename}";
inherit sha256;
};
packageRequires = lib.optional (! isNull deps)
(map (dep: pkgargs."${dep}" or self."${dep}" or null)
deps);
meta = (sourceArgs.meta or {}) // {
inherit broken;
};
}
) {}
) else null);
}

File diff suppressed because it is too large Load Diff

View File

@ -4,12 +4,11 @@
To update the list of packages from MELPA,
1. Clone https://github.com/ttuegel/emacs2nix.
2. Clone https://github.com/milkypostman/melpa.
3. Run `./melpa-packages.sh --melpa PATH_TO_MELPA_CLONE` from emacs2nix.
4. Copy the new `melpa-generated.nix` file into Nixpkgs.
5. Check for evaluation errors: `nix-instantiate ./. -A emacsPackagesNg.melpaPackages`.
6. `git add pkgs/applications/editors/emacs-modes/melpa-generated.nix && git commit -m "melpa-packages $(date -Idate)"`
1. Run ./update-melpa
2. Check for evaluation errors:
env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPackagesNg.melpaStablePackages
env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPackagesNg.melpaPackages
3. `git commit -m "melpa-packages: $(date -Idate)" recipes-archive-melpa.json`
*/
@ -18,7 +17,9 @@ To update the list of packages from MELPA,
self:
let
imported = import ./melpa-generated.nix { inherit (self) callPackage; };
inherit (import ./libgenerated.nix lib self) melpaDerivation;
imported = lib.listToAttrs (map (melpaDerivation "unstable")
(lib.importJSON ./recipes-archive-melpa.json));
super = builtins.removeAttrs imported [
"swbuff-x" # required dependency swbuff is missing
];
@ -233,6 +234,12 @@ self:
# upstream issue: missing file header
textmate = markBroken super.textmate;
treemacs-magit = super.treemacs-magit.overrideAttrs (attrs: {
# searches for Git at build time
nativeBuildInputs =
(attrs.nativeBuildInputs or []) ++ [ external.git ];
});
# missing OCaml
utop = markBroken super.utop;
@ -258,6 +265,29 @@ self:
'';
});
});
# Map legacy renames from emacs2nix since code generation was ported to emacs lisp
_0blayout = super."0blayout";
_0xc = super."0xc";
_2048-game = super."2048-game";
_4clojure = super."4clojure";
at = super."@";
desktop-plus = super."desktop+";
# filesets-plus = super."filesets+";
ghub-plus = super."ghub+";
git-gutter-plus = super."git-gutter+";
git-gutter-fringe-plus = super."git-gutter-fringe+";
ido-completing-read-plus = super."ido-completing-read+";
image-plus = super."image+";
image-dired-plus = super."image-dired+";
markdown-mode-plus = super."markdown-mode+";
package-plus = super."package+";
rect-plus = super."rect+";
term-plus = super."term+";
term-plus-key-intercept = super."term+key-intercept";
term-plus-mux = super."term+mux";
xml-plus = super."xml+";
};
melpaPackages =

File diff suppressed because it is too large Load Diff

View File

@ -4,22 +4,23 @@
To update the list of packages from MELPA,
1. Clone https://github.com/ttuegel/emacs2nix.
2. Clone https://github.com/milkypostman/melpa.
3. Run `./melpa-stable-packages.sh --melpa PATH_TO_MELPA_CLONE` from emacs2nix.
4. Copy the new `melpa-stable-generated.nix` file into Nixpkgs.
5. Check for evaluation errors: `nix-instantiate ./. -A emacsPackagesNg.melpaStablePackages`.
6. `git add pkgs/applications/editors/emacs-modes/melpa-stable-generated.nix && git commit -m "melpa-stable-packages $(date -Idate)"`
1. Run ./update-melpa
2. Check for evaluation errors:
env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPackagesNg.melpaStablePackages
env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPackagesNg.melpaPackages
3. `git commit -m "melpa-packages: $(date -Idate)" recipes-archive-melpa.json`
*/
{ external }:
{ lib, external }:
self:
let
imported = import ./melpa-stable-generated.nix { inherit (self) callPackage; };
inherit (import ./libgenerated.nix lib self) melpaDerivation;
imported = lib.listToAttrs (map (melpaDerivation "stable")
(lib.importJSON ./recipes-archive-melpa.json));
super = imported;
dontConfigure = pkg: pkg.override (args: {
@ -28,11 +29,11 @@ self:
});
});
markBroken = pkg: pkg.override (args: {
markBroken = pkg: if pkg != null then pkg.override (args: {
melpaBuild = drv: args.melpaBuild (drv // {
meta = (drv.meta or {}) // { broken = true; };
});
});
}) else null;
overrides = {
# Expects bash to be at /bin/bash
@ -205,6 +206,28 @@ self:
# upstream issue: missing file header
window-numbering = markBroken super.window-numbering;
# Map legacy renames from emacs2nix since code generation was ported to emacs lisp
_0blayout = super."0blayout";
_0xc = super."0xc";
_2048-game = super."2048-game";
_4clojure = super."4clojure";
at = super."@";
desktop-plus = super."desktop+";
ghub-plus = super."ghub+";
git-gutter-plus = super."git-gutter+";
git-gutter-fringe-plus = super."git-gutter-fringe+";
ido-completing-read-plus = super."ido-completing-read+";
image-plus = super."image+";
image-dired-plus = super."image-dired+";
markdown-mode-plus = super."markdown-mode+";
package-plus = super."package+";
rect-plus = super."rect+";
term-plus = super."term+";
term-plus-key-intercept = super."term+key-intercept";
term-plus-mux = super."term+mux";
xml-plus = super."xml+";
};
melpaStablePackages = super // overrides;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
#! /usr/bin/env nix-shell
#! nix-shell --show-trace -i sh -p git nix nix-prefetch-git nix-prefetch-hg "import ./updater-emacs.nix"
# "with import ../../../.. {}; emacsWithPackages (epkgs: with epkgs.melpaPackages; [ promise semaphore ])"
exec emacs --fg-daemon=updater --quick -l update-melpa.el -f run-updater "$@"
# exec emacs update-melpa.el "$@"

View File

@ -0,0 +1,434 @@
;; -*- lexical-binding: t -*-
;; This is the updater for recipes-archive-melpa.json
(require 'promise)
(require 'semaphore-promise)
(require 'url)
(require 'json)
(require 'cl)
(require 'subr-x)
(require 'seq)
;; # Lib
(defun alist-set (key value alist)
(cons
(cons key value)
(assq-delete-all
key alist)))
(defun alist-update (key f alist)
(let ((value (alist-get key alist)))
(cons
(cons key (funcall f value))
(assq-delete-all
key alist))))
(defun process-promise (semaphore program &rest args)
"Generate an asynchronous process and
return Promise to resolve in that process."
(promise-then
(semaphore-promise-gated
semaphore
(lambda (resolve reject)
(funcall resolve (apply #'promise:make-process program args))))
#'car))
(defun mangle-name (s)
(if (string-match "^[a-zA-Z].*" s)
s
(concat "_" s)))
;; ## Shell promise + env
(defun as-string (o)
(with-output-to-string (princ o)))
(defun assocenv (env &rest namevals)
(let ((process-environment (copy-sequence env)))
(mapc (lambda (e)
(setenv (as-string (car e))
(cadr e)))
(seq-partition namevals 2))
process-environment))
(defun shell-promise (semaphore env script)
(semaphore-promise-gated
semaphore
(lambda (resolve reject)
(let ((process-environment env))
(funcall resolve (promise:make-shell-command script))))))
;; # Updater
;; ## Previous Archive Reader
(defun previous-commit (index ename variant)
(when-let (pdesc (and index (gethash ename index)))
(when-let (desc (and pdesc (gethash variant pdesc)))
(gethash 'commit desc))))
(defun previous-sha256 (index ename variant)
(when-let (pdesc (and index (gethash ename index)))
(when-let (desc (and pdesc (gethash variant pdesc)))
(gethash 'sha256 desc))))
(defun parse-previous-archive (filename)
(let ((idx (make-hash-table :test 'equal)))
(loop for desc in
(let ((json-object-type 'hash-table)
(json-array-type 'list)
(json-key-type 'symbol))
(json-read-file filename))
do (puthash (gethash 'ename desc)
desc idx))
idx))
;; ## Prefetcher
;; (defun latest-git-revision (url)
;; (process-promise "git" "ls-remote" url))
(defun prefetch (semaphore fetcher repo commit)
(promise-then
(apply 'process-promise
semaphore
(pcase fetcher
("github" (list "nix-prefetch-url"
"--unpack" (concat "https://github.com/" repo "/archive/" commit ".tar.gz")))
("gitlab" (list "nix-prefetch-url"
"--unpack" (concat "https://gitlab.com/" repo "/repository/archive.tar.gz?ref=" commit)))
("bitbucket" (list "nix-prefetch-hg"
(concat "https://bitbucket.com/" repo) commit))
("hg" (list "nix-prefetch-hg"
repo commit))
("git" (list "nix-prefetch-git"
"--fetch-submodules"
"--url" repo
"--rev" commit))
(_ (throw 'unknown-fetcher fetcher))))
(lambda (res)
(pcase fetcher
("git" (alist-get 'sha256 (json-read-from-string res)))
(_ (car (split-string res)))))))
(defun source-sha (semaphore ename eprops aprops previous variant)
(let* ((fetcher (alist-get 'fetcher eprops))
(url (alist-get 'url eprops))
(repo (alist-get 'repo eprops))
(commit (gethash 'commit aprops))
(prev-commit (previous-commit previous ename variant))
(prev-sha256 (previous-sha256 previous ename variant)))
(if (and commit prev-sha256
(equal prev-commit commit))
(progn
(message "INFO: %s: re-using %s %s" ename prev-commit prev-sha256)
(promise-resolve `((sha256 . ,prev-sha256))))
(if (and commit (or repo url))
(promise-then
(prefetch semaphore fetcher (or repo url) commit)
(lambda (sha256)
(message "INFO: %s: prefetched repository %s %s" ename commit sha256)
`((sha256 . ,sha256)))
(lambda (err)
(message "ERROR: %s: during prefetch %s" ename err)
(promise-resolve
`((error . ,err)))))
(progn
(message "ERROR: %s: no commit information" ename)
(promise-resolve
`((error . "No commit information"))))))))
(defun source-info (recipe archive source-sha)
(let* ((esym (car recipe))
(ename (symbol-name esym))
(eprops (cdr recipe))
(aentry (gethash esym archive))
(version (and aentry (gethash 'ver aentry)))
(deps (when-let (deps (gethash 'deps aentry))
(remove 'emacs (hash-table-keys deps))))
(aprops (and aentry (gethash 'props aentry)))
(commit (gethash 'commit aprops)))
(append `((version . ,version))
(when (< 0 (length deps))
`((deps . ,(sort deps 'string<))))
`((commit . ,commit))
source-sha)))
(defun recipe-info (recipe-index ename)
(if-let (desc (gethash ename recipe-index))
(destructuring-bind (rcp-commit . rcp-sha256) desc
`((commit . ,rcp-commit)
(sha256 . ,rcp-sha256)))
`((error . "No recipe info"))))
(defun start-fetch (semaphore recipe-index-promise recipes unstable-archive stable-archive previous)
(promise-all
(mapcar (lambda (entry)
(let* ((esym (car entry))
(ename (symbol-name esym))
(eprops (cdr entry))
(fetcher (alist-get 'fetcher eprops))
(url (alist-get 'url eprops))
(repo (alist-get 'repo eprops))
(unstable-aentry (gethash esym unstable-archive))
(unstable-aprops (and unstable-aentry (gethash 'props unstable-aentry)))
(unstable-commit (and unstable-aprops (gethash 'commit unstable-aprops)))
(stable-aentry (gethash esym stable-archive))
(stable-aprops (and stable-aentry (gethash 'props stable-aentry)))
(stable-commit (and stable-aprops (gethash 'commit stable-aprops)))
(unstable-shap (if unstable-aprops
(source-sha semaphore ename eprops unstable-aprops previous 'unstable)
(promise-resolve nil)))
(stable-shap (if (equal unstable-commit stable-commit)
unstable-shap
(if stable-aprops
(source-sha semaphore ename eprops stable-aprops previous 'stable)
(promise-resolve nil)))))
(promise-then
(promise-all (list recipe-index-promise unstable-shap stable-shap))
(lambda (res)
(seq-let [recipe-index unstable-sha stable-sha] res
(append `((ename . ,ename))
(if-let (desc (gethash ename recipe-index))
(destructuring-bind (rcp-commit . rcp-sha256) desc
(append `((commit . ,rcp-commit)
(sha256 . ,rcp-sha256))
(when (not unstable-aprops)
(message "ERROR: %s: not in archive" ename)
`((error . "Not in archive")))))
`((error . "No recipe info")))
`((fetcher . ,fetcher))
(if (or (equal "github" fetcher)
(equal "bitbucket" fetcher)
(equal "gitlab" fetcher))
`((repo . ,repo))
`((url . ,url)))
(when unstable-aprops `((unstable . ,(source-info entry unstable-archive unstable-sha))))
(when stable-aprops `((stable . ,(source-info entry stable-archive stable-sha))))))))))
recipes)))
;; ## Emitter
(defun emit-json (prefetch-semaphore recipe-index-promise recipes archive stable-archive previous)
(promise-then
(start-fetch
prefetch-semaphore
recipe-index-promise
(sort recipes (lambda (a b)
(string-lessp
(symbol-name (car a))
(symbol-name (car b)))))
archive stable-archive
previous)
(lambda (descriptors)
(message "Finished downloading %d descriptors" (length descriptors))
(let ((buf (generate-new-buffer "*recipes-archive*")))
(with-current-buffer buf
;; (switch-to-buffer buf)
;; (json-mode)
(insert
(let ((json-encoding-pretty-print t)
(json-encoding-default-indentation " "))
(json-encode descriptors)))
buf)))))
;; ## Recipe indexer
(defun http-get (url parser)
(promise-new
(lambda (resolve reject)
(url-retrieve
url (lambda (status)
(funcall resolve (condition-case err
(progn
(goto-char (point-min))
(search-forward "\n\n")
(message (buffer-substring (point-min) (point)))
(delete-region (point-min) (point))
(funcall parser))
(funcall reject err))))))))
(defun json-read-buffer (buffer)
(with-current-buffer buffer
(save-excursion
(mark-whole-buffer)
(json-read))))
(defun error-count (recipes-archive)
(length
(seq-filter
(lambda (desc)
(alist-get 'error desc))
recipes-archive)))
;; (error-count (json-read-buffer "recipes-archive-melpa.json"))
(defun latest-recipe-commit (semaphore repo base-rev recipe)
(shell-promise
semaphore (assocenv process-environment
"GIT_DIR" repo
"BASE_REV" base-rev
"RECIPE" recipe)
"exec git log --first-parent -n1 --pretty=format:%H $BASE_REV -- recipes/$RECIPE"))
(defun latest-recipe-sha256 (semaphore repo base-rev recipe)
(promise-then
(shell-promise
semaphore (assocenv process-environment
"GIT_DIR" repo
"BASE_REV" base-rev
"RECIPE" recipe)
"exec nix-hash --flat --type sha256 --base32 <(
git cat-file blob $(
git ls-tree $BASE_REV recipes/$RECIPE | cut -f1 | cut -d' ' -f3
)
)")
(lambda (res)
(car
(split-string res)))))
(defun index-recipe-commits (semaphore repo base-rev recipes)
(promise-then
(promise-all
(mapcar (lambda (recipe)
(promise-then
(latest-recipe-commit semaphore repo base-rev recipe)
(let ((sha256p (latest-recipe-sha256 semaphore repo base-rev recipe)))
(lambda (commit)
(promise-then sha256p
(lambda (sha256)
(message "Indexed Recipe %s %s %s" recipe commit sha256)
(cons recipe (cons commit sha256))))))))
recipes))
(lambda (rcp-commits)
(let ((idx (make-hash-table :test 'equal)))
(mapc (lambda (rcpc)
(puthash (car rcpc) (cdr rcpc) idx))
rcp-commits)
idx))))
(defun with-melpa-checkout (resolve)
(let ((tmpdir (make-temp-file "melpa-" t)))
(promise-finally
(promise-then
(shell-promise
(semaphore-create 1 "dummy")
(assocenv process-environment "MELPA_DIR" tmpdir)
"cd $MELPA_DIR
(git init --bare
git remote add origin https://github.com/melpa/melpa.git
git fetch origin) 1>&2
echo -n $MELPA_DIR")
(lambda (dir)
(message "Created melpa checkout %s" dir)
(funcall resolve dir)))
(lambda ()
(delete-directory tmpdir t)
(message "Deleted melpa checkout %s" tmpdir)))))
(defun list-recipes (repo base-rev)
(promise-then
(shell-promise nil (assocenv process-environment
"GIT_DIR" repo
"BASE_REV" base-rev)
"git ls-tree --name-only $BASE_REV recipes/")
(lambda (s)
(mapcar (lambda (n)
(substring n 8))
(split-string s)))))
;; ## Main runner
(defvar recipe-indexp)
(defvar archivep)
(defun run-updater ()
(message "Turning off logging to *Message* buffer")
(setq message-log-max nil)
(setenv "GIT_ASKPASS")
(setenv "SSH_ASKPASS")
(setq process-adaptive-read-buffering nil)
;; Indexer and Prefetcher run in parallel
;; Recipe Indexer
(setq recipe-indexp
(with-melpa-checkout
(lambda (repo)
(promise-then
(promise-then
(list-recipes repo "origin/master")
(lambda (recipe-names)
(promise:make-thread #'index-recipe-commits
;; The indexer runs on a local git repository,
;; so it is CPU bound.
;; Adjust for core count + 2
(semaphore-create 6 "local-indexer")
repo "origin/master"
;; (seq-take recipe-names 20)
recipe-names)))
(lambda (res)
(message "Indexed Recipes: %d" (hash-table-count res))
(defvar recipe-index res)
res)
(lambda (err)
(message "ERROR: %s" err))))))
;; Prefetcher + Emitter
(setq archivep
(promise-then
(promise-then (promise-all
(list (http-get "https://melpa.org/recipes.json"
(lambda ()
(let ((json-object-type 'alist)
(json-array-type 'list)
(json-key-type 'symbol))
(json-read))))
(http-get "https://melpa.org/archive.json"
(lambda ()
(let ((json-object-type 'hash-table)
(json-array-type 'list)
(json-key-type 'symbol))
(json-read))))
(http-get "https://stable.melpa.org/archive.json"
(lambda ()
(let ((json-object-type 'hash-table)
(json-array-type 'list)
(json-key-type 'symbol))
(json-read))))))
(lambda (resolved)
(message "Finished download")
(seq-let [recipes-content archive-content stable-archive-content] resolved
;; The prefetcher is network bound, so 64 seems a good estimate
;; for parallel network connections
(promise:make-thread #'emit-json (semaphore-create 64 "prefetch-pool")
recipe-indexp
recipes-content
archive-content
stable-archive-content
(parse-previous-archive "recipes-archive-melpa.json")))))
(lambda (buf)
(with-current-buffer buf
(write-file "recipes-archive-melpa.json")))
(lambda (err)
(message "ERROR: %s" err))))
;; Shutdown routine
(make-thread
(lambda ()
(promise-finally archivep
(lambda ()
;; (message "Joining threads %s" (all-threads))
;; (mapc (lambda (thr)
;; (when (not (eq thr (current-thread)))
;; (thread-join thr)))
;; (all-threads))
(kill-emacs 0))))))

View File

@ -0,0 +1,29 @@
with import ../../../.. {};
(emacsPackagesNgFor emacs26).
emacsWithPackages (epkgs: let
promise = epkgs.trivialBuild {
pname = "promise";
version = "1";
src = fetchFromGitHub {
owner = "bendlas";
repo = "emacs-promise";
rev = "4da97087c5babbd8429b5ce62a8323b9b03c6022";
sha256 = "0yin7kj69g4zxs30pvk47cnfygxlaw7jc7chr3b36lz51yqczjsy";
};
};
semaphore = epkgs.trivialBuild {
pname = "semaphore";
version = "1";
packageRequires = [ promise ];
src = fetchFromGitHub {
owner = "webnf";
repo = "semaphore.el";
rev = "93802cb093073bc6a6ccd797328dafffcef248e0";
sha256 = "09pfyp27m35sv340xarhld7xx2vv5fs5xj4418709iw6l6hpk853";
};
};
in [ promise semaphore ]
# ++ (with epkgs.melpaPackages; [ smex rainbow-delimiters paredit ])
)

View File

@ -1,9 +1,8 @@
{ stdenv, fetchFromGitHub, qmake, pkgconfig, qttools, qtwebengine, hunspell }:
{ stdenv, mkDerivation, fetchFromGitHub, qmake, pkgconfig, qttools, qtwebengine, hunspell }:
stdenv.mkDerivation rec {
mkDerivation rec {
pname = "ghostwriter";
version = "1.8.0";
name = "${pname}-${version}";
src = fetchFromGitHub {
owner = "wereturtle";

View File

@ -3,13 +3,13 @@
stdenv.mkDerivation rec {
name = "goxel-${version}";
version = "0.9.0";
version = "0.10.0";
src = fetchFromGitHub {
owner = "guillaumechereau";
repo = "goxel";
rev = "v${version}";
sha256 = "1vd1vw5pplm4ig9f5gwnbvndnag1h7j0jj0cnj78gpiv96qak2vw";
sha256 = "1mdw4bs7hvfn0yngd9ial5wzlfkcbhr3wzldb1w7s3s48agixkdr";
};
patches = [ ./disable-imgui_ini.patch ];

View File

@ -1,6 +1,6 @@
{ clipnotify, makeWrapper, xsel, dmenu2, utillinux, gawk, stdenv, fetchFromGitHub, lib }:
{ clipnotify, makeWrapper, xsel, dmenu, utillinux, gawk, stdenv, fetchFromGitHub, lib }:
let
runtimePath = lib.makeBinPath [ clipnotify xsel dmenu2 utillinux gawk ];
runtimePath = lib.makeBinPath [ clipnotify xsel dmenu utillinux gawk ];
in
stdenv.mkDerivation rec {
name = "clipmenu-${version}";

View File

@ -1,29 +0,0 @@
{stdenv, fetchhg, libX11, libXinerama, libXft, zlib}:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "dmenu2-0.3pre-2014-07-08";
src = fetchhg {
url = "https://bitbucket.org/melek/dmenu2";
rev = "36cb94a16edf928bdaaa636123392517ed469be0";
sha256 = "1b17z5ypg6ij7zz3ncp3irc87raccna10y4w490c872a99lp23lv";
};
buildInputs = [ libX11 libXinerama zlib libXft ];
postPatch = ''
sed -ri -e 's!\<(dmenu|stest)\>!'"$out/bin"'/&!g' dmenu_run
'';
preConfigure = [ ''sed -i "s@PREFIX = /usr/local@PREFIX = $out@g" config.mk'' ];
meta = {
description = "A patched fork of the original dmenu - an efficient dynamic menu for X";
homepage = https://bitbucket.org/melek/dmenu2;
license = licenses.mit;
maintainers = [ maintainers.cstrahan ];
platforms = platforms.all;
};
}

View File

@ -1,6 +1,6 @@
{ stdenv, fetchurl, fetchpatch, cmake, qtscript, qtwebengine, gdal, proj, routino, quazip }:
{ mkDerivation, lib, fetchurl, fetchpatch, cmake, qtscript, qtwebengine, gdal, proj, routino, quazip }:
stdenv.mkDerivation rec {
mkDerivation rec {
name = "qmapshack-${version}";
version = "1.13.0";
@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
})
];
meta = with stdenv.lib; {
meta = with lib; {
homepage = https://bitbucket.org/maproom/qmapshack/wiki/Home;
description = "Plan your next outdoor trip";
license = licenses.gpl3;

View File

@ -3,11 +3,9 @@
, gtk, girara, gettext, libxml2, check
, sqlite, glib, texlive, libintl, libseccomp
, file, librsvg
, gtk-mac-integration, synctexSupport ? true
, gtk-mac-integration
}:
assert synctexSupport -> texlive != null;
with stdenv.lib;
stdenv.mkDerivation rec {
@ -29,7 +27,8 @@ stdenv.mkDerivation rec {
# "-Dseccomp=enabled"
"-Dmanpages=enabled"
"-Dconvert-icon=enabled"
] ++ optional synctexSupport "-Dsynctex=enabled";
"-Dsynctex=enabled"
];
nativeBuildInputs = [
meson ninja pkgconfig desktop-file-utils python3.pkgs.sphinx
@ -38,8 +37,8 @@ stdenv.mkDerivation rec {
buildInputs = [
gtk girara libintl sqlite glib file librsvg
] ++ optional synctexSupport texlive.bin.core
++ optional stdenv.isLinux libseccomp
texlive.bin.core
] ++ optional stdenv.isLinux libseccomp
++ optional stdenv.isDarwin gtk-mac-integration;
doCheck = true;

View File

@ -1,7 +1,6 @@
{ config, pkgs
# zathura_pdf_mupdf fails to load _opj_create_decompress at runtime on Darwin (https://github.com/NixOS/nixpkgs/pull/61295#issue-277982980)
, useMupdf ? config.zathura.useMupdf or (!pkgs.stdenv.isDarwin)
, synctexSupport ? true }:
, useMupdf ? config.zathura.useMupdf or (!pkgs.stdenv.isDarwin) }:
let
callPackage = pkgs.newScope self;
@ -9,9 +8,7 @@ let
self = rec {
gtk = pkgs.gtk3;
zathura_core = callPackage ./core {
inherit synctexSupport;
};
zathura_core = callPackage ./core { };
zathura_pdf_poppler = callPackage ./pdf-poppler { };

View File

@ -67,7 +67,8 @@ let
in attrs: concatStringsSep " " (attrValues (mapAttrs toFlag attrs));
gnSystemLibraries = [
"flac" "libwebp" "libxslt" "yasm" "opus" "snappy" "libpng" "zlib"
"flac" "libwebp" "libxslt" "yasm" "opus" "snappy" "libpng"
# "zlib" # version 77 reports unresolved dependency on //third_party/zlib:zlib_config
# "libjpeg" # fails with multiple undefined references to chromium_jpeg_*
# "re2" # fails with linker errors
# "ffmpeg" # https://crbug.com/731766

View File

@ -1,18 +1,18 @@
# This file is autogenerated from update.sh in the same directory.
{
beta = {
sha256 = "0pq7q7plbmfg2f6m74wl2l19k15ik2mvw56bfzk4c9cdns8w6b8a";
sha256bin64 = "09zf3kldvi8zh7arvl94vjmbvgsghwa51b5j0ic8ncdn880dlq0j";
version = "76.0.3809.25";
sha256 = "1521vh38mfgy7aj1lw1vpbdm8m6wyh52d5p7bz4x6kvvxsnacp11";
sha256bin64 = "0rbc0ld655szg42mqjdby8749d2jg34nlpp4cpq66qb4zi6vvb04";
version = "76.0.3809.87";
};
dev = {
sha256 = "19v1i4ks5rpwdcwmfj8qqni4afyhnddb5hbbisabnjif3b8xrvjw";
sha256bin64 = "0vsbxvqidrvw797h0and67pdb4maijsiv6jkpj3kqaxakiwnadxj";
version = "76.0.3809.21";
sha256 = "15v25nwcdxqgw6n0ym7fz5qaq0a74p0wiwcq155xy6zvr3q8q1nw";
sha256bin64 = "1qawl0hsl6qpc10avli8raw4nzwcpmp6dyada5pga7i4k5jpsr95";
version = "77.0.3860.5";
};
stable = {
sha256 = "0f9qjhxvk8sajj7qa061crfmln65q7sniylrgp0qijwyw6xrmddi";
sha256bin64 = "1xvqfrq119iwgvd2d4z2v2ladi2kl52kji55yxdmyi377dpk5rfa";
version = "75.0.3770.90";
sha256 = "1521vh38mfgy7aj1lw1vpbdm8m6wyh52d5p7bz4x6kvvxsnacp11";
sha256bin64 = "0hnfn2zxdrp96a4p98r08w4krzwkpb1kp4rjk03754akjyg1b3xx";
version = "76.0.3809.87";
};
}

View File

@ -97,8 +97,8 @@ in rec {
terraform_0_11-full = terraform_0_11.full;
terraform_0_12 = pluggable (generic {
version = "0.12.5";
sha256 = "0p064rhaanwx4szs8hv6mdqad8d2bgfd94h2la11j58xbsxc7hap";
version = "0.12.6";
sha256 = "0vxvciv4amblxx50wivlm60fyj1ardfgdpj3l8cj9fhi79b3khxl";
patches = [ ./provider-path.patch ];
passthru = { inherit plugins; };
});

View File

@ -0,0 +1,29 @@
{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "dsvpn";
version = "0.1.0";
src = fetchFromGitHub {
owner = "jedisct1";
repo = pname;
rev = version;
sha256 = "1g747197zpg83ba9l9vxg8m3jv13wcprhnyr8asdxq745kzmynsr";
};
installPhase = ''
runHook preInstall
install -Dm755 -t $out/bin dsvpn
runHook postInstall
'';
meta = with stdenv.lib; {
description = "A Dead Simple VPN";
homepage = "https://github.com/jedisct1/dsvpn";
license = licenses.mit;
maintainers = [ maintainers.marsam ];
platforms = platforms.unix;
};
}

View File

@ -1,36 +1,83 @@
{ stdenv, fetchFromGitLab, meson, ninja, gettext, cargo, rustc, python3, rustPlatform, pkgconfig, gtksourceview
, hicolor-icon-theme, glib, libhandy, gtk3, libsecret, dbus, openssl, sqlite, gst_all_1, wrapGAppsHook, fetchpatch }:
{ stdenv
, fetchFromGitLab
, fetchpatch
, meson
, ninja
, gettext
, cargo
, rustc
, python3
, rustPlatform
, pkgconfig
, gtksourceview
, hicolor-icon-theme
, glib
, libhandy
, gtk3
, dbus
, openssl
, sqlite
, gst_all_1
, cairo
, gdk-pixbuf
, gspell
, wrapGAppsHook
}:
rustPlatform.buildRustPackage rec {
version = "4.0.0";
name = "fractal-${version}";
pname = "fractal";
version = "4.2.0";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "GNOME";
repo = "fractal";
rev = version;
sha256 = "05q47jdgbi5jz01280msb8gxnbsrgf2jvglfm6k40f1xw4wxkrzy";
sha256 = "0clwsmd6h759bzlazfq5ig56dbx7npx3h43yspk87j1rm2dp1177";
};
cargoSha256 = "1hwjajkphl5439dymglgj3h92hxgbf7xpipzrga7ga8m10nx1dhl";
nativeBuildInputs = [
meson ninja pkgconfig gettext cargo rustc python3 wrapGAppsHook
];
buildInputs = [
glib gtk3 libhandy dbus openssl sqlite gst_all_1.gstreamer gst_all_1.gst-plugins-base gst_all_1.gst-plugins-bad
gtksourceview hicolor-icon-theme libsecret
cargo
gettext
meson
ninja
pkgconfig
python3
rustc
wrapGAppsHook
];
patches = [
# Fixes build with >= gstreamer 1.15.1
buildInputs = [
cairo
dbus
gdk-pixbuf
glib
gspell
gst_all_1.gst-editing-services
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-base
gst_all_1.gstreamer
gtk3
gtksourceview
hicolor-icon-theme
libhandy
openssl
sqlite
];
cargoPatches = [
# https://gitlab.gnome.org/GNOME/fractal/merge_requests/446
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/fractal/commit/e78f36c25c095ea09c9c421187593706ad7c4065.patch";
sha256 = "1qv7ayhkhgrrldag2lzs9ql17nbc1d72j375ljhhf6cms89r19ir";
url = "https://gitlab.gnome.org/GNOME/fractal/commit/2778acdc6c50bc6f034513029b66b0b092bc4c38.patch";
sha256 = "08v17xmbwrjw688ps4hsnd60d5fm26xj72an3zf6yszha2b97j6y";
})
];
postPatch = ''
patchShebangs scripts/meson_post_install.py
chmod +x scripts/test.sh
patchShebangs scripts/meson_post_install.py scripts/test.sh
'';
# Don't use buildRustPackage phases, only use it for rust deps setup
@ -39,13 +86,11 @@ rustPlatform.buildRustPackage rec {
checkPhase = null;
installPhase = null;
cargoSha256 = "1ax5dv200v8mfx0418bx8sbwpbp6zj469xg75hp78kqfiv83pn1g";
meta = with stdenv.lib; {
description = "Matrix group messaging app";
homepage = https://gitlab.gnome.org/GNOME/fractal;
license = licenses.gpl3;
maintainers = with maintainers; [ dtzWill ];
maintainers = with maintainers; [ dtzWill worldofpeace ];
};
}

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, fetchNodeModules, nodejs-8_x, ruby, sencha
{ stdenv, fetchFromGitHub, fetchNodeModules, nodejs-10_x, ruby, sencha
, auth0ClientID, auth0Domain }:
stdenv.mkDerivation rec {
@ -12,12 +12,12 @@ stdenv.mkDerivation rec {
sha256 = "1h44srl2gzkhjaazpwz1pwy4dp5x776fc685kahlvjlsfls0fvy9";
};
nativeBuildInputs = [ nodejs-8_x ruby sencha ];
nativeBuildInputs = [ nodejs-10_x ruby sencha ];
node_modules = fetchNodeModules {
inherit src;
nodejs = nodejs-8_x;
nodejs = nodejs-10_x;
sha256 = "0qsgr8cq81yismal5sqr02skakqpynwwzk5s98dr5bg91y361fgy";
};

View File

@ -2,26 +2,19 @@
stdenv.mkDerivation rec {
pname = "rambox-pro";
version = "1.1.2";
version = "1.1.4";
dontBuild = true;
dontStrip = true;
buildInputs = [ nss xorg.libxkbfile ];
buildInputs = [ nss xorg.libXext xorg.libxkbfile xorg.libXScrnSaver ];
nativeBuildInputs = [ autoPatchelfHook makeWrapper nodePackages.asar ];
src = fetchurl {
url = "https://github.com/ramboxapp/download/releases/download/v${version}/RamboxPro-${version}-linux-x64.tar.gz";
sha256 = "0rrfpl371hp278b02b9b6745ax29yrdfmxrmkxv6d158jzlv0dlr";
sha256 = "0vwh3km3h46bgynd10s8ijl3aj5sskzncdj14h3k7h4sibd8r71a";
};
postPatch = ''
substituteInPlace resources/app.asar.unpacked/node_modules/ad-block/vendor/depot_tools/create-chromium-git-src \
--replace "/usr/bin/env -S bash -e" "${stdenv.shell}"
substituteInPlace resources/app.asar.unpacked/node_modules/ad-block/node_modules/bloom-filter-cpp/vendor/depot_tools/create-chromium-git-src \
--replace "/usr/bin/env -S bash -e" "${stdenv.shell}"
'';
installPhase = ''
mkdir -p $out/bin $out/opt/RamboxPro $out/share/applications
asar e resources/app.asar $out/opt/RamboxPro/resources/app.asar.unpacked

View File

@ -7,7 +7,7 @@ let
# Please keep the version x.y.0.z and do not update to x.y.76.z because the
# source of the latter disappears much faster.
version = "8.49.0.49";
version = "8.50.0.38";
rpath = stdenv.lib.makeLibraryPath [
alsaLib
@ -58,7 +58,7 @@ let
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://repo.skype.com/deb/pool/main/s/skypeforlinux/skypeforlinux_${version}_amd64.deb";
sha256 = "0l5q336kkw9i13076qn7fkknypg7cwjp58qi8xd6h0rwha3kkqa2";
sha256 = "1g0aacp4qgzp3018w1s685yr3ssqlw0z2x6ifrj01k4ig82jfkn6";
}
else
throw "Skype for linux is not supported on ${stdenv.hostPlatform.system}";

View File

@ -1,22 +1,19 @@
{ stdenv, fetchurl }:
{ stdenv, fetchgit }:
let
stdenv.mkDerivation rec {
rev = "e2a6a9cd9da70175881ab991220c86aa87179509";
sha256 = "1gw0kpszgflk3vqjlm5igd2rznh36mb2j1iqrcqi6pzxlpccv1lg";
version = "2019-07-25";
in stdenv.mkDerivation {
inherit version;
name = "slack-theme-black-${version}";
name = "slack-theme-black";
src = fetchurl {
url = "https://raw.githubusercontent.com/laCour/slack-night-mode/${rev}/css/raw/black.css";
inherit sha256;
src = fetchgit { inherit rev;
url = "https://github.com/laCour/slack-night-mode";
sha256 = "1jwxy63qzgvr83idsgcg7yhm9kn0ybfji1m964c5c6ypzcm7j10v";
};
dontUnpack = true;
buildCommand = ''
mkdir $out
cp $src $out/theme.css
cp $src/css/raw/black.css $out/theme.css
'';
}

View File

@ -6,7 +6,7 @@ at-spi2-atk, libuuid, nodePackages
let
version = "4.0.0";
version = "4.0.1";
rpath = stdenv.lib.makeLibraryPath [
alsaLib
@ -51,7 +51,7 @@ let
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://downloads.slack-edge.com/linux_releases/slack-desktop-${version}-amd64.deb";
sha256 = "911a4c05fb4f85181df13f013e82440b0d171862c9cb137dc19b6381d47bd57e";
sha256 = "1g7c8jka750pblsfzjvfyf7sp1m409kybqagml9miif1v71scxv2";
}
else
throw "Slack is not supported on ${stdenv.hostPlatform.system}";
@ -113,6 +113,7 @@ in stdenv.mkDerivation {
description = "Desktop client for Slack";
homepage = https://slack.com;
license = licenses.unfree;
maintainers = [ maintainers.mmahut ];
platforms = [ "x86_64-linux" ];
};
}

View File

@ -0,0 +1,19 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl common-updater-scripts jq
set -eu -o pipefail
oldVersion="$(nix-instantiate --eval -E "with import ./. {}; slack-theme-black.version or (builtins.parseDrvName slack-theme-black.name).version" | tr -d '"')"
latestSha="$(curl -L -s https://api.github.com/repos/laCour/slack-night-mode/commits\?sha\=master\&since\=${oldVersion} | jq -r '.[0].sha')"
if [ ! "null" = "${latestSha}" ]; then
latestDate="$(curl -L -s https://api.github.com/repos/laCour/slack-night-mode/commits/${latestSha} | jq '.commit.author.date' | sed 's|"\(.*\)T.*|\1|g')"
update-source-version slack-theme-black "${latestSha}" --version-key=rev
update-source-version slack-theme-black "${latestDate}" --ignore-same-hash
nixpkgs="$(git rev-parse --show-toplevel)"
default_nix="$nixpkgs/pkgs/applications/networking/instant-messengers/slack/dark-theme.nix"
git add "${default_nix}"
git commit -m "slack-theme-black: ${oldVersion} -> ${latestDate}"
else
echo "slack-theme-black is already up-to-date"
fi

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, mkDerivation, makeWrapper, makeDesktopItem, autoPatchelfHook
, wrapQtAppsHook
{ stdenv, fetchurl, mkDerivation, autoPatchelfHook
, fetchFromGitHub
# Dynamic libraries
, dbus, glib, libGL, libX11, libXfixes, libuuid, libxcb, qtbase, qtdeclarative
, qtimageformats, qtlocation, qtquickcontrols, qtquickcontrols2, qtscript, qtsvg
@ -22,12 +22,20 @@ let
};
};
# Used for icons, appdata, and desktop file.
desktopIntegration = fetchFromGitHub {
owner = "flathub";
repo = "us.zoom.Zoom";
rev = "0d294e1fdd2a4ef4e05d414bc680511f24d835d7";
sha256 = "0rm188844a10v8d6zgl2pnwsliwknawj09b02iabrvjw5w1lp6wl";
};
in mkDerivation {
name = "zoom-us-${version}";
src = srcs.${stdenv.hostPlatform.system};
nativeBuildInputs = [ autoPatchelfHook makeWrapper wrapQtAppsHook ];
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [
dbus glib libGL libX11 libXfixes libuuid libxcb libjpeg_turbo
@ -66,15 +74,26 @@ in mkDerivation {
runHook postInstall
'';
postInstall = (makeDesktopItem {
name = "zoom-us";
exec = "$out/bin/zoom-us %U";
icon = "$out/share/zoom-us/application-x-zoom.png";
desktopName = "Zoom";
genericName = "Video Conference";
categories = "Network;Application;";
mimeType = "x-scheme-handler/zoommtg;";
}).buildCommand + ''
postInstall = ''
mkdir -p $out/share/{applications,appdata,icons}
# Desktop File
cp ${desktopIntegration}/us.zoom.Zoom.desktop $out/share/applications
substituteInPlace $out/share/applications/us.zoom.Zoom.desktop \
--replace "Exec=zoom" "Exec=$out/bin/zoom-us"
# Appdata
cp ${desktopIntegration}/us.zoom.Zoom.appdata.xml $out/share/appdata
# Icons
for icon_size in 64 96 128 256; do
path=$icon_size'x'$icon_size
icon=${desktopIntegration}/us.zoom.Zoom.$icon_size.png
mkdir -p $out/share/icons/hicolor/$path/apps
cp $icon $out/share/icons/hicolor/$path/apps/us.zoom.Zoom.png
done
ln -s $out/share/zoom-us/zoom $out/bin/zoom-us
'';

View File

@ -14,7 +14,7 @@ assert iceSupport -> zeroc_ice != null;
with stdenv.lib;
let
generic = overrides: source: stdenv.mkDerivation (source // overrides // {
generic = overrides: source: (if source.qtVersion == 5 then qt5.mkDerivation else stdenv.mkDerivation) (source // overrides // {
name = "${overrides.type}-${source.version}";
patches = (source.patches or []) ++ optional jackSupport ./mumble-jack-support.patch;
@ -26,7 +26,7 @@ let
# protobuf is freezed to 3.6 because of this bug: https://github.com/mumble-voip/mumble/issues/3617
# this could be reverted to the latest version in a future release of mumble as it is already fixed in master
buildInputs = [ boost protobuf3_6 avahi ]
++ { qt4 = [ qt4 ]; qt5 = [ qt5.qtbase ]; }."qt${toString source.qtVersion}"
++ optional (source.qtVersion == 4) qt4
++ (overrides.buildInputs or [ ]);
qmakeFlags = [
@ -45,20 +45,23 @@ let
++ (overrides.configureFlags or [ ]);
preConfigure = ''
qmakeFlags="$qmakeFlags DEFINES+=PLUGIN_PATH=$out/lib"
qmakeFlags="$qmakeFlags DEFINES+=PLUGIN_PATH=$out/lib/mumble"
patchShebangs scripts
'';
makeFlags = [ "release" ];
installPhase = ''
mkdir -p $out/{lib,bin}
find release -type f -not -name \*.\* -exec cp {} $out/bin \;
find release -type f -name \*.\* -exec cp {} $out/lib \;
runHook preInstall
${overrides.installPhase}
# doc stuff
mkdir -p $out/share/man/man1
cp man/mum* $out/share/man/man1
'' + (overrides.installPhase or "");
install -Dm644 man/mum* $out/share/man/man1/
runHook postInstall
'';
enableParallelBuilding = true;
@ -74,7 +77,7 @@ let
client = source: generic {
type = "mumble";
nativeBuildInputs = optionals (source.qtVersion == 5) [ qt5.qttools ];
nativeBuildInputs = optional (source.qtVersion == 5) qt5.qttools;
buildInputs = [ libopus libsndfile speex ]
++ optional (source.qtVersion == 5) qt5.qtsvg
++ optional stdenv.isLinux alsaLib
@ -89,12 +92,19 @@ let
NIX_CFLAGS_COMPILE = optional speechdSupport "-I${speechd}/include/speech-dispatcher";
installPhase = ''
mkdir -p $out/share/applications
cp scripts/mumble.desktop $out/share/applications
# bin stuff
install -Dm755 release/mumble $out/bin/mumble
install -Dm755 scripts/mumble-overlay $out/bin/mumble-overlay
mkdir -p $out/share/icons{,/hicolor/scalable/apps}
cp icons/mumble.svg $out/share/icons
ln -s $out/share/icons/mumble.svg $out/share/icons/hicolor/scalable/apps
# lib stuff
mkdir -p $out/lib/mumble
cp -P release/libmumble.so* $out/lib
cp -P release/libcelt* $out/lib/mumble
cp -P release/plugins/* $out/lib/mumble
# icons
install -Dm644 scripts/mumble.desktop $out/share/applications/mumble.desktop
install -Dm644 icons/mumble.svg $out/share/icons/hicolor/scalable/apps/mumble.svg
'';
} source;
@ -110,6 +120,11 @@ let
];
buildInputs = [ libcap ] ++ optional iceSupport zeroc_ice;
installPhase = ''
# bin stuff
install -Dm755 release/murmurd $out/bin/murmurd
'';
};
stableSource = rec {
@ -138,26 +153,24 @@ let
];
};
gitSource = rec {
version = "2019-07-10";
rcSource = rec {
version = "1.3.0-rc2";
qtVersion = 5;
# Needs submodules
src = fetchFromGitHub {
owner = "mumble-voip";
repo = "mumble";
rev = "41b265584654c7ac216fd3ccb9c141734d3f839b";
rev = version;
sha256 = "00irlzz5q4drmsfbwrkyy7p7w8a5fc1ip5vyicq3g3cy58dprpqr";
fetchSubmodules = true;
};
};
in {
mumble = client stableSource;
mumble_git = client gitSource;
mumble_rc = client rcSource;
murmur = server stableSource;
murmur_git = (server gitSource).overrideAttrs (old: {
murmur_rc = (server rcSource).overrideAttrs (old: {
meta = old.meta // { broken = iceSupport; };
nativeBuildInputs = old.nativeBuildInputs or [] ++ [ qt5.wrapQtAppsHook ];
});
}

View File

@ -45,16 +45,16 @@ in pythonPackages.buildPythonApplication rec {
'';
preBuild = ''
paver generate_setup
${pythonPackages.paver}/bin/paver generate_setup
'';
doCheck = false;
meta = {
meta = with stdenv.lib; {
description = "Free and open source downloader for 1-click-hosting sites";
homepage = https://github.com/pyload/pyload;
license = stdenv.lib.licenses.gpl3;
maintainers = [ stdenv.lib.maintainers.mahe ];
platforms = stdenv.lib.platforms.all;
license = licenses.gpl3;
maintainers = [ maintainers.mahe ];
platforms = platforms.all;
};
}

View File

@ -2,16 +2,17 @@
stdenv.mkDerivation rec {
name = "strelka-${version}";
version = "2.9.5";
version = "2.9.10";
src = fetchFromGitHub {
owner = "Illumina";
repo = "strelka";
rev = "v${version}";
sha256 = "0x4a6nkx1jnyag9svghsdjz1fz6q7qx5pn77wphdfnk81f9yspf8";
sha256 = "1nykbmim1124xh22nrhrsn8xgjb3s2y7akrdapn9sl1gdych4ppf";
};
buildInputs = [ cmake zlib python2 ];
nativeBuildInputs = [ cmake ];
buildInputs = [ zlib python2 ];
preConfigure = ''
sed -i 's|/usr/bin/env python|${python2}/bin/python|' src/python/lib/makeRunScript.py

View File

@ -1,31 +1,40 @@
{ stdenv, fetchFromGitHub, autoconf, gperf, flex, bison }:
{ stdenv, fetchFromGitHub, autoconf, gperf, flex, bison, readline, ncurses
, bzip2, zlib
}:
stdenv.mkDerivation rec {
name = "iverilog-${version}";
version = "2019.03.27";
pname = "iverilog";
version = "unstable-2019-08-01";
src = fetchFromGitHub {
owner = "steveicarus";
repo = "iverilog";
rev = "a9388a895eb85a9d7f2924b89f839f94e1b6d7c4";
sha256 = "01d48sy3pzg9x1xpczqrsii2ckrvgnrfj720wiz22jdn90nirhhr";
repo = pname;
rev = "c383d2048c0bd15f5db083f14736400546fb6215";
sha256 = "1zs0gyhws0qa315magz3w5m45v97knczdgbf2zn4d7bdb7cv417c";
};
enableParallelBuilding = true;
patchPhase = ''
prePatch = ''
substituteInPlace configure.in \
--replace "AC_CHECK_LIB(termcap, tputs)" "AC_CHECK_LIB(termcap, tputs)"
'';
preConfigure = ''
chmod +x $PWD/autoconf.sh
$PWD/autoconf.sh
'';
buildInputs = [ autoconf gperf flex bison ];
nativeBuildInputs = [ autoconf gperf flex bison ];
meta = {
buildInputs = [ readline ncurses bzip2 zlib ];
meta = with stdenv.lib; {
description = "Icarus Verilog compiler";
repositories.git = https://github.com/steveicarus/iverilog.git;
homepage = http://www.icarus.com;
license = stdenv.lib.licenses.gpl2Plus;
maintainers = with stdenv.lib.maintainers; [winden];
platforms = with stdenv.lib.platforms; linux;
homepage = "http://iverilog.icarus.com/";
license = licenses.lgpl21;
maintainers = with maintainers; [ winden ];
platforms = platforms.linux;
};
}

View File

@ -1,9 +1,9 @@
{ stdenv, fetchFromGitHub
{ stdenv, fetchFromGitHub, mkDerivation
, pkgconfig, qtbase, qttools, qmake, qtmultimedia, qtx11extras, alsaLib, libv4l, libXrandr
, ffmpeg
}:
stdenv.mkDerivation rec {
mkDerivation rec {
pname = "vokoscreen";
version = "2.5.8-beta";

View File

@ -39,7 +39,7 @@ in {
sha256 = "1j8i32dq6rrlv3kf2hnq81iqks06kczaxjks7nw3zyq1231winm9";
};
v5 = font-awesome {
version = "5.10.0";
sha256 = "11nga1drlpkrmw307ga6plbj5z1b70cnckr465z8z6vkbcd6jkv3";
version = "5.10.1";
sha256 = "1ckr7n0hlhvyl8nkhyjr7k6r07czpcfp0s2mnb48mvfgxd3j992p";
};
}

View File

@ -345,8 +345,6 @@ lib.makeScope pkgs.newScope (self: with self; {
nautilus-python = callPackage ./misc/nautilus-python { };
pidgin-im-gnome-shell-extension = callPackage ./misc/pidgin { };
gtkhtml = callPackage ./misc/gtkhtml { enchant = pkgs.enchant1; };
pomodoro = callPackage ./misc/pomodoro { };
@ -398,4 +396,6 @@ lib.makeScope pkgs.newScope (self: with self; {
gtk = gtk3;
gtkmm = gtkmm3;
rest = librest;
pidgin-im-gnome-shell-extension = pkgs.gnomeExtensions.pidgin-im-integration; # added 2019-08-01
})

View File

@ -0,0 +1,31 @@
{ stdenv, fetchFromGitHub, glib }:
stdenv.mkDerivation rec {
pname = "gnome-shell-extension-pidgin-im-integration";
version = "32";
src = fetchFromGitHub {
owner = "muffinmad";
repo = "pidgin-im-gnome-shell-extension";
rev = "v${version}";
sha256 = "1jyg8r0s1v83sgg6y0jbsj2v37mglh8rvd8vi27fxnjq9xmg8kpc";
};
dontConfigure = true;
dontBuild = true;
installPhase = ''
share_dir="$prefix/share"
extensions_dir="$share_dir/gnome-shell/extensions/pidgin@muffinmad"
mkdir -p "$extensions_dir"
mv *.js metadata.json dbus.xml schemas locale "$extensions_dir"
'';
meta = with stdenv.lib; {
homepage = https://github.com/muffinmad/pidgin-im-gnome-shell-extension;
description = "Make Pidgin IM conversations appear in the Gnome Shell message tray";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ ];
};
}

View File

@ -1,42 +0,0 @@
{ stdenv, fetchFromGitHub, glib }:
stdenv.mkDerivation rec {
version = "1.0.1";
basename = "pidgin-im-gnome-shell-extension";
name = "${basename}-${version}";
src = fetchFromGitHub {
owner = "muffinmad";
repo = "${basename}";
rev = "v${version}";
sha256 = "1567s2sfqig4jw0nrn134f5vkx0yq31q044grv3xk4vpl1f3z2lr";
};
buildInputs = [ glib ];
configurePhase = "";
buildPhase = "";
installPhase = ''
share_dir="$prefix/share"
extensions_dir="$share_dir/gnome-shell/extensions/pidgin@muffinmad"
mkdir -p "$extensions_dir"
mv *.js metadata.json dbus.xml gnome-shell-extension-pidgin.pot "$extensions_dir"
schemas_dir="$share_dir/gsettings-schemas/${name}/glib-2.0/schemas"
mkdir -p "$schemas_dir"
mv schemas/* "$schemas_dir" # fix Emacs syntax highlighting: */
glib-compile-schemas "$schemas_dir"
locale_dir="$share_dir/locale"
mkdir -p "$locale_dir"
mv locale/* $locale_dir # fix Emacs syntax highlighting: */
'';
meta = with stdenv.lib; {
homepage = https://github.com/muffinmad/pidgin-im-gnome-shell-extension;
description = "Make Pidgin IM conversations appear in the Gnome Shell message tray";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ ];
};
}

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "cerbere";
version = "0.2.4";
version = "2.5.0";
src = fetchFromGitHub {
owner = "elementary";
repo = pname;
rev = version;
sha256 = "0f9jr6q5z6nir5b77f96wm9rx6r6s9i0sr1yrymg3n7jyjgrvdwp";
sha256 = "12y6gg4vyc1rhdm2c7pr7bgmdrah7ddphyh25fgh3way8l9gh7vw";
};
passthru = {

View File

@ -1,8 +1,8 @@
diff --git a/mx.py b/mx.py
index d119b62..471fe98 100644
index af7a9c2..08c0ea8 100755
--- a/mx.py
+++ b/mx.py
@@ -4961,30 +4961,6 @@ class PackedResourceLibrary(ResourceLibrary):
@@ -4976,30 +4976,6 @@ class PackedResourceLibrary(ResourceLibrary):
def get_path(self, resolve):
extract_path = _make_absolute(self.extract_path, self.suite.dir)
@ -33,7 +33,7 @@ index d119b62..471fe98 100644
return extract_path
def _check_download_needed(self):
@@ -5885,7 +5861,7 @@ class HgConfig(VC):
@@ -5900,7 +5876,7 @@ class HgConfig(VC):
def update_to_branch(self, vcdir, branch, abortOnError=True):
cmd = ['update', branch]
@ -42,7 +42,7 @@ index d119b62..471fe98 100644
def add(self, vcdir, path, abortOnError=True):
return self.run(['hg', '-q', '-R', vcdir, 'add', path]) == 0
@@ -5922,7 +5898,7 @@ class HgConfig(VC):
@@ -5937,7 +5913,7 @@ class HgConfig(VC):
return None
def parent_info(self, vcdir, abortOnError=True):
@ -51,7 +51,7 @@ index d119b62..471fe98 100644
author, date = out.split("|||")
ts, _ = date.split(" ")
return self._sanitize_parent_info({
@@ -8287,46 +8263,8 @@ class SuiteImport:
@@ -8301,46 +8277,8 @@ class SuiteImport:
version = import_dict.get("version")
suite_dir = None
version_from = import_dict.get("versionFrom")
@ -100,7 +100,7 @@ index d119b62..471fe98 100644
@staticmethod
def get_source_urls(source, kind=None):
@@ -8367,8 +8305,6 @@ class Suite(object):
@@ -8381,8 +8319,6 @@ class Suite(object):
:type dists: list[Distribution]
"""
def __init__(self, mxDir, primary, internal, importing_suite, load, vc, vc_dir, dynamicallyImported=False):
@ -109,7 +109,7 @@ index d119b62..471fe98 100644
self.imported_by = [] if primary else [importing_suite]
self.mxDir = mxDir
self.dir = dirname(mxDir)
@@ -8396,7 +8332,7 @@ class Suite(object):
@@ -8410,7 +8346,7 @@ class Suite(object):
self._outputRoot = None
self._preloaded_suite_dict = None
self.vc = vc
@ -118,7 +118,7 @@ index d119b62..471fe98 100644
self._preload_suite_dict()
self._init_imports()
if load:
@@ -9295,7 +9231,9 @@ def get_dynamic_imports():
@@ -9310,7 +9246,9 @@ def get_dynamic_imports():
class SourceSuite(Suite):
"""A source suite"""
def __init__(self, mxDir, primary=False, load=True, internal=False, importing_suite=None, dynamicallyImported=False):
@ -129,7 +129,7 @@ index d119b62..471fe98 100644
Suite.__init__(self, mxDir, primary, internal, importing_suite, load, vc, vc_dir, dynamicallyImported=dynamicallyImported)
logvv("SourceSuite.__init__({}), got vc={}, vc_dir={}".format(mxDir, self.vc, self.vc_dir))
self.projects = []
@@ -9344,17 +9282,7 @@ class SourceSuite(Suite):
@@ -9359,17 +9297,7 @@ class SourceSuite(Suite):
"""
Gets the release tag from VC or create a time based once if VC is unavailable
"""
@ -148,7 +148,7 @@ index d119b62..471fe98 100644
def scm_metadata(self, abortOnError=False):
scm = self.scm
@@ -12526,55 +12454,8 @@ def _attempt_download(url, path, jarEntryName=None):
@@ -12541,55 +12469,8 @@ def _attempt_download(url, path, jarEntryName=None):
return False
def download(path, urls, verbose=False, abortOnError=True, verifyOnly=False):
@ -206,7 +206,7 @@ index d119b62..471fe98 100644
def update_file(path, content, showDiff=False):
"""
@@ -13378,6 +13259,7 @@ class Archiver(SafeFileCreation):
@@ -13393,6 +13274,7 @@ class Archiver(SafeFileCreation):
def _add_zip(self, filename, archive_name, provenance):
self._add_provenance(archive_name, provenance)
@ -214,7 +214,7 @@ index d119b62..471fe98 100644
self.zf.write(filename, archive_name)
def _add_str_zip(self, data, archive_name, provenance):
@@ -18526,12 +18408,35 @@ def _find_suite_import(importing_suite, suite_import, fatalIfMissing=True, load=
@@ -18541,12 +18423,35 @@ def _find_suite_import(importing_suite, suite_import, fatalIfMissing=True, load=
Attempts to locate an existing suite in the local context
Returns the path to the mx.name dir if found else None
"""

View File

@ -1,10 +1,10 @@
{ stdenv, lib, fetchFromGitHub, fetchurl, fetchzip, fetchgit, mercurial, python27,
zlib, makeWrapper, openjdk, unzip, git, clang, llvm, which, icu, ruby, bzip2
{ stdenv, lib, fetchFromGitHub, fetchurl, fetchzip, fetchgit, mercurial, python27, setJavaClassPath,
zlib, makeWrapper, openjdk, unzip, git, clang, llvm, which, icu, ruby, bzip2, glibc
# gfortran, readline, bzip2, lzma, pcre, curl, ed, tree ## WIP: fastr deps
}:
let
version = "1.0.0-rc15";
version = "19.1.1";
truffleMake = ./truffle.make;
makeMxGitCache = list: out: ''
mkdir ${out}
@ -32,7 +32,7 @@ let
hg checkout ${lib.escapeShellArg "vm${version}"}
'';
# pre-download some cache entries ('mx' will not be able to download under nixbld1)
# pre-download some cache entries ('mx' will not be able to download under nixbld)
makeMxCache = list:
stdenv.mkDerivation {
name = "mx-cache";
@ -62,31 +62,27 @@ let
};
jvmci8-mxcache = [
rec { sha1 = "977b33afe2344a9ee801fd3317c54d8e1f9d7a79"; name = "JACOCOCORE_0.8.2_${sha1}/jacococore-0.8.2.jar"; url = mirror://maven/org/jacoco/org.jacoco.core/0.8.2/org.jacoco.core-0.8.2.jar; }
rec { sha1 = "46f38efb779fb08216379e1a196396f4e22bbe41"; name = "JACOCOCORE_0.8.2_${sha1}/jacococore-0.8.2.sources.jar"; url = mirror://maven/org/jacoco/org.jacoco.core/0.8.2/org.jacoco.core-0.8.2-sources.jar; }
rec { sha1 = "50e133cdfd2d31ca5702b73615be70f801d3ae26"; name = "JACOCOREPORT_0.8.2_${sha1}/jacocoreport-0.8.2.jar"; url = mirror://maven/org/jacoco/org.jacoco.report/0.8.2/org.jacoco.report-0.8.2.jar; }
rec { sha1 = "7488cd6e42cc4fa85b51200b7f451465692e033b"; name = "JACOCOREPORT_0.8.2_${sha1}/jacocoreport-0.8.2.sources.jar"; url = mirror://maven/org/jacoco/org.jacoco.report/0.8.2/org.jacoco.report-0.8.2-sources.jar; }
rec { sha1 = "4806883004063feb978b8811f00d5ea2138750bb"; name = "JACOCOAGENT_0.8.2_${sha1}/jacocoagent-0.8.2.jar"; url = mirror://maven/org/jacoco/org.jacoco.agent/0.8.2/org.jacoco.agent-0.8.2-runtime.jar; }
rec { sha1 = "53addc878614171ff0fcbc8f78aed12175c22cdb"; name = "JACOCOCORE_0.8.4_${sha1}/jacococore-0.8.4.jar"; url = mirror://maven/org/jacoco/org.jacoco.core/0.8.4/org.jacoco.core-0.8.4.jar; }
rec { sha1 = "9bd1fa334d941005bc9ab3ac92478a590f5b7d73"; name = "JACOCOCORE_0.8.4_${sha1}/jacococore-0.8.4.sources.jar"; url = mirror://maven/org/jacoco/org.jacoco.core/0.8.4/org.jacoco.core-0.8.4-sources.jar; }
rec { sha1 = "e5ca9511493b7e3bc2cabdb8ded92e855f3aac32"; name = "JACOCOREPORT_0.8.4_${sha1}/jacocoreport-0.8.4.jar"; url = mirror://maven/org/jacoco/org.jacoco.report/0.8.4/org.jacoco.report-0.8.4.jar; }
rec { sha1 = "eb61e479b35b467954f28a565c094c563b790e19"; name = "JACOCOREPORT_0.8.4_${sha1}/jacocoreport-0.8.4.sources.jar"; url = mirror://maven/org/jacoco/org.jacoco.report/0.8.4/org.jacoco.report-0.8.4-sources.jar; }
rec { sha1 = "869021a6d90cfb008b12e83fccbe42eca29e5355"; name = "JACOCOAGENT_0.8.4_${sha1}/jacocoagent-0.8.4.jar"; url = mirror://maven/org/jacoco/org.jacoco.agent/0.8.4/org.jacoco.agent-0.8.4-runtime.jar; }
rec { sha1 = "306816fb57cf94f108a43c95731b08934dcae15c"; name = "JOPTSIMPLE_4_6_${sha1}/joptsimple-4-6.jar"; url = mirror://maven/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.jar; }
rec { sha1 = "9cd14a61d7aa7d554f251ef285a6f2c65caf7b65"; name = "JOPTSIMPLE_4_6_${sha1}/joptsimple-4-6.sources.jar"; url = mirror://maven/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6-sources.jar; }
rec { sha1 = "b852fb028de645ad2852bbe998e084d253f450a5"; name = "JMH_GENERATOR_ANNPROCESS_1_18_${sha1}/jmh-generator-annprocess-1-18.jar"; url = mirror://maven/org/openjdk/jmh/jmh-generator-annprocess/1.18/jmh-generator-annprocess-1.18.jar; }
rec { sha1 = "d455b0dc6108b5e6f1fb4f6cf1c7b4cbedbecc97"; name = "JMH_GENERATOR_ANNPROCESS_1_18_${sha1}/jmh-generator-annprocess-1-18.sources.jar"; url = mirror://maven/org/openjdk/jmh/jmh-generator-annprocess/1.18/jmh-generator-annprocess-1.18-sources.jar; }
rec { sha1 = "7aac374614a8a76cad16b91f1a4419d31a7dcda3"; name = "JMH_GENERATOR_ANNPROCESS_1_21_${sha1}/jmh-generator-annprocess-1-21.jar"; url = mirror://maven/org/openjdk/jmh/jmh-generator-annprocess/1.21/jmh-generator-annprocess-1.21.jar; }
rec { sha1 = "fb48e2a97df95f8b9dced54a1a37749d2a64d2ae"; name = "JMH_GENERATOR_ANNPROCESS_1_21_${sha1}/jmh-generator-annprocess-1-21.sources.jar"; url = mirror://maven/org/openjdk/jmh/jmh-generator-annprocess/1.21/jmh-generator-annprocess-1.21-sources.jar; }
rec { sha1 = "c01b6798f81b0fc2c5faa70cbe468c275d4b50c7"; name = "ASM_6.2.1_${sha1}/asm-6.2.1.jar"; url = mirror://maven/org/ow2/asm/asm/6.2.1/asm-6.2.1.jar; }
rec { sha1 = "cee28077ac7a63d3de0b205ec314d83944ff6267"; name = "ASM_6.2.1_${sha1}/asm-6.2.1.sources.jar"; url = mirror://maven/org/ow2/asm/asm/6.2.1/asm-6.2.1-sources.jar; }
rec { sha1 = "332b022092ecec53cdb6272dc436884b2d940615"; name = "ASM_TREE_6.2.1_${sha1}/asm-tree-6.2.1.jar"; url = mirror://maven/org/ow2/asm/asm-tree/6.2.1/asm-tree-6.2.1.jar; }
rec { sha1 = "072bd64989090e4ed58e4657e3d4481d96f643af"; name = "ASM_TREE_6.2.1_${sha1}/asm-tree-6.2.1.sources.jar"; url = mirror://maven/org/ow2/asm/asm-tree/6.2.1/asm-tree-6.2.1-sources.jar; }
rec { sha1 = "e8b876c5ccf226cae2f44ed2c436ad3407d0ec1d"; name = "ASM_ANALYSIS_6.2.1_${sha1}/asm-analysis-6.2.1.jar"; url = mirror://maven/org/ow2/asm/asm-analysis/6.2.1/asm-analysis-6.2.1.jar; }
rec { sha1 = "b0b249bd185677648692e7c57b488b6d7c2a6653"; name = "ASM_ANALYSIS_6.2.1_${sha1}/asm-analysis-6.2.1.sources.jar"; url = mirror://maven/org/ow2/asm/asm-analysis/6.2.1/asm-analysis-6.2.1-sources.jar; }
rec { sha1 = "eaf31376d741a3e2017248a4c759209fe25c77d3"; name = "ASM_COMMONS_6.2.1_${sha1}/asm-commons-6.2.1.jar"; url = mirror://maven/org/ow2/asm/asm-commons/6.2.1/asm-commons-6.2.1.jar; }
rec { sha1 = "667fa0f9d370e7848b0e3d173942855a91fd1daf"; name = "ASM_COMMONS_6.2.1_${sha1}/asm-commons-6.2.1.sources.jar"; url = mirror://maven/org/ow2/asm/asm-commons/6.2.1/asm-commons-6.2.1-sources.jar; }
rec { sha1 = "fa29aa438674ff19d5e1386d2c3527a0267f291e"; name = "ASM_7.1_${sha1}/asm-7.1.jar"; url = mirror://maven/org/ow2/asm/asm/7.1/asm-7.1.jar; }
rec { sha1 = "9d170062d595240da35301362b079e5579c86f49"; name = "ASM_7.1_${sha1}/asm-7.1.sources.jar"; url = mirror://maven/org/ow2/asm/asm/7.1/asm-7.1-sources.jar; }
rec { sha1 = "a3662cf1c1d592893ffe08727f78db35392fa302"; name = "ASM_TREE_7.1_${sha1}/asm-tree-7.1.jar"; url = mirror://maven/org/ow2/asm/asm-tree/7.1/asm-tree-7.1.jar; }
rec { sha1 = "157238292b551de8680505fa2d19590d136e25b9"; name = "ASM_TREE_7.1_${sha1}/asm-tree-7.1.sources.jar"; url = mirror://maven/org/ow2/asm/asm-tree/7.1/asm-tree-7.1-sources.jar; }
rec { sha1 = "379e0250f7a4a42c66c5e94e14d4c4491b3c2ed3"; name = "ASM_ANALYSIS_7.1_${sha1}/asm-analysis-7.1.jar"; url = mirror://maven/org/ow2/asm/asm-analysis/7.1/asm-analysis-7.1.jar; }
rec { sha1 = "36789198124eb075f1a5efa18a0a7812fb16f47f"; name = "ASM_ANALYSIS_7.1_${sha1}/asm-analysis-7.1.sources.jar"; url = mirror://maven/org/ow2/asm/asm-analysis/7.1/asm-analysis-7.1-sources.jar; }
rec { sha1 = "431dc677cf5c56660c1c9004870de1ed1ea7ce6c"; name = "ASM_COMMONS_7.1_${sha1}/asm-commons-7.1.jar"; url = mirror://maven/org/ow2/asm/asm-commons/7.1/asm-commons-7.1.jar; }
rec { sha1 = "a62ff3ae6e37affda7c6fb7d63b89194c6d006ee"; name = "ASM_COMMONS_7.1_${sha1}/asm-commons-7.1.sources.jar"; url = mirror://maven/org/ow2/asm/asm-commons/7.1/asm-commons-7.1-sources.jar; }
rec { sha1 = "ec2544ab27e110d2d431bdad7d538ed509b21e62"; name = "COMMONS_MATH3_3_2_${sha1}/commons-math3-3-2.jar"; url = mirror://maven/org/apache/commons/commons-math3/3.2/commons-math3-3.2.jar; }
rec { sha1 = "cd098e055bf192a60c81d81893893e6e31a6482f"; name = "COMMONS_MATH3_3_2_${sha1}/commons-math3-3-2.sources.jar"; url = mirror://maven/org/apache/commons/commons-math3/3.2/commons-math3-3.2-sources.jar; }
rec { sha1 = "0174aa0077e9db596e53d7f9ec37556d9392d5a6"; name = "JMH_1_18_${sha1}/jmh-1-18.jar"; url = mirror://maven/org/openjdk/jmh/jmh-core/1.18/jmh-core-1.18.jar; }
rec { sha1 = "7ff1e1aafea436b6aa8b29a8b8f1c2d66be26f5b"; name = "JMH_1_18_${sha1}/jmh-1-18.sources.jar"; url = mirror://maven/org/openjdk/jmh/jmh-core/1.18/jmh-core-1.18-sources.jar; }
rec { sha1 = "442447101f63074c61063858033fbfde8a076873"; name = "JMH_1_21_${sha1}/jmh-1-21.jar"; url = mirror://maven/org/openjdk/jmh/jmh-core/1.21/jmh-core-1.21.jar; }
rec { sha1 = "a6fe84788bf8cf762b0e561bf48774c2ea74e370"; name = "JMH_1_21_${sha1}/jmh-1-21.sources.jar"; url = mirror://maven/org/openjdk/jmh/jmh-core/1.21/jmh-core-1.21-sources.jar; }
rec { sha1 = "7aac374614a8a76cad16b91f1a4419d31a7dcda3"; name = "JMH_GENERATOR_ANNPROCESS_1_21_${sha1}/jmh-generator-annprocess-1-21.jar"; url = mirror://maven/org/openjdk/jmh/jmh-generator-annprocess/1.21/jmh-generator-annprocess-1.21.jar; }
rec { sha1 = "fb48e2a97df95f8b9dced54a1a37749d2a64d2ae"; name = "JMH_GENERATOR_ANNPROCESS_1_21_${sha1}/jmh-generator-annprocess-1-21.sources.jar"; url = mirror://maven/org/openjdk/jmh/jmh-generator-annprocess/1.21/jmh-generator-annprocess-1.21-sources.jar; }
rec { sha1 = "2973d150c0dc1fefe998f834810d68f278ea58ec"; name = "JUNIT_${sha1}/junit.jar"; url = mirror://maven/junit/junit/4.12/junit-4.12.jar; }
rec { sha1 = "a6c32b40bf3d76eca54e3c601e5d1470c86fcdfa"; name = "JUNIT_${sha1}/junit.sources.jar"; url = mirror://maven/junit/junit/4.12/junit-4.12-sources.jar; }
rec { sha1 = "42a25dc3219429f0e5d060061f71acb49bf010a0"; name = "HAMCREST_${sha1}/hamcrest.jar"; url = mirror://maven/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar; }
@ -114,11 +110,11 @@ let
rec { sha1 = "280c265b789e041c02e5c97815793dfc283fb1e6"; name = "LIBFFI_SOURCES_${sha1}/libffi-sources.tar.gz"; url = https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/libffi-3.2.1.tar.gz; }
rec { sha1 = "8819cea8bfe22c9c63f55465e296b3855ea41786"; name = "TruffleJSON_${sha1}/trufflejson.jar"; url = https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/trufflejson-20180130.jar; }
rec { sha1 = "9712a8124c40298015f04a74f61b3d81a51513af"; name = "CHECKSTYLE_8.8_${sha1}/checkstyle-8.8.jar"; url = https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/checkstyle-8.8-all.jar; }
rec { sha1 = "5a5574f03b58465226166a638641a384b9f44445"; name = "VISUALVM_COMMON_${sha1}/visualvm-common.tar.gz"; url = https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/visualvm-655.tar.gz; }
rec { sha1 = "64f07398bac9897e9b8123edeaf5cf9ff19517b5"; name = "VISUALVM_PLATFORM_SPECIFIC_${sha1}/visualvm-platform-specific.tar.gz"; url = https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/visualvm-655-linux-amd64.tar.gz; }
rec { sha1 = "158ba6f2b346469b5f8083d1700c3f55b8b9082c"; name = "VISUALVM_COMMON_${sha1}/visualvm-common.tar.gz"; url = https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/visualvm/visualvm-19_0_0-11.tar.gz; }
rec { sha1 = "eb5ffa476ed2f6fac0ecd4bb2ae32741f9646932"; name = "VISUALVM_PLATFORM_SPECIFIC_${sha1}/visualvm-platform-specific.tar.gz"; url = https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/visualvm/visualvm-19_0_0-11-linux-amd64.tar.gz; }
rec { sha1 = "e6e60889b7211a80b21052a249bd7e0f88f79fee"; name = "Java-WebSocket_${sha1}/java-websocket.jar"; url = mirror://maven/org/java-websocket/Java-WebSocket/1.3.9/Java-WebSocket-1.3.9.jar; }
rec { sha1 = "7a4d00d5ec5febd252a6182e8b6e87a0a9821f81"; name = "ICU4J_${sha1}/icu4j.jar"; url = mirror://maven/com/ibm/icu/icu4j/62.1/icu4j-62.1.jar; }
# This duplication of asm with underscore and minus is totally weird
# This duplication of asm with underscore and minus is totally weird
rec { sha1 = "c01b6798f81b0fc2c5faa70cbe468c275d4b50c7"; name = "ASM-6.2.1_${sha1}/asm-6.2.1.jar"; url = mirror://maven/org/ow2/asm/asm/6.2.1/asm-6.2.1.jar; }
rec { sha1 = "cee28077ac7a63d3de0b205ec314d83944ff6267"; name = "ASM-6.2.1_${sha1}/asm-6.2.1.sources.jar"; url = mirror://maven/org/ow2/asm/asm/6.2.1/asm-6.2.1-sources.jar; }
rec { sha1 = "332b022092ecec53cdb6272dc436884b2d940615"; name = "ASM_TREE-6.2.1_${sha1}/asm-tree-6.2.1.jar"; url = mirror://maven/org/ow2/asm/asm-tree/6.2.1/asm-tree-6.2.1.jar; }
@ -145,14 +141,10 @@ let
];
graal-mxcachegit = [
{ sha256 = "0siryzvmj9h8zkyr0d3gy9fqgyxb9s5xs15rf7lnx9zh3ykq549y"; name = "graaljs";
url = "http://github.com/graalvm/graaljs.git"; rev = "vm-${version}"; }
{ sha256 = "1ii3mwa0c2zk9vm51hyrymdz3whfihm6sccd2r5ja2v53jcdc1a3"; name = "truffleruby";
url = "http://github.com/oracle/truffleruby.git"; rev = "vm-${version}"; }
{ sha256 = "1nz8yqg2k9shpmhj3jv7k2icfg72cm55baf354rsh1pqanay8qb7"; name = "fastr";
url = "http://github.com/oracle/fastr.git"; rev = "vm-${version}"; }
{ sha256 = "1c8nnrl30fys22gk3y6dvxzq0fq1a5hjkqrw15p68cwpz9wma4gi"; name = "graalpython";
url = "https://github.com/graalvm/graalpython.git"; rev = "vm-${version}"; }
{ sha256 = "05z2830ng71bhgsxc0zyc74l1bz7hg54la8j1r99993fhhch4y36"; name = "graaljs"; url = "https://github.com/graalvm/graaljs.git"; rev = "vm-${version}"; }
{ sha256 = "0ai5x4n1c2lcfkfpp29zn1bcmp3khc5hvssyw1qr1l2zy79fxwjp"; name = "truffleruby"; url = "https://github.com/oracle/truffleruby.git"; rev = "vm-${version}"; }
{ sha256 = "010079qsl6dff3yca8vlzcahq9z1ppyr758shjkm1f7izwphjv7p"; name = "fastr"; url = "https://github.com/oracle/fastr.git"; rev = "vm-${version}"; }
{ sha256 = "0hcqbasqs0yb7p1sal63qbxqxh942gh5vzl95pfdlflmc2g82v4q"; name = "graalpython"; url = "https://github.com/graalvm/graalpython.git"; rev = "vm-${version}"; }
];
ninja-syntax = python27.pkgs.buildPythonPackage rec {
@ -176,13 +168,13 @@ let
in rec {
mx = stdenv.mkDerivation rec {
version = "5.215.4";
version = "5.223.0";
pname = "mx";
src = fetchFromGitHub {
owner = "graalvm";
repo = "mx";
rev = version;
sha256 = "0wrwfiwqjw6xp0bvp2g15jn6yrjb9w6jw1xnwvkyhkw1s6m0w0z1";
sha256 = "0q51dnm6n1472p93dxr4jh8d7cv09a70pq89cdgxwh42vapykrn9";
};
nativeBuildInputs = [ makeWrapper ];
prePatch = ''
@ -215,19 +207,19 @@ in rec {
meta = with stdenv.lib; {
homepage = https://github.com/graalvm/mx;
description = "Command-line tool used for the development of Graal projects";
license = licenses.unfree;
license = licenses.gpl2;
platforms = python27.meta.platforms;
};
};
jvmci8 = stdenv.mkDerivation rec {
version = "0.58";
version = "19.2-b01";
name = "jvmci-${version}";
src = fetchFromGitHub {
owner = "graalvm";
repo = "graal-jvmci-8";
rev = "jvmci-${version}";
sha256 = "0p8icn3d99zggsh6pqb15dz1j186ck442sjpn2cv43n4nvdmmp1m";
sha256 = "0maipj871vaxvap4576m0pzblzqxfjjzmwap3ndd84ny8d6vbqaa";
};
buildInputs = [ mx mercurial openjdk ];
postUnpack = ''
@ -245,6 +237,9 @@ in rec {
# The hotspot version name regex fix
substituteInPlace mx.jvmci/mx_jvmci.py \
--replace "\\d+.\\d+-b\\d+" "\\d+.\\d+-bga"
substituteInPlace src/share/vm/jvmci/jvmciCompilerToVM.cpp \
--replace 'method->name_and_sig_as_C_string(), method->native_function(), entry' \
'method->name_and_sig_as_C_string(), p2i(method->native_function()), p2i(entry)' || exit -1
'';
hardeningDisable = [ "fortify" ];
NIX_CFLAGS_COMPILE = [
@ -264,9 +259,22 @@ in rec {
mv openjdk1.8.0_*/linux-amd64/product/* $out
install -v -m0555 -D $MX_CACHE_DIR/hsdis*/hsdis.so $out/jre/lib/amd64/hsdis-amd64.so
'';
dontFixup = true; # do not nuke path of ffmpeg etc
dontStrip = true; # why? see in oraclejdk derivation
meta = openjdk.meta // { inherit (graalvm8.meta) platforms; };
# copy-paste openjdk's preFixup
preFixup = ''
# Propagate the setJavaClassPath setup hook from the JRE so that
# any package that depends on the JRE has $CLASSPATH set up
# properly.
mkdir -p $out/nix-support
printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
# Set JAVA_HOME automatically.
mkdir -p $out/nix-support
cat <<EOF > $out/nix-support/setup-hook
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
EOF
'';
dontStrip = true; # stripped javac crashes with "segmentaion fault"
inherit (openjdk) meta;
inherit (openjdk) postFixup;
};
@ -277,7 +285,7 @@ in rec {
owner = "oracle";
repo = "graal";
rev = "vm-${version}";
sha256 = "18fqah8x7gwz02ji40b4vyqav9x5dw703xwikjc117wlyymb1k56";
sha256 = "0abx6adk91yzaf1md4qbidxykpqcgphh6j4hj01ry57s4if0j66f";
};
patches = [ ./002_setjmp.c.patch ./003_mx_truffle.py.patch ];
buildInputs = [ mx zlib mercurial jvmci8 git clang llvm
@ -320,6 +328,10 @@ in rec {
# Patch the native-image template, as it will be run during build
chmod +x vm/mx.vm/launcher_template.sh && patchShebangs vm/mx.vm
# Prevent random errors from too low maxRuntimecompilemethods
substituteInPlace truffle/mx.truffle/macro-truffle.properties \
--replace '-H:MaxRuntimeCompileMethods=1400' \
'-H:MaxRuntimeCompileMethods=28000'
'';
buildPhase = ''
@ -345,19 +357,21 @@ in rec {
installPhase = ''
mkdir -p $out
cp -rf $MX_ALT_OUTPUT_ROOT/vm/linux-amd64/GRAALVM_CMP_GU_GVM_INS_JS_LIBPOLY_NFI_NJS_POLY_POLYNATIVE_PRO_PYN_RGX_SLG_SVM_SVMAG_SVMCF_SVML_TFL_VVM/graalvm-unknown-${version}/* $out
rm -rf $MX_ALT_OUTPUT_ROOT/vm/linux-amd64/GRAALVM_*STAGE1*
cp -rf $MX_ALT_OUTPUT_ROOT/vm/linux-amd64/GRAALVM*/graalvm-unknown-${version}/* $out
# BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html
substituteInPlace $out/jre/lib/security/java.security \
--replace file:/dev/random file:/dev/./urandom \
--replace NativePRNGBlocking SHA1PRNG
# Organize the out dir
mkdir -p $out/share && mv $out/man $out/share
rm $out/ASSEMBLY_EXCEPTION $out/release $out/LICENSE $out/THIRD_PARTY_README
# copy static and dynamic libraries needed for static compilation
cp -rf ${glibc}/lib/* $out/jre/lib/svm/clibraries/linux-amd64/
cp ${glibc.static}/lib/* $out/jre/lib/svm/clibraries/linux-amd64/
cp ${zlib.static}/lib/libz.a $out/jre/lib/svm/clibraries/linux-amd64/libz.a
'';
dontFixup = true; # do not nuke path of ffmpeg etc
dontStrip = true; # why? see in oraclejdk derivation
inherit (jvmci8) preFixup;
dontStrip = true; # stripped javac crashes with "segmentaion fault"
doInstallCheck = true;
installCheckPhase = ''
echo ${lib.escapeShellArg ''
@ -377,8 +391,14 @@ in rec {
$out/bin/native-image --no-server HelloWorld
./helloworld
./helloworld | fgrep 'Hello World'
# Ahead-Of-Time compilation with --static
$out/bin/native-image --no-server --static HelloWorld
./helloworld
./helloworld | fgrep 'Hello World'
'';
enableParallelBuilding = true;
passthru.home = graalvm8;
meta = with stdenv.lib; {
@ -386,7 +406,7 @@ in rec {
description = "High-Performance Polyglot VM";
license = licenses.gpl2;
maintainers = with maintainers; [ volth hlolli ];
platforms = [ "x86_64-linux" ];
platforms = [ "x86_64-linux" /*"aarch64-linux" "x86_64-darwin"*/ ];
};
};
}

View File

@ -1,5 +1,5 @@
{ stdenv, makeWrapper, fetchFromGitHub, ocaml, findlib, dune
, menhir, merlin_extend, ppx_tools_versioned, utop
, menhir, merlin-extend, ppx_tools_versioned, utop
}:
stdenv.mkDerivation rec {
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ makeWrapper ];
propagatedBuildInputs = [ menhir merlin_extend ppx_tools_versioned ];
propagatedBuildInputs = [ menhir merlin-extend ppx_tools_versioned ];
buildInputs = [ ocaml findlib dune utop menhir ];

View File

@ -2,7 +2,7 @@
buildGoPackage rec {
name = "joker-${version}";
version = "0.12.2";
version = "0.12.4";
goPackagePath = "github.com/candid82/joker";
@ -10,11 +10,13 @@ buildGoPackage rec {
rev = "v${version}";
owner = "candid82";
repo = "joker";
sha256 = "0cqz8k53fzz3xqx9czk3hgq164dsbvnk51s0j29g1bmkbl51c2vm";
sha256 = "1swi991khmyhxn6w6xsdqp1wbyx3qmd9d7yhpwvqasyxp8gg3szm";
};
preBuild = "go generate ./...";
postBuild = "rm go/bin/sum256dir";
dontInstallSrc = true;
excludedPackages = "gen"; # Do not install private generators.

View File

@ -1,13 +1,17 @@
{ callPackage }:
{ pkgs }:
let
inherit (pkgs) callPackage;
icu = pkgs.icu60;
in
{
ticcutils = callPackage ./ticcutils.nix { };
libfolia = callPackage ./libfolia.nix { };
ucto = callPackage ./ucto.nix { };
libfolia = callPackage ./libfolia.nix { inherit icu; };
ucto = callPackage ./ucto.nix { inherit icu; };
uctodata = callPackage ./uctodata.nix { };
timbl = callPackage ./timbl.nix { };
timblserver = callPackage ./timblserver.nix { };
mbt = callPackage ./mbt.nix { };
frog = callPackage ./frog.nix { };
frog = callPackage ./frog.nix { inherit icu; };
frogdata = callPackage ./frogdata.nix { };
test = callPackage ./test.nix { };

View File

@ -0,0 +1,6 @@
{ callPackage, ... }:
callPackage ./generic-v3.nix {
version = "3.8.0";
sha256 = "0vll02a6k46k720wfh25sl4hdai0130s3ix2l1wh6j1lm9pi7bm8";
}

View File

@ -0,0 +1,6 @@
{ callPackage, ... }:
callPackage ./generic-v3.nix {
version = "3.9.0";
sha256 = "1xq2njqrbmizwg91ggi1lqr0n26cm2jdyk668ljc24ihrpk0z9bw";
}

View File

@ -12,7 +12,7 @@ rec {
buildApp = import ./build-app.nix {
inherit (pkgs) stdenv python which file jdk nodejs;
inherit (pkgs.nodePackages_8_x) alloy titanium;
inherit (pkgs.nodePackages_10_x) alloy titanium;
inherit (androidenv) composeAndroidPackages;
inherit (xcodeenv) composeXcodeWrapper;
inherit titaniumsdk;

View File

@ -1,4 +1,4 @@
# This file has been generated by node2nix 1.7.0. Do not edit!
# This file has been generated by node2nix 1.6.0. Do not edit!
{pkgs ? import <nixpkgs> {
inherit system;

View File

@ -1,8 +1,8 @@
# This file has been generated by node2nix 1.7.0. Do not edit!
# This file has been generated by node2nix 1.6.0. Do not edit!
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-12_x"}:
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-6_x"}:
let
nodeEnv = import ./node-env.nix {

View File

@ -1,17 +0,0 @@
# This file has been generated by node2nix 1.7.0. Do not edit!
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-8_x"}:
let
nodeEnv = import ./node-env.nix {
inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
inherit nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in
import ./node-packages-v8.nix {
inherit (pkgs) fetchurl fetchgit;
inherit nodeEnv;
}

View File

@ -7,15 +7,6 @@ let
};
in
nodePackages // {
aws-azure-login = nodePackages.aws-azure-login.override {
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD = "true";
buildInputs = [ pkgs.makeWrapper ];
postInstall = ''
wrapProgram "$out/bin/aws-azure-login" --set PUPPETEER_EXECUTABLE_PATH "${pkgs.chromium}/bin/chromium"
'';
};
bower2nix = nodePackages.bower2nix.override {
buildInputs = [ pkgs.makeWrapper ];
postInstall = ''

View File

@ -1,27 +0,0 @@
{ pkgs, nodejs, stdenv }:
let
nodePackages = import ./composition-v8.nix {
inherit pkgs nodejs;
inherit (stdenv.hostPlatform) system;
};
in
nodePackages // {
pnpm = nodePackages.pnpm.override {
nativeBuildInputs = [ pkgs.makeWrapper ];
postInstall = let
pnpmLibPath = stdenv.lib.makeBinPath [
nodejs.passthru.python
nodejs
];
in ''
for prog in $out/bin/*; do
wrapProgram "$prog" --prefix PATH : ${pnpmLibPath}
done
'';
};
stf = nodePackages.stf.override {
nativeBuildInputs = with pkgs; [ yasm czmq protobufc ];
};
}

View File

@ -4,6 +4,5 @@
set -eu -o pipefail
rm -f node-env.nix
node2nix -8 -i node-packages-v8.json -o node-packages-v8.nix -c composition-v8.nix
node2nix --nodejs-10 -i node-packages-v10.json -o node-packages-v10.nix -c composition-v10.nix
node2nix --nodejs-12 -i node-packages-v12.json -o node-packages-v12.nix -c composition-v12.nix

View File

@ -11,7 +11,7 @@ let
cat > $out/bin/tar <<EOF
#! ${stdenv.shell} -e
$(type -p tar) "\$@" --warning=no-unknown-keyword --delay-directory-restore
$(type -p tar) "\$@" --warning=no-unknown-keyword
EOF
chmod +x $out/bin/tar
@ -72,7 +72,7 @@ let
packageDir="$(find . -maxdepth 1 -type d | tail -1)"
# Restore write permissions to make building work
find "$packageDir" -type d -exec chmod u+x {} \;
find "$packageDir" -type d -print0 | xargs -0 chmod u+x
chmod -R u+w "$packageDir"
# Move the extracted tarball into the output folder
@ -219,16 +219,7 @@ let
packageObj["_integrity"] = "sha1-000000000000000000000000000="; // When no _integrity string has been provided (e.g. by Git dependencies), add a dummy one. It does not seem to harm and it bypasses downloads.
}
if(dependency.resolved) {
packageObj["_resolved"] = dependency.resolved; // Adopt the resolved property if one has been provided
} else {
packageObj["_resolved"] = dependency.version; // Set the resolved version to the version identifier. This prevents NPM from cloning Git repositories.
}
if(dependency.from !== undefined) { // Adopt from property if one has been provided
packageObj["_from"] = dependency.from;
}
packageObj["_resolved"] = dependency.version; // Set the resolved version to the version identifier. This prevents NPM from cloning Git repositories.
fs.writeFileSync(packageJSONPath, JSON.stringify(packageObj, null, 2));
}
@ -317,11 +308,50 @@ let
'';
};
prepareAndInvokeNPM = {packageName, bypassCache, reconstructLock, npmFlags, production}:
# Builds and composes an NPM package including all its dependencies
buildNodePackage =
{ name
, packageName
, version
, dependencies ? []
, buildInputs ? []
, production ? true
, npmFlags ? ""
, dontNpmInstall ? false
, bypassCache ? false
, preRebuild ? ""
, dontStrip ? true
, unpackPhase ? "true"
, buildPhase ? "true"
, ... }@args:
let
forceOfflineFlag = if bypassCache then "--offline" else "--registry http://www.example.com";
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "preRebuild" "unpackPhase" "buildPhase" ];
in
''
stdenv.mkDerivation ({
name = "node-${name}-${version}";
buildInputs = [ tarWrapper python nodejs ]
++ stdenv.lib.optional (stdenv.isLinux) utillinux
++ stdenv.lib.optional (stdenv.isDarwin) libtool
++ buildInputs;
inherit dontStrip; # Stripping may fail a build for some package deployments
inherit dontNpmInstall preRebuild unpackPhase buildPhase;
compositionScript = composePackage args;
pinpointDependenciesScript = pinpointDependenciesOfPackage args;
passAsFile = [ "compositionScript" "pinpointDependenciesScript" ];
installPhase = ''
# Create and enter a root node_modules/ folder
mkdir -p $out/lib/node_modules
cd $out/lib/node_modules
# Compose the package and all its dependencies
source $compositionScriptPath
# Pinpoint the versions of all dependencies to the ones that are actually being used
echo "pinpointing versions of dependencies..."
source $pinpointDependenciesScriptPath
@ -345,18 +375,11 @@ let
runHook preRebuild
${stdenv.lib.optionalString bypassCache ''
${stdenv.lib.optionalString reconstructLock ''
if [ -f package-lock.json ]
then
echo "WARNING: Reconstruct lock option enabled, but a lock file already exists!"
echo "This will most likely result in version mismatches! We will remove the lock file and regenerate it!"
rm package-lock.json
else
echo "No package-lock.json file found, reconstructing..."
fi
node ${reconstructPackageLock}
''}
if [ ! -f package-lock.json ]
then
echo "No package-lock.json file found, reconstructing..."
node ${reconstructPackageLock}
fi
node ${addIntegrityFieldsScript}
''}
@ -370,53 +393,6 @@ let
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} install
fi
'';
# Builds and composes an NPM package including all its dependencies
buildNodePackage =
{ name
, packageName
, version
, dependencies ? []
, buildInputs ? []
, production ? true
, npmFlags ? ""
, dontNpmInstall ? false
, bypassCache ? false
, reconstructLock ? false
, preRebuild ? ""
, dontStrip ? true
, unpackPhase ? "true"
, buildPhase ? "true"
, ... }@args:
let
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "preRebuild" "unpackPhase" "buildPhase" ];
in
stdenv.mkDerivation ({
name = "node_${name}-${version}";
buildInputs = [ tarWrapper python nodejs ]
++ stdenv.lib.optional (stdenv.isLinux) utillinux
++ stdenv.lib.optional (stdenv.isDarwin) libtool
++ buildInputs;
inherit dontStrip; # Stripping may fail a build for some package deployments
inherit dontNpmInstall preRebuild unpackPhase buildPhase;
compositionScript = composePackage args;
pinpointDependenciesScript = pinpointDependenciesOfPackage args;
passAsFile = [ "compositionScript" "pinpointDependenciesScript" ];
installPhase = ''
# Create and enter a root node_modules/ folder
mkdir -p $out/lib/node_modules
cd $out/lib/node_modules
# Compose the package and all its dependencies
source $compositionScriptPath
${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }}
# Create symlink to the deployed executable folder, if applicable
if [ -d "$out/lib/node_modules/.bin" ]
@ -455,13 +431,14 @@ let
, npmFlags ? ""
, dontNpmInstall ? false
, bypassCache ? false
, reconstructLock ? false
, dontStrip ? true
, unpackPhase ? "true"
, buildPhase ? "true"
, ... }@args:
let
forceOfflineFlag = if bypassCache then "--offline" else "--registry http://www.example.com";
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" ];
nodeDependencies = stdenv.mkDerivation ({
@ -496,13 +473,39 @@ let
fi
''}
# Go to the parent folder to make sure that all packages are pinpointed
# Pinpoint the versions of all dependencies to the ones that are actually being used
echo "pinpointing versions of dependencies..."
cd ..
${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }}
source $pinpointDependenciesScriptPath
cd ${packageName}
# Patch the shebangs of the bundled modules to prevent them from
# calling executables outside the Nix store as much as possible
patchShebangs .
export HOME=$PWD
${stdenv.lib.optionalString bypassCache ''
if [ ! -f package-lock.json ]
then
echo "No package-lock.json file found, reconstructing..."
node ${reconstructPackageLock}
fi
node ${addIntegrityFieldsScript}
''}
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} rebuild
${stdenv.lib.optionalString (!dontNpmInstall) ''
# NPM tries to download packages even when they already exist if npm-shrinkwrap is used.
rm -f npm-shrinkwrap.json
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} install
''}
# Expose the executables that were installed
cd ..
${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
@ -529,7 +532,6 @@ let
inherit nodeDependencies;
shellHook = stdenv.lib.optionalString (dependencies != []) ''
export NODE_PATH=$nodeDependencies/lib/node_modules
export PATH="$nodeDependencies/bin:$PATH"
'';
};
in

View File

@ -2,8 +2,15 @@
"@angular/cli"
, "@antora/cli"
, "@antora/site-generator-default"
, "@vue/cli"
, "@webassemblyjs/cli"
, "@webassemblyjs/repl"
, "@webassemblyjs/wasm-strip"
, "@webassemblyjs/wasm-text-gen"
, "@webassemblyjs/wast-refmt"
, "alloy"
, "asar"
, "aws-azure-login"
, "azure-cli"
, "azure-functions-core-tools"
, "bash-language-server"
, "bower"
@ -27,10 +34,10 @@
, "elm-live"
, "elm-oracle"
, "emoj"
, "emojione"
, "eslint"
, "eslint_d"
, "emojione"
, { "fast-cli": "1.x" }
, {"fast-cli": "1.x"}
, "fkill-cli"
, "forever"
, "git-run"
@ -40,26 +47,26 @@
, "grunt-cli"
, "gulp"
, "gulp-cli"
, "htmlhint"
, "html-minifier"
, "htmlhint"
, "http-server"
, "hueadm"
, "ionic"
, "ios-deploy"
, "imapnotify"
, "indium"
, "ionic"
, "ios-deploy"
, "jake"
, "javascript-typescript-langserver"
, "joplin"
, "js-beautify"
, "js-yaml"
, "jsdoc"
, "jshint"
, "json"
, "js-beautify"
, "jsonlint"
, "json-diff"
, "json-refs"
, "json-server"
, "js-yaml"
, "jsonlint"
, "karma"
, "lcov-result-merger"
, "leetcode-cli"
@ -68,7 +75,7 @@
, "less-plugin-clean-css"
, "live-server"
, "livedown"
, { "lumo-build-deps": "../interpreters/clojurescript/lumo" }
, {"lumo-build-deps": "../interpreters/clojurescript/lumo" }
, "madoko"
, "markdown-link-check"
, "mathjax"
@ -78,24 +85,25 @@
, "multi-file-swagger"
, "neovim"
, "nijs"
, "node2nix"
, "node-gyp"
, "node-gyp-build"
, "node-inspector"
, "node-pre-gyp"
, "nodemon"
, "node-red"
, "node2nix"
, "nodemon"
, "npm"
, "npm-check-updates"
, {"npm2nix": "git://github.com/NixOS/npm2nix.git#5.12.0"}
, "ocaml-language-server"
, "parcel-bundler"
, "peerflix"
, "peerflix-server"
, "pnpm"
, "parcel-bundler"
, "prettier"
, "pulp"
, "react-tools"
, "react-native-cli"
, "react-tools"
, "reveal.js"
, "s3http"
, "semver"
@ -108,9 +116,10 @@
, "speed-test"
, "ssb-server"
, "stackdriver-statsd-backend"
, "stf"
, "svgo"
, "swagger"
, { "tedicross": "git+https://github.com/TediCross/TediCross.git#v0.8.7" }
, {"tedicross": "git+https://github.com/TediCross/TediCross.git#v0.8.7"}
, "tern"
, "textlint"
, "textlint-plugin-latex"
@ -129,6 +138,7 @@
, "thelounge"
, "three"
, "tiddlywiki"
, "titanium"
, "triton"
, "tsun"
, "ttf2eot"
@ -139,17 +149,11 @@
, "vscode-css-languageserver-bin"
, "vscode-html-languageserver-bin"
, "vue-cli"
, "@vue/cli"
, "vue-language-server"
, "@webassemblyjs/cli"
, "@webassemblyjs/repl"
, "@webassemblyjs/wasm-strip"
, "@webassemblyjs/wasm-text-gen"
, "@webassemblyjs/wast-refmt"
, "web-ext"
, "webpack"
, "webpack-cli"
, "webtorrent-cli"
, "web-ext"
, "wring"
, "write-good"
, "yarn"

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
# This file has been generated by node2nix 1.7.0. Do not edit!
# This file has been generated by node2nix 1.6.0. Do not edit!
{nodeEnv, fetchurl, fetchgit, globalBuildInputs ? []}:
@ -1624,13 +1624,13 @@ let
sha1 = "212d5bfe1318306a420f6402b8e26ff39647a849";
};
};
"psl-1.2.0" = {
"psl-1.3.0" = {
name = "psl";
packageName = "psl";
version = "1.2.0";
version = "1.3.0";
src = fetchurl {
url = "https://registry.npmjs.org/psl/-/psl-1.2.0.tgz";
sha512 = "GEn74ZffufCmkDDLNcl3uuyF/aSD6exEyh1v/ZSdAomB82t6G9hzJVRx0jBmLDW+VfZqks3aScmMw9DszwUalA==";
url = "https://registry.npmjs.org/psl/-/psl-1.3.0.tgz";
sha512 = "avHdspHO+9rQTLbv1RO+MPYeP/SzsCoxofjVnHanETfQhTJrmB0HlDoW+EiN/R+C0BZ+gERab9NY0lPN2TxNag==";
};
};
"punycode-1.4.1" = {
@ -1714,13 +1714,13 @@ let
sha512 = "NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==";
};
};
"resolve-1.11.1" = {
"resolve-1.12.0" = {
name = "resolve";
packageName = "resolve";
version = "1.11.1";
version = "1.12.0";
src = fetchurl {
url = "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz";
sha512 = "vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==";
url = "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz";
sha512 = "B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==";
};
};
"resolve-dir-1.0.1" = {
@ -2303,8 +2303,7 @@ in
license = "MIT";
};
production = true;
bypassCache = true;
reconstructLock = true;
bypassCache = false;
};
coffee-script = nodeEnv.buildNodePackage {
name = "coffee-script";
@ -2321,8 +2320,7 @@ in
license = "MIT";
};
production = true;
bypassCache = true;
reconstructLock = true;
bypassCache = false;
};
grunt-cli = nodeEnv.buildNodePackage {
name = "grunt-cli";
@ -2497,7 +2495,7 @@ in
sources."regex-not-1.0.2"
sources."repeat-element-1.1.3"
sources."repeat-string-1.6.1"
sources."resolve-1.11.1"
sources."resolve-1.12.0"
sources."resolve-dir-1.0.1"
sources."resolve-url-0.2.1"
sources."ret-0.1.15"
@ -2587,8 +2585,7 @@ in
license = "MIT";
};
production = true;
bypassCache = true;
reconstructLock = true;
bypassCache = false;
};
node2nix = nodeEnv.buildNodePackage {
name = "node2nix";
@ -2716,7 +2713,7 @@ in
sources."performance-now-2.1.0"
sources."process-nextick-args-2.0.1"
sources."proto-list-1.2.4"
sources."psl-1.2.0"
sources."psl-1.3.0"
sources."punycode-2.1.1"
sources."qs-6.5.2"
(sources."readable-stream-2.3.6" // {
@ -2725,7 +2722,7 @@ in
];
})
sources."request-2.88.0"
sources."resolve-1.11.1"
sources."resolve-1.12.0"
sources."retry-0.10.1"
sources."rimraf-2.6.3"
sources."safe-buffer-5.2.0"
@ -2777,7 +2774,6 @@ in
license = "MIT";
};
production = true;
bypassCache = true;
reconstructLock = true;
bypassCache = false;
};
}

View File

@ -1,13 +0,0 @@
[
"alloy"
, "azure-cli"
, "bower"
, "coffee-script"
, "grunt-cli"
, "node-gyp"
, "node-gyp-build"
, "node-pre-gyp"
, "pnpm"
, "stf"
, "titanium"
]

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,23 @@
{ lib, fetchFromGitHub, buildDunePackage, markup }:
buildDunePackage rec {
pname = "lambdasoup";
version = "0.6.3"; # NB: double-check the license when updating
src = fetchFromGitHub {
owner = "aantron";
repo = pname;
rev = version;
sha256 = "1w4zp3vswijzvrx0c3fv269ncqwnvvrzc46629nnwm9shwv07vmv";
};
propagatedBuildInputs = [ markup ];
meta = {
description = "Functional HTML scraping and rewriting with CSS in OCaml";
homepage = "https://aantron.github.io/lambdasoup/";
license = lib.licenses.bsd2;
maintainers = [ lib.maintainers.vbgl ];
};
}

View File

@ -0,0 +1,22 @@
{ lib, buildDunePackage, fetchFromGitHub, cppo }:
buildDunePackage rec {
pname = "merlin-extend";
version = "0.4";
src = fetchFromGitHub {
owner = "let-def";
repo = pname;
sha256 = "1dxiqmm7ry24gvw6p9n4mrz37mnq4s6m8blrccsv3rb8yq82acx9";
rev = "v${version}";
};
buildInputs = [ cppo ];
meta = with lib; {
inherit (src.meta) homepage;
description = "SDK to extend Merlin";
license = licenses.mit;
maintainers = [ maintainers.volth ];
};
}

View File

@ -1,26 +0,0 @@
{ stdenv, buildOcaml, fetchFromGitHub, cppo }:
buildOcaml rec {
name = "merlin_extend";
version = "0.3";
minimumSupportedOcamlVersion = "4.02";
src = fetchFromGitHub {
owner = "let-def";
repo = "merlin-extend";
sha256 = "1z6hybcb7ry0bkzjd0r2dlcgjnhhxdsr06x3h03sj7h5fihsc7vd";
rev = "v${version}";
};
buildInputs = [ cppo ];
createFindlibDestdir = true;
meta = with stdenv.lib; {
homepage = https://github.com/let-def/merlin-extend;
description = "SDK to extend Merlin";
license = licenses.mit;
maintainers = [ maintainers.volth ];
};
}

View File

@ -0,0 +1,22 @@
{ stdenv, fetchFromGitHub, buildDunePackage, base, stdio, configurator, secp256k1 }:
buildDunePackage rec {
pname = "secp256k1";
version = "0.4.0";
src = fetchFromGitHub {
owner = "dakk";
repo = "secp256k1-ml";
rev = "42c04c93e2ed9596f6378676e944c8cfabfa69d7";
sha256 = "1zw2kgg181a9lj1m8z0ybijs8gw9w1kk990avh1bp9x8kc1asffg";
};
buildInputs = [ base stdio configurator secp256k1 ];
meta = with stdenv.lib; {
homepage = https://github.com/dakk/secp256k1-ml;
description = "Elliptic curve library secp256k1 wrapper for Ocaml";
license = licenses.mit;
maintainers = [ maintainers.vyorkin ];
};
}

View File

@ -6,11 +6,11 @@
}:
buildPythonPackage rec {
pname = "cmd2";
version = "0.9.14";
version = "0.9.15";
src = fetchPypi {
inherit pname version;
sha256 = "0rllwc4h89xdivy85nmgqdi2s0sk1zw31mlvrnlr9gz2902cnq93";
sha256 = "0k3y3czpabw173vhqg523l2r804jj08986wlz6vyh224zr0ngggw";
};
LC_ALL="en_US.UTF-8";

View File

@ -1,11 +1,16 @@
{ lib
{ blessed
, buildPythonPackage
, fetchPypi
, pythonOlder
, lib
, libcxx
, libcxxabi
, llvm
, typesentry
, blessed
, openmp
, pytest
, pythonOlder
, stdenv
, substituteAll
, typesentry
}:
buildPythonPackage rec {
@ -17,10 +22,25 @@ buildPythonPackage rec {
sha256 = "1s8z81zffrckvdwrrl0pkjc7gsdvjxw59xgg6ck81dl7gkh5grjk";
};
patches = [
# Disable the compiler monkey patching, and remove the task that's copying
# the native dependencies to the build directory.
./remove-compiler-monkeypatch_disable-native-relocation.patch
] ++ lib.optionals stdenv.isDarwin [
# Replace the library auto-detection with hardcoded paths.
(substituteAll {
src = ./hardcode-library-paths.patch;
libomp_dylib = "${lib.getLib openmp}/lib/libomp.dylib";
libcxx_dylib = "${lib.getLib libcxx}/lib/libc++.1.dylib";
libcxxabi_dylib = "${lib.getLib libcxxabi}/lib/libc++abi.dylib";
})
];
disabled = pythonOlder "3.5";
propagatedBuildInputs = [ typesentry blessed ];
buildInputs = [ llvm ];
buildInputs = [ llvm ] ++ lib.optionals stdenv.isDarwin [ openmp ];
checkInputs = [ pytest ];
LLVM = llvm;

View File

@ -0,0 +1,43 @@
diff --git a/ci/setup_utils.py b/ci/setup_utils.py
index 66b385a..6255af0 100644
--- a/ci/setup_utils.py
+++ b/ci/setup_utils.py
@@ -600,37 +600,7 @@ def find_linked_dynamic_libraries():
them as a list of absolute paths.
"""
with TaskContext("Find the required dynamic libraries") as log:
- llvm = get_llvm()
- libs = required_link_libraries()
- resolved = []
- for libname in libs:
- if llvm:
- fullpath = os.path.join(llvm, "lib", libname)
- if os.path.isfile(fullpath):
- resolved.append(fullpath)
- log.info("Library `%s` found at %s" % (libname, fullpath))
- continue
- else:
- log.info("%s does not exist" % fullpath)
- # Rely on the shell `locate` command to find the dynamic libraries.
- proc = subprocess.Popen(["locate", libname], stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- stdout, stderr = proc.communicate()
- if proc.returncode == 0:
- results = stdout.decode().strip().split("\n")
- results = [r for r in results if r]
- if results:
- results.sort(key=len)
- fullpath = results[0]
- assert os.path.isfile(fullpath), "Invalid path: %r" % (fullpath,)
- resolved.append(fullpath)
- log.info("Library `%s` found at %s" % (libname, fullpath))
- continue
- else:
- log.fatal("Cannot locate dynamic library `%s`" % libname)
- else:
- log.fatal("`locate` command returned the following error:\n%s"
- % stderr.decode())
+ resolved = ["@libomp_dylib@", "@libcxx_dylib@", "@libcxxabi_dylib@"]
return resolved

View File

@ -0,0 +1,28 @@
diff --git a/setup.py b/setup.py
index 58fc875..8032561 100644
--- a/setup.py
+++ b/setup.py
@@ -141,23 +141,6 @@ if cmd in ("build", "bdist_wheel", "build_ext", "install"):
extra_link_args = get_extra_link_args()
cpp_files = get_c_sources("c")
- with TaskContext("Copy dynamic libraries") as log:
- # Copy system libraries into the datatable/lib folder, so that they can
- # be packaged with the wheel
- libs = find_linked_dynamic_libraries()
- for libpath in libs:
- trgfile = os.path.join("datatable", "lib",
- os.path.basename(libpath))
- if os.path.exists(trgfile):
- log.info("File %s already exists, skipped" % trgfile)
- else:
- log.info("Copying %s to %s" % (libpath, trgfile))
- shutil.copy(libpath, trgfile)
-
- if ismacos():
- monkey_patch_compiler()
-
-
# Create the git version file
if cmd in ("build", "sdist", "bdist_wheel", "install"):
make_git_version_file(True)

View File

@ -18,7 +18,7 @@ buildPythonPackage rec {
src = fetchPypi {
inherit pname version;
sha256 = "f0e962052718068ad3b1d8bcc703794660858f58803c3798628817f492a8769c";
sha256 = "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh";
};
checkInputs = [ pytest nose ];

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