merge: fixing changes with nixpkgs since pull-request
- pytest-timeout: no longer requires patch - joblib: was improperly merged with the github merge tool (never using again)
This commit is contained in:
commit
dac171dd5d
@ -47,13 +47,9 @@
|
||||
|
||||
<para>
|
||||
In Nixpkgs, these three platforms are defined as attribute sets under the
|
||||
names <literal>buildPlatform</literal>, <literal>hostPlatform</literal>,
|
||||
and <literal>targetPlatform</literal>. All three are always defined as
|
||||
attributes in the standard environment, and at the top level. That means
|
||||
one can get at them just like a dependency in a function that is imported
|
||||
with <literal>callPackage</literal>:
|
||||
<programlisting>{ stdenv, buildPlatform, hostPlatform, fooDep, barDep, .. }: ...buildPlatform...</programlisting>
|
||||
, or just off <varname>stdenv</varname>:
|
||||
names <literal>buildPlatform</literal>, <literal>hostPlatform</literal>, and
|
||||
<literal>targetPlatform</literal>. They are always defined as attributes in
|
||||
the standard environment. That means one can access them like:
|
||||
<programlisting>{ stdenv, fooDep, barDep, .. }: ...stdenv.buildPlatform...</programlisting>
|
||||
.
|
||||
</para>
|
||||
|
@ -5,11 +5,16 @@ date: 2016-06-25
|
||||
---
|
||||
# User's Guide to Vim Plugins/Addons/Bundles/Scripts in Nixpkgs
|
||||
|
||||
You'll get a vim(-your-suffix) in PATH also loading the plugins you want.
|
||||
Both Neovim and Vim can be configured to include your favorite plugins
|
||||
and additional libraries.
|
||||
|
||||
Loading can be deferred; see examples.
|
||||
|
||||
Vim packages, VAM (=vim-addon-manager) and Pathogen are supported to load
|
||||
packages.
|
||||
At the moment we support three different methods for managing plugins:
|
||||
|
||||
- Vim packages (*recommend*)
|
||||
- VAM (=vim-addon-manager)
|
||||
- Pathogen
|
||||
|
||||
## Custom configuration
|
||||
|
||||
@ -25,7 +30,19 @@ vim_configurable.customize {
|
||||
}
|
||||
```
|
||||
|
||||
## Vim packages
|
||||
For Neovim the `configure` argument can be overridden to achieve the same:
|
||||
|
||||
```
|
||||
neovim.override {
|
||||
configure = {
|
||||
customRC = ''
|
||||
# here your custom configuration goes!
|
||||
'';
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
## Managing plugins with Vim packages
|
||||
|
||||
To store you plugins in Vim packages the following example can be used:
|
||||
|
||||
@ -38,13 +55,50 @@ vim_configurable.customize {
|
||||
opt = [ phpCompletion elm-vim ];
|
||||
# To automatically load a plugin when opening a filetype, add vimrc lines like:
|
||||
# autocmd FileType php :packadd phpCompletion
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
## VAM
|
||||
For Neovim the syntax is
|
||||
|
||||
### dependencies by Vim plugins
|
||||
```
|
||||
neovim.override {
|
||||
configure = {
|
||||
customRC = ''
|
||||
# here your custom configuration goes!
|
||||
'';
|
||||
packages.myVimPackage = with pkgs.vimPlugins; {
|
||||
# see examples below how to use custom packages
|
||||
start = [ ];
|
||||
opt = [ ];
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
The resulting package can be added to `packageOverrides` in `~/.nixpkgs/config.nix` to make it installable:
|
||||
|
||||
```
|
||||
{
|
||||
packageOverrides = pkgs: with pkgs; {
|
||||
myVim = vim_configurable.customize {
|
||||
name = "vim-with-plugins";
|
||||
# add here code from the example section
|
||||
};
|
||||
myNeovim = neovim.override {
|
||||
configure = {
|
||||
# add here code from the example section
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
After that you can install your special grafted `myVim` or `myNeovim` packages.
|
||||
|
||||
## Managing plugins with VAM
|
||||
|
||||
### Handling dependencies of Vim plugins
|
||||
|
||||
VAM introduced .json files supporting dependencies without versioning
|
||||
assuming that "using latest version" is ok most of the time.
|
||||
@ -125,6 +179,18 @@ Sample output2:
|
||||
]
|
||||
|
||||
|
||||
## 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.
|
||||
|
||||
## Important repositories
|
||||
|
||||
- [vim-pi](https://bitbucket.org/vimcommunity/vim-pi) is a plugin repository
|
||||
|
@ -671,6 +671,8 @@ overrides = super: self: rec {
|
||||
plugins = with availablePlugins; [ python perl ];
|
||||
}
|
||||
}</programlisting>
|
||||
If the <literal>configure</literal> function returns an attrset without the <literal>plugins</literal>
|
||||
attribute, <literal>availablePlugins</literal> will be used automatically.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@ -704,6 +706,55 @@ overrides = super: self: rec {
|
||||
}; }
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
WeeChat allows to set defaults on startup using the <literal>--run-command</literal>.
|
||||
The <literal>configure</literal> method can be used to pass commands to the program:
|
||||
<programlisting>weechat.override {
|
||||
configure = { availablePlugins, ... }: {
|
||||
init = ''
|
||||
/set foo bar
|
||||
/server add freenode chat.freenode.org
|
||||
'';
|
||||
};
|
||||
}</programlisting>
|
||||
Further values can be added to the list of commands when running
|
||||
<literal>weechat --run-command "your-commands"</literal>.
|
||||
</para>
|
||||
<para>
|
||||
Additionally it's possible to specify scripts to be loaded when starting <literal>weechat</literal>.
|
||||
These will be loaded before the commands from <literal>init</literal>:
|
||||
<programlisting>weechat.override {
|
||||
configure = { availablePlugins, ... }: {
|
||||
scripts = with pkgs.weechatScripts; [
|
||||
weechat-xmpp weechat-matrix-bridge wee-slack
|
||||
];
|
||||
init = ''
|
||||
/set plugins.var.python.jabber.key "val"
|
||||
'':
|
||||
};
|
||||
}</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
In <literal>nixpkgs</literal> there's a subpackage which contains derivations for
|
||||
WeeChat scripts. Such derivations expect a <literal>passthru.scripts</literal> attribute
|
||||
which contains a list of all scripts inside the store path. Furthermore all scripts
|
||||
have to live in <literal>$out/share</literal>. An exemplary derivation looks like this:
|
||||
<programlisting>{ stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "exemplary-weechat-script";
|
||||
src = fetchurl {
|
||||
url = "https://scripts.tld/your-scripts.tar.gz";
|
||||
sha256 = "...";
|
||||
};
|
||||
passthru.scripts = [ "foo.py" "bar.lua" ];
|
||||
installPhase = ''
|
||||
mkdir $out/share
|
||||
cp foo.py $out/share
|
||||
cp bar.lua $out/share
|
||||
'';
|
||||
}</programlisting>
|
||||
</para>
|
||||
</section>
|
||||
<section xml:id="sec-citrix">
|
||||
<title>Citrix Receiver</title>
|
||||
|
44
lib/asserts.nix
Normal file
44
lib/asserts.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{ lib }:
|
||||
|
||||
rec {
|
||||
|
||||
/* Print a trace message if pred is false.
|
||||
Intended to be used to augment asserts with helpful error messages.
|
||||
|
||||
Example:
|
||||
assertMsg false "nope"
|
||||
=> false
|
||||
stderr> trace: nope
|
||||
|
||||
assert (assertMsg ("foo" == "bar") "foo is not bar, silly"); ""
|
||||
stderr> trace: foo is not bar, silly
|
||||
stderr> assert failed at …
|
||||
|
||||
Type:
|
||||
assertMsg :: Bool -> String -> Bool
|
||||
*/
|
||||
# TODO(Profpatsch): add tests that check stderr
|
||||
assertMsg = pred: msg:
|
||||
if pred
|
||||
then true
|
||||
else builtins.trace msg false;
|
||||
|
||||
/* Specialized `assertMsg` for checking if val is one of the elements
|
||||
of a list. Useful for checking enums.
|
||||
|
||||
Example:
|
||||
let sslLibrary = "libressl"
|
||||
in assertOneOf "sslLibrary" sslLibrary [ "openssl" "bearssl" ]
|
||||
=> false
|
||||
stderr> trace: sslLibrary must be one of "openssl", "bearssl", but is: "libressl"
|
||||
|
||||
Type:
|
||||
assertOneOf :: String -> ComparableVal -> List ComparableVal -> Bool
|
||||
*/
|
||||
assertOneOf = name: val: xs: assertMsg
|
||||
(lib.elem val xs)
|
||||
"${name} must be one of ${
|
||||
lib.generators.toPretty {} xs}, but is: ${
|
||||
lib.generators.toPretty {} val}";
|
||||
|
||||
}
|
@ -38,10 +38,11 @@ let
|
||||
systems = callLibs ./systems;
|
||||
|
||||
# misc
|
||||
asserts = callLibs ./asserts.nix;
|
||||
debug = callLibs ./debug.nix;
|
||||
|
||||
generators = callLibs ./generators.nix;
|
||||
misc = callLibs ./deprecated.nix;
|
||||
|
||||
# domain-specific
|
||||
fetchers = callLibs ./fetchers.nix;
|
||||
|
||||
@ -60,7 +61,6 @@ let
|
||||
boolToString mergeAttrs flip mapNullable inNixShell min max
|
||||
importJSON warn info nixpkgsVersion version mod compare
|
||||
splitByAndCompare functionArgs setFunctionArgs isFunction;
|
||||
|
||||
inherit (fixedPoints) fix fix' extends composeExtensions
|
||||
makeExtensible makeExtensibleWithCustomName;
|
||||
inherit (attrsets) attrByPath hasAttrByPath setAttrByPath
|
||||
@ -117,6 +117,8 @@ let
|
||||
unknownModule mkOption;
|
||||
inherit (types) isType setType defaultTypeMerge defaultFunctor
|
||||
isOptionType mkOptionType;
|
||||
inherit (asserts)
|
||||
assertMsg assertOneOf;
|
||||
inherit (debug) addErrorContextToAttrs traceIf traceVal traceValFn
|
||||
traceXMLVal traceXMLValMarked traceSeq traceSeqN traceValSeq
|
||||
traceValSeqFn traceValSeqN traceValSeqNFn traceShowVal
|
||||
|
@ -355,6 +355,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
|
||||
fullName = "Independent JPEG Group License";
|
||||
};
|
||||
|
||||
imagemagick = spdx {
|
||||
fullName = "ImageMagick License";
|
||||
spdxId = "imagemagick";
|
||||
};
|
||||
|
||||
inria-compcert = {
|
||||
fullName = "INRIA Non-Commercial License Agreement for the CompCert verified compiler";
|
||||
url = "http://compcert.inria.fr/doc/LICENSE";
|
||||
|
@ -509,7 +509,8 @@ rec {
|
||||
=> 3
|
||||
*/
|
||||
last = list:
|
||||
assert list != []; elemAt list (length list - 1);
|
||||
assert lib.assertMsg (list != []) "lists.last: list must not be empty!";
|
||||
elemAt list (length list - 1);
|
||||
|
||||
/* Return all elements but the last
|
||||
|
||||
@ -517,7 +518,9 @@ rec {
|
||||
init [ 1 2 3 ]
|
||||
=> [ 1 2 ]
|
||||
*/
|
||||
init = list: assert list != []; take (length list - 1) list;
|
||||
init = list:
|
||||
assert lib.assertMsg (list != []) "lists.init: list must not be empty!";
|
||||
take (length list - 1) list;
|
||||
|
||||
|
||||
/* return the image of the cross product of some lists by a function
|
||||
|
@ -410,7 +410,7 @@ rec {
|
||||
components = splitString "/" url;
|
||||
filename = lib.last components;
|
||||
name = builtins.head (splitString sep filename);
|
||||
in assert name != filename; name;
|
||||
in assert name != filename; name;
|
||||
|
||||
/* Create an --{enable,disable}-<feat> string that can be passed to
|
||||
standard GNU Autoconf scripts.
|
||||
@ -468,7 +468,10 @@ rec {
|
||||
strw = lib.stringLength str;
|
||||
reqWidth = width - (lib.stringLength filler);
|
||||
in
|
||||
assert strw <= width;
|
||||
assert lib.assertMsg (strw <= width)
|
||||
"fixedWidthString: requested string length (${
|
||||
toString width}) must not be shorter than actual length (${
|
||||
toString strw})";
|
||||
if strw == width then str else filler + fixedWidthString reqWidth filler str;
|
||||
|
||||
/* Format a number adding leading zeroes up to fixed width.
|
||||
@ -501,7 +504,7 @@ rec {
|
||||
isStorePath = x:
|
||||
isCoercibleToString x
|
||||
&& builtins.substring 0 1 (toString x) == "/"
|
||||
&& dirOf (builtins.toPath x) == builtins.storeDir;
|
||||
&& dirOf x == builtins.storeDir;
|
||||
|
||||
/* Convert string to int
|
||||
Obviously, it is a bit hacky to use fromJSON that way.
|
||||
@ -537,11 +540,10 @@ rec {
|
||||
*/
|
||||
readPathsFromFile = rootPath: file:
|
||||
let
|
||||
root = toString rootPath;
|
||||
lines = lib.splitString "\n" (builtins.readFile file);
|
||||
removeComments = lib.filter (line: line != "" && !(lib.hasPrefix "#" line));
|
||||
relativePaths = removeComments lines;
|
||||
absolutePaths = builtins.map (path: builtins.toPath (root + "/" + path)) relativePaths;
|
||||
absolutePaths = builtins.map (path: rootPath + "/${path}") relativePaths;
|
||||
in
|
||||
absolutePaths;
|
||||
|
||||
|
@ -112,7 +112,7 @@ runTests {
|
||||
storePathAppendix = isStorePath
|
||||
"${goodPath}/bin/python";
|
||||
nonAbsolute = isStorePath (concatStrings (tail (stringToCharacters goodPath)));
|
||||
asPath = isStorePath (builtins.toPath goodPath);
|
||||
asPath = isStorePath goodPath;
|
||||
otherPath = isStorePath "/something/else";
|
||||
otherVals = {
|
||||
attrset = isStorePath {};
|
||||
@ -357,7 +357,7 @@ runTests {
|
||||
int = 42;
|
||||
bool = true;
|
||||
string = ''fno"rd'';
|
||||
path = /. + "/foo"; # toPath returns a string
|
||||
path = /. + "/foo";
|
||||
null_ = null;
|
||||
function = x: x;
|
||||
functionArgs = { arg ? 4, foo }: arg;
|
||||
|
@ -171,7 +171,7 @@ rec {
|
||||
builtins.fromJSON (builtins.readFile path);
|
||||
|
||||
|
||||
## Warnings and asserts
|
||||
## Warnings
|
||||
|
||||
/* See https://github.com/NixOS/nix/issues/749. Eventually we'd like these
|
||||
to expand to Nix builtins that carry metadata so that Nix can filter out
|
||||
|
@ -119,7 +119,9 @@ rec {
|
||||
let
|
||||
betweenDesc = lowest: highest:
|
||||
"${toString lowest} and ${toString highest} (both inclusive)";
|
||||
between = lowest: highest: assert lowest <= highest;
|
||||
between = lowest: highest:
|
||||
assert lib.assertMsg (lowest <= highest)
|
||||
"ints.between: lowest must be smaller than highest";
|
||||
addCheck int (x: x >= lowest && x <= highest) // {
|
||||
name = "intBetween";
|
||||
description = "integer between ${betweenDesc lowest highest}";
|
||||
@ -439,7 +441,9 @@ rec {
|
||||
# Either value of type `finalType` or `coercedType`, the latter is
|
||||
# converted to `finalType` using `coerceFunc`.
|
||||
coercedTo = coercedType: coerceFunc: finalType:
|
||||
assert coercedType.getSubModules == null;
|
||||
assert lib.assertMsg (coercedType.getSubModules == null)
|
||||
"coercedTo: coercedType must not have submodules (it’s a ${
|
||||
coercedType.description})";
|
||||
mkOptionType rec {
|
||||
name = "coercedTo";
|
||||
description = "${finalType.description} or ${coercedType.description} convertible to it";
|
||||
|
@ -3893,6 +3893,11 @@
|
||||
github = "StillerHarpo";
|
||||
name = "Florian Engel";
|
||||
};
|
||||
stites = {
|
||||
email = "sam@stites.io";
|
||||
github = "stites";
|
||||
name = "Sam Stites";
|
||||
};
|
||||
stumoss = {
|
||||
email = "samoss@gmail.com";
|
||||
github = "stumoss";
|
||||
@ -4158,6 +4163,11 @@
|
||||
github = "tomsmeets";
|
||||
name = "Tom Smeets";
|
||||
};
|
||||
toonn = {
|
||||
email = "nnoot@toonn.io";
|
||||
github = "toonn";
|
||||
name = "Toon Nolten";
|
||||
};
|
||||
travisbhartwell = {
|
||||
email = "nafai@travishartwell.net";
|
||||
github = "travisbhartwell";
|
||||
|
@ -283,6 +283,14 @@ $ nix-instantiate -E '(import <nixpkgsunstable> {}).gitFull'
|
||||
from your config without any issues.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>stdenv.system</literal> and <literal>system</literal> in nixpkgs now refer to the host platform instead of the build platform.
|
||||
For native builds this is not change, let alone a breaking one.
|
||||
For cross builds, it is a breaking change, and <literal>stdenv.buildPlatform.system</literal> can be used instead for the old behavior.
|
||||
They should be using that anyways for clarity.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
|
||||
@ -536,6 +544,13 @@ inherit (pkgs.nixos {
|
||||
a new paragraph.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Top-level <literal>buildPlatform</literal>, <literal>hostPlatform</literal>, and <literal>targetPlatform</literal> in Nixpkgs are deprecated.
|
||||
Please use their equivalents in <literal>stdenv</literal> instead:
|
||||
<literal>stdenv.buildPlatform</literal>, <literal>stdenv.hostPlatform</literal>, and <literal>stdenv.targetPlatform</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
</section>
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
let extraArgs_ = extraArgs; pkgs_ = pkgs;
|
||||
extraModules = let e = builtins.getEnv "NIXOS_EXTRA_MODULE_PATH";
|
||||
in if e == "" then [] else [(import (builtins.toPath e))];
|
||||
in if e == "" then [] else [(import e)];
|
||||
in
|
||||
|
||||
let
|
||||
@ -36,7 +36,11 @@ let
|
||||
_file = ./eval-config.nix;
|
||||
key = _file;
|
||||
config = {
|
||||
nixpkgs.localSystem = lib.mkDefault { inherit system; };
|
||||
# Explicit `nixpkgs.system` or `nixpkgs.localSystem` should override
|
||||
# this. Since the latter defaults to the former, the former should
|
||||
# default to the argument. That way this new default could propagate all
|
||||
# they way through, but has the last priority behind everything else.
|
||||
nixpkgs.system = lib.mkDefault system;
|
||||
_module.args.pkgs = lib.mkIf (pkgs_ != null) (lib.mkForce pkgs_);
|
||||
};
|
||||
};
|
||||
|
@ -163,15 +163,24 @@ in
|
||||
/bin/sh
|
||||
'';
|
||||
|
||||
# For resetting environment with `. /etc/set-environment` when needed
|
||||
# and discoverability (see motivation of #30418).
|
||||
environment.etc."set-environment".source = config.system.build.setEnvironment;
|
||||
|
||||
system.build.setEnvironment = pkgs.writeText "set-environment"
|
||||
''
|
||||
${exportedEnvVars}
|
||||
''
|
||||
# DO NOT EDIT -- this file has been generated automatically.
|
||||
|
||||
${cfg.extraInit}
|
||||
# Prevent this file from being sourced by child shells.
|
||||
export __NIXOS_SET_ENVIRONMENT_DONE=1
|
||||
|
||||
# ~/bin if it exists overrides other bin directories.
|
||||
export PATH="$HOME/bin:$PATH"
|
||||
'';
|
||||
${exportedEnvVars}
|
||||
|
||||
${cfg.extraInit}
|
||||
|
||||
# ~/bin if it exists overrides other bin directories.
|
||||
export PATH="$HOME/bin:$PATH"
|
||||
'';
|
||||
|
||||
system.activationScripts.binsh = stringAfter [ "stdio" ]
|
||||
''
|
||||
|
@ -23,12 +23,12 @@ with lib;
|
||||
];
|
||||
|
||||
environment.extraSetup = ''
|
||||
if [ -w $out/share/mime ]; then
|
||||
XDG_DATA_DIRS=$out/share ${pkgs.shared-mime-info}/bin/update-mime-database -V $out/share/mime > /dev/null
|
||||
if [ -w $out/share/mime ] && [ -d $out/share/mime/packages ]; then
|
||||
XDG_DATA_DIRS=$out/share ${pkgs.shared-mime-info}/bin/update-mime-database -V $out/share/mime > /dev/null
|
||||
fi
|
||||
|
||||
if [ -w $out/share/applications ]; then
|
||||
${pkgs.desktop-file-utils}/bin/update-desktop-database $out/share/applications
|
||||
${pkgs.desktop-file-utils}/bin/update-desktop-database $out/share/applications
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
@ -62,12 +62,11 @@ in
|
||||
pkgs = mkOption {
|
||||
defaultText = literalExample
|
||||
''import "''${nixos}/.." {
|
||||
inherit (config.nixpkgs) config overlays localSystem crossSystem;
|
||||
inherit (cfg) config overlays localSystem crossSystem;
|
||||
}
|
||||
'';
|
||||
default = import ../../.. {
|
||||
localSystem = { inherit (cfg) system; } // cfg.localSystem;
|
||||
inherit (cfg) config overlays crossSystem;
|
||||
inherit (cfg) config overlays localSystem crossSystem;
|
||||
};
|
||||
type = pkgsType;
|
||||
example = literalExample ''import <nixpkgs> {}'';
|
||||
@ -140,8 +139,11 @@ in
|
||||
|
||||
localSystem = mkOption {
|
||||
type = types.attrs; # TODO utilize lib.systems.parsedPlatform
|
||||
default = { system = builtins.currentSystem; };
|
||||
default = { inherit (cfg) system; };
|
||||
example = { system = "aarch64-linux"; config = "aarch64-unknown-linux-gnu"; };
|
||||
# Make sure that the final value has all fields for sake of other modules
|
||||
# referring to this. TODO make `lib.systems` itself use the module system.
|
||||
apply = lib.systems.elaborate;
|
||||
defaultText = literalExample
|
||||
''(import "''${nixos}/../lib").lib.systems.examples.aarch64-multiplatform'';
|
||||
description = ''
|
||||
@ -180,6 +182,7 @@ in
|
||||
system = mkOption {
|
||||
type = types.str;
|
||||
example = "i686-linux";
|
||||
default = { system = builtins.currentSystem; };
|
||||
description = ''
|
||||
Specifies the Nix platform type on which NixOS should be built.
|
||||
It is better to specify <code>nixpkgs.localSystem</code> instead.
|
||||
@ -196,6 +199,7 @@ in
|
||||
</programlisting>
|
||||
See <code>nixpkgs.localSystem</code> for more information.
|
||||
|
||||
Ignored when <code>nixpkgs.localSystem</code> is set.
|
||||
Ignored when <code>nixpkgs.pkgs</code> is set.
|
||||
'';
|
||||
};
|
||||
|
@ -245,6 +245,7 @@
|
||||
./services/desktops/gnome3/gnome-user-share.nix
|
||||
./services/desktops/gnome3/gpaste.nix
|
||||
./services/desktops/gnome3/gvfs.nix
|
||||
./services/desktops/gnome3/rygel.nix
|
||||
./services/desktops/gnome3/seahorse.nix
|
||||
./services/desktops/gnome3/sushi.nix
|
||||
./services/desktops/gnome3/tracker.nix
|
||||
@ -406,6 +407,7 @@
|
||||
./services/misc/taskserver
|
||||
./services/misc/tzupdate.nix
|
||||
./services/misc/uhub.nix
|
||||
./services/misc/weechat.nix
|
||||
./services/misc/xmr-stak.nix
|
||||
./services/misc/zookeeper.nix
|
||||
./services/monitoring/apcupsd.nix
|
||||
@ -518,6 +520,7 @@
|
||||
./services/networking/i2pd.nix
|
||||
./services/networking/i2p.nix
|
||||
./services/networking/iodine.nix
|
||||
./services/networking/iperf3.nix
|
||||
./services/networking/ircd-hybrid/default.nix
|
||||
./services/networking/iwd.nix
|
||||
./services/networking/keepalived/default.nix
|
||||
|
@ -126,7 +126,9 @@ in
|
||||
programs.bash = {
|
||||
|
||||
shellInit = ''
|
||||
${config.system.build.setEnvironment.text}
|
||||
if [ -z "$__NIXOS_SET_ENVIRONMENT_DONE" ]; then
|
||||
. ${config.system.build.setEnvironment}
|
||||
fi
|
||||
|
||||
${cfge.shellInit}
|
||||
'';
|
||||
@ -166,11 +168,11 @@ in
|
||||
|
||||
# Read system-wide modifications.
|
||||
if test -f /etc/profile.local; then
|
||||
. /etc/profile.local
|
||||
. /etc/profile.local
|
||||
fi
|
||||
|
||||
if [ -n "''${BASH_VERSION:-}" ]; then
|
||||
. /etc/bashrc
|
||||
. /etc/bashrc
|
||||
fi
|
||||
'';
|
||||
|
||||
@ -191,12 +193,12 @@ in
|
||||
|
||||
# We are not always an interactive shell.
|
||||
if [ -n "$PS1" ]; then
|
||||
${cfg.interactiveShellInit}
|
||||
${cfg.interactiveShellInit}
|
||||
fi
|
||||
|
||||
# Read system-wide modifications.
|
||||
if test -f /etc/bashrc.local; then
|
||||
. /etc/bashrc.local
|
||||
. /etc/bashrc.local
|
||||
fi
|
||||
'';
|
||||
|
||||
|
@ -109,7 +109,9 @@ in
|
||||
set fish_function_path ${pkgs.fish-foreign-env}/share/fish-foreign-env/functions $__fish_datadir/functions
|
||||
|
||||
# source the NixOS environment config
|
||||
fenv source ${config.system.build.setEnvironment}
|
||||
if [ -z "$__NIXOS_SET_ENVIRONMENT_DONE" ]
|
||||
fenv source ${config.system.build.setEnvironment}
|
||||
end
|
||||
|
||||
# clear fish_function_path so that it will be correctly set when we return to $__fish_datadir/config.fish
|
||||
set -e fish_function_path
|
||||
@ -150,7 +152,6 @@ in
|
||||
and begin
|
||||
${fishAliases}
|
||||
|
||||
|
||||
set fish_function_path ${pkgs.fish-foreign-env}/share/fish-foreign-env/functions $fish_function_path
|
||||
fenv source /etc/fish/foreign-env/interactiveShellInit > /dev/null
|
||||
set -e fish_function_path[1]
|
||||
|
@ -70,7 +70,7 @@ in
|
||||
promptInit = mkOption {
|
||||
default = ''
|
||||
if [ "$TERM" != dumb ]; then
|
||||
autoload -U promptinit && promptinit && prompt walters
|
||||
autoload -U promptinit && promptinit && prompt walters
|
||||
fi
|
||||
'';
|
||||
description = ''
|
||||
@ -116,7 +116,9 @@ in
|
||||
if [ -n "$__ETC_ZSHENV_SOURCED" ]; then return; fi
|
||||
export __ETC_ZSHENV_SOURCED=1
|
||||
|
||||
${config.system.build.setEnvironment.text}
|
||||
if [ -z "$__NIXOS_SET_ENVIRONMENT_DONE" ]; then
|
||||
. ${config.system.build.setEnvironment}
|
||||
fi
|
||||
|
||||
${cfge.shellInit}
|
||||
|
||||
@ -124,7 +126,7 @@ in
|
||||
|
||||
# Read system-wide modifications.
|
||||
if test -f /etc/zshenv.local; then
|
||||
. /etc/zshenv.local
|
||||
. /etc/zshenv.local
|
||||
fi
|
||||
'';
|
||||
|
||||
@ -143,7 +145,7 @@ in
|
||||
|
||||
# Read system-wide modifications.
|
||||
if test -f /etc/zprofile.local; then
|
||||
. /etc/zprofile.local
|
||||
. /etc/zprofile.local
|
||||
fi
|
||||
'';
|
||||
|
||||
@ -169,7 +171,7 @@ in
|
||||
|
||||
# Tell zsh how to find installed completions
|
||||
for p in ''${(z)NIX_PROFILES}; do
|
||||
fpath+=($p/share/zsh/site-functions $p/share/zsh/$ZSH_VERSION/functions $p/share/zsh/vendor-completions)
|
||||
fpath+=($p/share/zsh/site-functions $p/share/zsh/$ZSH_VERSION/functions $p/share/zsh/vendor-completions)
|
||||
done
|
||||
|
||||
${optionalString cfg.enableGlobalCompInit "autoload -U compinit && compinit"}
|
||||
@ -184,7 +186,7 @@ in
|
||||
|
||||
# Read system-wide modifications.
|
||||
if test -f /etc/zshrc.local; then
|
||||
. /etc/zshrc.local
|
||||
. /etc/zshrc.local
|
||||
fi
|
||||
'';
|
||||
|
||||
|
@ -8,6 +8,7 @@ let
|
||||
# configuration file can be generated by http://slurm.schedmd.com/configurator.html
|
||||
configFile = pkgs.writeTextDir "slurm.conf"
|
||||
''
|
||||
ClusterName=${cfg.clusterName}
|
||||
${optionalString (cfg.controlMachine != null) ''controlMachine=${cfg.controlMachine}''}
|
||||
${optionalString (cfg.controlAddr != null) ''controlAddr=${cfg.controlAddr}''}
|
||||
${optionalString (cfg.nodeName != null) ''nodeName=${cfg.nodeName}''}
|
||||
@ -105,6 +106,15 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
clusterName = mkOption {
|
||||
type = types.str;
|
||||
default = "default";
|
||||
example = "myCluster";
|
||||
description = ''
|
||||
Necessary to distinguish accounting records in a multi-cluster environment.
|
||||
'';
|
||||
};
|
||||
|
||||
nodeName = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
|
30
nixos/modules/services/desktops/gnome3/rygel.nix
Normal file
30
nixos/modules/services/desktops/gnome3/rygel.nix
Normal file
@ -0,0 +1,30 @@
|
||||
# rygel service.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
###### interface
|
||||
options = {
|
||||
services.gnome3.rygel = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable Rygel UPnP Mediaserver.
|
||||
|
||||
You will need to also allow UPnP connections in firewall, see the following <link xlink:href="https://github.com/NixOS/nixpkgs/pull/45045#issuecomment-416030795">comment</link>.
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
config = mkIf config.services.gnome3.rygel.enable {
|
||||
environment.systemPackages = [ pkgs.gnome3.rygel ];
|
||||
|
||||
services.dbus.packages = [ pkgs.gnome3.rygel ];
|
||||
|
||||
systemd.packages = [ pkgs.gnome3.rygel ];
|
||||
};
|
||||
}
|
56
nixos/modules/services/misc/weechat.nix
Normal file
56
nixos/modules/services/misc/weechat.nix
Normal file
@ -0,0 +1,56 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.weechat;
|
||||
in
|
||||
|
||||
{
|
||||
options.services.weechat = {
|
||||
enable = mkEnableOption "weechat";
|
||||
root = mkOption {
|
||||
description = "Weechat state directory.";
|
||||
type = types.str;
|
||||
default = "/var/lib/weechat";
|
||||
};
|
||||
sessionName = mkOption {
|
||||
description = "Name of the `screen' session for weechat.";
|
||||
default = "weechat-screen";
|
||||
type = types.str;
|
||||
};
|
||||
binary = mkOption {
|
||||
description = "Binary to execute (by default \${weechat}/bin/weechat).";
|
||||
example = literalExample ''
|
||||
''${pkgs.weechat}/bin/weechat-headless
|
||||
'';
|
||||
default = "${pkgs.weechat}/bin/weechat";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
users = {
|
||||
groups.weechat = {};
|
||||
users.weechat = {
|
||||
createHome = true;
|
||||
group = "weechat";
|
||||
home = cfg.root;
|
||||
isSystemUser = true;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.weechat = {
|
||||
environment.WEECHAT_HOME = cfg.root;
|
||||
serviceConfig = {
|
||||
User = "weechat";
|
||||
Group = "weechat";
|
||||
RemainAfterExit = "yes";
|
||||
};
|
||||
script = "exec ${pkgs.screen}/bin/screen -Dm -S ${cfg.sessionName} ${cfg.binary}";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "network.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
meta.doc = ./weechat.xml;
|
||||
}
|
61
nixos/modules/services/misc/weechat.xml
Normal file
61
nixos/modules/services/misc/weechat.xml
Normal file
@ -0,0 +1,61 @@
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
version="5.0"
|
||||
xml:id="module-services-weechat">
|
||||
|
||||
<title>WeeChat</title>
|
||||
<para><link xlink:href="https://weechat.org/">WeeChat</link> is a fast and extensible IRC client.</para>
|
||||
|
||||
<section><title>Basic Usage</title>
|
||||
<para>
|
||||
By default, the module creates a
|
||||
<literal><link xlink:href="https://www.freedesktop.org/wiki/Software/systemd/">systemd</link></literal> unit
|
||||
which runs the chat client in a detached
|
||||
<literal><link xlink:href="https://www.gnu.org/software/screen/">screen</link></literal> session.
|
||||
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This can be done by enabling the <literal>weechat</literal> service:
|
||||
|
||||
<programlisting>
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
<link linkend="opt-services.weechat.enable">services.weechat.enable</link> = true;
|
||||
}
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
The service is managed by a dedicated user
|
||||
named <literal>weechat</literal> in the state directory
|
||||
<literal>/var/lib/weechat</literal>.
|
||||
</para>
|
||||
</section>
|
||||
<section><title>Re-attaching to WeeChat</title>
|
||||
<para>
|
||||
WeeChat runs in a screen session owned by a dedicated user. To explicitly
|
||||
allow your another user to attach to this session, the <literal>screenrc</literal> needs to be tweaked
|
||||
by adding <link xlink:href="https://www.gnu.org/software/screen/manual/html_node/Multiuser.html#Multiuser">multiuser</link> support:
|
||||
|
||||
<programlisting>
|
||||
{
|
||||
<link linkend="opt-programs.screen.screenrc">programs.screen.screenrc</link> = ''
|
||||
multiuser on
|
||||
acladd normal_user
|
||||
'';
|
||||
}
|
||||
</programlisting>
|
||||
|
||||
Now, the session can be re-attached like this:
|
||||
|
||||
<programlisting>
|
||||
screen -r weechat-screen
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
<emphasis>The session name can be changed using <link linkend="opt-services.weechat.sessionName">services.weechat.sessionName.</link></emphasis>
|
||||
</para>
|
||||
</section>
|
||||
</chapter>
|
@ -17,9 +17,9 @@ let
|
||||
|
||||
launcher = writeScriptBin "riemann" ''
|
||||
#!/bin/sh
|
||||
exec ${jdk}/bin/java ${concatStringsSep "\n" cfg.extraJavaOpts} \
|
||||
exec ${jdk}/bin/java ${concatStringsSep " " cfg.extraJavaOpts} \
|
||||
-cp ${classpath} \
|
||||
riemann.bin ${writeText "riemann-config.clj" riemannConfig}
|
||||
riemann.bin ${cfg.configFile}
|
||||
'';
|
||||
|
||||
in {
|
||||
@ -37,7 +37,8 @@ in {
|
||||
config = mkOption {
|
||||
type = types.lines;
|
||||
description = ''
|
||||
Contents of the Riemann configuration file.
|
||||
Contents of the Riemann configuration file. For more complicated
|
||||
config you should use configFile.
|
||||
'';
|
||||
};
|
||||
configFiles = mkOption {
|
||||
@ -47,7 +48,15 @@ in {
|
||||
Extra files containing Riemann configuration. These files will be
|
||||
loaded at runtime by Riemann (with Clojure's
|
||||
<literal>load-file</literal> function) at the end of the
|
||||
configuration.
|
||||
configuration if you use the config option, this is ignored if you
|
||||
use configFile.
|
||||
'';
|
||||
};
|
||||
configFile = mkOption {
|
||||
type = types.str;
|
||||
description = ''
|
||||
A Riemann config file. Any files in the same directory as this file
|
||||
will be added to the classpath by Riemann.
|
||||
'';
|
||||
};
|
||||
extraClasspathEntries = mkOption {
|
||||
@ -77,6 +86,10 @@ in {
|
||||
group = "riemann";
|
||||
};
|
||||
|
||||
services.riemann.configFile = mkDefault (
|
||||
writeText "riemann-config.clj" riemannConfig
|
||||
);
|
||||
|
||||
systemd.services.riemann = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ inetutils ];
|
||||
@ -84,6 +97,7 @@ in {
|
||||
User = "riemann";
|
||||
ExecStart = "${launcher}/bin/riemann";
|
||||
};
|
||||
serviceConfig.LimitNOFILE = 65536;
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -8,6 +8,17 @@ let
|
||||
|
||||
homeDir = "/var/lib/i2pd";
|
||||
|
||||
strOpt = k: v: k + " = " + v;
|
||||
boolOpt = k: v: k + " = " + boolToString v;
|
||||
intOpt = k: v: k + " = " + toString v;
|
||||
lstOpt = k: xs: k + " = " + concatStringsSep "," xs;
|
||||
optionalNullString = o: s: optional (! isNull s) (strOpt o s);
|
||||
optionalNullBool = o: b: optional (! isNull b) (boolOpt o b);
|
||||
optionalNullInt = o: i: optional (! isNull i) (intOpt o i);
|
||||
optionalEmptyList = o: l: optional ([] != l) (lstOpt o l);
|
||||
|
||||
mkEnableTrueOption = name: mkEnableOption name // { default = true; };
|
||||
|
||||
mkEndpointOpt = name: addr: port: {
|
||||
enable = mkEnableOption name;
|
||||
name = mkOption {
|
||||
@ -18,42 +29,54 @@ let
|
||||
address = mkOption {
|
||||
type = types.str;
|
||||
default = addr;
|
||||
description = "Bind address for ${name} endpoint. Default: " + addr;
|
||||
description = "Bind address for ${name} endpoint.";
|
||||
};
|
||||
port = mkOption {
|
||||
type = types.int;
|
||||
default = port;
|
||||
description = "Bind port for ${name} endoint. Default: " + toString port;
|
||||
description = "Bind port for ${name} endoint.";
|
||||
};
|
||||
};
|
||||
|
||||
mkKeyedEndpointOpt = name: addr: port: keyFile:
|
||||
i2cpOpts = name: {
|
||||
length = mkOption {
|
||||
type = types.int;
|
||||
description = "Guaranteed minimum hops for ${name} tunnels.";
|
||||
default = 3;
|
||||
};
|
||||
quantity = mkOption {
|
||||
type = types.int;
|
||||
description = "Number of simultaneous ${name} tunnels.";
|
||||
default = 5;
|
||||
};
|
||||
};
|
||||
|
||||
mkKeyedEndpointOpt = name: addr: port: keyloc:
|
||||
(mkEndpointOpt name addr port) // {
|
||||
keys = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
type = with types; nullOr str;
|
||||
default = keyloc;
|
||||
description = ''
|
||||
File to persist ${lib.toUpper name} keys.
|
||||
'';
|
||||
};
|
||||
inbound = i2cpOpts name;
|
||||
outbound = i2cpOpts name;
|
||||
latency.min = mkOption {
|
||||
type = with types; nullOr int;
|
||||
description = "Min latency for tunnels.";
|
||||
default = null;
|
||||
};
|
||||
latency.max = mkOption {
|
||||
type = with types; nullOr int;
|
||||
description = "Max latency for tunnels.";
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
|
||||
commonTunOpts = let
|
||||
i2cpOpts = {
|
||||
length = mkOption {
|
||||
type = types.int;
|
||||
description = "Guaranteed minimum hops.";
|
||||
default = 3;
|
||||
};
|
||||
quantity = mkOption {
|
||||
type = types.int;
|
||||
description = "Number of simultaneous tunnels.";
|
||||
default = 5;
|
||||
};
|
||||
};
|
||||
in name: {
|
||||
outbound = i2cpOpts;
|
||||
inbound = i2cpOpts;
|
||||
commonTunOpts = name: {
|
||||
outbound = i2cpOpts name;
|
||||
inbound = i2cpOpts name;
|
||||
crypto.tagsToSend = mkOption {
|
||||
type = types.int;
|
||||
description = "Number of ElGamal/AES tags to send.";
|
||||
@ -70,94 +93,142 @@ let
|
||||
};
|
||||
} // mkEndpointOpt name "127.0.0.1" 0;
|
||||
|
||||
i2pdConf = pkgs.writeText "i2pd.conf" ''
|
||||
# DO NOT EDIT -- this file has been generated automatically.
|
||||
loglevel = ${cfg.logLevel}
|
||||
|
||||
ipv4 = ${boolToString cfg.enableIPv4}
|
||||
ipv6 = ${boolToString cfg.enableIPv6}
|
||||
notransit = ${boolToString cfg.notransit}
|
||||
floodfill = ${boolToString cfg.floodfill}
|
||||
netid = ${toString cfg.netid}
|
||||
${if isNull cfg.bandwidth then "" else "bandwidth = ${toString cfg.bandwidth}" }
|
||||
${if isNull cfg.port then "" else "port = ${toString cfg.port}"}
|
||||
|
||||
[limits]
|
||||
transittunnels = ${toString cfg.limits.transittunnels}
|
||||
|
||||
[upnp]
|
||||
enabled = ${boolToString cfg.upnp.enable}
|
||||
name = ${cfg.upnp.name}
|
||||
|
||||
[precomputation]
|
||||
elgamal = ${boolToString cfg.precomputation.elgamal}
|
||||
|
||||
[reseed]
|
||||
verify = ${boolToString cfg.reseed.verify}
|
||||
file = ${cfg.reseed.file}
|
||||
urls = ${builtins.concatStringsSep "," cfg.reseed.urls}
|
||||
|
||||
[addressbook]
|
||||
defaulturl = ${cfg.addressbook.defaulturl}
|
||||
subscriptions = ${builtins.concatStringsSep "," cfg.addressbook.subscriptions}
|
||||
|
||||
${flip concatMapStrings
|
||||
sec = name: "\n[" + name + "]";
|
||||
notice = "# DO NOT EDIT -- this file has been generated automatically.";
|
||||
i2pdConf = let
|
||||
opts = [
|
||||
notice
|
||||
(strOpt "loglevel" cfg.logLevel)
|
||||
(boolOpt "logclftime" cfg.logCLFTime)
|
||||
(boolOpt "ipv4" cfg.enableIPv4)
|
||||
(boolOpt "ipv6" cfg.enableIPv6)
|
||||
(boolOpt "notransit" cfg.notransit)
|
||||
(boolOpt "floodfill" cfg.floodfill)
|
||||
(intOpt "netid" cfg.netid)
|
||||
] ++ (optionalNullInt "bandwidth" cfg.bandwidth)
|
||||
++ (optionalNullInt "port" cfg.port)
|
||||
++ (optionalNullString "family" cfg.family)
|
||||
++ (optionalNullString "datadir" cfg.dataDir)
|
||||
++ (optionalNullInt "share" cfg.share)
|
||||
++ (optionalNullBool "ssu" cfg.ssu)
|
||||
++ (optionalNullBool "ntcp" cfg.ntcp)
|
||||
++ (optionalNullString "ntcpproxy" cfg.ntcpProxy)
|
||||
++ (optionalNullString "ifname" cfg.ifname)
|
||||
++ (optionalNullString "ifname4" cfg.ifname4)
|
||||
++ (optionalNullString "ifname6" cfg.ifname6)
|
||||
++ [
|
||||
(sec "limits")
|
||||
(intOpt "transittunnels" cfg.limits.transittunnels)
|
||||
(intOpt "coresize" cfg.limits.coreSize)
|
||||
(intOpt "openfiles" cfg.limits.openFiles)
|
||||
(intOpt "ntcphard" cfg.limits.ntcpHard)
|
||||
(intOpt "ntcpsoft" cfg.limits.ntcpSoft)
|
||||
(intOpt "ntcpthreads" cfg.limits.ntcpThreads)
|
||||
(sec "upnp")
|
||||
(boolOpt "enabled" cfg.upnp.enable)
|
||||
(sec "precomputation")
|
||||
(boolOpt "elgamal" cfg.precomputation.elgamal)
|
||||
(sec "reseed")
|
||||
(boolOpt "verify" cfg.reseed.verify)
|
||||
] ++ (optionalNullString "file" cfg.reseed.file)
|
||||
++ (optionalEmptyList "urls" cfg.reseed.urls)
|
||||
++ (optionalNullString "floodfill" cfg.reseed.floodfill)
|
||||
++ (optionalNullString "zipfile" cfg.reseed.zipfile)
|
||||
++ (optionalNullString "proxy" cfg.reseed.proxy)
|
||||
++ [
|
||||
(sec "trust")
|
||||
(boolOpt "enabled" cfg.trust.enable)
|
||||
(boolOpt "hidden" cfg.trust.hidden)
|
||||
] ++ (optionalEmptyList "routers" cfg.trust.routers)
|
||||
++ (optionalNullString "family" cfg.trust.family)
|
||||
++ [
|
||||
(sec "websockets")
|
||||
(boolOpt "enabled" cfg.websocket.enable)
|
||||
(strOpt "address" cfg.websocket.address)
|
||||
(intOpt "port" cfg.websocket.port)
|
||||
(sec "exploratory")
|
||||
(intOpt "inbound.length" cfg.exploratory.inbound.length)
|
||||
(intOpt "inbound.quantity" cfg.exploratory.inbound.quantity)
|
||||
(intOpt "outbound.length" cfg.exploratory.outbound.length)
|
||||
(intOpt "outbound.quantity" cfg.exploratory.outbound.quantity)
|
||||
(sec "ntcp2")
|
||||
(boolOpt "enabled" cfg.ntcp2.enable)
|
||||
(boolOpt "published" cfg.ntcp2.published)
|
||||
(intOpt "port" cfg.ntcp2.port)
|
||||
(sec "addressbook")
|
||||
(strOpt "defaulturl" cfg.addressbook.defaulturl)
|
||||
] ++ (optionalEmptyList "subscriptions" cfg.addressbook.subscriptions)
|
||||
++ (flip map
|
||||
(collect (proto: proto ? port && proto ? address && proto ? name) cfg.proto)
|
||||
(proto: ''
|
||||
[${proto.name}]
|
||||
enabled = ${boolToString proto.enable}
|
||||
address = ${proto.address}
|
||||
port = ${toString proto.port}
|
||||
${if proto ? keys then "keys = ${proto.keys}" else ""}
|
||||
${if proto ? auth then "auth = ${boolToString proto.auth}" else ""}
|
||||
${if proto ? user then "user = ${proto.user}" else ""}
|
||||
${if proto ? pass then "pass = ${proto.pass}" else ""}
|
||||
${if proto ? outproxy then "outproxy = ${proto.outproxy}" else ""}
|
||||
${if proto ? outproxyPort then "outproxyport = ${toString proto.outproxyPort}" else ""}
|
||||
'')
|
||||
}
|
||||
'';
|
||||
(proto: let protoOpts = [
|
||||
(sec proto.name)
|
||||
(boolOpt "enabled" proto.enable)
|
||||
(strOpt "address" proto.address)
|
||||
(intOpt "port" proto.port)
|
||||
] ++ (if proto ? keys then optionalNullString "keys" proto.keys else [])
|
||||
++ (if proto ? auth then optionalNullBool "auth" proto.auth else [])
|
||||
++ (if proto ? user then optionalNullString "user" proto.user else [])
|
||||
++ (if proto ? pass then optionalNullString "pass" proto.pass else [])
|
||||
++ (if proto ? strictHeaders then optionalNullBool "strictheaders" proto.strictHeaders else [])
|
||||
++ (if proto ? hostname then optionalNullString "hostname" proto.hostname else [])
|
||||
++ (if proto ? outproxy then optionalNullString "outproxy" proto.outproxy else [])
|
||||
++ (if proto ? outproxyPort then optionalNullInt "outproxyport" proto.outproxyPort else [])
|
||||
++ (if proto ? outproxyEnable then optionalNullBool "outproxy.enabled" proto.outproxyEnable else []);
|
||||
in (concatStringsSep "\n" protoOpts)
|
||||
));
|
||||
in
|
||||
pkgs.writeText "i2pd.conf" (concatStringsSep "\n" opts);
|
||||
|
||||
i2pdTunnelConf = pkgs.writeText "i2pd-tunnels.conf" ''
|
||||
# DO NOT EDIT -- this file has been generated automatically.
|
||||
${flip concatMapStrings
|
||||
tunnelConf = let opts = [
|
||||
notice
|
||||
(flip map
|
||||
(collect (tun: tun ? port && tun ? destination) cfg.outTunnels)
|
||||
(tun: ''
|
||||
[${tun.name}]
|
||||
type = client
|
||||
destination = ${tun.destination}
|
||||
destinationport = ${toString tun.destinationPort}
|
||||
keys = ${tun.keys}
|
||||
address = ${tun.address}
|
||||
port = ${toString tun.port}
|
||||
inbound.length = ${toString tun.inbound.length}
|
||||
outbound.length = ${toString tun.outbound.length}
|
||||
inbound.quantity = ${toString tun.inbound.quantity}
|
||||
outbound.quantity = ${toString tun.outbound.quantity}
|
||||
crypto.tagsToSend = ${toString tun.crypto.tagsToSend}
|
||||
'')
|
||||
}
|
||||
${flip concatMapStrings
|
||||
(tun: let outTunOpts = [
|
||||
(sec tun.name)
|
||||
"type = client"
|
||||
(intOpt "port" tun.port)
|
||||
(strOpt "destination" tun.destination)
|
||||
] ++ (if tun ? destinationPort then optionalNullInt "destinationport" tun.destinationPort else [])
|
||||
++ (if tun ? keys then
|
||||
optionalNullString "keys" tun.keys else [])
|
||||
++ (if tun ? address then
|
||||
optionalNullString "address" tun.address else [])
|
||||
++ (if tun ? inbound.length then
|
||||
optionalNullInt "inbound.length" tun.inbound.length else [])
|
||||
++ (if tun ? inbound.quantity then
|
||||
optionalNullInt "inbound.quantity" tun.inbound.quantity else [])
|
||||
++ (if tun ? outbound.length then
|
||||
optionalNullInt "outbound.length" tun.outbound.length else [])
|
||||
++ (if tun ? outbound.quantity then
|
||||
optionalNullInt "outbound.quantity" tun.outbound.quantity else [])
|
||||
++ (if tun ? crypto.tagsToSend then
|
||||
optionalNullInt "crypto.tagstosend" tun.crypto.tagsToSend else []);
|
||||
in concatStringsSep "\n" outTunOpts))
|
||||
(flip map
|
||||
(collect (tun: tun ? port && tun ? address) cfg.inTunnels)
|
||||
(tun: ''
|
||||
[${tun.name}]
|
||||
type = server
|
||||
destination = ${tun.destination}
|
||||
keys = ${tun.keys}
|
||||
host = ${tun.address}
|
||||
port = ${toString tun.port}
|
||||
inport = ${toString tun.inPort}
|
||||
accesslist = ${builtins.concatStringsSep "," tun.accessList}
|
||||
'')
|
||||
}
|
||||
'';
|
||||
(tun: let inTunOpts = [
|
||||
(sec tun.name)
|
||||
"type = server"
|
||||
(intOpt "port" tun.port)
|
||||
(strOpt "host" tun.address)
|
||||
] ++ (if tun ? destination then
|
||||
optionalNullString "destination" tun.destination else [])
|
||||
++ (if tun ? keys then
|
||||
optionalNullString "keys" tun.keys else [])
|
||||
++ (if tun ? inPort then
|
||||
optionalNullInt "inport" tun.inPort else [])
|
||||
++ (if tun ? accessList then
|
||||
optionalEmptyList "accesslist" tun.accessList else []);
|
||||
in concatStringsSep "\n" inTunOpts))];
|
||||
in pkgs.writeText "i2pd-tunnels.conf" opts;
|
||||
|
||||
i2pdSh = pkgs.writeScriptBin "i2pd" ''
|
||||
#!/bin/sh
|
||||
exec ${pkgs.i2pd}/bin/i2pd \
|
||||
${if isNull cfg.address then "" else "--host="+cfg.address} \
|
||||
--service \
|
||||
--conf=${i2pdConf} \
|
||||
--tunconf=${i2pdTunnelConf}
|
||||
--tunconf=${tunnelConf}
|
||||
'';
|
||||
|
||||
in
|
||||
@ -170,9 +241,7 @@ in
|
||||
|
||||
services.i2pd = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
enable = mkEnableOption "I2Pd daemon" // {
|
||||
description = ''
|
||||
Enables I2Pd as a running service upon activation.
|
||||
Please read http://i2pd.readthedocs.io/en/latest/ for further
|
||||
@ -192,6 +261,8 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
logCLFTime = mkEnableOption "Full CLF-formatted date and time to log";
|
||||
|
||||
address = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
@ -200,17 +271,72 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
notransit = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
family = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = ''
|
||||
Specify a family the router belongs to.
|
||||
'';
|
||||
};
|
||||
|
||||
dataDir = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = ''
|
||||
Alternative path to storage of i2pd data (RI, keys, peer profiles, ...)
|
||||
'';
|
||||
};
|
||||
|
||||
share = mkOption {
|
||||
type = types.int;
|
||||
default = 100;
|
||||
description = ''
|
||||
Limit of transit traffic from max bandwidth in percents.
|
||||
'';
|
||||
};
|
||||
|
||||
ifname = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = ''
|
||||
Network interface to bind to.
|
||||
'';
|
||||
};
|
||||
|
||||
ifname4 = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = ''
|
||||
IPv4 interface to bind to.
|
||||
'';
|
||||
};
|
||||
|
||||
ifname6 = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = ''
|
||||
IPv6 interface to bind to.
|
||||
'';
|
||||
};
|
||||
|
||||
ntcpProxy = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = ''
|
||||
Proxy URL for NTCP transport.
|
||||
'';
|
||||
};
|
||||
|
||||
ntcp = mkEnableTrueOption "ntcp";
|
||||
ssu = mkEnableTrueOption "ssu";
|
||||
|
||||
notransit = mkEnableOption "notransit" // {
|
||||
description = ''
|
||||
Tells the router to not accept transit tunnels during startup.
|
||||
'';
|
||||
};
|
||||
|
||||
floodfill = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
floodfill = mkEnableOption "floodfill" // {
|
||||
description = ''
|
||||
If the router is declared to be unreachable and needs introduction nodes.
|
||||
'';
|
||||
@ -241,51 +367,20 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
enableIPv4 = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
enableIPv4 = mkEnableTrueOption "IPv4 connectivity";
|
||||
enableIPv6 = mkEnableOption "IPv6 connectivity";
|
||||
nat = mkEnableTrueOption "NAT bypass";
|
||||
|
||||
upnp.enable = mkEnableOption "UPnP service discovery";
|
||||
upnp.name = mkOption {
|
||||
type = types.str;
|
||||
default = "I2Pd";
|
||||
description = ''
|
||||
Enables IPv4 connectivity. Enabled by default.
|
||||
Name i2pd appears in UPnP forwardings list.
|
||||
'';
|
||||
};
|
||||
|
||||
enableIPv6 = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enables IPv6 connectivity. Disabled by default.
|
||||
'';
|
||||
};
|
||||
|
||||
nat = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Assume router is NATed. Enabled by default.
|
||||
'';
|
||||
};
|
||||
|
||||
upnp = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enables UPnP.
|
||||
'';
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = "I2Pd";
|
||||
description = ''
|
||||
Name i2pd appears in UPnP forwardings list.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
precomputation.elgamal = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
precomputation.elgamal = mkEnableTrueOption "Precomputed ElGamal tables" // {
|
||||
description = ''
|
||||
Whenever to use precomputated tables for ElGamal.
|
||||
<command>i2pd</command> defaults to <literal>false</literal>
|
||||
@ -296,76 +391,154 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
reseed = {
|
||||
verify = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Request SU3 signature verification
|
||||
'';
|
||||
};
|
||||
reseed.verify = mkEnableOption "SU3 signature verification";
|
||||
|
||||
file = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
description = ''
|
||||
Full path to SU3 file to reseed from
|
||||
'';
|
||||
};
|
||||
|
||||
urls = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [
|
||||
"https://reseed.i2p-project.de/"
|
||||
"https://i2p.mooo.com/netDb/"
|
||||
"https://netdb.i2p2.no/"
|
||||
"https://us.reseed.i2p2.no:444/"
|
||||
"https://uk.reseed.i2p2.no:444/"
|
||||
"https://i2p.manas.ca:8443/"
|
||||
];
|
||||
description = ''
|
||||
Reseed URLs
|
||||
'';
|
||||
};
|
||||
reseed.file = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = ''
|
||||
Full path to SU3 file to reseed from.
|
||||
'';
|
||||
};
|
||||
|
||||
addressbook = {
|
||||
defaulturl = mkOption {
|
||||
type = types.str;
|
||||
default = "http://joajgazyztfssty4w2on5oaqksz6tqoxbduy553y34mf4byv6gpq.b32.i2p/export/alive-hosts.txt";
|
||||
description = ''
|
||||
AddressBook subscription URL for initial setup
|
||||
'';
|
||||
};
|
||||
subscriptions = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [
|
||||
"http://inr.i2p/export/alive-hosts.txt"
|
||||
"http://i2p-projekt.i2p/hosts.txt"
|
||||
"http://stats.i2p/cgi-bin/newhosts.txt"
|
||||
];
|
||||
description = ''
|
||||
AddressBook subscription URLs
|
||||
'';
|
||||
};
|
||||
reseed.urls = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [];
|
||||
description = ''
|
||||
Reseed URLs.
|
||||
'';
|
||||
};
|
||||
|
||||
reseed.floodfill = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = ''
|
||||
Path to router info of floodfill to reseed from.
|
||||
'';
|
||||
};
|
||||
|
||||
reseed.zipfile = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = ''
|
||||
Path to local .zip file to reseed from.
|
||||
'';
|
||||
};
|
||||
|
||||
reseed.proxy = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = ''
|
||||
URL for reseed proxy, supports http/socks.
|
||||
'';
|
||||
};
|
||||
|
||||
addressbook.defaulturl = mkOption {
|
||||
type = types.str;
|
||||
default = "http://joajgazyztfssty4w2on5oaqksz6tqoxbduy553y34mf4byv6gpq.b32.i2p/export/alive-hosts.txt";
|
||||
description = ''
|
||||
AddressBook subscription URL for initial setup
|
||||
'';
|
||||
};
|
||||
addressbook.subscriptions = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [
|
||||
"http://inr.i2p/export/alive-hosts.txt"
|
||||
"http://i2p-projekt.i2p/hosts.txt"
|
||||
"http://stats.i2p/cgi-bin/newhosts.txt"
|
||||
];
|
||||
description = ''
|
||||
AddressBook subscription URLs
|
||||
'';
|
||||
};
|
||||
|
||||
trust.enable = mkEnableOption "Explicit trust options";
|
||||
|
||||
trust.family = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = ''
|
||||
Router Familiy to trust for first hops.
|
||||
'';
|
||||
};
|
||||
|
||||
trust.routers = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [];
|
||||
description = ''
|
||||
Only connect to the listed routers.
|
||||
'';
|
||||
};
|
||||
|
||||
trust.hidden = mkEnableOption "Router concealment.";
|
||||
|
||||
websocket = mkEndpointOpt "websockets" "127.0.0.1" 7666;
|
||||
|
||||
exploratory.inbound = i2cpOpts "exploratory";
|
||||
exploratory.outbound = i2cpOpts "exploratory";
|
||||
|
||||
ntcp2.enable = mkEnableTrueOption "NTCP2.";
|
||||
ntcp2.published = mkEnableOption "NTCP2 publication.";
|
||||
ntcp2.port = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
description = ''
|
||||
Port to listen for incoming NTCP2 connections (0=auto).
|
||||
'';
|
||||
};
|
||||
|
||||
limits.transittunnels = mkOption {
|
||||
type = types.int;
|
||||
default = 2500;
|
||||
description = ''
|
||||
Maximum number of active transit sessions
|
||||
Maximum number of active transit sessions.
|
||||
'';
|
||||
};
|
||||
|
||||
limits.coreSize = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
description = ''
|
||||
Maximum size of corefile in Kb (0 - use system limit).
|
||||
'';
|
||||
};
|
||||
|
||||
limits.openFiles = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
description = ''
|
||||
Maximum number of open files (0 - use system default).
|
||||
'';
|
||||
};
|
||||
|
||||
limits.ntcpHard = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
description = ''
|
||||
Maximum number of active transit sessions.
|
||||
'';
|
||||
};
|
||||
|
||||
limits.ntcpSoft = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
description = ''
|
||||
Threshold to start probabalistic backoff with ntcp sessions (default: use system limit).
|
||||
'';
|
||||
};
|
||||
|
||||
limits.ntcpThreads = mkOption {
|
||||
type = types.int;
|
||||
default = 1;
|
||||
description = ''
|
||||
Maximum number of threads used by NTCP DH worker.
|
||||
'';
|
||||
};
|
||||
|
||||
proto.http = (mkEndpointOpt "http" "127.0.0.1" 7070) // {
|
||||
auth = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enable authentication for webconsole.
|
||||
'';
|
||||
};
|
||||
|
||||
auth = mkEnableOption "Webconsole authentication";
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = "i2pd";
|
||||
@ -373,6 +546,7 @@ in
|
||||
Username for webconsole access
|
||||
'';
|
||||
};
|
||||
|
||||
pass = mkOption {
|
||||
type = types.str;
|
||||
default = "i2pd";
|
||||
@ -380,11 +554,35 @@ in
|
||||
Password for webconsole access.
|
||||
'';
|
||||
};
|
||||
|
||||
strictHeaders = mkOption {
|
||||
type = with types; nullOr bool;
|
||||
default = null;
|
||||
description = ''
|
||||
Enable strict host checking on WebUI.
|
||||
'';
|
||||
};
|
||||
|
||||
hostname = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = ''
|
||||
Expected hostname for WebUI.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
proto.httpProxy = mkKeyedEndpointOpt "httpproxy" "127.0.0.1" 4444 "";
|
||||
proto.socksProxy = (mkKeyedEndpointOpt "socksproxy" "127.0.0.1" 4447 "")
|
||||
proto.httpProxy = (mkKeyedEndpointOpt "httpproxy" "127.0.0.1" 4444 "httpproxy-keys.dat")
|
||||
// {
|
||||
outproxy = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = "Upstream outproxy bind address.";
|
||||
};
|
||||
};
|
||||
proto.socksProxy = (mkKeyedEndpointOpt "socksproxy" "127.0.0.1" 4447 "socksproxy-keys.dat")
|
||||
// {
|
||||
outproxyEnable = mkEnableOption "SOCKS outproxy";
|
||||
outproxy = mkOption {
|
||||
type = types.str;
|
||||
default = "127.0.0.1";
|
||||
@ -408,8 +606,8 @@ in
|
||||
{ name, ... }: {
|
||||
options = {
|
||||
destinationPort = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
type = with types; nullOr int;
|
||||
default = null;
|
||||
description = "Connect to particular port at destination.";
|
||||
};
|
||||
} // commonTunOpts name;
|
||||
|
87
nixos/modules/services/networking/iperf3.nix
Normal file
87
nixos/modules/services/networking/iperf3.nix
Normal file
@ -0,0 +1,87 @@
|
||||
{ config, lib, pkgs, ... }: with lib;
|
||||
let
|
||||
cfg = config.services.iperf3;
|
||||
|
||||
api = {
|
||||
enable = mkEnableOption "iperf3 network throughput testing server";
|
||||
port = mkOption {
|
||||
type = types.ints.u16;
|
||||
default = 5201;
|
||||
description = "Server port to listen on for iperf3 client requsts.";
|
||||
};
|
||||
affinity = mkOption {
|
||||
type = types.nullOr types.ints.unsigned;
|
||||
default = null;
|
||||
description = "CPU affinity for the process.";
|
||||
};
|
||||
bind = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "Bind to the specific interface associated with the given address.";
|
||||
};
|
||||
verbose = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Give more detailed output.";
|
||||
};
|
||||
forceFlush = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Force flushing output at every interval.";
|
||||
};
|
||||
debug = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Emit debugging output.";
|
||||
};
|
||||
rsaPrivateKey = mkOption {
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
description = "Path to the RSA private key (not password-protected) used to decrypt authentication credentials from the client.";
|
||||
};
|
||||
authorizedUsersFile = mkOption {
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
description = "Path to the configuration file containing authorized users credentials to run iperf tests.";
|
||||
};
|
||||
extraFlags = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
description = "Extra flags to pass to iperf3(1).";
|
||||
};
|
||||
};
|
||||
|
||||
imp = {
|
||||
systemd.services.iperf3 = {
|
||||
description = "iperf3 daemon";
|
||||
unitConfig.Documentation = "man:iperf3(1) https://iperf.fr/iperf-doc.php";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
Restart = "on-failure";
|
||||
RestartSec = 2;
|
||||
DynamicUser = true;
|
||||
PrivateDevices = true;
|
||||
CapabilityBoundingSet = "";
|
||||
NoNewPrivileges = true;
|
||||
ExecStart = ''
|
||||
${pkgs.iperf3}/bin/iperf \
|
||||
--server \
|
||||
--port ${toString cfg.port} \
|
||||
${optionalString (cfg.affinity != null) "--affinity ${toString cfg.affinity}"} \
|
||||
${optionalString (cfg.bind != null) "--bind ${cfg.bind}"} \
|
||||
${optionalString (cfg.rsaPrivateKey != null) "--rsa-private-key-path ${cfg.rsaPrivateKey}"} \
|
||||
${optionalString (cfg.authorizedUsersFile != null) "--authorized-users-path ${cfg.authorizedUsersFile}"} \
|
||||
${optionalString cfg.verbose "--verbose"} \
|
||||
${optionalString cfg.debug "--debug"} \
|
||||
${optionalString cfg.forceFlush "--forceflush"} \
|
||||
${escapeShellArgs cfg.extraFlags}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
options.services.iperf3 = api;
|
||||
config = mkIf cfg.enable imp;
|
||||
}
|
@ -406,25 +406,25 @@ in {
|
||||
{ source = configFile;
|
||||
target = "NetworkManager/NetworkManager.conf";
|
||||
}
|
||||
{ source = "${networkmanager-openvpn}/etc/NetworkManager/VPN/nm-openvpn-service.name";
|
||||
{ source = "${networkmanager-openvpn}/lib/NetworkManager/VPN/nm-openvpn-service.name";
|
||||
target = "NetworkManager/VPN/nm-openvpn-service.name";
|
||||
}
|
||||
{ source = "${networkmanager-vpnc}/etc/NetworkManager/VPN/nm-vpnc-service.name";
|
||||
{ source = "${networkmanager-vpnc}/lib/NetworkManager/VPN/nm-vpnc-service.name";
|
||||
target = "NetworkManager/VPN/nm-vpnc-service.name";
|
||||
}
|
||||
{ source = "${networkmanager-openconnect}/etc/NetworkManager/VPN/nm-openconnect-service.name";
|
||||
{ source = "${networkmanager-openconnect}/lib/NetworkManager/VPN/nm-openconnect-service.name";
|
||||
target = "NetworkManager/VPN/nm-openconnect-service.name";
|
||||
}
|
||||
{ source = "${networkmanager-fortisslvpn}/etc/NetworkManager/VPN/nm-fortisslvpn-service.name";
|
||||
{ source = "${networkmanager-fortisslvpn}/lib/NetworkManager/VPN/nm-fortisslvpn-service.name";
|
||||
target = "NetworkManager/VPN/nm-fortisslvpn-service.name";
|
||||
}
|
||||
{ source = "${networkmanager-l2tp}/etc/NetworkManager/VPN/nm-l2tp-service.name";
|
||||
{ source = "${networkmanager-l2tp}/lib/NetworkManager/VPN/nm-l2tp-service.name";
|
||||
target = "NetworkManager/VPN/nm-l2tp-service.name";
|
||||
}
|
||||
{ source = "${networkmanager_strongswan}/etc/NetworkManager/VPN/nm-strongswan-service.name";
|
||||
{ source = "${networkmanager_strongswan}/lib/NetworkManager/VPN/nm-strongswan-service.name";
|
||||
target = "NetworkManager/VPN/nm-strongswan-service.name";
|
||||
}
|
||||
{ source = "${networkmanager-iodine}/etc/NetworkManager/VPN/nm-iodine-service.name";
|
||||
{ source = "${networkmanager-iodine}/lib/NetworkManager/VPN/nm-iodine-service.name";
|
||||
target = "NetworkManager/VPN/nm-iodine-service.name";
|
||||
}
|
||||
] ++ optional (cfg.appendNameservers == [] || cfg.insertNameservers == [])
|
||||
|
@ -3,78 +3,112 @@
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.sks;
|
||||
|
||||
sksPkg = cfg.package;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
in {
|
||||
meta.maintainers = with maintainers; [ primeos calbrecht jcumming ];
|
||||
|
||||
options = {
|
||||
|
||||
services.sks = {
|
||||
|
||||
enable = mkEnableOption "sks";
|
||||
enable = mkEnableOption ''
|
||||
SKS (synchronizing key server for OpenPGP) and start the database
|
||||
server. You need to create "''${dataDir}/dump/*.gpg" for the initial
|
||||
import'';
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.sks;
|
||||
defaultText = "pkgs.sks";
|
||||
type = types.package;
|
||||
description = "
|
||||
Which sks derivation to use.
|
||||
";
|
||||
description = "Which SKS derivation to use.";
|
||||
};
|
||||
|
||||
dataDir = mkOption {
|
||||
type = types.path;
|
||||
default = "/var/db/sks";
|
||||
example = "/var/lib/sks";
|
||||
# TODO: The default might change to "/var/lib/sks" as this is more
|
||||
# common. There's also https://github.com/NixOS/nixpkgs/issues/26256
|
||||
# and "/var/db" is not FHS compliant (seems to come from BSD).
|
||||
description = ''
|
||||
Data directory (-basedir) for SKS, where the database and all
|
||||
configuration files are located (e.g. KDB, PTree, membership and
|
||||
sksconf).
|
||||
'';
|
||||
};
|
||||
|
||||
hkpAddress = mkOption {
|
||||
default = [ "127.0.0.1" "::1" ];
|
||||
type = types.listOf types.str;
|
||||
description = "
|
||||
Wich ip addresses the sks-keyserver is listening on.
|
||||
";
|
||||
description = ''
|
||||
Domain names, IPv4 and/or IPv6 addresses to listen on for HKP
|
||||
requests.
|
||||
'';
|
||||
};
|
||||
|
||||
hkpPort = mkOption {
|
||||
default = 11371;
|
||||
type = types.int;
|
||||
description = "
|
||||
Which port the sks-keyserver is listening on.
|
||||
";
|
||||
type = types.ints.u16;
|
||||
description = "HKP port to listen on.";
|
||||
};
|
||||
|
||||
webroot = mkOption {
|
||||
type = types.nullOr types.path;
|
||||
default = "${sksPkg.webSamples}/OpenPKG";
|
||||
defaultText = "\${pkgs.sks.webSamples}/OpenPKG";
|
||||
description = ''
|
||||
Source directory (will be symlinked, if not null) for the files the
|
||||
built-in webserver should serve. SKS (''${pkgs.sks.webSamples})
|
||||
provides the following examples: "HTML5", "OpenPKG", and "XHTML+ES".
|
||||
The index file can be named index.html, index.htm, index.xhtm, or
|
||||
index.xhtml. Files with the extensions .css, .es, .js, .jpg, .jpeg,
|
||||
.png, or .gif are supported. Subdirectories and filenames with
|
||||
anything other than alphanumeric characters and the '.' character
|
||||
will be ignored.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = [ sksPkg ];
|
||||
|
||||
users.users.sks = {
|
||||
createHome = true;
|
||||
home = "/var/db/sks";
|
||||
isSystemUser = true;
|
||||
shell = "${pkgs.coreutils}/bin/true";
|
||||
users = {
|
||||
users.sks = {
|
||||
isSystemUser = true;
|
||||
description = "SKS user";
|
||||
home = cfg.dataDir;
|
||||
createHome = true;
|
||||
group = "sks";
|
||||
useDefaultShell = true;
|
||||
packages = [ sksPkg pkgs.db ];
|
||||
};
|
||||
groups.sks = { };
|
||||
};
|
||||
|
||||
systemd.services = let
|
||||
hkpAddress = "'" + (builtins.concatStringsSep " " cfg.hkpAddress) + "'" ;
|
||||
hkpPort = builtins.toString cfg.hkpPort;
|
||||
home = config.users.users.sks.home;
|
||||
user = config.users.users.sks.name;
|
||||
in {
|
||||
sks-keyserver = {
|
||||
"sks-db" = {
|
||||
description = "SKS database server";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
preStart = ''
|
||||
mkdir -p ${home}/dump
|
||||
${pkgs.sks}/bin/sks build ${home}/dump/*.gpg -n 10 -cache 100 || true #*/
|
||||
${pkgs.sks}/bin/sks cleandb || true
|
||||
${pkgs.sks}/bin/sks pbuild -cache 20 -ptree_cache 70 || true
|
||||
${lib.optionalString (cfg.webroot != null)
|
||||
"ln -sfT \"${cfg.webroot}\" web"}
|
||||
mkdir -p dump
|
||||
${sksPkg}/bin/sks build dump/*.gpg -n 10 -cache 100 || true #*/
|
||||
${sksPkg}/bin/sks cleandb || true
|
||||
${sksPkg}/bin/sks pbuild -cache 20 -ptree_cache 70 || true
|
||||
'';
|
||||
serviceConfig = {
|
||||
WorkingDirectory = home;
|
||||
User = user;
|
||||
WorkingDirectory = "~";
|
||||
User = "sks";
|
||||
Group = "sks";
|
||||
Restart = "always";
|
||||
ExecStart = "${pkgs.sks}/bin/sks db -hkp_address ${hkpAddress} -hkp_port ${hkpPort}";
|
||||
ExecStart = "${sksPkg}/bin/sks db -hkp_address ${hkpAddress} -hkp_port ${hkpPort}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -66,7 +66,7 @@ in
|
||||
'';
|
||||
}];
|
||||
|
||||
security.wrappers = (import (builtins.toPath "${e.enlightenment}/e-wrappers.nix")).security.wrappers;
|
||||
security.wrappers = (import "${e.enlightenment}/e-wrappers.nix").security.wrappers;
|
||||
|
||||
environment.etc = singleton
|
||||
{ source = xcfg.xkbDir;
|
||||
|
@ -110,6 +110,7 @@ in {
|
||||
services.gnome3.gnome-terminal-server.enable = mkDefault true;
|
||||
services.gnome3.gnome-user-share.enable = mkDefault true;
|
||||
services.gnome3.gvfs.enable = true;
|
||||
services.gnome3.rygel.enable = mkDefault true;
|
||||
services.gnome3.seahorse.enable = mkDefault true;
|
||||
services.gnome3.sushi.enable = mkDefault true;
|
||||
services.gnome3.tracker.enable = mkDefault true;
|
||||
|
@ -208,7 +208,6 @@ let
|
||||
"InitialCongestionWindow" "InitialAdvertisedReceiveWindow" "QuickAck"
|
||||
"MTUBytes"
|
||||
])
|
||||
(assertHasField "Gateway")
|
||||
];
|
||||
|
||||
checkDhcp = checkUnitConfig "DHCP" [
|
||||
@ -249,13 +248,14 @@ let
|
||||
# .network files have a [Link] section with different options than in .netlink files
|
||||
checkNetworkLink = checkUnitConfig "Link" [
|
||||
(assertOnlyFields [
|
||||
"MACAddress" "MTUBytes" "ARP" "Unmanaged" "RequiredForOnline"
|
||||
"MACAddress" "MTUBytes" "ARP" "Multicast" "Unmanaged" "RequiredForOnline"
|
||||
])
|
||||
(assertMacAddress "MACAddress")
|
||||
(assertByteFormat "MTUBytes")
|
||||
(assertValueOneOf "ARP" boolValues)
|
||||
(assertValueOneOf "Multicast" boolValues)
|
||||
(assertValueOneOf "Unmanaged" boolValues)
|
||||
(assertValueOneOf "RquiredForOnline" boolValues)
|
||||
(assertValueOneOf "RequiredForOnline" boolValues)
|
||||
];
|
||||
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
{ stdenv, fetchurl, pkgconfig, autoreconfHook, openssl, db48, boost
|
||||
, zlib, miniupnpc, qt4, utillinux, protobuf, qrencode, libevent
|
||||
, withGui }:
|
||||
{ stdenv, fetchurl, pkgconfig, autoreconfHook, hexdump, openssl, db48
|
||||
, boost, zlib, miniupnpc, qt4, utillinux, protobuf, qrencode, libevent
|
||||
, AppKit
|
||||
, withGui ? !stdenv.isDarwin
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
stdenv.mkDerivation rec{
|
||||
@ -12,11 +14,10 @@ stdenv.mkDerivation rec{
|
||||
sha256 = "0v0g2wb4nsnhddxzb63vj2bc1mgyj05vqm5imicjfz8prvgc0si8";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig autoreconfHook ];
|
||||
buildInputs = [ openssl db48 boost zlib
|
||||
miniupnpc protobuf libevent]
|
||||
++ optionals stdenv.isLinux [ utillinux ]
|
||||
++ optionals withGui [ qt4 qrencode ];
|
||||
nativeBuildInputs = [ pkgconfig autoreconfHook hexdump ];
|
||||
buildInputs = [ openssl db48 boost zlib miniupnpc protobuf libevent ]
|
||||
++ optionals withGui [ qt4 qrencode ]
|
||||
++ optional stdenv.isDarwin AppKit;
|
||||
|
||||
configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ]
|
||||
++ optionals withGui [ "--with-gui=qt4" ];
|
||||
|
@ -32,8 +32,11 @@ rec {
|
||||
boost = boost165; withGui = false;
|
||||
};
|
||||
|
||||
btc1 = callPackage ./btc1.nix { boost = boost165; withGui = true; };
|
||||
btc1d = callPackage ./btc1.nix { boost = boost165; withGui = false; };
|
||||
btc1 = callPackage ./btc1.nix {
|
||||
inherit (darwin.apple_sdk.frameworks) AppKit;
|
||||
boost = boost165;
|
||||
};
|
||||
btc1d = btc1.override { withGui = false; };
|
||||
|
||||
cryptop = python3.pkgs.callPackage ./cryptop { };
|
||||
|
||||
|
63
pkgs/applications/audio/pulseaudio-modules-bt/default.nix
Normal file
63
pkgs/applications/audio/pulseaudio-modules-bt/default.nix
Normal file
@ -0,0 +1,63 @@
|
||||
{ stdenv
|
||||
, runCommand
|
||||
, fetchFromGitHub
|
||||
, libpulseaudio
|
||||
, pulseaudio
|
||||
, pkgconfig
|
||||
, libtool
|
||||
, cmake
|
||||
, bluez
|
||||
, dbus
|
||||
, sbc
|
||||
}:
|
||||
|
||||
let
|
||||
pulseSources = runCommand "pulseaudio-sources" {} ''
|
||||
mkdir $out
|
||||
tar -xf ${pulseaudio.src}
|
||||
mv pulseaudio*/* $out/
|
||||
'';
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "pulseaudio-modules-bt-${version}";
|
||||
version = "unstable-2018-09-11";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "EHfive";
|
||||
repo = "pulseaudio-modules-bt";
|
||||
rev = "9c6ad75382f3855916ad2feaa6b40e37356d80cc";
|
||||
sha256 = "1iz4m3y6arsvwcyvqc429w252dl3apnhvl1zhyvfxlbg00d2ii0h";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgconfig
|
||||
cmake
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libpulseaudio
|
||||
pulseaudio
|
||||
libtool
|
||||
bluez
|
||||
dbus
|
||||
sbc
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = [
|
||||
"-L${pulseaudio}/lib/pulseaudio"
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
rm -r pa
|
||||
ln -s ${pulseSources} pa
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/EHfive/pulseaudio-modules-bt;
|
||||
description = "SBC, Sony LDAC codec (A2DP Audio) support for Pulseaudio";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ adisbladis ];
|
||||
};
|
||||
}
|
@ -29,11 +29,11 @@
|
||||
# handle that.
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "qmmp-1.2.2";
|
||||
name = "qmmp-1.2.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://qmmp.ylsoftware.com/files/${name}.tar.bz2";
|
||||
sha256 = "01nnyg8m3p3px1fj3lfsqqv9zh1388dwx1bm2qv4v87jywimgp79";
|
||||
sha256 = "05lqmj22vr5ch1i0928d64ybdnn3qc66s9lgarx5s6x6ffr6589j";
|
||||
};
|
||||
|
||||
buildInputs =
|
||||
|
@ -13,9 +13,9 @@ let
|
||||
sha256Hash = "0xx6yprylmcb32ipmwdcfkgddlm1nrxi1w68miclvgrbk015brf2";
|
||||
};
|
||||
betaVersion = {
|
||||
version = "3.2.0.24"; # "Android Studio 3.2 RC 2"
|
||||
build = "181.4974118";
|
||||
sha256Hash = "0sj848pzpsbmnfi2692gg73v6m72hr1pwlk5x8q912w60iypi3pz";
|
||||
version = "3.2.0.25"; # "Android Studio 3.2 RC 3"
|
||||
build = "181.4987877";
|
||||
sha256Hash = "0mriakxxchc0wbqkl236pp4fsqbq3gb2qrkdg5hx9zz763dc59gp";
|
||||
};
|
||||
latestVersion = { # canary & dev
|
||||
version = "3.3.0.7"; # "Android Studio 3.3 Canary 8"
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig
|
||||
, curl, freetype, giflib, libjpeg, libpng, libwebp, pixman, tinyxml, zlib
|
||||
{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, pkgconfig
|
||||
, curl, freetype, giflib, harfbuzz, libjpeg, libpng, libwebp, pixman, tinyxml, zlib
|
||||
, libX11, libXext, libXcursor, libXxf86vm
|
||||
, unfree ? false
|
||||
, cmark
|
||||
@ -11,7 +11,7 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "aseprite-${version}";
|
||||
version = if unfree then "1.2.4" else "1.1.7";
|
||||
version = if unfree then "1.2.9" else "1.1.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aseprite";
|
||||
@ -19,16 +19,27 @@ stdenv.mkDerivation rec {
|
||||
rev = "v${version}";
|
||||
fetchSubmodules = true;
|
||||
sha256 = if unfree
|
||||
then "1rnf4a8vgddz8x55rpqaihlxmqip1kgpdhqb4d3l71h1zmidg5k3"
|
||||
then "0a9xk163j0984n8nn6pqf27n83gr6w7g25wkiv591zx88pa6cpbd"
|
||||
else "0gd49lns2bpzbkwax5jf9x1xmg1j8ij997kcxr2596cwiswnw4di";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
|
||||
buildInputs = [
|
||||
curl freetype giflib libjpeg libpng libwebp pixman tinyxml zlib
|
||||
curl freetype giflib harfbuzz libjpeg libpng libwebp pixman tinyxml zlib
|
||||
libX11 libXext libXcursor libXxf86vm
|
||||
] ++ lib.optionals unfree [ cmark ];
|
||||
] ++ lib.optionals unfree [ cmark harfbuzz ];
|
||||
|
||||
patches = lib.optionals unfree [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/aseprite/aseprite/commit/cfb4dac6feef1f39e161c23c886055a8f9acfd0d.patch";
|
||||
sha256 = "1qhjfpngg8b1vvb9w26lhjjfamfx57ih0p31km3r5l96nm85l7f9";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/orivej/aseprite/commit/ea87e65b357ad0bd65467af5529183b5a48a8c17.patch";
|
||||
sha256 = "1vwn8ivap1pzdh444sdvvkndp55iz146nhmd80xbm8cyzn3qmg91";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
sed -i src/config.h -e "s-\\(#define VERSION\\) .*-\\1 \"$version\"-"
|
||||
@ -49,6 +60,7 @@ stdenv.mkDerivation rec {
|
||||
"-DWITH_WEBP_SUPPORT=ON"
|
||||
] ++ lib.optionals unfree [
|
||||
"-DUSE_SHARED_CMARK=ON"
|
||||
"-DUSE_SHARED_HARFBUZZ=ON"
|
||||
# Aseprite needs internal freetype headers.
|
||||
"-DUSE_SHARED_FREETYPE=OFF"
|
||||
# Disable libarchive programs.
|
||||
|
@ -4,8 +4,9 @@
|
||||
, alsaLib, cairo, acl, gpm, AppKit, GSS, ImageIO, m17n_lib, libotf
|
||||
, systemd ? null
|
||||
, withX ? !stdenv.isDarwin
|
||||
, withGTK2 ? false, gtk2 ? null
|
||||
, withGTK3 ? true, gtk3 ? null, gsettings-desktop-schemas ? null
|
||||
, withNS ? stdenv.isDarwin
|
||||
, withGTK2 ? false, gtk2-x11 ? null
|
||||
, withGTK3 ? true, gtk3-x11 ? null, gsettings-desktop-schemas ? null
|
||||
, withXwidgets ? false, webkitgtk ? null, wrapGAppsHook ? null, glib-networking ? null
|
||||
, withCsrc ? true
|
||||
, srcRepo ? false, autoconf ? null, automake ? null, texinfo ? null
|
||||
@ -13,10 +14,12 @@
|
||||
|
||||
assert (libXft != null) -> libpng != null; # probably a bug
|
||||
assert stdenv.isDarwin -> libXaw != null; # fails to link otherwise
|
||||
assert withGTK2 -> withX || stdenv.isDarwin;
|
||||
assert withGTK3 -> withX || stdenv.isDarwin;
|
||||
assert withGTK2 -> !withGTK3 && gtk2 != null;
|
||||
assert withGTK3 -> !withGTK2 && gtk3 != null;
|
||||
assert withNS -> !withX;
|
||||
assert withNS -> stdenv.isDarwin;
|
||||
assert (withGTK2 && !withNS) -> withX;
|
||||
assert (withGTK3 && !withNS) -> withX;
|
||||
assert withGTK2 -> !withGTK3 && gtk2-x11 != null;
|
||||
assert withGTK3 -> !withGTK2 && gtk3-x11 != null;
|
||||
assert withXwidgets -> withGTK3 && webkitgtk != null;
|
||||
|
||||
let
|
||||
@ -56,19 +59,22 @@ stdenv.mkDerivation rec {
|
||||
++ lib.optionals stdenv.isLinux [ dbus libselinux systemd ]
|
||||
++ lib.optionals withX
|
||||
[ xlibsWrapper libXaw Xaw3d libXpm libpng libjpeg libungif libtiff librsvg libXft
|
||||
imagemagick gconf m17n_lib libotf ]
|
||||
++ lib.optional (withX && withGTK2) gtk2
|
||||
++ lib.optionals (withX && withGTK3) [ gtk3 gsettings-desktop-schemas ]
|
||||
imagemagick gconf ]
|
||||
++ lib.optionals (stdenv.isLinux && withX) [ m17n_lib libotf ]
|
||||
++ lib.optional (withX && withGTK2) gtk2-x11
|
||||
++ lib.optionals (withX && withGTK3) [ gtk3-x11 gsettings-desktop-schemas ]
|
||||
++ lib.optional (stdenv.isDarwin && withX) cairo
|
||||
++ lib.optionals (withX && withXwidgets) [ webkitgtk ];
|
||||
|
||||
propagatedBuildInputs = lib.optionals stdenv.isDarwin [ AppKit GSS ImageIO ];
|
||||
propagatedBuildInputs = lib.optionals withNS [ AppKit GSS ImageIO ];
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
configureFlags = [ "--with-modules" ] ++
|
||||
(if stdenv.isDarwin
|
||||
then [ "--with-ns" "--disable-ns-self-contained" ]
|
||||
(lib.optional stdenv.isDarwin
|
||||
(lib.withFeature withNS "ns")) ++
|
||||
(if withNS
|
||||
then [ "--disable-ns-self-contained" ]
|
||||
else if withX
|
||||
then [ "--with-x-toolkit=${toolkit}" "--with-xft" ]
|
||||
else [ "--with-x=no" "--with-xpm=no" "--with-jpeg=no" "--with-png=no"
|
||||
@ -103,7 +109,7 @@ stdenv.mkDerivation rec {
|
||||
cp $srcdir/TAGS $dstdir
|
||||
echo '((nil . ((tags-file-name . "TAGS"))))' > $dstdir/.dir-locals.el
|
||||
done
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
'' + lib.optionalString withNS ''
|
||||
mkdir -p $out/Applications
|
||||
mv nextstep/Emacs.app $out/Applications
|
||||
'';
|
||||
|
@ -14,17 +14,17 @@ let
|
||||
nixSyntaxHighlight = fetchFromGitHub {
|
||||
owner = "seitz";
|
||||
repo = "nanonix";
|
||||
rev = "7483fd8b79f1f3f2179dbbd46aa400df4320ba10";
|
||||
sha256 = "10pv75kfrgnziz8sr83hdbb0c3klm2fmsdw3i5cpqqf5va1fzb8h";
|
||||
rev = "bf8d898efaa10dce3f7972ff765b58c353b4b4ab";
|
||||
sha256 = "0773s5iz8aw9npgyasb0r2ybp6gvy2s9sq51az8w7h52bzn5blnn";
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "nano-${version}";
|
||||
version = "2.9.8";
|
||||
version = "3.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/nano/${name}.tar.xz";
|
||||
sha256 = "122lm0z97wk3mgnbn8m4d769d4j9rxyc9z7s89xd4gsdp8qsrpn2";
|
||||
sha256 = "1868hg9s584fwjrh0fzdrixmxc2qhw520z4q5iv68kjiajivr9g0";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ texinfo ] ++ optional enableNls gettext;
|
||||
|
29
pkgs/applications/editors/nano/nanorc/default.nix
Normal file
29
pkgs/applications/editors/nano/nanorc/default.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{ stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "nanorc-${version}";
|
||||
version = "2018-09-05";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "scopatz";
|
||||
repo = "nanorc";
|
||||
rev = "1e589cb729d24fba470228d429e6dde07973d597";
|
||||
sha256 = "136yxr38lzrfv8bar0c6c56rh54q9s94zpwa19f425crh44drppl";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share
|
||||
|
||||
install *.nanorc $out/share/
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Improved Nano Syntax Highlighting Files";
|
||||
homepage = https://github.com/scopatz/nanorc;
|
||||
license = stdenv.lib.licenses.gpl3;
|
||||
maintainers = with stdenv.lib.maintainers; [ nequissimus ];
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
};
|
||||
}
|
@ -4,11 +4,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "okteta-${version}";
|
||||
version = "0.25.2";
|
||||
version = "0.25.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kde/stable/okteta/${version}/src/${name}.tar.xz";
|
||||
sha256 = "00mw8gdqvn6vn6ir6kqnp7xi3lpn6iyp4f5aknxwq6mdcxgjmh1p";
|
||||
sha256 = "0mm6pmk7k9c581b12a3wl0ayhadvyymfzmscy9x32b391qy9inai";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ qtscript extra-cmake-modules kdoctools ];
|
||||
|
@ -5,13 +5,13 @@
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "rednotebook";
|
||||
version = "2.3";
|
||||
version = "2.6.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jendrikseipp";
|
||||
repo = "rednotebook";
|
||||
rev = "v${version}";
|
||||
sha256 = "0zkfid104hcsf20r6829v11wxdghqkd3j1zbgyvd1s7q4nxjn5lj";
|
||||
sha256 = "1x6acx0hagsawx84cv55qz17p8qjpq1v1zaf8rmm6ifsslsxw91h";
|
||||
};
|
||||
|
||||
# We have not packaged tests.
|
||||
|
43
pkgs/applications/editors/thonny/default.nix
Normal file
43
pkgs/applications/editors/thonny/default.nix
Normal file
@ -0,0 +1,43 @@
|
||||
{ stdenv, fetchFromBitbucket, python3 }:
|
||||
|
||||
with python3.pkgs;
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "thonny";
|
||||
version = "3.0.0b3";
|
||||
|
||||
src = fetchFromBitbucket {
|
||||
owner = "plas";
|
||||
repo = pname;
|
||||
rev = "a511d4539c532b6dddf6d7f1586d30e1ac35bd86";
|
||||
sha256 = "1s3pp97r6p3j81idglnml4faxryk7saszxmv3gys1agdfj75qczr";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [ jedi pyserial tkinter docutils pylint ];
|
||||
|
||||
preInstall = ''
|
||||
export HOME=$(mktemp -d)
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
wrapProgram "$out/bin/thonny" \
|
||||
--prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath ${python3.pkgs.jedi})
|
||||
'';
|
||||
|
||||
# Tests need a DISPLAY
|
||||
doCheck = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Python IDE for beginners";
|
||||
longDescription = ''
|
||||
Thonny is a Python IDE for beginners. It supports different ways
|
||||
of stepping through the code, step-by-step expression
|
||||
evaluation, detailed visualization of the call stack and a mode
|
||||
for explaining the concepts of references and heap.
|
||||
'';
|
||||
homepage = https://www.thonny.org/;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ leenaars ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
# This expression provides Python bindings to ImageMagick. Python libraries are supposed to be called via `python-packages.nix`.
|
||||
|
||||
{stdenv, fetchurl, python, boost, pkgconfig, imagemagick}:
|
||||
{ stdenv, fetchurl, python, pkgconfig, imagemagick, autoreconfHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "pythonmagick-${version}";
|
||||
@ -11,10 +11,18 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "137278mfb5079lns2mmw73x8dhpzgwha53dyl00mmhj2z25varpn";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [python boost imagemagick];
|
||||
postPatch = ''
|
||||
rm configure
|
||||
'';
|
||||
|
||||
meta = {
|
||||
configureFlags = [ "--with-boost=${python.pkgs.boost}" ];
|
||||
|
||||
nativeBuildInputs = [ pkgconfig autoreconfHook ];
|
||||
buildInputs = [ python python.pkgs.boost imagemagick ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://www.imagemagick.org/script/api.php;
|
||||
license = licenses.imagemagick;
|
||||
description = "PythonMagick provides object oriented bindings for the ImageMagick Library.";
|
||||
};
|
||||
}
|
||||
|
@ -1,29 +1,34 @@
|
||||
{ stdenv, fetchFromGitHub, libpng, python3, boost, libGLU_combined, qtbase, ncurses, cmake, flex, lemon }:
|
||||
{ stdenv, fetchFromGitHub, libpng, python3
|
||||
, libGLU_combined, qtbase, ncurses
|
||||
, cmake, flex, lemon
|
||||
}:
|
||||
|
||||
let
|
||||
gitRev = "020910c25614a3752383511ede5a1f5551a8bd39";
|
||||
gitBranch = "master";
|
||||
gitRev = "60a58688e552f12501980c4bdab034ab0f2ba059";
|
||||
gitBranch = "develop";
|
||||
gitTag = "0.9.3";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "antimony-${version}";
|
||||
version = gitTag;
|
||||
version = "2018-07-17";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mkeeter";
|
||||
repo = "antimony";
|
||||
rev = gitTag;
|
||||
sha256 = "1vm5h5py8l3b8h4pbmm8s3wlxvlw492xfwnlwx0nvl0cjs8ba6r4";
|
||||
owner = "mkeeter";
|
||||
repo = "antimony";
|
||||
rev = gitRev;
|
||||
sha256 = "0pgf6kr23xw012xsil56j5gq78mlirmrlqdm09m5wlgcf4vr6xnl";
|
||||
};
|
||||
|
||||
patches = [ ./paths-fix.patch ];
|
||||
|
||||
postPatch = ''
|
||||
sed -i "s,/usr/local,$out,g" app/CMakeLists.txt app/app/app.cpp app/app/main.cpp
|
||||
sed -i "s,/usr/local,$out,g" \
|
||||
app/CMakeLists.txt app/app/app.cpp app/app/main.cpp
|
||||
sed -i "s,python-py35,python36," CMakeLists.txt
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
libpng python3 (boost.override { python = python3; })
|
||||
libpng python3 python3.pkgs.boost
|
||||
libGLU_combined qtbase ncurses
|
||||
];
|
||||
|
||||
@ -41,6 +46,7 @@ in
|
||||
description = "A computer-aided design (CAD) tool from a parallel universe";
|
||||
homepage = "https://github.com/mkeeter/antimony";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ rnhmjoj ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
||||
homepage = https://github.com/eXeC64/imv;
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ rnhmjoj ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
platforms = [ "i686-linux" "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -7,11 +7,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "kipi-plugins-${version}";
|
||||
version = "5.2.0";
|
||||
version = "5.9.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://download.kde.org/stable/digikam/digikam-${version}.tar.xz";
|
||||
sha256 = "0q4j7iv20cxgfsr14qwzx05wbp2zkgc7cg2pi7ibcnwba70ky96g";
|
||||
sha256 = "06qdalf2mwx2f43p3bljy3vn5bk8n3x539kha6ky2vzxvkp343b6";
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
|
@ -1 +1 @@
|
||||
WGET_ARGS=( https://download.kde.org/stable/applications/18.08.0/ -A '*.tar.xz' )
|
||||
WGET_ARGS=( https://download.kde.org/stable/applications/18.08.1/ -A '*.tar.xz' )
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -7,7 +7,7 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "dbeaver-ce-${version}";
|
||||
version = "5.1.6";
|
||||
version = "5.2.0";
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "dbeaver";
|
||||
@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dbeaver.io/files/${version}/dbeaver-ce-${version}-linux.gtk.x86_64.tar.gz";
|
||||
sha256 = "1zypadnyhinm6mfv91s7zs2s55bhzgkqhl6ai6x3yqwhvayc02nn";
|
||||
sha256 = "13j2qc4g24d2gmkxj9zpqrcbai9aq8rassrq3c9mp9ir6sf4q0jf";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "josm-${version}";
|
||||
version = "14066";
|
||||
version = "14178";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://josm.openstreetmap.de/download/josm-snapshot-${version}.jar";
|
||||
sha256 = "06mhaz5vr19ydqc5irhgcbl0s8fifwvaq60iz2nsnlxb1pw89xia";
|
||||
sha256 = "08an4s8vbcd8vyinnvd7cxmgnrsy47j78a94nk6vq244gp7v5n0r";
|
||||
};
|
||||
|
||||
buildInputs = [ jre10 makeWrapper ];
|
||||
|
@ -46,6 +46,10 @@ in with python.pkgs; buildPythonApplication rec {
|
||||
nativeBuildInputs = [ setuptools_scm pkgs.glibcLocales ];
|
||||
checkInputs = [ pytest ];
|
||||
|
||||
postInstall = ''
|
||||
install -D misc/__khal $out/share/zsh/site-functions/__khal
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
py.test
|
||||
'';
|
||||
|
@ -1,13 +1,12 @@
|
||||
{ stdenv, fetchurl, fetchFromGitHub
|
||||
{ stdenv, lib, fetchurl, fetchFromGitHub
|
||||
, pkgconfig
|
||||
, autoconf, automake, intltool, gettext
|
||||
, gtk, vte
|
||||
|
||||
# "stable" or "git"
|
||||
, flavour ? "stable"
|
||||
}:
|
||||
|
||||
assert flavour == "stable" || flavour == "git";
|
||||
assert lib.assertOneOf "flavour" flavour [ "stable" "git" ];
|
||||
|
||||
let
|
||||
stuff =
|
||||
|
@ -2,11 +2,11 @@
|
||||
, desktop-file-utils, libSM, imagemagick }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "18.05";
|
||||
version = "18.08";
|
||||
name = "mediainfo-gui-${version}";
|
||||
src = fetchurl {
|
||||
url = "https://mediaarea.net/download/source/mediainfo/${version}/mediainfo_${version}.tar.xz";
|
||||
sha256 = "0rgsfplisf729n1j3fyg82wpw88aahisrddn5wq9yx8hz6m96h6r";
|
||||
sha256 = "0l4bhrgwfn3da6cr0jz5vs17sk7k0bc26nk7hymv04xifns5999n";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
||||
|
@ -1,11 +1,11 @@
|
||||
{ stdenv, fetchurl, autoreconfHook, pkgconfig, libzen, libmediainfo, zlib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "18.05";
|
||||
version = "18.08";
|
||||
name = "mediainfo-${version}";
|
||||
src = fetchurl {
|
||||
url = "https://mediaarea.net/download/source/mediainfo/${version}/mediainfo_${version}.tar.xz";
|
||||
sha256 = "0rgsfplisf729n1j3fyg82wpw88aahisrddn5wq9yx8hz6m96h6r";
|
||||
sha256 = "0l4bhrgwfn3da6cr0jz5vs17sk7k0bc26nk7hymv04xifns5999n";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
||||
|
@ -7,13 +7,13 @@ assert imagePreviewSupport -> w3m != null;
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
name = "ranger-${version}";
|
||||
version = "1.9.1";
|
||||
version = "1.9.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ranger";
|
||||
repo = "ranger";
|
||||
rev = "v${version}";
|
||||
sha256= "1zhds37j1scxa9b183qbrjwxqldrdk581c5xiy81vg17sndb1kqj";
|
||||
sha256= "1ws6g8z1m1hfp8bv4msvbaa9f7948p687jmc8h69yib4jkv3qyax";
|
||||
};
|
||||
|
||||
checkInputs = with python3Packages; [ pytest ];
|
||||
@ -51,6 +51,6 @@ python3Packages.buildPythonApplication rec {
|
||||
homepage = http://ranger.github.io/;
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.magnetophon ];
|
||||
maintainers = [ maintainers.toonn maintainers.magnetophon ];
|
||||
};
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
|
||||
let
|
||||
version = "0.6.0";
|
||||
version = "0.6.1";
|
||||
sqlGda = libgda.override {
|
||||
mysqlSupport = true;
|
||||
postgresSupport = true;
|
||||
@ -17,7 +17,7 @@ in stdenv.mkDerivation rec {
|
||||
owner = "Alecaddd";
|
||||
repo = "sequeler";
|
||||
rev = "v${version}";
|
||||
sha256 = "04x3fg665201g3zy66sicfna4vac4n1pmrahbra90gvfzaia1cai";
|
||||
sha256 = "1gafd8bmwpby7gjzfr7q25rrdmyh1f175fxc1yrcr5nplfyzwfnb";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ meson ninja pkgconfig vala gobjectIntrospection gettext wrapGAppsHook python3 desktop-file-utils ];
|
||||
|
@ -1,5 +1,5 @@
|
||||
{fetchFromGitHub, stdenv, gtk3, python34Packages, gobjectIntrospection}:
|
||||
python34Packages.buildPythonApplication rec {
|
||||
{fetchFromGitHub, stdenv, gtk3, pythonPackages, gobjectIntrospection}:
|
||||
pythonPackages.buildPythonApplication rec {
|
||||
name = "solaar-unstable-${version}";
|
||||
version = "2018-02-02";
|
||||
namePrefix = "";
|
||||
@ -10,7 +10,7 @@ python34Packages.buildPythonApplication rec {
|
||||
sha256 = "0zy5vmjzdybnjf0mpp8rny11sc43gmm8172svsm9s51h7x0v83y3";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [python34Packages.pygobject3 python34Packages.pyudev gobjectIntrospection gtk3];
|
||||
propagatedBuildInputs = [pythonPackages.pygobject3 pythonPackages.pyudev gobjectIntrospection gtk3];
|
||||
postInstall = ''
|
||||
wrapProgram "$out/bin/solaar" \
|
||||
--prefix PYTHONPATH : "$PYTHONPATH" \
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, ninja, which, nodejs, fetchurl, fetchpatch, gnutar
|
||||
{ stdenv, gn, ninja, which, nodejs, fetchurl, fetchpatch, gnutar
|
||||
|
||||
# default dependencies
|
||||
, bzip2, flac, speex, libopus
|
||||
@ -139,11 +139,6 @@ let
|
||||
# (gentooPatch "<patch>" "0000000000000000000000000000000000000000000000000000000000000000")
|
||||
./patches/fix-freetype.patch
|
||||
./patches/nix_plugin_paths_68.patch
|
||||
] ++ optionals (versionRange "68" "69") [
|
||||
./patches/remove-webp-include-68.patch
|
||||
(githubPatch "4d10424f9e2a06978cdd6cdf5403fcaef18e49fc" "11la1jycmr5b5rw89mzcdwznmd2qh28sghvz9klr1qhmsmw1vzjc")
|
||||
(githubPatch "56cb5f7da1025f6db869e840ed34d3b98b9ab899" "04mp5r1yvdvdx6m12g3lw3z51bzh7m3gr73mhblkn4wxdbvi3dcs")
|
||||
] ++ optionals (versionAtLeast version "69") [
|
||||
./patches/remove-webp-include-69.patch
|
||||
] ++ optional enableWideVine ./patches/widevine.patch;
|
||||
|
||||
@ -243,15 +238,11 @@ let
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
||||
# Build gn
|
||||
python tools/gn/bootstrap/bootstrap.py -v -s --no-clean
|
||||
PATH="$PWD/out/Release:$PATH"
|
||||
|
||||
# This is to ensure expansion of $out.
|
||||
libExecPath="${libExecPath}"
|
||||
python build/linux/unbundle/replace_gn_files.py \
|
||||
--system-libraries ${toString gnSystemLibraries}
|
||||
gn gen --args=${escapeShellArg gnFlags} out/Release | tee gn-gen-outputs.txt
|
||||
${gn}/bin/gn gen --args=${escapeShellArg gnFlags} out/Release | tee gn-gen-outputs.txt
|
||||
|
||||
# Fail if `gn gen` contains a WARNING.
|
||||
grep -o WARNING gn-gen-outputs.txt && echo "Found gn WARNING, exiting nix build" && exit 1
|
||||
|
@ -1,12 +0,0 @@
|
||||
--- a/third_party/blink/renderer/platform/image-encoders/image_encoder.h
|
||||
+++ b/third_party/blink/renderer/platform/image-encoders/image_encoder.h
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "third_party/blink/renderer/platform/platform_export.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/vector.h"
|
||||
#include "third_party/libjpeg/jpeglib.h" // for JPEG_MAX_DIMENSION
|
||||
-#include "third_party/libwebp/src/webp/encode.h" // for WEBP_MAX_DIMENSION
|
||||
+#define WEBP_MAX_DIMENSION 16383
|
||||
#include "third_party/skia/include/core/SkStream.h"
|
||||
#include "third_party/skia/include/encode/SkJpegEncoder.h"
|
||||
#include "third_party/skia/include/encode/SkPngEncoder.h"
|
||||
|
@ -1,18 +1,18 @@
|
||||
# This file is autogenerated from update.sh in the same directory.
|
||||
{
|
||||
beta = {
|
||||
sha256 = "0w5k1446j45796vj8p6kv5cdrkrxyr7rh8d8vavplfldbvg36bdw";
|
||||
sha256bin64 = "0a7gmbcps3b85rhwgrvg41m9db2n3igwr4hncm7kcqnq5hr60v8s";
|
||||
version = "69.0.3497.32";
|
||||
sha256 = "0i3iz6c05ykqxbq58sx954nky0gd0schl7ik2r56p3jqsk8cfnhn";
|
||||
sha256bin64 = "03k5y1nyzx26mxwxmdijkl2kj49vm5vhbxhakfxxjg3r1v0rsqrs";
|
||||
version = "69.0.3497.81";
|
||||
};
|
||||
dev = {
|
||||
sha256 = "15gk2jbjv3iy4hg4xm1f66x5jqfqh9f98wfzrcsd5ix3ki3f9g3c";
|
||||
sha256bin64 = "1lir6q31dnjsbrz99bfx74r5j6f0c1a443ky1k0idbx6ysvr8nnm";
|
||||
version = "70.0.3521.2";
|
||||
sha256 = "1lx6dfd6w675b4kyrci8ikc8rfmjc1aqmm7bimxp3h4p97j5wml1";
|
||||
sha256bin64 = "0fsxj9h25glp3akw0x2rc488w5zr5v5yvl6ry7fy8w70fqgynffj";
|
||||
version = "70.0.3538.9";
|
||||
};
|
||||
stable = {
|
||||
sha256 = "1676y2axl5ihvv8jid2i9wp4i4awxzij5nwvd5zx98506l3088bh";
|
||||
sha256bin64 = "0d352maw1630g0hns3c0g0n95bp5iqh7nzs8bnv48kxz87snmpdj";
|
||||
version = "68.0.3440.106";
|
||||
sha256 = "0i3iz6c05ykqxbq58sx954nky0gd0schl7ik2r56p3jqsk8cfnhn";
|
||||
sha256bin64 = "1f3shb85jynxq37vjxxkkxrjayqgvpss1zws5i28x6i9nygfzay7";
|
||||
version = "69.0.3497.81";
|
||||
};
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -20,10 +20,10 @@ rec {
|
||||
|
||||
firefox = common rec {
|
||||
pname = "firefox";
|
||||
version = "61.0.2";
|
||||
version = "62.0";
|
||||
src = fetchurl {
|
||||
url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz";
|
||||
sha512 = "3zzcxqjpsn2m5z4l66rxrq7yf58aii370jj8pcl50smcd55sfsyknnc20agbppsw4k4pnwycfn57im33swwkjzg0hk0h2ng4rvi42x2";
|
||||
sha512 = "0byxslbgr37sm1ra3wywl5c2a39qbkjwc227yp4j2l930m5j86m5g7rmv8zm944vv5vnyzmwhym972si229fm2lwq74p4xam5rfv948";
|
||||
};
|
||||
|
||||
patches = nixpkgsPatches ++ [
|
||||
@ -60,6 +60,7 @@ rec {
|
||||
|
||||
meta = firefox.meta // {
|
||||
description = "A web browser built from Firefox Extended Support Release source tree";
|
||||
knownVulnerabilities = [ "Support ended in August 2018." ];
|
||||
};
|
||||
updateScript = callPackage ./update.nix {
|
||||
attrPath = "firefox-esr-52-unwrapped";
|
||||
@ -69,10 +70,10 @@ rec {
|
||||
|
||||
firefox-esr-60 = common rec {
|
||||
pname = "firefox-esr";
|
||||
version = "60.1.0esr";
|
||||
version = "60.2.0esr";
|
||||
src = fetchurl {
|
||||
url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz";
|
||||
sha512 = "2bg7zvkpy1x2ryiazvk4nn5m94v0addbhrcrlcf9djnqjf14rp5q50lbiymhxxz0988vgpicsvizifb8gb3hi7b8g17rdw6438ddhh6";
|
||||
sha512 = "1nf7nsycvzafvy4jjli5xh59d2mac17gfx91a1jh86f41w6qcsi3lvkfa8xhxsq8wfdsmqk1f4hmqzyx63h4m691qji7838g2nk49k7";
|
||||
};
|
||||
|
||||
patches = nixpkgsPatches ++ [
|
||||
|
@ -5,10 +5,10 @@ let
|
||||
then "linux-amd64"
|
||||
else "darwin-amd64";
|
||||
checksum = if isLinux
|
||||
then "1fk6w6sajdi6iphxrzi9r7xfyaf923nxcqnl01s6x3f611fjvbjn"
|
||||
else "1jzgy641hm3khj0bakfbr5wd5zl3s7w5jb622fjv2jxwmnv7dxiv";
|
||||
then "1zig6ihmxcaw2wsbdd85yf1zswqcifw0hvbp1zws7r5ihd4yv8hg"
|
||||
else "1l8y9i8vhibhwbn5kn5qp722q4dcx464kymlzy2bkmhiqbxnnkkw";
|
||||
pname = "helm";
|
||||
version = "2.9.1";
|
||||
version = "2.10.0";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "${pname}-${version}";
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
buildGoPackage rec {
|
||||
name = "kops-${version}";
|
||||
version = "1.9.0";
|
||||
version = "1.10.0";
|
||||
|
||||
goPackagePath = "k8s.io/kops";
|
||||
|
||||
@ -11,7 +11,7 @@ buildGoPackage rec {
|
||||
rev = version;
|
||||
owner = "kubernetes";
|
||||
repo = "kops";
|
||||
sha256 = "03avkm7gk2dqyvd7245qsca1sbhwk41j9yhc208gcmjgjhkx2vn7";
|
||||
sha256 = "1ga83sbhvhcazran6xfwgv95sg8ygg2w59vql0yjicj8r2q01vqp";
|
||||
};
|
||||
|
||||
buildInputs = [go-bindata];
|
||||
|
@ -1,39 +1,9 @@
|
||||
{
|
||||
lib, stdenv, fetchFromGitHub, fetchurl,
|
||||
cmake, doxygen, lmdb, qt5, qtmacextras
|
||||
{ lib, stdenv, fetchFromGitHub, fetchurl
|
||||
, cmake, lmdb, qt5, qtmacextras, mtxclient
|
||||
, boost, spdlog, olm, pkgconfig
|
||||
}:
|
||||
|
||||
let
|
||||
json_hpp = fetchurl {
|
||||
url = https://github.com/nlohmann/json/releases/download/v3.1.2/json.hpp;
|
||||
sha256 = "fbdfec4b4cf63b3b565d09f87e6c3c183bdd45c5be1864d3fcb338f6f02c1733";
|
||||
};
|
||||
|
||||
variant_hpp = fetchurl {
|
||||
url = https://github.com/mpark/variant/releases/download/v1.3.0/variant.hpp;
|
||||
sha256 = "1vjiz1x5l8ynqqyb5l9mlrzgps526v45hbmwjilv4brgyi5445fq";
|
||||
};
|
||||
|
||||
matrix-structs = stdenv.mkDerivation rec {
|
||||
name = "matrix-structs-git";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mujx";
|
||||
repo = "matrix-structs";
|
||||
rev = "5e57c2385a79b6629d1998fec4a7c0baee23555e";
|
||||
sha256 = "112b7gnvr04g1ak7fnc7ch7w2n825j4qkw0jb49xx06ag93nb6m6";
|
||||
};
|
||||
|
||||
postUnpack = ''
|
||||
cp ${json_hpp} "$sourceRoot/include/json.hpp"
|
||||
cp ${variant_hpp} "$sourceRoot/include/variant.hpp"
|
||||
'';
|
||||
|
||||
patches = [ ./fetchurls.patch ];
|
||||
|
||||
nativeBuildInputs = [ cmake doxygen ];
|
||||
};
|
||||
|
||||
tweeny = fetchFromGitHub {
|
||||
owner = "mobius3";
|
||||
repo = "tweeny";
|
||||
@ -50,19 +20,15 @@ let
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "nheko-${version}";
|
||||
version = "0.4.3";
|
||||
version = "0.5.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mujx";
|
||||
repo = "nheko";
|
||||
rev = "v${version}";
|
||||
sha256 = "0qjia42nam3hj835k2jb5b6j6n56rdkb8rn67yqf45xdz8ypmbmv";
|
||||
sha256 = "0k5gmfwmisfavliyz0nfsmwy317ps8a4r3l1d831giqp9pvqvi0i";
|
||||
};
|
||||
|
||||
# This patch is likely not strictly speaking needed, but will help detect when
|
||||
# a dependency is updated, so that the fetches up there can be updated too
|
||||
patches = [ ./external-deps.patch ];
|
||||
|
||||
# If, on Darwin, you encounter the error
|
||||
# error: must specify at least one argument for '...' parameter of variadic
|
||||
# macro [-Werror,-Wgnu-zero-variadic-macro-arguments]
|
||||
@ -79,25 +45,30 @@ stdenv.mkDerivation rec {
|
||||
# export CFLAGS=-Wno-error=gnu-zero-variadic-macro-arguments
|
||||
#'';
|
||||
|
||||
postPatch = ''
|
||||
mkdir -p .deps/include/
|
||||
ln -s ${tweeny}/include .deps/include/tweeny
|
||||
ln -s ${spdlog} .deps/spdlog
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DMATRIX_STRUCTS_LIBRARY=${matrix-structs}/lib/static/libmatrix_structs.a"
|
||||
"-DMATRIX_STRUCTS_INCLUDE_DIR=${matrix-structs}/include/matrix_structs"
|
||||
"-DTWEENY_INCLUDE_DIR=${tweeny}/include"
|
||||
"-DTWEENY_INCLUDE_DIR=.deps/include"
|
||||
"-DLMDBXX_INCLUDE_DIR=${lmdbxx}"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
|
||||
buildInputs = [
|
||||
lmdb lmdbxx matrix-structs qt5.qtbase qt5.qtmultimedia qt5.qttools tweeny
|
||||
mtxclient olm boost lmdb spdlog
|
||||
qt5.qtbase qt5.qtmultimedia qt5.qttools
|
||||
] ++ lib.optional stdenv.isDarwin qtmacextras;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Desktop client for the Matrix protocol";
|
||||
maintainers = with maintainers; [ ekleog ];
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ ekleog fpletz ];
|
||||
platforms = platforms.unix;
|
||||
license = licenses.gpl3Plus;
|
||||
};
|
||||
}
|
||||
|
@ -1,94 +0,0 @@
|
||||
diff --git a/cmake/LMDBXX.cmake b/cmake/LMDBXX.cmake
|
||||
index 3b9817d..e69de29 100644
|
||||
--- a/cmake/LMDBXX.cmake
|
||||
+++ b/cmake/LMDBXX.cmake
|
||||
@@ -1,23 +0,0 @@
|
||||
-include(ExternalProject)
|
||||
-
|
||||
-#
|
||||
-# Build lmdbxx.
|
||||
-#
|
||||
-
|
||||
-set(THIRD_PARTY_ROOT ${CMAKE_SOURCE_DIR}/.third-party)
|
||||
-set(LMDBXX_ROOT ${THIRD_PARTY_ROOT}/lmdbxx)
|
||||
-
|
||||
-set(LMDBXX_INCLUDE_DIR ${LMDBXX_ROOT})
|
||||
-
|
||||
-ExternalProject_Add(
|
||||
- lmdbxx
|
||||
-
|
||||
- GIT_REPOSITORY https://github.com/bendiken/lmdbxx
|
||||
- GIT_TAG 0b43ca87d8cfabba392dfe884eb1edb83874de02
|
||||
-
|
||||
- BUILD_IN_SOURCE 1
|
||||
- SOURCE_DIR ${LMDBXX_ROOT}
|
||||
- CONFIGURE_COMMAND ""
|
||||
- BUILD_COMMAND ""
|
||||
- INSTALL_COMMAND ""
|
||||
-)
|
||||
diff --git a/cmake/MatrixStructs.cmake b/cmake/MatrixStructs.cmake
|
||||
index cef00f6..e69de29 100644
|
||||
--- a/cmake/MatrixStructs.cmake
|
||||
+++ b/cmake/MatrixStructs.cmake
|
||||
@@ -1,33 +0,0 @@
|
||||
-include(ExternalProject)
|
||||
-
|
||||
-#
|
||||
-# Build matrix-structs.
|
||||
-#
|
||||
-
|
||||
-set(THIRD_PARTY_ROOT ${CMAKE_SOURCE_DIR}/.third-party)
|
||||
-set(MATRIX_STRUCTS_ROOT ${THIRD_PARTY_ROOT}/matrix_structs)
|
||||
-set(MATRIX_STRUCTS_INCLUDE_DIR ${MATRIX_STRUCTS_ROOT}/include)
|
||||
-set(MATRIX_STRUCTS_LIBRARY matrix_structs)
|
||||
-
|
||||
-link_directories(${MATRIX_STRUCTS_ROOT})
|
||||
-
|
||||
-set(WINDOWS_FLAGS "")
|
||||
-
|
||||
-if(MSVC)
|
||||
- set(WINDOWS_FLAGS "-DCMAKE_GENERATOR_PLATFORM=x64")
|
||||
-endif()
|
||||
-
|
||||
-ExternalProject_Add(
|
||||
- MatrixStructs
|
||||
-
|
||||
- GIT_REPOSITORY https://github.com/mujx/matrix-structs
|
||||
- GIT_TAG 5e57c2385a79b6629d1998fec4a7c0baee23555e
|
||||
-
|
||||
- BUILD_IN_SOURCE 1
|
||||
- SOURCE_DIR ${MATRIX_STRUCTS_ROOT}
|
||||
- CONFIGURE_COMMAND ${CMAKE_COMMAND}
|
||||
- -DCMAKE_BUILD_TYPE=Release ${MATRIX_STRUCTS_ROOT}
|
||||
- ${WINDOWS_FLAGS}
|
||||
- BUILD_COMMAND ${CMAKE_COMMAND} --build ${MATRIX_STRUCTS_ROOT} --config Release
|
||||
- INSTALL_COMMAND ""
|
||||
-)
|
||||
diff --git a/cmake/Tweeny.cmake b/cmake/Tweeny.cmake
|
||||
index 537ac92..e69de29 100644
|
||||
--- a/cmake/Tweeny.cmake
|
||||
+++ b/cmake/Tweeny.cmake
|
||||
@@ -1,23 +0,0 @@
|
||||
-include(ExternalProject)
|
||||
-
|
||||
-#
|
||||
-# Build tweeny
|
||||
-#
|
||||
-
|
||||
-set(THIRD_PARTY_ROOT ${CMAKE_SOURCE_DIR}/.third-party)
|
||||
-set(TWEENY_ROOT ${THIRD_PARTY_ROOT}/tweeny)
|
||||
-
|
||||
-set(TWEENY_INCLUDE_DIR ${TWEENY_ROOT}/include)
|
||||
-
|
||||
-ExternalProject_Add(
|
||||
- Tweeny
|
||||
-
|
||||
- GIT_REPOSITORY https://github.com/mobius3/tweeny
|
||||
- GIT_TAG b94ce07cfb02a0eb8ac8aaf66137dabdaea857cf
|
||||
-
|
||||
- BUILD_IN_SOURCE 1
|
||||
- SOURCE_DIR ${TWEENY_ROOT}
|
||||
- CONFIGURE_COMMAND ""
|
||||
- BUILD_COMMAND ""
|
||||
- INSTALL_COMMAND ""
|
||||
-)
|
@ -1,21 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 077ac37..c639d71 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -18,16 +18,6 @@ include(Doxygen)
|
||||
#
|
||||
include(CompilerFlags)
|
||||
|
||||
-file(DOWNLOAD
|
||||
- "https://github.com/nlohmann/json/releases/download/v3.1.2/json.hpp"
|
||||
- ${PROJECT_SOURCE_DIR}/include/json.hpp
|
||||
- EXPECTED_HASH SHA256=fbdfec4b4cf63b3b565d09f87e6c3c183bdd45c5be1864d3fcb338f6f02c1733)
|
||||
-
|
||||
-file(DOWNLOAD
|
||||
- "https://github.com/mpark/variant/releases/download/v1.3.0/variant.hpp"
|
||||
- ${PROJECT_SOURCE_DIR}/include/variant.hpp
|
||||
- EXPECTED_MD5 "be0ce322cdd408e1b347b9f1d59ea67a")
|
||||
-
|
||||
include_directories(include)
|
||||
|
||||
set(SRC
|
@ -55,11 +55,11 @@ let
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "signal-desktop-${version}";
|
||||
version = "1.15.5";
|
||||
version = "1.16.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
|
||||
sha256 = "1a63kyxbhdaz6izprg8wryvscmvfjii50xi1v5pxlf74x2pkxs8k";
|
||||
sha256 = "0hw5h1m8fijhqybx0xijrkifn5wl50qibaxkn2mxqf4mjwlvaw9a";
|
||||
};
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
@ -0,0 +1,110 @@
|
||||
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
|
||||
index 91c3c068d..8105e4171 100644
|
||||
--- a/src/core/wee-command.c
|
||||
+++ b/src/core/wee-command.c
|
||||
@@ -8345,10 +8345,20 @@ command_exec_list (const char *command_list)
|
||||
void
|
||||
command_startup (int plugins_loaded)
|
||||
{
|
||||
+ int i;
|
||||
+
|
||||
if (plugins_loaded)
|
||||
{
|
||||
command_exec_list (CONFIG_STRING(config_startup_command_after_plugins));
|
||||
- command_exec_list (weechat_startup_commands);
|
||||
+ if (weechat_startup_commands)
|
||||
+ {
|
||||
+ for (i = 0; i < weelist_size (weechat_startup_commands); i++)
|
||||
+ {
|
||||
+ command_exec_list (
|
||||
+ weelist_string (
|
||||
+ weelist_get (weechat_startup_commands, i)));
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
else
|
||||
command_exec_list (CONFIG_STRING(config_startup_command_before_plugins));
|
||||
diff --git a/src/core/weechat.c b/src/core/weechat.c
|
||||
index f74598ad5..ff2e539d1 100644
|
||||
--- a/src/core/weechat.c
|
||||
+++ b/src/core/weechat.c
|
||||
@@ -60,6 +60,7 @@
|
||||
#include "wee-eval.h"
|
||||
#include "wee-hdata.h"
|
||||
#include "wee-hook.h"
|
||||
+#include "wee-list.h"
|
||||
#include "wee-log.h"
|
||||
#include "wee-network.h"
|
||||
#include "wee-proxy.h"
|
||||
@@ -102,7 +103,8 @@ int weechat_no_gnutls = 0; /* remove init/deinit of gnutls */
|
||||
/* (useful with valgrind/electric-f.)*/
|
||||
int weechat_no_gcrypt = 0; /* remove init/deinit of gcrypt */
|
||||
/* (useful with valgrind) */
|
||||
-char *weechat_startup_commands = NULL; /* startup commands (-r flag) */
|
||||
+struct t_weelist *weechat_startup_commands = NULL; /* startup commands */
|
||||
+ /* (option -r) */
|
||||
|
||||
|
||||
/*
|
||||
@@ -152,9 +154,13 @@ weechat_display_usage ()
|
||||
" -h, --help display this help\n"
|
||||
" -l, --license display WeeChat license\n"
|
||||
" -p, --no-plugin don't load any plugin at startup\n"
|
||||
- " -r, --run-command <cmd> run command(s) after startup\n"
|
||||
- " (many commands can be separated by "
|
||||
- "semicolons)\n"
|
||||
+ " -P, --plugins <plugins> load only these plugins at startup\n"
|
||||
+ " (see /help weechat.plugin.autoload)\n"
|
||||
+ " -r, --run-command <cmd> run command(s) after startup;\n"
|
||||
+ " many commands can be separated by "
|
||||
+ "semicolons,\n"
|
||||
+ " this option can be given multiple "
|
||||
+ "times\n"
|
||||
" -s, --no-script don't load any script at startup\n"
|
||||
" --upgrade upgrade WeeChat using session files "
|
||||
"(see /help upgrade in WeeChat)\n"
|
||||
@@ -276,9 +282,10 @@ weechat_parse_args (int argc, char *argv[])
|
||||
{
|
||||
if (i + 1 < argc)
|
||||
{
|
||||
- if (weechat_startup_commands)
|
||||
- free (weechat_startup_commands);
|
||||
- weechat_startup_commands = strdup (argv[++i]);
|
||||
+ if (!weechat_startup_commands)
|
||||
+ weechat_startup_commands = weelist_new ();
|
||||
+ weelist_add (weechat_startup_commands, argv[++i],
|
||||
+ WEECHAT_LIST_POS_END, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -616,6 +623,8 @@ weechat_shutdown (int return_code, int crash)
|
||||
free (weechat_home);
|
||||
if (weechat_local_charset)
|
||||
free (weechat_local_charset);
|
||||
+ if (weechat_startup_commands)
|
||||
+ weelist_free (weechat_startup_commands);
|
||||
|
||||
if (crash)
|
||||
abort ();
|
||||
diff --git a/src/core/weechat.h b/src/core/weechat.h
|
||||
index 9420ff415..cbb565a03 100644
|
||||
--- a/src/core/weechat.h
|
||||
+++ b/src/core/weechat.h
|
||||
@@ -96,6 +96,8 @@
|
||||
/* name of environment variable with an extra lib dir */
|
||||
#define WEECHAT_EXTRA_LIBDIR "WEECHAT_EXTRA_LIBDIR"
|
||||
|
||||
+struct t_weelist;
|
||||
+
|
||||
/* global variables and functions */
|
||||
extern int weechat_headless;
|
||||
extern int weechat_debug_core;
|
||||
@@ -112,7 +114,7 @@ extern char *weechat_local_charset;
|
||||
extern int weechat_plugin_no_dlclose;
|
||||
extern int weechat_no_gnutls;
|
||||
extern int weechat_no_gcrypt;
|
||||
-extern char *weechat_startup_commands;
|
||||
+extern struct t_weelist *weechat_startup_commands;
|
||||
|
||||
extern void weechat_term_check ();
|
||||
extern void weechat_shutdown (int return_code, int crash);
|
@ -12,7 +12,8 @@
|
||||
, tclSupport ? true, tcl
|
||||
, extraBuildInputs ? []
|
||||
, configure ? { availablePlugins, ... }: { plugins = builtins.attrValues availablePlugins; }
|
||||
, runCommand }:
|
||||
, runCommand, buildEnv
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (pythonPackages) python;
|
||||
@ -29,12 +30,12 @@ let
|
||||
weechat =
|
||||
assert lib.all (p: p.enabled -> ! (builtins.elem null p.buildInputs)) plugins;
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2.1";
|
||||
version = "2.2";
|
||||
name = "weechat-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://weechat.org/files/src/weechat-${version}.tar.bz2";
|
||||
sha256 = "0fq68wgynv2c3319gmzi0lz4ln4yrrk755y5mbrlr7fc1sx7ffd8";
|
||||
sha256 = "0p4nhh7f7w4q77g7jm9i6fynndqlgjkc9dk5g1xb4gf9imiisqlg";
|
||||
};
|
||||
|
||||
outputs = [ "out" "man" ] ++ map (p: p.name) enabledPlugins;
|
||||
@ -69,6 +70,13 @@ let
|
||||
done
|
||||
'';
|
||||
|
||||
# remove when bumping to the latest version.
|
||||
# This patch basically rebases `fcf7469d7664f37e94d5f6d0b3fe6fce6413f88c`
|
||||
# from weechat upstream to weechat-2.2.
|
||||
patches = [
|
||||
./aggregate-commands.patch
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = http://www.weechat.org/;
|
||||
description = "A fast, light and extensible chat client";
|
||||
@ -78,38 +86,38 @@ let
|
||||
on https://nixos.org/nixpkgs/manual/#sec-weechat .
|
||||
'';
|
||||
license = stdenv.lib.licenses.gpl3;
|
||||
maintainers = with stdenv.lib.maintainers; [ lovek323 garbas the-kenny lheckemann ];
|
||||
maintainers = with stdenv.lib.maintainers; [ lovek323 garbas the-kenny lheckemann ma27 ];
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
};
|
||||
};
|
||||
in if configure == null then weechat else
|
||||
let
|
||||
perlInterpreter = perl;
|
||||
config = configure {
|
||||
availablePlugins = let
|
||||
simplePlugin = name: {pluginFile = "${weechat.${name}}/lib/weechat/plugins/${name}.so";};
|
||||
in rec {
|
||||
python = {
|
||||
pluginFile = "${weechat.python}/lib/weechat/plugins/python.so";
|
||||
withPackages = pkgsFun: (python // {
|
||||
extraEnv = ''
|
||||
export PYTHONHOME="${pythonPackages.python.withPackages pkgsFun}"
|
||||
'';
|
||||
});
|
||||
};
|
||||
perl = (simplePlugin "perl") // {
|
||||
availablePlugins = let
|
||||
simplePlugin = name: {pluginFile = "${weechat.${name}}/lib/weechat/plugins/${name}.so";};
|
||||
in rec {
|
||||
python = {
|
||||
pluginFile = "${weechat.python}/lib/weechat/plugins/python.so";
|
||||
withPackages = pkgsFun: (python // {
|
||||
extraEnv = ''
|
||||
export PATH="${perlInterpreter}/bin:$PATH"
|
||||
export PYTHONHOME="${pythonPackages.python.withPackages pkgsFun}"
|
||||
'';
|
||||
};
|
||||
tcl = simplePlugin "tcl";
|
||||
ruby = simplePlugin "ruby";
|
||||
guile = simplePlugin "guile";
|
||||
lua = simplePlugin "lua";
|
||||
});
|
||||
};
|
||||
perl = (simplePlugin "perl") // {
|
||||
extraEnv = ''
|
||||
export PATH="${perlInterpreter}/bin:$PATH"
|
||||
'';
|
||||
};
|
||||
tcl = simplePlugin "tcl";
|
||||
ruby = simplePlugin "ruby";
|
||||
guile = simplePlugin "guile";
|
||||
lua = simplePlugin "lua";
|
||||
};
|
||||
|
||||
inherit (config) plugins;
|
||||
config = configure { inherit availablePlugins; };
|
||||
|
||||
plugins = config.plugins or (builtins.attrValues availablePlugins);
|
||||
|
||||
pluginsDir = runCommand "weechat-plugins" {} ''
|
||||
mkdir -p $out/plugins
|
||||
@ -117,13 +125,29 @@ in if configure == null then weechat else
|
||||
ln -s $plugin $out/plugins
|
||||
done
|
||||
'';
|
||||
in (writeScriptBin "weechat" ''
|
||||
#!${stdenv.shell}
|
||||
export WEECHAT_EXTRA_LIBDIR=${pluginsDir}
|
||||
${lib.concatMapStringsSep "\n" (p: lib.optionalString (p ? extraEnv) p.extraEnv) plugins}
|
||||
exec ${weechat}/bin/weechat "$@"
|
||||
'') // {
|
||||
name = weechat.name;
|
||||
unwrapped = weechat;
|
||||
meta = weechat.meta;
|
||||
|
||||
init = let
|
||||
init = builtins.replaceStrings [ "\n" ] [ ";" ] (config.init or "");
|
||||
|
||||
mkScript = drv: lib.flip map drv.scripts (script: "/script load ${drv}/share/${script}");
|
||||
|
||||
scripts = builtins.concatStringsSep ";" (lib.foldl (scripts: drv: scripts ++ mkScript drv)
|
||||
[ ] (config.scripts or []));
|
||||
in "${scripts};${init}";
|
||||
|
||||
mkWeechat = bin: (writeScriptBin bin ''
|
||||
#!${stdenv.shell}
|
||||
export WEECHAT_EXTRA_LIBDIR=${pluginsDir}
|
||||
${lib.concatMapStringsSep "\n" (p: lib.optionalString (p ? extraEnv) p.extraEnv) plugins}
|
||||
exec ${weechat}/bin/${bin} "$@" --run-command ${lib.escapeShellArg init}
|
||||
'') // {
|
||||
inherit (weechat) name meta;
|
||||
unwrapped = weechat;
|
||||
};
|
||||
in buildEnv {
|
||||
name = "weechat-bin-env";
|
||||
paths = [
|
||||
(mkWeechat "weechat")
|
||||
(mkWeechat "weechat-headless")
|
||||
];
|
||||
}
|
||||
|
13
pkgs/applications/networking/irc/weechat/scripts/default.nix
Normal file
13
pkgs/applications/networking/irc/weechat/scripts/default.nix
Normal file
@ -0,0 +1,13 @@
|
||||
{ callPackage, luaPackages, pythonPackages }:
|
||||
|
||||
{
|
||||
weechat-xmpp = callPackage ./weechat-xmpp {
|
||||
inherit (pythonPackages) pydns;
|
||||
};
|
||||
|
||||
weechat-matrix-bridge = callPackage ./weechat-matrix-bridge {
|
||||
inherit (luaPackages) cjson;
|
||||
};
|
||||
|
||||
wee-slack = callPackage ./wee-slack { };
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
{ stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "wee-slack-${version}";
|
||||
version = "2.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "wee-slack";
|
||||
owner = "wee-slack";
|
||||
rev = "v${version}";
|
||||
sha256 = "05caackz645aw6kljmiihiy7xz9jld8b9blwpmh0cnaihavgj1wc";
|
||||
};
|
||||
|
||||
passthru.scripts = [ "wee_slack.py" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share
|
||||
cp wee_slack.py $out/share/wee_slack.py
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/wee-slack/wee-slack;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ma27 ];
|
||||
description = ''
|
||||
A WeeChat plugin for Slack.com. Synchronizes read markers, provides typing notification, search, etc..
|
||||
'';
|
||||
};
|
||||
}
|
@ -25,6 +25,8 @@ stdenv.mkDerivation {
|
||||
--replace "__NIX_LIB_PATH__" "$out/lib/?.so"
|
||||
'';
|
||||
|
||||
passthru.scripts = [ "olm.lua" "matrix.lua" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{share,lib}
|
||||
|
@ -25,6 +25,8 @@ stdenv.mkDerivation {
|
||||
})
|
||||
];
|
||||
|
||||
passthru.scripts = [ "jabber.py" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A fork of the jabber plugin for weechat";
|
||||
homepage = "https://github.com/sleduc/weechat-xmpp";
|
@ -1,20 +1,20 @@
|
||||
{ stdenv, fetchgit, libowfat, zlib }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "opentracker-2016-10-02";
|
||||
name = "opentracker-2018-05-26";
|
||||
|
||||
src = fetchgit {
|
||||
url = "git://erdgeist.org/opentracker";
|
||||
rev = "0ebc0ed6a3e3b7acc9f9e338cc23cea5f4f22f61";
|
||||
sha256 = "0qi0a8fygjwgs3yacramfn53jdabfgrlzid7q597x9lr94anfpyl";
|
||||
url = "https://erdgeist.org/gitweb/opentracker";
|
||||
rev = "6411f1567f64248b0d145493c2e61004d2822623";
|
||||
sha256 = "110nfb6n4clykwdzpk54iccsfjawq0krjfqhg114i1z0ri5dyl8j";
|
||||
};
|
||||
|
||||
buildInputs = [ libowfat zlib ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/doc
|
||||
cp opentracker $out/bin
|
||||
cp opentracker.conf.sample $out/share/doc
|
||||
runHook preInstall
|
||||
install -D opentracker $out/bin/opentracker
|
||||
install -D opentracker.conf.sample $out/share/doc/opentracker.conf.sample
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
buildGoPackage rec {
|
||||
name = "rclone-${version}";
|
||||
version = "1.43";
|
||||
version = "1.43.1";
|
||||
|
||||
goPackagePath = "github.com/ncw/rclone";
|
||||
|
||||
@ -10,7 +10,7 @@ buildGoPackage rec {
|
||||
owner = "ncw";
|
||||
repo = "rclone";
|
||||
rev = "v${version}";
|
||||
sha256 = "1khg5jsrjmnblv8zg0zqs1n0hmjv05pjj94m9d7jbp9d936lxsxx";
|
||||
sha256 = "0iz427gdm8cxx3kbjmhw7jsvi9j0ppb5aqcq4alwf72fvpvql3mx";
|
||||
};
|
||||
|
||||
outputs = [ "bin" "out" "man" ];
|
||||
|
@ -2,7 +2,7 @@
|
||||
, dnsutils, coreutils, openssl, nettools, utillinux, procps }:
|
||||
|
||||
let
|
||||
version = "2.9.5-5";
|
||||
version = "2.9.5-6";
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "testssl.sh-${version}";
|
||||
@ -11,7 +11,7 @@ in stdenv.mkDerivation rec {
|
||||
owner = "drwetter";
|
||||
repo = "testssl.sh";
|
||||
rev = "v${version}";
|
||||
sha256 = "0zgj9vhd8fv3a1cn8dxqmjd8qmgryc867gq7zbvbr41lkqc06a1r";
|
||||
sha256 = "0wn7lxz0ibv59v0acbsk5z3rsmr65zr1q7n4kxva1cw5xzq9ya6k";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
@ -12,7 +12,10 @@ stdenv.mkDerivation rec {
|
||||
name = "gildas-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.iram.fr/~gildas/dist/gildas-src-${srcVersion}.tar.gz";
|
||||
# For each new release, the upstream developers of Gildas move the
|
||||
# source code of the previous release to a different directory
|
||||
urls = [ "http://www.iram.fr/~gildas/dist/gildas-src-${srcVersion}.tar.gz"
|
||||
"http://www.iram.fr/~gildas/dist/archive/gildas/gildas-src-${srcVersion}.tar.gz" ];
|
||||
sha256 = "0mg3wijrj8x1p912vkgrhxbypjx7aj9b1492yxvq2y3fxban6bj1";
|
||||
};
|
||||
|
||||
|
49
pkgs/applications/science/biology/hisat2/default.nix
Normal file
49
pkgs/applications/science/biology/hisat2/default.nix
Normal file
@ -0,0 +1,49 @@
|
||||
{stdenv, fetchurl, unzip, which, python}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "hisat2-${version}";
|
||||
version = "2.1.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.ccb.jhu.edu/pub/infphilo/hisat2/downloads/hisat2-${version}-source.zip";
|
||||
sha256 = "10g73sdf6vqqfhhd92hliw7bbpkb8v4pp5012r5l21zws7p7d8l9";
|
||||
};
|
||||
|
||||
buildInputs = [ unzip which python ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp hisat2 \
|
||||
hisat2-inspect-l \
|
||||
hisat2-build-s \
|
||||
hisat2-align-l \
|
||||
hisat2-inspect \
|
||||
hisat2-align-s \
|
||||
hisat2-inspect-s \
|
||||
hisat2-build-l \
|
||||
hisat2-build \
|
||||
extract_exons.py \
|
||||
extract_splice_sites.py \
|
||||
hisat2_extract_exons.py \
|
||||
hisat2_extract_snps_haplotypes_UCSC.py \
|
||||
hisat2_extract_snps_haplotypes_VCF.py \
|
||||
hisat2_extract_splice_sites.py \
|
||||
hisat2_simulate_reads.py \
|
||||
hisatgenotype_build_genome.py \
|
||||
hisatgenotype_extract_reads.py \
|
||||
hisatgenotype_extract_vars.py \
|
||||
hisatgenotype_hla_cyp.py \
|
||||
hisatgenotype_locus.py \
|
||||
hisatgenotype.py \
|
||||
$out/bin
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Graph based aligner";
|
||||
license = licenses.gpl3;
|
||||
homepage = https://ccb.jhu.edu/software/hisat2/index.shtml;
|
||||
maintainers = with maintainers; [ jbedo ];
|
||||
platforms = [ "x86_64-linux" "i686-linux" ];
|
||||
};
|
||||
|
||||
}
|
@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "picard-tools-${version}";
|
||||
version = "2.18.11";
|
||||
version = "2.18.12";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/broadinstitute/picard/releases/download/${version}/picard.jar";
|
||||
sha256 = "03wkyz3bjx3n8bwambhz9lr09271r1wxycmx4p7m2naqs4afxb89";
|
||||
sha256 = "0r5w71fcji4j3xjdhip9jlvmqi66x52af8b7mfxp4nz6xxl9ilxm";
|
||||
};
|
||||
|
||||
buildInputs = [ jre makeWrapper ];
|
||||
|
@ -17,7 +17,7 @@ let
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
version = "14.29.17";
|
||||
version = "14.29.19";
|
||||
pname = "jmol";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
|
||||
baseVersion = "${lib.versions.major version}.${lib.versions.minor version}";
|
||||
in fetchurl {
|
||||
url = "mirror://sourceforge/jmol/Jmol/Version%20${baseVersion}/Jmol%20${version}/Jmol-${version}-binary.tar.gz";
|
||||
sha256 = "1dnxbvi8ha9z2ldymkjpxydd216afv6k7fdp3j70sql10zgy0isk";
|
||||
sha256 = "0sfbbi6mgj9hqzvcz19cr5s96rna2f2b1nc1d4j28xvva7qaqjm5";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
|
@ -20,8 +20,10 @@ stdenv.mkDerivation rec {
|
||||
cp drgeo.desktop.in drgeo.desktop
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
description = "Interactive geometry program";
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
homepage = https://sourceforge.net/projects/ofset;
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ stdenv.mkDerivation (rec {
|
||||
dontAddPrefix = true;
|
||||
configureFlags = [ "--prefix" "$(out)" ];
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
description = "A program for proof-tree visualization";
|
||||
longDescription = ''
|
||||
Prooftree is a program for proof-tree visualization during interactive
|
||||
@ -35,7 +35,8 @@ stdenv.mkDerivation (rec {
|
||||
shift-click).
|
||||
'';
|
||||
homepage = http://askra.de/software/prooftree;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
maintainers = [ stdenv.lib.maintainers.jwiegley ];
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.jwiegley ];
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
})
|
||||
|
@ -20,8 +20,7 @@ with python3.pkgs; buildPythonApplication rec {
|
||||
meta = with stdenv.lib; {
|
||||
description = "Terminal Mandelbrot fractal viewer";
|
||||
homepage = https://github.com/Tenchi2xh/Almonds;
|
||||
# No license has been specified
|
||||
license = licenses.unfree;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ infinisil ];
|
||||
};
|
||||
}
|
||||
|
@ -41,6 +41,7 @@ stdenv.mkDerivation rec {
|
||||
of the full GiNaC, and it is *only* meant to be used as a Python library.
|
||||
'';
|
||||
homepage = http://pynac.org;
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ timokau ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
|
@ -8,7 +8,8 @@
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
assert elem fileFormat ["lowerTriangularCsv" "upperTriangularCsv" "dipha"];
|
||||
assert assertOneOf "fileFormat" fileFormat
|
||||
["lowerTriangularCsv" "upperTriangularCsv" "dipha"];
|
||||
assert useGoogleHashmap -> sparsehash != null;
|
||||
|
||||
let
|
||||
|
@ -21,7 +21,7 @@ let
|
||||
|
||||
sagelib = self.callPackage ./sagelib.nix {
|
||||
inherit flint ecl arb;
|
||||
inherit sage-src pynac singular;
|
||||
inherit sage-src openblas-blas-pc openblas-cblas-pc openblas-lapack-pc pynac singular;
|
||||
linbox = nixpkgs.linbox.override { withSage = true; };
|
||||
};
|
||||
|
||||
@ -41,13 +41,13 @@ let
|
||||
};
|
||||
|
||||
sage-env = self.callPackage ./sage-env.nix {
|
||||
inherit sage-src python rWrapper ecl singular palp flint pynac pythonEnv;
|
||||
inherit sage-src python rWrapper openblas-cblas-pc ecl singular palp flint pynac pythonEnv;
|
||||
pkg-config = nixpkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
|
||||
};
|
||||
|
||||
sage-with-env = self.callPackage ./sage-with-env.nix {
|
||||
inherit pythonEnv;
|
||||
inherit sage-src pynac singular;
|
||||
inherit sage-src openblas-blas-pc openblas-cblas-pc openblas-lapack-pc pynac singular;
|
||||
pkg-config = nixpkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
|
||||
three = nodePackages_8_x.three;
|
||||
};
|
||||
@ -60,6 +60,10 @@ let
|
||||
};
|
||||
};
|
||||
|
||||
openblas-blas-pc = callPackage ./openblas-pc.nix { name = "blas"; };
|
||||
openblas-cblas-pc = callPackage ./openblas-pc.nix { name = "cblas"; };
|
||||
openblas-lapack-pc = callPackage ./openblas-pc.nix { name = "lapack"; };
|
||||
|
||||
sage-src = callPackage ./sage-src.nix {};
|
||||
|
||||
pythonRuntimeDeps = with python.pkgs; [
|
||||
|
17
pkgs/applications/science/math/sage/openblas-pc.nix
Normal file
17
pkgs/applications/science/math/sage/openblas-pc.nix
Normal file
@ -0,0 +1,17 @@
|
||||
{ openblasCompat
|
||||
, writeTextFile
|
||||
, name
|
||||
}:
|
||||
|
||||
writeTextFile {
|
||||
name = "openblas-${name}-pc-${openblasCompat.version}";
|
||||
destination = "/lib/pkgconfig/${name}.pc";
|
||||
text = ''
|
||||
Name: ${name}
|
||||
Version: ${openblasCompat.version}
|
||||
|
||||
Description: ${name} for SageMath, provided by the OpenBLAS package.
|
||||
Cflags: -I${openblasCompat}/include
|
||||
Libs: -L${openblasCompat}/lib -lopenblas
|
||||
'';
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
diff --git a/src/doc/en/faq/faq-usage.rst b/src/doc/en/faq/faq-usage.rst
|
||||
index 79b4205fd3..9a89bd2136 100644
|
||||
index 2347a1190d..f5b0fe71a4 100644
|
||||
--- a/src/doc/en/faq/faq-usage.rst
|
||||
+++ b/src/doc/en/faq/faq-usage.rst
|
||||
@@ -338,7 +338,7 @@ ints. For example::
|
||||
@ -174,7 +174,7 @@ index 5b89cd75ee..e50b2ea5d4 100644
|
||||
This creates a random 5x5 matrix ``A``, and solves `Ax=b` where
|
||||
``b=[0.0,1.0,2.0,3.0,4.0]``. There are many other routines in the :mod:`numpy.linalg`
|
||||
diff --git a/src/sage/calculus/riemann.pyx b/src/sage/calculus/riemann.pyx
|
||||
index df85cce43d..34ea164be0 100644
|
||||
index 60f37f7557..4ac3dedf1d 100644
|
||||
--- a/src/sage/calculus/riemann.pyx
|
||||
+++ b/src/sage/calculus/riemann.pyx
|
||||
@@ -1191,30 +1191,30 @@ cpdef complex_to_spiderweb(np.ndarray[COMPLEX_T, ndim = 2] z_values,
|
||||
@ -248,7 +248,7 @@ index df85cce43d..34ea164be0 100644
|
||||
|
||||
TESTS::
|
||||
diff --git a/src/sage/combinat/fully_packed_loop.py b/src/sage/combinat/fully_packed_loop.py
|
||||
index 61b1003002..4baee9cbbd 100644
|
||||
index 0a9bd61267..d2193cc2d6 100644
|
||||
--- a/src/sage/combinat/fully_packed_loop.py
|
||||
+++ b/src/sage/combinat/fully_packed_loop.py
|
||||
@@ -72,11 +72,11 @@ def _make_color_list(n, colors=None, color_map=None, randomize=False):
|
||||
@ -269,10 +269,10 @@ index 61b1003002..4baee9cbbd 100644
|
||||
['blue', 'blue', 'red', 'blue', 'red', 'red', 'red', 'blue']
|
||||
"""
|
||||
diff --git a/src/sage/finance/time_series.pyx b/src/sage/finance/time_series.pyx
|
||||
index c37700d14e..49b7298d0b 100644
|
||||
index 28779365df..3ab0282861 100644
|
||||
--- a/src/sage/finance/time_series.pyx
|
||||
+++ b/src/sage/finance/time_series.pyx
|
||||
@@ -109,8 +109,8 @@ cdef class TimeSeries:
|
||||
@@ -111,8 +111,8 @@ cdef class TimeSeries:
|
||||
|
||||
sage: import numpy
|
||||
sage: v = numpy.array([[1,2], [3,4]], dtype=float); v
|
||||
@ -283,7 +283,7 @@ index c37700d14e..49b7298d0b 100644
|
||||
sage: finance.TimeSeries(v)
|
||||
[1.0000, 2.0000, 3.0000, 4.0000]
|
||||
sage: finance.TimeSeries(v[:,0])
|
||||
@@ -2098,14 +2098,14 @@ cdef class TimeSeries:
|
||||
@@ -2100,14 +2100,14 @@ cdef class TimeSeries:
|
||||
|
||||
sage: w[0] = 20
|
||||
sage: w
|
||||
@ -301,7 +301,7 @@ index c37700d14e..49b7298d0b 100644
|
||||
sage: v
|
||||
[20.0000, -3.0000, 4.5000, -2.0000]
|
||||
diff --git a/src/sage/functions/hyperbolic.py b/src/sage/functions/hyperbolic.py
|
||||
index 931a4b41e4..bf33fc483d 100644
|
||||
index aff552f450..7a6df931e7 100644
|
||||
--- a/src/sage/functions/hyperbolic.py
|
||||
+++ b/src/sage/functions/hyperbolic.py
|
||||
@@ -214,7 +214,7 @@ class Function_coth(GinacFunction):
|
||||
@ -341,7 +341,7 @@ index 931a4b41e4..bf33fc483d 100644
|
||||
return arctanh(1.0 / x)
|
||||
|
||||
diff --git a/src/sage/functions/orthogonal_polys.py b/src/sage/functions/orthogonal_polys.py
|
||||
index 017c85a96f..33fbb499c5 100644
|
||||
index ed6365bef4..99b8b04dad 100644
|
||||
--- a/src/sage/functions/orthogonal_polys.py
|
||||
+++ b/src/sage/functions/orthogonal_polys.py
|
||||
@@ -810,12 +810,12 @@ class Func_chebyshev_T(ChebyshevFunction):
|
||||
@ -379,10 +379,10 @@ index 017c85a96f..33fbb499c5 100644
|
||||
array([ 0.2 , -0.96])
|
||||
"""
|
||||
diff --git a/src/sage/functions/other.py b/src/sage/functions/other.py
|
||||
index 679384c907..d63b295a4c 100644
|
||||
index 1883daa3e6..9885222817 100644
|
||||
--- a/src/sage/functions/other.py
|
||||
+++ b/src/sage/functions/other.py
|
||||
@@ -390,7 +390,7 @@ class Function_ceil(BuiltinFunction):
|
||||
@@ -389,7 +389,7 @@ class Function_ceil(BuiltinFunction):
|
||||
sage: import numpy
|
||||
sage: a = numpy.linspace(0,2,6)
|
||||
sage: ceil(a)
|
||||
@ -391,7 +391,7 @@ index 679384c907..d63b295a4c 100644
|
||||
|
||||
Test pickling::
|
||||
|
||||
@@ -539,7 +539,7 @@ class Function_floor(BuiltinFunction):
|
||||
@@ -553,7 +553,7 @@ class Function_floor(BuiltinFunction):
|
||||
sage: import numpy
|
||||
sage: a = numpy.linspace(0,2,6)
|
||||
sage: floor(a)
|
||||
@ -400,7 +400,7 @@ index 679384c907..d63b295a4c 100644
|
||||
sage: floor(x)._sympy_()
|
||||
floor(x)
|
||||
|
||||
@@ -840,7 +840,7 @@ def sqrt(x, *args, **kwds):
|
||||
@@ -869,7 +869,7 @@ def sqrt(x, *args, **kwds):
|
||||
sage: import numpy
|
||||
sage: a = numpy.arange(2,5)
|
||||
sage: sqrt(a)
|
||||
@ -409,11 +409,35 @@ index 679384c907..d63b295a4c 100644
|
||||
"""
|
||||
if isinstance(x, float):
|
||||
return math.sqrt(x)
|
||||
diff --git a/src/sage/functions/spike_function.py b/src/sage/functions/spike_function.py
|
||||
index 1e021de3fe..56635ca98f 100644
|
||||
--- a/src/sage/functions/spike_function.py
|
||||
+++ b/src/sage/functions/spike_function.py
|
||||
@@ -157,7 +157,7 @@ class SpikeFunction:
|
||||
sage: S = spike_function([(-3,4),(-1,1),(2,3)]); S
|
||||
A spike function with spikes at [-3.0, -1.0, 2.0]
|
||||
sage: P = S.plot_fft_abs(8)
|
||||
- sage: p = P[0]; p.ydata
|
||||
+ sage: p = P[0]; p.ydata # abs tol 1e-8
|
||||
[5.0, 5.0, 3.367958691924177, 3.367958691924177, 4.123105625617661, 4.123105625617661, 4.759921664218055, 4.759921664218055]
|
||||
"""
|
||||
w = self.vector(samples = samples, xmin=xmin, xmax=xmax)
|
||||
@@ -176,8 +176,8 @@ class SpikeFunction:
|
||||
sage: S = spike_function([(-3,4),(-1,1),(2,3)]); S
|
||||
A spike function with spikes at [-3.0, -1.0, 2.0]
|
||||
sage: P = S.plot_fft_arg(8)
|
||||
- sage: p = P[0]; p.ydata
|
||||
- [0.0, 0.0, -0.211524990023434..., -0.211524990023434..., 0.244978663126864..., 0.244978663126864..., -0.149106180027477..., -0.149106180027477...]
|
||||
+ sage: p = P[0]; p.ydata # abs tol 1e-8
|
||||
+ [0.0, 0.0, -0.211524990023434, -0.211524990023434, 0.244978663126864, 0.244978663126864, -0.149106180027477, -0.149106180027477]
|
||||
"""
|
||||
w = self.vector(samples = samples, xmin=xmin, xmax=xmax)
|
||||
xmin, xmax = self._ranges(xmin, xmax)
|
||||
diff --git a/src/sage/functions/trig.py b/src/sage/functions/trig.py
|
||||
index e7e7a311cd..e7ff78a9de 100644
|
||||
index 501e7ff6b6..5f760912f0 100644
|
||||
--- a/src/sage/functions/trig.py
|
||||
+++ b/src/sage/functions/trig.py
|
||||
@@ -731,7 +731,7 @@ class Function_arccot(GinacFunction):
|
||||
@@ -724,7 +724,7 @@ class Function_arccot(GinacFunction):
|
||||
sage: import numpy
|
||||
sage: a = numpy.arange(2, 5)
|
||||
sage: arccot(a)
|
||||
@ -422,7 +446,7 @@ index e7e7a311cd..e7ff78a9de 100644
|
||||
"""
|
||||
return math.pi/2 - arctan(x)
|
||||
|
||||
@@ -787,7 +787,7 @@ class Function_arccsc(GinacFunction):
|
||||
@@ -780,7 +780,7 @@ class Function_arccsc(GinacFunction):
|
||||
sage: import numpy
|
||||
sage: a = numpy.arange(2, 5)
|
||||
sage: arccsc(a)
|
||||
@ -431,7 +455,7 @@ index e7e7a311cd..e7ff78a9de 100644
|
||||
"""
|
||||
return arcsin(1.0/x)
|
||||
|
||||
@@ -845,7 +845,7 @@ class Function_arcsec(GinacFunction):
|
||||
@@ -838,7 +838,7 @@ class Function_arcsec(GinacFunction):
|
||||
sage: import numpy
|
||||
sage: a = numpy.arange(2, 5)
|
||||
sage: arcsec(a)
|
||||
@ -440,7 +464,7 @@ index e7e7a311cd..e7ff78a9de 100644
|
||||
"""
|
||||
return arccos(1.0/x)
|
||||
|
||||
@@ -920,13 +920,13 @@ class Function_arctan2(GinacFunction):
|
||||
@@ -913,13 +913,13 @@ class Function_arctan2(GinacFunction):
|
||||
sage: a = numpy.linspace(1, 3, 3)
|
||||
sage: b = numpy.linspace(3, 6, 3)
|
||||
sage: atan2(a, b)
|
||||
@ -458,10 +482,10 @@ index e7e7a311cd..e7ff78a9de 100644
|
||||
TESTS::
|
||||
|
||||
diff --git a/src/sage/matrix/constructor.pyx b/src/sage/matrix/constructor.pyx
|
||||
index 19a1d37df0..5780dfae1c 100644
|
||||
index 12136f1773..491bf22e62 100644
|
||||
--- a/src/sage/matrix/constructor.pyx
|
||||
+++ b/src/sage/matrix/constructor.pyx
|
||||
@@ -494,8 +494,8 @@ class MatrixFactory(object):
|
||||
@@ -503,8 +503,8 @@ def matrix(*args, **kwds):
|
||||
[7 8 9]
|
||||
Full MatrixSpace of 3 by 3 dense matrices over Integer Ring
|
||||
sage: n = matrix(QQ, 2, 2, [1, 1/2, 1/3, 1/4]).numpy(); n
|
||||
@ -473,10 +497,31 @@ index 19a1d37df0..5780dfae1c 100644
|
||||
[ 1 1/2]
|
||||
[1/3 1/4]
|
||||
diff --git a/src/sage/matrix/matrix_double_dense.pyx b/src/sage/matrix/matrix_double_dense.pyx
|
||||
index 48e0a8a97f..1be5d35b19 100644
|
||||
index 66e54a79a4..0498334f4b 100644
|
||||
--- a/src/sage/matrix/matrix_double_dense.pyx
|
||||
+++ b/src/sage/matrix/matrix_double_dense.pyx
|
||||
@@ -2546,7 +2546,7 @@ cdef class Matrix_double_dense(Matrix_dense):
|
||||
@@ -606,6 +606,9 @@ cdef class Matrix_double_dense(Matrix_dense):
|
||||
[ 3.0 + 9.0*I 4.0 + 16.0*I 5.0 + 25.0*I]
|
||||
[6.0 + 36.0*I 7.0 + 49.0*I 8.0 + 64.0*I]
|
||||
sage: B.condition()
|
||||
+ doctest:warning
|
||||
+ ...
|
||||
+ ComplexWarning: Casting complex values to real discards the imaginary part
|
||||
203.851798...
|
||||
sage: B.condition(p='frob')
|
||||
203.851798...
|
||||
@@ -654,9 +657,7 @@ cdef class Matrix_double_dense(Matrix_dense):
|
||||
True
|
||||
sage: B = A.change_ring(CDF)
|
||||
sage: B.condition()
|
||||
- Traceback (most recent call last):
|
||||
- ...
|
||||
- LinAlgError: Singular matrix
|
||||
+ +Infinity
|
||||
|
||||
Improper values of ``p`` are caught. ::
|
||||
|
||||
@@ -2519,7 +2520,7 @@ cdef class Matrix_double_dense(Matrix_dense):
|
||||
sage: P.is_unitary(algorithm='orthonormal')
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
@ -485,7 +530,7 @@ index 48e0a8a97f..1be5d35b19 100644
|
||||
|
||||
TESTS::
|
||||
|
||||
@@ -3662,8 +3662,8 @@ cdef class Matrix_double_dense(Matrix_dense):
|
||||
@@ -3635,8 +3636,8 @@ cdef class Matrix_double_dense(Matrix_dense):
|
||||
[0.0 1.0 2.0]
|
||||
[3.0 4.0 5.0]
|
||||
sage: m.numpy()
|
||||
@ -496,7 +541,7 @@ index 48e0a8a97f..1be5d35b19 100644
|
||||
|
||||
Alternatively, numpy automatically calls this function (via
|
||||
the magic :meth:`__array__` method) to convert Sage matrices
|
||||
@@ -3674,16 +3674,16 @@ cdef class Matrix_double_dense(Matrix_dense):
|
||||
@@ -3647,16 +3648,16 @@ cdef class Matrix_double_dense(Matrix_dense):
|
||||
[0.0 1.0 2.0]
|
||||
[3.0 4.0 5.0]
|
||||
sage: numpy.array(m)
|
||||
@ -518,10 +563,10 @@ index 48e0a8a97f..1be5d35b19 100644
|
||||
dtype('complex128')
|
||||
|
||||
diff --git a/src/sage/matrix/special.py b/src/sage/matrix/special.py
|
||||
index c698ba5e97..b743bab354 100644
|
||||
index ccbd208810..c3f9a65093 100644
|
||||
--- a/src/sage/matrix/special.py
|
||||
+++ b/src/sage/matrix/special.py
|
||||
@@ -705,7 +705,7 @@ def diagonal_matrix(arg0=None, arg1=None, arg2=None, sparse=True):
|
||||
@@ -706,7 +706,7 @@ def diagonal_matrix(arg0=None, arg1=None, arg2=None, sparse=True):
|
||||
|
||||
sage: import numpy
|
||||
sage: entries = numpy.array([1.2, 5.6]); entries
|
||||
@ -530,7 +575,7 @@ index c698ba5e97..b743bab354 100644
|
||||
sage: A = diagonal_matrix(3, entries); A
|
||||
[1.2 0.0 0.0]
|
||||
[0.0 5.6 0.0]
|
||||
@@ -715,7 +715,7 @@ def diagonal_matrix(arg0=None, arg1=None, arg2=None, sparse=True):
|
||||
@@ -716,7 +716,7 @@ def diagonal_matrix(arg0=None, arg1=None, arg2=None, sparse=True):
|
||||
|
||||
sage: j = numpy.complex(0,1)
|
||||
sage: entries = numpy.array([2.0+j, 8.1, 3.4+2.6*j]); entries
|
||||
@ -540,10 +585,10 @@ index c698ba5e97..b743bab354 100644
|
||||
[2.0 + 1.0*I 0.0 0.0]
|
||||
[ 0.0 8.1 0.0]
|
||||
diff --git a/src/sage/modules/free_module_element.pyx b/src/sage/modules/free_module_element.pyx
|
||||
index 230f142117..2ab1c0ae68 100644
|
||||
index 37d92c1282..955d083b34 100644
|
||||
--- a/src/sage/modules/free_module_element.pyx
|
||||
+++ b/src/sage/modules/free_module_element.pyx
|
||||
@@ -982,7 +982,7 @@ cdef class FreeModuleElement(Vector): # abstract base class
|
||||
@@ -988,7 +988,7 @@ cdef class FreeModuleElement(Vector): # abstract base class
|
||||
sage: v.numpy()
|
||||
array([1, 2, 5/6], dtype=object)
|
||||
sage: v.numpy(dtype=float)
|
||||
@ -552,7 +597,7 @@ index 230f142117..2ab1c0ae68 100644
|
||||
sage: v.numpy(dtype=int)
|
||||
array([1, 2, 0])
|
||||
sage: import numpy
|
||||
@@ -993,7 +993,7 @@ cdef class FreeModuleElement(Vector): # abstract base class
|
||||
@@ -999,7 +999,7 @@ cdef class FreeModuleElement(Vector): # abstract base class
|
||||
be more efficient but may have unintended consequences::
|
||||
|
||||
sage: v.numpy(dtype=None)
|
||||
@ -596,22 +641,6 @@ index 39fc2970de..2badf98284 100644
|
||||
"""
|
||||
if dtype is None or dtype is self._vector_numpy.dtype:
|
||||
from copy import copy
|
||||
diff --git a/src/sage/numerical/optimize.py b/src/sage/numerical/optimize.py
|
||||
index 17b5ebb84b..92ce35c502 100644
|
||||
--- a/src/sage/numerical/optimize.py
|
||||
+++ b/src/sage/numerical/optimize.py
|
||||
@@ -486,9 +486,9 @@ def minimize_constrained(func,cons,x0,gradient=None,algorithm='default', **args)
|
||||
else:
|
||||
min = optimize.fmin_tnc(f, x0, approx_grad=True, bounds=cons, messages=0, **args)[0]
|
||||
elif isinstance(cons[0], function_type) or isinstance(cons[0], Expression):
|
||||
- min = optimize.fmin_cobyla(f, x0, cons, iprint=0, **args)
|
||||
+ min = optimize.fmin_cobyla(f, x0, cons, disp=0, **args)
|
||||
elif isinstance(cons, function_type) or isinstance(cons, Expression):
|
||||
- min = optimize.fmin_cobyla(f, x0, cons, iprint=0, **args)
|
||||
+ min = optimize.fmin_cobyla(f, x0, cons, disp=0, **args)
|
||||
return vector(RDF, min)
|
||||
|
||||
|
||||
diff --git a/src/sage/plot/complex_plot.pyx b/src/sage/plot/complex_plot.pyx
|
||||
index ad9693da62..758fb709b7 100644
|
||||
--- a/src/sage/plot/complex_plot.pyx
|
||||
@ -649,6 +678,76 @@ index ad9693da62..758fb709b7 100644
|
||||
"""
|
||||
import numpy
|
||||
cdef unsigned int i, j, imax, jmax
|
||||
diff --git a/src/sage/plot/histogram.py b/src/sage/plot/histogram.py
|
||||
index 5d28473731..fc4b2046c0 100644
|
||||
--- a/src/sage/plot/histogram.py
|
||||
+++ b/src/sage/plot/histogram.py
|
||||
@@ -53,10 +53,17 @@ class Histogram(GraphicPrimitive):
|
||||
"""
|
||||
import numpy as np
|
||||
self.datalist=np.asarray(datalist,dtype=float)
|
||||
+ if 'normed' in options:
|
||||
+ from sage.misc.superseded import deprecation
|
||||
+ deprecation(25260, "the 'normed' option is deprecated. Use 'density' instead.")
|
||||
if 'linestyle' in options:
|
||||
from sage.plot.misc import get_matplotlib_linestyle
|
||||
options['linestyle'] = get_matplotlib_linestyle(
|
||||
options['linestyle'], return_type='long')
|
||||
+ if options.get('range', None):
|
||||
+ # numpy.histogram performs type checks on "range" so this must be
|
||||
+ # actual floats
|
||||
+ options['range'] = [float(x) for x in options['range']]
|
||||
GraphicPrimitive.__init__(self, options)
|
||||
|
||||
def get_minmax_data(self):
|
||||
@@ -80,10 +87,14 @@ class Histogram(GraphicPrimitive):
|
||||
{'xmax': 4.0, 'xmin': 0, 'ymax': 2, 'ymin': 0}
|
||||
|
||||
TESTS::
|
||||
-
|
||||
sage: h = histogram([10,3,5], normed=True)[0]
|
||||
- sage: h.get_minmax_data() # rel tol 1e-15
|
||||
- {'xmax': 10.0, 'xmin': 3.0, 'ymax': 0.4761904761904765, 'ymin': 0}
|
||||
+ doctest:warning...:
|
||||
+ DeprecationWarning: the 'normed' option is deprecated. Use 'density' instead.
|
||||
+ See https://trac.sagemath.org/25260 for details.
|
||||
+ sage: h.get_minmax_data()
|
||||
+ doctest:warning ...:
|
||||
+ VisibleDeprecationWarning: Passing `normed=True` on non-uniform bins has always been broken, and computes neither the probability density function nor the probability mass function. The result is only correct if the bins are uniform, when density=True will produce the same result anyway. The argument will be removed in a future version of numpy.
|
||||
+ {'xmax': 10.0, 'xmin': 3.0, 'ymax': 0.476190476190..., 'ymin': 0}
|
||||
"""
|
||||
import numpy
|
||||
|
||||
@@ -152,7 +163,7 @@ class Histogram(GraphicPrimitive):
|
||||
'rwidth': 'The relative width of the bars as a fraction of the bin width',
|
||||
'cumulative': '(True or False) If True, then a histogram is computed in which each bin gives the counts in that bin plus all bins for smaller values. Negative values give a reversed direction of accumulation.',
|
||||
'range': 'A list [min, max] which define the range of the histogram. Values outside of this range are treated as outliers and omitted from counts.',
|
||||
- 'normed': 'Deprecated alias for density',
|
||||
+ 'normed': 'Deprecated. Use density instead.',
|
||||
'density': '(True or False) If True, the counts are normalized to form a probability density. (n/(len(x)*dbin)',
|
||||
'weights': 'A sequence of weights the same length as the data list. If supplied, then each value contributes its associated weight to the bin count.',
|
||||
'stacked': '(True or False) If True, multiple data are stacked on top of each other.',
|
||||
@@ -199,7 +210,7 @@ class Histogram(GraphicPrimitive):
|
||||
subplot.hist(self.datalist.transpose(), **options)
|
||||
|
||||
|
||||
-@options(aspect_ratio='automatic',align='mid', weights=None, range=None, bins=10, edgecolor='black')
|
||||
+@options(aspect_ratio='automatic', align='mid', weights=None, range=None, bins=10, edgecolor='black')
|
||||
def histogram(datalist, **options):
|
||||
"""
|
||||
Computes and draws the histogram for list(s) of numerical data.
|
||||
@@ -231,8 +242,9 @@ def histogram(datalist, **options):
|
||||
- ``linewidth`` -- (float) width of the lines defining the bars
|
||||
- ``linestyle`` -- (default: 'solid') Style of the line. One of 'solid'
|
||||
or '-', 'dashed' or '--', 'dotted' or ':', 'dashdot' or '-.'
|
||||
- - ``density`` -- (boolean - default: False) If True, the counts are
|
||||
- normalized to form a probability density.
|
||||
+ - ``density`` -- (boolean - default: False) If True, the result is the
|
||||
+ value of the probability density function at the bin, normalized such
|
||||
+ that the integral over the range is 1.
|
||||
- ``range`` -- A list [min, max] which define the range of the
|
||||
histogram. Values outside of this range are treated as outliers and
|
||||
omitted from counts
|
||||
diff --git a/src/sage/plot/line.py b/src/sage/plot/line.py
|
||||
index 23f5e61446..3b1b51d7cf 100644
|
||||
--- a/src/sage/plot/line.py
|
||||
@ -718,7 +817,7 @@ index f3da57c370..3806f4b32f 100644
|
||||
TESTS:
|
||||
|
||||
diff --git a/src/sage/probability/probability_distribution.pyx b/src/sage/probability/probability_distribution.pyx
|
||||
index f66cd898b9..35995886d5 100644
|
||||
index 1b119e323f..3290b00695 100644
|
||||
--- a/src/sage/probability/probability_distribution.pyx
|
||||
+++ b/src/sage/probability/probability_distribution.pyx
|
||||
@@ -130,7 +130,17 @@ cdef class ProbabilityDistribution:
|
||||
@ -741,10 +840,10 @@ index f66cd898b9..35995886d5 100644
|
||||
import pylab
|
||||
l = [float(self.get_random_element()) for _ in range(num_samples)]
|
||||
diff --git a/src/sage/rings/rational.pyx b/src/sage/rings/rational.pyx
|
||||
index a0bfe080f5..7d95e7a1a8 100644
|
||||
index 12ca1b222b..9bad7dae0c 100644
|
||||
--- a/src/sage/rings/rational.pyx
|
||||
+++ b/src/sage/rings/rational.pyx
|
||||
@@ -1056,7 +1056,7 @@ cdef class Rational(sage.structure.element.FieldElement):
|
||||
@@ -1041,7 +1041,7 @@ cdef class Rational(sage.structure.element.FieldElement):
|
||||
dtype('O')
|
||||
|
||||
sage: numpy.array([1, 1/2, 3/4])
|
||||
@ -754,10 +853,10 @@ index a0bfe080f5..7d95e7a1a8 100644
|
||||
if mpz_cmp_ui(mpq_denref(self.value), 1) == 0:
|
||||
if mpz_fits_slong_p(mpq_numref(self.value)):
|
||||
diff --git a/src/sage/rings/real_mpfr.pyx b/src/sage/rings/real_mpfr.pyx
|
||||
index 4c630867a4..64e2187f5b 100644
|
||||
index 9b90c8833e..1ce05b937d 100644
|
||||
--- a/src/sage/rings/real_mpfr.pyx
|
||||
+++ b/src/sage/rings/real_mpfr.pyx
|
||||
@@ -1438,7 +1438,7 @@ cdef class RealNumber(sage.structure.element.RingElement):
|
||||
@@ -1439,7 +1439,7 @@ cdef class RealNumber(sage.structure.element.RingElement):
|
||||
|
||||
sage: import numpy
|
||||
sage: numpy.arange(10.0)
|
||||
@ -767,10 +866,10 @@ index 4c630867a4..64e2187f5b 100644
|
||||
dtype('float64')
|
||||
sage: numpy.array([1.000000000000000000000000000000000000]).dtype
|
||||
diff --git a/src/sage/schemes/elliptic_curves/height.py b/src/sage/schemes/elliptic_curves/height.py
|
||||
index 3d270ebf9d..1144f168e3 100644
|
||||
index de31fe9883..7a33ea6f5b 100644
|
||||
--- a/src/sage/schemes/elliptic_curves/height.py
|
||||
+++ b/src/sage/schemes/elliptic_curves/height.py
|
||||
@@ -1623,18 +1623,18 @@ class EllipticCurveCanonicalHeight:
|
||||
@@ -1627,18 +1627,18 @@ class EllipticCurveCanonicalHeight:
|
||||
even::
|
||||
|
||||
sage: H.wp_on_grid(v,4)
|
||||
@ -798,10 +897,10 @@ index 3d270ebf9d..1144f168e3 100644
|
||||
tau = self.tau(v)
|
||||
fk, err = self.fk_intervals(v, 15, CDF)
|
||||
diff --git a/src/sage/symbolic/ring.pyx b/src/sage/symbolic/ring.pyx
|
||||
index 2dcb0492b9..2b1a06385c 100644
|
||||
index 9da38002e8..d61e74bf82 100644
|
||||
--- a/src/sage/symbolic/ring.pyx
|
||||
+++ b/src/sage/symbolic/ring.pyx
|
||||
@@ -1135,7 +1135,7 @@ cdef class NumpyToSRMorphism(Morphism):
|
||||
@@ -1136,7 +1136,7 @@ cdef class NumpyToSRMorphism(Morphism):
|
||||
sage: cos(numpy.int('2'))
|
||||
cos(2)
|
||||
sage: numpy.cos(numpy.int('2'))
|
@ -37,7 +37,7 @@
|
||||
, lcalc
|
||||
, rubiks
|
||||
, flintqs
|
||||
, openblasCompat
|
||||
, openblas-cblas-pc
|
||||
, flint
|
||||
, gmp
|
||||
, mpfr
|
||||
@ -98,9 +98,9 @@ writeTextFile rec {
|
||||
export PKG_CONFIG_PATH='${lib.concatStringsSep ":" (map (pkg: "${pkg}/lib/pkgconfig") [
|
||||
# This is only needed in the src/sage/misc/cython.py test and I'm not sure if there's really a use-case
|
||||
# for it outside of the tests. However since singular and openblas are runtime dependencies anyways
|
||||
# it doesn't really hurt to include.
|
||||
# and openblas-cblas-pc is tiny, it doesn't really hurt to include.
|
||||
singular
|
||||
openblasCompat
|
||||
openblas-cblas-pc
|
||||
])
|
||||
}'
|
||||
export SAGE_ROOT='${sage-src}'
|
||||
|
@ -94,9 +94,20 @@ stdenv.mkDerivation rec {
|
||||
stripLen = 1;
|
||||
})
|
||||
|
||||
# Only formatting changes.
|
||||
(fetchpatch {
|
||||
name = "matplotlib-2.2.2";
|
||||
url = "https://git.sagemath.org/sage.git/patch?id=0d6244ed53b71aba861ce3d683d33e542c0bf0b0";
|
||||
sha256 = "15x4cadxxlsdfh2sblgagqjj6ir13fgdzixxnwnvzln60saahb34";
|
||||
})
|
||||
|
||||
(fetchpatch {
|
||||
name = "scipy-1.1.0";
|
||||
url = "https://git.sagemath.org/sage.git/patch?id=e0db968a51678b34ebd8d34906c7042900272378";
|
||||
sha256 = "0kq5zxqphhrmavrmg830wdr7hwp1bkzdqlf3jfqfr8r8xq12qwf7";
|
||||
})
|
||||
|
||||
# https://trac.sagemath.org/ticket/25260
|
||||
./patches/numpy-1.14.3.patch
|
||||
./patches/numpy-1.15.1.patch
|
||||
|
||||
# https://trac.sagemath.org/ticket/25862
|
||||
./patches/eclib-20180710.patch
|
||||
|
@ -4,6 +4,9 @@
|
||||
, sage-env
|
||||
, sage-src
|
||||
, openblasCompat
|
||||
, openblas-blas-pc
|
||||
, openblas-cblas-pc
|
||||
, openblas-lapack-pc
|
||||
, pkg-config
|
||||
, three
|
||||
, singular
|
||||
@ -29,6 +32,9 @@ let
|
||||
makeWrapper
|
||||
pkg-config
|
||||
openblasCompat # lots of segfaults with regular (64 bit) openblas
|
||||
openblas-blas-pc
|
||||
openblas-cblas-pc
|
||||
openblas-lapack-pc
|
||||
singular
|
||||
three
|
||||
pynac
|
||||
|
@ -3,6 +3,9 @@
|
||||
, buildPythonPackage
|
||||
, arb
|
||||
, openblasCompat
|
||||
, openblas-blas-pc
|
||||
, openblas-cblas-pc
|
||||
, openblas-lapack-pc
|
||||
, brial
|
||||
, cliquer
|
||||
, cypari2
|
||||
@ -56,7 +59,9 @@ buildPythonPackage rec {
|
||||
nativeBuildInputs = [
|
||||
iml
|
||||
perl
|
||||
openblasCompat
|
||||
openblas-blas-pc
|
||||
openblas-cblas-pc
|
||||
openblas-lapack-pc
|
||||
jupyter_core
|
||||
];
|
||||
|
||||
|
@ -67,10 +67,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://root.cern.ch/;
|
||||
description = "A data analysis framework";
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
maintainers = with stdenv.lib.maintainers; [ veprbl ];
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.veprbl ];
|
||||
license = licenses.lgpl21;
|
||||
};
|
||||
}
|
||||
|
@ -27,9 +27,10 @@ python2Packages.buildPythonApplication rec {
|
||||
--subst-var-by certPath /etc/ssl/certs/ca-certificates.crt
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://bazaar-vcs.org/;
|
||||
description = "A distributed version control system that Just Works";
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
platforms = platforms.unix;
|
||||
license = licenses.gpl2Plus;
|
||||
};
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user