Merge master into staging-next

This commit is contained in:
Frederik Rietdijk 2018-12-31 12:00:36 +01:00
commit 070290bda7
172 changed files with 2734 additions and 2541 deletions

View file

@ -48,7 +48,7 @@ neovim.override {
## Managing plugins with Vim packages
To store you plugins in Vim packages the following example can be used:
To store you plugins in Vim packages (the native vim plugin manager, see `:help packages`) the following example can be used:
```
vim_configurable.customize {
@ -56,6 +56,8 @@ vim_configurable.customize {
# loaded on launch
start = [ youcompleteme fugitive ];
# manually loadable by calling `:packadd $plugin-name`
# however, if a vim plugin has a dependency that is not explicitly listed in
# opt that dependency will always be added to start to avoid confusion.
opt = [ phpCompletion elm-vim ];
# To automatically load a plugin when opening a filetype, add vimrc lines like:
# autocmd FileType php :packadd phpCompletion
@ -63,6 +65,7 @@ vim_configurable.customize {
}
```
`myVimPackage` is an arbitrary name for the generated package. You can choose any name you like.
For Neovim the syntax is:
```
@ -74,6 +77,8 @@ neovim.override {
packages.myVimPackage = with pkgs.vimPlugins; {
# see examples below how to use custom packages
start = [ ];
# If a vim plugin has a dependency that is not explicitly listed in
# opt that dependency will always be added to start to avoid confusion.
opt = [ ];
};
};

View file

@ -1,113 +0,0 @@
{lib, pkgs}:
let inherit (lib) nvs; in
{
# composableDerivation basically mixes these features:
# - fix function
# - mergeAttrBy
# - provides shortcuts for "options" such as "--enable-foo" and adding
# buildInputs, see php example
#
# It predates styles which are common today, such as
# * the config attr
# * mkDerivation.override feature
# * overrideDerivation (lib/customization.nix)
#
# Some of the most more important usage examples (which could be rewritten if it was important):
# * php
# * postgis
# * vim_configurable
#
# A minimal example illustrating most features would look like this:
# let base = composableDerivation { (fixed: let inherit (fixed.fixed) name in {
# src = fetchurl {
# }
# buildInputs = [A];
# preConfigre = "echo ${name}";
# # attention, "name" attr is missing, thus you cannot instantiate "base".
# }
# in {
# # These all add name attribute, thus you can instantiate those:
# v1 = base.merge ({ name = "foo-add-B"; buildInputs = [B]; }); // B gets merged into buildInputs
# v2 = base.merge ({ name = "mix-in-pre-configure-lines" preConfigre = ""; });
# v3 = base.replace ({ name = "foo-no-A-only-B;" buildInputs = [B]; });
# }
#
# So yes, you can think about it being something like nixos modules, and
# you'd be merging "features" in one at a time using .merge or .replace
# Thanks Shea for telling me that I rethink the documentation ..
#
# issues:
# * its complicated to understand
# * some "features" such as exact merge behaviour are buried in mergeAttrBy
# and defaultOverridableDelayableArgs assuming the default behaviour does
# the right thing in the common case
# * Eelco once said using such fix style functions are slow to evaluate
# * Too quick & dirty. Hard to understand for others. The benefit was that
# you were able to create a kernel builder like base derivation and replace
# / add patches the way you want without having to declare function arguments
#
# nice features:
# declaring "optional features" is modular. For instance:
# flags.curl = {
# configureFlags = ["--with-curl=${curl.dev}" "--with-curlwrappers"];
# buildInputs = [curl openssl];
# };
# flags.other = { .. }
# (Example taken from PHP)
#
# alternative styles / related features:
# * Eg see function supporting building the kernel
# * versionedDerivation (discussion about this is still going on - or ended)
# * composedArgsAndFun
# * mkDerivation.override
# * overrideDerivation
# * using { .., *Support ? false }: like configurable options.
# To find those examples use grep
#
# To sum up: It exists for historical reasons - and for most commonly used
# tasks the alternatives should be used
#
# If you have questions about this code ping Marc Weber.
composableDerivation = {
mkDerivation ? pkgs.stdenv.mkDerivation,
# list of functions to be applied before defaultOverridableDelayableArgs removes removeAttrs names
# prepareDerivationArgs handles derivation configurations
applyPreTidy ? [ lib.prepareDerivationArgs ],
# consider adding addtional elements by derivation.merge { removeAttrs = ["elem"]; };
removeAttrs ? ["cfg" "flags"]
}: (lib.defaultOverridableDelayableArgs ( a: mkDerivation a)
{
inherit applyPreTidy removeAttrs;
}).merge;
# some utility functions
# use this function to generate flag attrs for prepareDerivationArgs
# E nable D isable F eature
edf = {name, feat ? name, enable ? {}, disable ? {} , value ? ""}:
nvs name {
set = {
configureFlags = ["--enable-${feat}${if value == "" then "" else "="}${value}"];
} // enable;
unset = {
configureFlags = ["--disable-${feat}"];
} // disable;
};
# same for --with and --without-
# W ith or W ithout F eature
wwf = {name, feat ? name, enable ? {}, disable ? {}, value ? ""}:
nvs name {
set = enable // {
configureFlags = ["--with-${feat}${if value == "" then "" else "="}${value}"]
++ lib.maybeAttr "configureFlags" [] enable;
};
unset = disable // {
configureFlags = ["--without-${feat}"]
++ lib.maybeAttr "configureFlags" [] disable;
};
};
}

View file

@ -125,14 +125,13 @@ let
traceShowValMarked showVal traceCall traceCall2 traceCall3
traceValIfNot runTests testAllTrue traceCallXml attrNamesToStr;
inherit (misc) maybeEnv defaultMergeArg defaultMerge foldArgs
defaultOverridableDelayableArgs composedArgsAndFun
maybeAttrNullable maybeAttr ifEnable checkFlag getValue
checkReqs uniqList uniqListExt condConcat lazyGenericClosure
innerModifySumArgs modifySumArgs innerClosePropagation
closePropagation mapAttrsFlatten nvs setAttr setAttrMerge
mergeAttrsWithFunc mergeAttrsConcatenateValues
mergeAttrsNoOverride mergeAttrByFunc mergeAttrsByFuncDefaults
mergeAttrsByFuncDefaultsClean mergeAttrBy prepareDerivationArgs
nixType imap overridableDelayableArgs;
mergeAttrsByFuncDefaultsClean mergeAttrBy
nixType imap;
});
in lib

View file

@ -35,74 +35,6 @@ rec {
withStdOverrides;
# predecessors: proposed replacement for applyAndFun (which has a bug cause it merges twice)
# the naming "overridableDelayableArgs" tries to express that you can
# - override attr values which have been supplied earlier
# - use attr values before they have been supplied by accessing the fix point
# name "fixed"
# f: the (delayed overridden) arguments are applied to this
#
# initial: initial attrs arguments and settings. see defaultOverridableDelayableArgs
#
# returns: f applied to the arguments // special attributes attrs
# a) merge: merge applied args with new args. Wether an argument is overridden depends on the merge settings
# b) replace: this let's you replace and remove names no matter which merge function has been set
#
# examples: see test cases "res" below;
overridableDelayableArgs =
f: # the function applied to the arguments
initial: # you pass attrs, the functions below are passing a function taking the fix argument
let
takeFixed = if lib.isFunction initial then initial else (fixed : initial); # transform initial to an expression always taking the fixed argument
tidy = args:
let # apply all functions given in "applyPreTidy" in sequence
applyPreTidyFun = fold ( n: a: x: n ( a x ) ) lib.id (maybeAttr "applyPreTidy" [] args);
in removeAttrs (applyPreTidyFun args) ( ["applyPreTidy"] ++ (maybeAttr "removeAttrs" [] args) ); # tidy up args before applying them
fun = n: x:
let newArgs = fixed:
let args = takeFixed fixed;
mergeFun = args.${n};
in if isAttrs x then (mergeFun args x)
else assert lib.isFunction x;
mergeFun args (x ( args // { inherit fixed; }));
in overridableDelayableArgs f newArgs;
in
(f (tidy (lib.fix takeFixed))) // {
merge = fun "mergeFun";
replace = fun "keepFun";
};
defaultOverridableDelayableArgs = f:
let defaults = {
mergeFun = mergeAttrByFunc; # default merge function. merge strategie (concatenate lists, strings) is given by mergeAttrBy
keepFun = a: b: { inherit (a) removeAttrs mergeFun keepFun mergeAttrBy; } // b; # even when using replace preserve these values
applyPreTidy = []; # list of functions applied to args before args are tidied up (usage case : prepareDerivationArgs)
mergeAttrBy = mergeAttrBy // {
applyPreTidy = a: b: a ++ b;
removeAttrs = a: b: a ++ b;
};
removeAttrs = ["mergeFun" "keepFun" "mergeAttrBy" "removeAttrs" "fixed" ]; # before applying the arguments to the function make sure these names are gone
};
in (overridableDelayableArgs f defaults).merge;
# rec { # an example of how composedArgsAndFun can be used
# a = composedArgsAndFun (x: x) { a = ["2"]; meta = { d = "bar";}; };
# # meta.d will be lost ! It's your task to preserve it (eg using a merge function)
# b = a.passthru.function { a = [ "3" ]; meta = { d2 = "bar2";}; };
# # instead of passing/ overriding values you can use a merge function:
# c = b.passthru.function ( x: { a = x.a ++ ["4"]; }); # consider using (maybeAttr "a" [] x)
# }
# result:
# {
# a = { a = ["2"]; meta = { d = "bar"; }; passthru = { function = .. }; };
# b = { a = ["3"]; meta = { d2 = "bar2"; }; passthru = { function = .. }; };
# c = { a = ["3" "4"]; meta = { d2 = "bar2"; }; passthru = { function = .. }; };
# # c2 is equal to c
# }
composedArgsAndFun = f: foldArgs defaultMerge f {};
# shortcut for attrByPath ["name"] default attrs
maybeAttrNullable = maybeAttr;
@ -285,7 +217,7 @@ rec {
# };
# will result in
# { mergeAttrsBy = [...]; buildInputs = [ a b c d ]; }
# is used by prepareDerivationArgs, defaultOverridableDelayableArgs and can be used when composing using
# is used by defaultOverridableDelayableArgs and can be used when composing using
# foldArgs, composedArgsAndFun or applyAndFun. Example: composableDerivation in all-packages.nix
mergeAttrByFunc = x: y:
let
@ -318,58 +250,6 @@ rec {
// listToAttrs (map (n: nameValuePair n (a: b: "${a}\n${b}") ) [ "preConfigure" "postInstall" ])
;
# prepareDerivationArgs tries to make writing configurable derivations easier
# example:
# prepareDerivationArgs {
# mergeAttrBy = {
# myScript = x: y: x ++ "\n" ++ y;
# };
# cfg = {
# readlineSupport = true;
# };
# flags = {
# readline = {
# set = {
# configureFlags = [ "--with-compiler=${compiler}" ];
# buildInputs = [ compiler ];
# pass = { inherit compiler; READLINE=1; };
# assertion = compiler.dllSupport;
# myScript = "foo";
# };
# unset = { configureFlags = ["--without-compiler"]; };
# };
# };
# src = ...
# buildPhase = '' ... '';
# name = ...
# myScript = "bar";
# };
# if you don't have need for unset you can omit the surrounding set = { .. } attr
# all attrs except flags cfg and mergeAttrBy will be merged with the
# additional data from flags depending on config settings
# It's used in composableDerivation in all-packages.nix. It's also used
# heavily in the new python and libs implementation
#
# should we check for misspelled cfg options?
# TODO use args.mergeFun here as well?
prepareDerivationArgs = args:
let args2 = { cfg = {}; flags = {}; } // args;
flagName = name: "${name}Support";
cfgWithDefaults = (listToAttrs (map (n: nameValuePair (flagName n) false) (attrNames args2.flags)))
// args2.cfg;
opts = attrValues (mapAttrs (a: v:
let v2 = if v ? set || v ? unset then v else { set = v; };
n = if cfgWithDefaults.${flagName a} then "set" else "unset";
attr = maybeAttr n {} v2; in
if (maybeAttr "assertion" true attr)
then attr
else throw "assertion of flag ${a} of derivation ${args.name} failed"
) args2.flags );
in removeAttrs
(mergeAttrsByFuncDefaults ([args] ++ opts ++ [{ passthru = cfgWithDefaults; }]))
["flags" "cfg" "mergeAttrBy" ];
nixType = x:
if isAttrs x then
if x ? outPath then "derivation"

View file

@ -401,42 +401,4 @@ runTests {
expected = "«foo»";
};
# MISC
testOverridableDelayableArgsTest = {
expr =
let res1 = defaultOverridableDelayableArgs id {};
res2 = defaultOverridableDelayableArgs id { a = 7; };
res3 = let x = defaultOverridableDelayableArgs id { a = 7; };
in (x.merge) { b = 10; };
res4 = let x = defaultOverridableDelayableArgs id { a = 7; };
in (x.merge) ( x: { b = 10; });
res5 = let x = defaultOverridableDelayableArgs id { a = 7; };
in (x.merge) ( x: { a = builtins.add x.a 3; });
res6 = let x = defaultOverridableDelayableArgs id { a = 7; mergeAttrBy = { a = builtins.add; }; };
y = x.merge {};
in (y.merge) { a = 10; };
resRem7 = res6.replace (a: removeAttrs a ["a"]);
# fixed tests (delayed args): (when using them add some comments, please)
resFixed1 =
let x = defaultOverridableDelayableArgs id ( x: { a = 7; c = x.fixed.b; });
y = x.merge (x: { name = "name-${builtins.toString x.fixed.c}"; });
in (y.merge) { b = 10; };
strip = attrs: removeAttrs attrs ["merge" "replace"];
in all id
[ ((strip res1) == { })
((strip res2) == { a = 7; })
((strip res3) == { a = 7; b = 10; })
((strip res4) == { a = 7; b = 10; })
((strip res5) == { a = 10; })
((strip res6) == { a = 17; })
((strip resRem7) == {})
((strip resFixed1) == { a = 7; b = 10; c =10; name = "name-10"; })
];
expected = true;
};
}

View file

@ -4677,6 +4677,11 @@
github = "vklquevs";
name = "vklquevs";
};
vlaci = {
email = "laszlo.vasko@outlook.com";
github = "vlaci";
name = "László Vaskó";
};
vlstill = {
email = "xstill@fi.muni.cz";
github = "vlstill";

View file

@ -343,6 +343,13 @@
<literal><![CDATA[security.pam.services.<name?>.text]]></literal>.
</para>
</listitem>
<listitem>
<para>
<literal>fish</literal> has been upgraded to 3.0.
It comes with a number of improvements and backwards incompatible changes.
See the <literal>fish</literal> <link xlink:href="https://github.com/fish-shell/fish-shell/releases/tag/3.0.0">release notes</link> for more information.
</para>
</listitem>
</itemizedlist>
</section>
@ -361,6 +368,12 @@
Matomo version.
</para>
</listitem>
<listitem>
<para>
<literal>composableDerivation</literal> along with supporting library functions
has been removed.
</para>
</listitem>
<listitem>
<para>
The deprecated <literal>truecrypt</literal> package has been removed

View file

@ -7,7 +7,7 @@ with lib;
let
requiredPackages =
requiredPackages = map lib.lowPrio
[ config.nix.package
pkgs.acl
pkgs.attr

View file

@ -182,10 +182,9 @@ with lib;
serviceConfig = rec {
DynamicUser = true;
RuntimeDirectory = StateDirectory;
RuntimeDirectoryMode = "0750";
StateDirectory = builtins.baseNameOf dataDir;
Type = "oneshot";
ExecStartPre = "!${lib.getBin pkgs.coreutils}/bin/install -m660 ${cfg.configFile} /run/${RuntimeDirectory}/ddclient.conf";
ExecStartPre = "!${lib.getBin pkgs.coreutils}/bin/install -m666 ${cfg.configFile} /run/${RuntimeDirectory}/ddclient.conf";
ExecStart = "${lib.getBin pkgs.ddclient}/bin/ddclient -file /run/${RuntimeDirectory}/ddclient.conf";
};
};

View file

@ -25,7 +25,7 @@
DESTDIR=$(out)
'';
propagatedBuildInputs = with python3Packages; [ pyqt5 ];
propagatedBuildInputs = with python3Packages; [ pyqt5_with_qtwebkit ];
postInstall = ''
# replace with our own wrappers. They need to be changed manually since it wouldn't work otherwise

View file

@ -5,7 +5,7 @@
python3.pkgs.buildPythonApplication rec {
pname = "lollypop";
version = "0.9.906";
version = "0.9.908";
format = "other";
doCheck = false;
@ -14,7 +14,7 @@ python3.pkgs.buildPythonApplication rec {
url = "https://gitlab.gnome.org/World/lollypop";
rev = "refs/tags/${version}";
fetchSubmodules = true;
sha256 = "1blfq3vdzs3ji3sr1z6dn5c2f8w93zv2k7aa5xpfpfnds4zfd3q6";
sha256 = "0sjhp0lw41qdp5jah9shq69ga43rkxi3vijm57x8w147nj87ch7c";
};
nativeBuildInputs = with python3.pkgs; [

View file

@ -2,11 +2,11 @@
pythonPackages.buildPythonApplication rec {
pname = "Mopidy-Iris";
version = "3.31.3";
version = "3.31.7";
src = pythonPackages.fetchPypi {
inherit pname version;
sha256 = "060kvwlch2jgiriafly8y03fp8gpbw9xiwhq8ncdij390a03iz8n";
sha256 = "0z3lqjncczlddfwdsfqninh2i8dz0kis8lhqfpdzdxhhmxlgmi20";
};
propagatedBuildInputs = [

View file

@ -4,11 +4,11 @@ let
pythonPackages = python3Packages;
in pythonPackages.buildPythonApplication rec {
pname = "picard";
version = "2.0.4";
version = "2.1";
src = fetchurl {
url = "http://ftp.musicbrainz.org/pub/musicbrainz/picard/picard-${version}.tar.gz";
sha256 = "0ds3ylpqn717fnzcjrfn05v5xram01bj6n3hwn9igmkd1jgf8vhc";
sha256 = "054a37q5828q59jzml4npkyczsp891d89kawgsif9kwpi0dxa06c";
};
buildInputs = [ gettext ];

View file

@ -86,6 +86,9 @@ let
license = with licenses; [ asl20 vim ];
maintainers = with maintainers; [ manveru garbas rvolosatovs ];
platforms = platforms.unix;
# `lua: bad light userdata pointer`
# https://nix-cache.s3.amazonaws.com/log/9ahcb52905d9d417zsskjpc331iailpq-neovim-unwrapped-0.2.2.drv
broken = stdenv.isAarch64;
};
};

View file

@ -6,7 +6,7 @@
, qtbase
, qtxmlpatterns
, qtsvg
, qtwebkit
, qtwebengine
, kcalcore
, kconfigwidgets
@ -84,7 +84,7 @@ mkDerivation rec {
qtbase
qtxmlpatterns
qtsvg
qtwebkit
qtwebengine
kcalcore
kconfigwidgets
@ -105,6 +105,7 @@ mkDerivation rec {
"-DENABLE_MYSQLSUPPORT=1"
"-DENABLE_INTERNALMYSQL=1"
"-DENABLE_MEDIAPLAYER=1"
"-DENABLE_QWEBENGINE=on"
];
preFixup = ''

View file

@ -39,6 +39,10 @@ stdenv.mkDerivation rec {
#doCheck = false;
NIX_CFLAGS_COMPILE = [
"-Wno-deprecated-declarations"
];
meta = with stdenv.lib; {
description = "A 3D editor with support for procedural editing";
homepage = http://www.k-3d.org/;

View file

@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
] ++ stdenv.lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch;
prePatch = ''
sed -i "/pyqt_sip_dir/ s:=.*:= '${python2Packages.pyqt5}/share/sip/PyQt5':" \
sed -i "/pyqt_sip_dir/ s:=.*:= '${python2Packages.pyqt5_with_qtwebkit}/share/sip/PyQt5':" \
setup/build_environment.py
# Remove unneeded files and libs
@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
fontconfig podofo qtbase chmlib icu sqlite libusb1 libmtp xdg_utils wrapGAppsHook
] ++ (with python2Packages; [
apsw cssselect cssutils dateutil dnspython html5-parser lxml mechanize netifaces pillow
python pyqt5 sip
python pyqt5_with_qtwebkit sip
regex msgpack
# the following are distributed with calibre, but we use upstream instead
odfpy

View file

@ -4,11 +4,11 @@ with stdenv.lib;
stdenv.mkDerivation rec {
name = "cherrytree-${version}";
version = "0.38.6";
version = "0.38.7";
src = fetchurl {
url = "https://www.giuspen.com/software/${name}.tar.xz";
sha256 = "0b83ygv0y4lrclsyagmllkwiia62xkwij14i6z53avba191jvhma";
sha256 = "1ls7vz993hj5gd99imlrzahxznfg6fa4n77ikkj79va4csw9b892";
};
buildInputs = with pythonPackages;

View file

@ -2,14 +2,14 @@
, qtquickcontrols, qtgraphicaleffects, qmake }:
stdenv.mkDerivation rec {
version = "1.0.1";
version = "1.1.0";
name = "cool-retro-term-${version}";
src = fetchFromGitHub {
owner = "Swordfish90";
repo = "cool-retro-term";
rev = version;
sha256 = "1ah54crqv13xsg9cvlwmgyhz90xjjy3vy8pbn9i0vc0ljmpgkqd5";
sha256 = "0gmigjpc19q7l94q4wzbrxh7cdb6zk3zscaijzwsz9364wsgzb47";
};
patchPhase = ''

View file

@ -9,7 +9,7 @@
let
inherit (pythonPackages) python buildPythonApplication;
in buildPythonApplication rec {
version = "5.0.0";
version = "5.0.1";
name = "gramps-${version}";
nativeBuildInputs = [ wrapGAppsHook ];
@ -27,7 +27,7 @@ in buildPythonApplication rec {
owner = "gramps-project";
repo = "gramps";
rev = "v${version}";
sha256 = "056l4ihmd3gdsiv6wwv4ckgh8bfzd5nii6z4afsdn2nmjbj4hw9m";
sha256 = "1jz1fbjj6byndvir7qxzhd2ryirrd5h2kwndxpp53xdc05z1i8g7";
};
pythonPath = with pythonPackages; [ bsddb3 PyICU pygobject3 pycairo ];

View file

@ -11,11 +11,11 @@ let
];
in
stdenv.mkDerivation rec {
version = "2.0.0";
version = "2.1.0";
name = "hyper-${version}";
src = fetchurl {
url = "https://github.com/zeit/hyper/releases/download/${version}/hyper_${version}_amd64.deb";
sha256 = "04241kjy65pnp5q9z901910rmvcx18x0qaqfl31i0l4c2xj83ws0";
sha256 = "0ss0ip6yc7sd8b1lx504nxckqmxjiqcz105wi3226nzyan489q3g";
};
buildInputs = [ dpkg ];
unpackPhase = ''

View file

@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, pkgconfig, freetype, harfbuzz, openjpeg
{ stdenv, lib, fetchurl, fetchpatch, pkgconfig, freetype, harfbuzz, openjpeg
, jbig2dec, libjpeg , darwin
, enableX11 ? true, libX11, libXext, libXi, libXrandr
, enableCurl ? true, curl, openssl
@ -24,7 +24,14 @@ in stdenv.mkDerivation rec {
patches =
# Use shared libraries to decrease size
stdenv.lib.optional (!stdenv.isDarwin) ./mupdf-1.14-shared_libs.patch
[( fetchpatch
{
name = "CVE-2018-18662";
url = "http://git.ghostscript.com/?p=mupdf.git;a=patch;h=164ddc22ee0d5b63a81d5148f44c37dd132a9356";
sha256 = "1jkzh20n3b854871h86cy5y7fvy0d5wyqy51b3fg6gj3a0jqpzzd";
}
)]
++ stdenv.lib.optional (!stdenv.isDarwin) ./mupdf-1.14-shared_libs.patch
++ stdenv.lib.optional stdenv.isDarwin ./darwin.patch
;

View file

@ -2,6 +2,8 @@
let
buildPlugin = args: python2Packages.buildPythonPackage (args // {
pname = "OctoPrintPlugin-${args.pname}";
inherit (args) version;
propagatedBuildInputs = (args.propagatedBuildInputs or []) ++ [ octoprint ];
# none of the following have tests
doCheck = false;
@ -13,7 +15,7 @@ let
m3d-fio = self.m33-fio; # added 2016-08-13
m33-fio = buildPlugin rec {
name = "M33-Fio-${version}";
pname = "M33-Fio";
version = "1.21";
src = fetchFromGitHub {
@ -36,16 +38,15 @@ let
'';
meta = with stdenv.lib; {
homepage = https://github.com/donovan6000/M33-Fio;
description = "OctoPrint plugin for the Micro 3D printer";
platforms = platforms.all;
homepage = https://github.com/donovan6000/M33-Fio;
license = licenses.gpl3;
maintainers = with maintainers; [ abbradar ];
};
};
mqtt = buildPlugin rec {
name = "OctoPrint-MQTT-${version}";
pname = "MQTT";
version = "0.8.0";
src = fetchFromGitHub {
@ -58,16 +59,15 @@ let
propagatedBuildInputs = with python2Packages; [ paho-mqtt ];
meta = with stdenv.lib; {
homepage = https://github.com/OctoPrint/OctoPrint-MQTT;
description = "Publish printer status MQTT";
platforms = platforms.all;
homepage = https://github.com/OctoPrint/OctoPrint-MQTT;
license = licenses.agpl3;
maintainers = with maintainers; [ peterhoeg ];
};
};
titlestatus = buildPlugin rec {
name = "OctoPrint-TitleStatus-${version}";
pname = "TitleStatus";
version = "0.0.4";
src = fetchFromGitHub {
@ -78,16 +78,15 @@ let
};
meta = with stdenv.lib; {
homepage = https://github.com/MoonshineSG/OctoPrint-TitleStatus;
description = "Show printers status in window title";
platforms = platforms.all;
homepage = https://github.com/MoonshineSG/OctoPrint-TitleStatus;
license = licenses.agpl3;
maintainers = with maintainers; [ abbradar ];
};
};
stlviewer = buildPlugin rec {
name = "OctoPrint-STLViewer-${version}";
pname = "STLViewer";
version = "0.4.1";
src = fetchFromGitHub {
@ -98,9 +97,8 @@ let
};
meta = with stdenv.lib; {
homepage = https://github.com/jneilliii/Octoprint-STLViewer;
description = "A simple stl viewer tab for OctoPrint";
platforms = platforms.all;
homepage = https://github.com/jneilliii/Octoprint-STLViewer;
license = licenses.agpl3;
maintainers = with maintainers; [ abbradar ];
};

View file

@ -1,4 +1,4 @@
{ cairo, cmake, fetchgit, libXdmcp, libpthreadstubs, libxcb, pcre, pkgconfig
{ cairo, cmake, fetchFromGitHub, libXdmcp, libpthreadstubs, libxcb, pcre, pkgconfig
, python2, stdenv, xcbproto, xcbutil, xcbutilcursor, xcbutilimage
, xcbutilrenderutil, xcbutilwm, xcbutilxrm, makeWrapper
@ -26,11 +26,13 @@ assert i3GapsSupport -> ! i3Support && jsoncpp != null && i3-gaps != null;
stdenv.mkDerivation rec {
name = "polybar-${version}";
version = "3.2.1";
src = fetchgit {
url = "https://github.com/jaagr/polybar";
version = "3.3.0";
src = fetchFromGitHub {
owner = "jaagr";
repo = "polybar";
rev = version;
sha256 = "1z45swj2l0h8x8li7prl963cgl6zm3birsswpij8qwcmjaj5l8vz";
sha256 = "18hrsbq62na2i4rlwbs2ih7v9shnayg76nw14i6az28wpf8kx4rr";
fetchSubmodules = true;
};
meta = with stdenv.lib; {

View file

@ -5,13 +5,13 @@
mkDerivation rec {
name = "qlcplus-${version}";
version = "4.11.2";
version = "4.12.0";
src = fetchFromGitHub {
owner = "mcallegari";
repo = "qlcplus";
rev = "QLC+_${version}";
sha256 = "0ry7j8d5mm3h3mzd49xqlagnldmfhfr6plwk73pz62hxr4j58s6w";
sha256 = "056ccgcz3rpbic2hqg4r1rq8svq7070j2h6l3hbb1p8h3qxwamzh";
};
nativeBuildInputs = [ qmake pkgconfig ];

View file

@ -1,19 +1,19 @@
{ stdenv, lib, fetchurl, dpkg, patchelf, qt4, libXtst, libXext, libX11, makeWrapper, libXScrnSaver }:
{ stdenv, lib, fetchurl, dpkg, patchelf, qt5, libXtst, libXext, libX11, makeWrapper, libXScrnSaver }:
let
src =
if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
name = "rescuetime-installer.deb";
url = "https://www.rescuetime.com/installers/rescuetime_current_i386.deb";
sha256 = "06q1jwqsrjvlj820dd4vl80jznwafsqshsg0p6si8qx4721blryz";
sha256 = "136ci4q0ns0qzikndlkbab947m47zv2nmnn8mda2374ip43kn6ri";
} else fetchurl {
name = "rescuetime-installer.deb";
url = "https://www.rescuetime.com/installers/rescuetime_current_amd64.deb";
sha256 = "0b56iglg8g45biddwsdn1hmx9gsz4kxr64civwyy7f69f022ppab";
sha256 = "1cw10lr7hrsr9xvq3wv1wkyk7jqsgfnnlkq4km9kxr39f51hv6na";
};
in stdenv.mkDerivation {
# https://www.rescuetime.com/updates/linux_release_notes.html
name = "rescuetime-2.10.0.1322";
name = "rescuetime-2.14.2.1";
inherit src;
buildInputs = [ dpkg makeWrapper ];
# avoid https://github.com/NixOS/patchelf/issues/99
@ -29,7 +29,7 @@ in stdenv.mkDerivation {
${patchelf}/bin/patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${lib.makeLibraryPath [ qt4 libXtst libXext libX11 libXScrnSaver ]}" \
--set-rpath "${lib.makeLibraryPath [ qt5.qtbase libXtst libXext libX11 libXScrnSaver ]}" \
$out/bin/rescuetime
'';
meta = with lib; {

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, fetchcvs, makeWrapper, makeDesktopItem, jdk, jre, ant
{ lib, stdenv, fetchurl, fetchsvn, makeWrapper, makeDesktopItem, jdk, jre, ant
, gtk3, gsettings-desktop-schemas, p7zip, libXxf86vm }:
let
@ -74,16 +74,15 @@ let
in rec {
application = mkSweetHome3D rec {
version = "5.4";
version = "6.0";
module = "SweetHome3D";
name = stdenv.lib.toLower module + "-application-" + version;
description = "Design and visualize your future home";
license = stdenv.lib.licenses.gpl2Plus;
src = fetchcvs {
cvsRoot = ":pserver:anonymous@sweethome3d.cvs.sourceforge.net:/cvsroot/sweethome3d";
sha256 = "09sk4svmaiw8dabcya3407iq5yjwxbss8pik1rzalrlds2428vyw";
module = module;
tag = "V_" + d2u version;
src = fetchsvn {
url = "https://svn.code.sf.net/p/sweethome3d/code/tags/V_" + d2u version + "/SweetHome3D/";
sha256 = "1l4kc1c2iwkggmcdb2wksb4vrh97ll804vc51yawhdlq9g567ky9";
rev = "6647";
};
desktopName = "Sweet Home 3D";
icons = {

View file

@ -1,6 +1,6 @@
{stdenv, fetchFromGitHub, pkgconfig, wrapGAppsHook, makeWrapper
,help2man, lua5, luafilesystem, luajit, sqlite
,webkitgtk, gtk3, gst_all_1}:
,webkitgtk, gtk3, gst_all_1, glib-networking}:
let
lualibs = [luafilesystem];
@ -27,7 +27,8 @@ in stdenv.mkDerivation rec {
gst_all_1.gstreamer gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good gst_all_1.gst-plugins-bad gst_all_1.gst-plugins-ugly
gst_all_1.gst-libav
];
glib-networking # TLS support
];
postPatch =
#Kind of ugly seds here. There must be a better solution.

View file

@ -4,7 +4,6 @@
, libxslt, gst_all_1 ? null
, withPdfReader ? true
, withMediaPlayback ? true
, withWebEngineDefault ? true
}:
assert withMediaPlayback -> gst_all_1 != null;
@ -39,7 +38,7 @@ in python3Packages.buildPythonApplication rec {
] ++ lib.optionals withMediaPlayback (with gst_all_1; [
gst-plugins-base gst-plugins-good
gst-plugins-bad gst-plugins-ugly gst-libav
]) ++ lib.optional (!withWebEngineDefault) python3Packages.qtwebkit-plugins;
]);
nativeBuildInputs = [
makeWrapper wrapGAppsHook asciidoc
@ -90,10 +89,6 @@ in python3Packages.buildPythonApplication rec {
done
'';
postFixup = lib.optionalString (! withWebEngineDefault) ''
wrapProgram $out/bin/qutebrowser --add-flags "--backend webkit"
'';
meta = with stdenv.lib; {
homepage = https://github.com/The-Compiler/qutebrowser;
description = "Keyboard-focused browser with a minimal GUI";

View file

@ -7,7 +7,7 @@ assert lib.elem stdenv.hostPlatform.system platforms;
# Dropbox client to bootstrap installation.
# The client is self-updating, so the actual version may be newer.
let
version = "55.4.171";
version = "63.4.107";
arch = {
"x86_64-linux" = "x86_64";

View file

@ -1,15 +1,17 @@
{ stdenv, fetchurl, stfl, sqlite, curl, gettext, pkgconfig, libxml2, json_c, ncurses
, asciidoc, docbook_xml_dtd_45, libxslt, docbook_xsl, libiconv, makeWrapper }:
{ stdenv, rustPlatform, fetchurl, stfl, sqlite, curl, gettext, pkgconfig, libxml2, json_c, ncurses
, asciidoc, docbook_xml_dtd_45, libxslt, docbook_xsl, libiconv, Security, makeWrapper }:
stdenv.mkDerivation rec {
rustPlatform.buildRustPackage rec {
name = "newsboat-${version}";
version = "2.13";
version = "2.14";
src = fetchurl {
url = "https://newsboat.org/releases/${version}/${name}.tar.xz";
sha256 = "0pik1d98ydzqi6055vdbkjg5krwifbk2hy2f5jp5p1wcy2s16dn7";
sha256 = "13bdwnwxa66c69lqhb02basff0aa6q1jhl7fgahcxmdy7snbmg37";
};
cargoSha256 = "11s50qy1b833r2b5kr1wx9imi9h7s00c0hs36ricgbd0xw7n76hd";
prePatch = ''
substituteInPlace Makefile --replace "|| true" ""
# Allow other ncurses versions on Darwin
@ -18,18 +20,25 @@ stdenv.mkDerivation rec {
'';
nativeBuildInputs = [ pkgconfig asciidoc docbook_xml_dtd_45 libxslt docbook_xsl ]
++ stdenv.lib.optional stdenv.isDarwin [ makeWrapper libiconv ];
++ stdenv.lib.optional stdenv.isDarwin [ makeWrapper libiconv ];
buildInputs = [ stfl sqlite curl gettext libxml2 json_c ncurses ];
buildInputs = [ stfl sqlite curl gettext libxml2 json_c ncurses ]
++ stdenv.lib.optional stdenv.isDarwin Security;
makeFlags = [ "prefix=$(out)" ];
doCheck = true;
checkTarget = "test";
postBuild = ''
make
'';
NIX_CFLAGS_COMPILE = "-Wno-error=sign-compare";
doCheck = true;
checkPhase = ''
make test
'';
postInstall = ''
make prefix="$out" install
cp -r contrib $out
'' + stdenv.lib.optionalString stdenv.isDarwin ''
for prog in $out/bin/*; do

View file

@ -16,7 +16,7 @@ pythonPackages.buildPythonApplication rec {
sed -i 's|@out@|'"''${out}"'|g' blink/resources.py
'';
propagatedBuildInputs = with pythonPackages; [ pyqt5 cjson sipsimple twisted google_api_python_client ];
propagatedBuildInputs = with pythonPackages; [ pyqt5_with_qtwebkit cjson sipsimple twisted google_api_python_client ];
buildInputs = [ pythonPackages.cython zlib libvncserver libvpx ];

View file

@ -2,22 +2,18 @@
stdenv.mkDerivation rec {
name = "purple-hangouts-hg-${version}";
version = "2018-03-28";
version = "2018-12-02";
src = fetchhg {
url = "https://bitbucket.org/EionRobb/purple-hangouts/";
rev = "0e137e6bf9e95c5a0bd282f3ad4a5bd00a6968ab";
sha256 = "04vjgz6qyd9ilv1c6n08r45vc683vxs1rgfwhh65pag6q4rbzlb9";
rev = "cccf2f6";
sha256 = "1zd1rlzqvw1zkb0ydyz039n3xa1kv1f20a4l6rkm9a8sp6rpf3pi";
};
buildInputs = [ pidgin glib json-glib protobuf protobufc ];
installPhase = ''
install -Dm755 -t $out/lib/pidgin/ libhangouts.so
for size in 16 22 24 48; do
install -TDm644 hangouts$size.png $out/share/pixmaps/pidgin/protocols/$size/hangouts.png
done
'';
PKG_CONFIG_PURPLE_PLUGINDIR = "${placeholder "out"}/lib/purple-2";
PKG_CONFIG_PURPLE_DATADIR = "${placeholder "out"}/share";
meta = with stdenv.lib; {
homepage = https://bitbucket.org/EionRobb/purple-hangouts;

View file

@ -9,7 +9,7 @@ in python3Packages.buildPythonPackage {
sha256 = "e0d1cb72115d0fda17db92d28be51558ad8fe250972683fac3086dbe8d350d22";
};
propagatedBuildInputs = with python3Packages; [ pyqt5 dbus-python jsmin ];
propagatedBuildInputs = with python3Packages; [ pyqt5_with_qtwebkit dbus-python jsmin ];
meta = with stdenv.lib; {
description = "Non-official desktop client for Slack";

View file

@ -4,7 +4,7 @@
, tag ? "" # tag added to the package name
, static ? false # link statically
, stdenv, fetchurl, cmake, makeWrapper, dconf
, stdenv, fetchFromGitHub, cmake, makeWrapper, dconf
, qtbase, qtscript
, phonon, libdbusmenu, qca-qt5
@ -30,12 +30,17 @@ assert !buildClient -> !withKDE; # KDE is used by the client only
let
edf = flag: feature: [("-D" + feature + (if flag then "=ON" else "=OFF"))];
source = import ./source.nix { inherit fetchurl; };
in with stdenv; mkDerivation rec {
inherit (source) src version;
name = "quassel${tag}-${version}";
version = "0.13.0";
src = fetchFromGitHub {
owner = "quassel";
repo = "quassel";
rev = version;
sha256 = "1jnmc0xky91h81xjjgwg5zylfns0f1pvjy2rv39wlah890k143zr";
};
enableParallelBuilding = true;
@ -71,8 +76,6 @@ in with stdenv; mkDerivation rec {
--prefix GIO_EXTRA_MODULES : "${dconf}/lib/gio/modules"
'';
patches = [ ./qt5_11.patch ];
meta = with stdenv.lib; {
homepage = https://quassel-irc.org/;
description = "Qt/KDE distributed IRC client suppporting a remote daemon";
@ -83,7 +86,7 @@ in with stdenv; mkDerivation rec {
combination of screen and a text-based IRC client such
as WeeChat, but graphical (based on Qt4/KDE4 or Qt5/KF5).
'';
license = stdenv.lib.licenses.gpl3;
license = licenses.gpl3;
maintainers = with maintainers; [ phreedom ttuegel ];
repositories.git = https://github.com/quassel/quassel.git;
inherit (qtbase.meta) platforms;

View file

@ -1,72 +0,0 @@
From 92f4dca367c3a6f0536a1e0f3fbb44bb6ed4da62 Mon Sep 17 00:00:00 2001
From: Manuel Nickschas <sputnick@quassel-irc.org>
Date: Thu, 3 May 2018 23:19:34 +0200
Subject: [PATCH] cmake: Fix build with Qt 5.11
Qt 5.11 removes the qt5_use_modules function, so add a copy. If
present, the Qt-provided function will be used instead.
Closes GH-355.
---
cmake/QuasselMacros.cmake | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/cmake/QuasselMacros.cmake b/cmake/QuasselMacros.cmake
index 652c0042..d77ba1cf 100644
--- a/cmake/QuasselMacros.cmake
+++ b/cmake/QuasselMacros.cmake
@@ -5,6 +5,9 @@
# The qt4_use_modules function was taken from CMake's Qt4Macros.cmake:
# (C) 2005-2009 Kitware, Inc.
#
+# The qt5_use_modules function was taken from Qt 5.10.1 (and modified):
+# (C) 2005-2011 Kitware, Inc.
+#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
@@ -43,6 +46,41 @@ function(qt4_use_modules _target _link_type)
endforeach()
endfunction()
+# Qt 5.11 removed the qt5_use_modules function, so we need to provide it until we can switch to a modern CMake version.
+# If present, the Qt-provided version will be used automatically instead.
+function(qt5_use_modules _target _link_type)
+ if (NOT TARGET ${_target})
+ message(FATAL_ERROR "The first argument to qt5_use_modules must be an existing target.")
+ endif()
+ if ("${_link_type}" STREQUAL "LINK_PUBLIC" OR "${_link_type}" STREQUAL "LINK_PRIVATE" )
+ set(_qt5_modules ${ARGN})
+ set(_qt5_link_type ${_link_type})
+ else()
+ set(_qt5_modules ${_link_type} ${ARGN})
+ endif()
+
+ if ("${_qt5_modules}" STREQUAL "")
+ message(FATAL_ERROR "qt5_use_modules requires at least one Qt module to use.")
+ endif()
+ foreach(_module ${_qt5_modules})
+ if (NOT Qt5${_module}_FOUND)
+ find_package(Qt5${_module} PATHS "${_Qt5_COMPONENT_PATH}" NO_DEFAULT_PATH)
+ if (NOT Qt5${_module}_FOUND)
+ message(FATAL_ERROR "Can not use \"${_module}\" module which has not yet been found.")
+ endif()
+ endif()
+ target_link_libraries(${_target} ${_qt5_link_type} ${Qt5${_module}_LIBRARIES})
+ set_property(TARGET ${_target} APPEND PROPERTY INCLUDE_DIRECTORIES ${Qt5${_module}_INCLUDE_DIRS})
+ set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS ${Qt5${_module}_COMPILE_DEFINITIONS})
+ if (Qt5_POSITION_INDEPENDENT_CODE
+ AND (CMAKE_VERSION VERSION_LESS 2.8.12
+ AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
+ OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)))
+ set_property(TARGET ${_target} PROPERTY POSITION_INDEPENDENT_CODE ${Qt5_POSITION_INDEPENDENT_CODE})
+ endif()
+ endforeach()
+endfunction()
+
# Some wrappers for simplifying dual-Qt support
function(qt_use_modules)
--
2.16.2

View file

@ -1,9 +0,0 @@
{ fetchurl }:
rec {
version = "0.12.5";
src = fetchurl {
url = "https://github.com/quassel/quassel/archive/${version}.tar.gz";
sha256 = "04f42x87a4wkj3va3wnmj2jl7ikqqa7d7nmypqpqwalzpzk7kxwv";
};
}

View file

@ -31,11 +31,11 @@ with stdenv.lib;
stdenv.mkDerivation rec {
name = "claws-mail-${version}";
version = "3.17.1";
version = "3.17.2";
src = fetchurl {
url = "http://www.claws-mail.org/download.php?file=releases/claws-mail-${version}.tar.xz";
sha256 = "1wknxbwyzm5xjh3cqmddcxmvp1rkp301qga5n5rgfi7vcd0myyvm";
sha256 = "1hb17kpvfl8f1y49zan0wvf4awapxg13bqbqwrbhq2n4xp445kr5";
};
outputs = [ "out" "dev" ];

View file

@ -1,15 +1,28 @@
--- a/src/procmime.c 2015-10-01 23:02:16.629908590 -0700
+++ b/src/procmime.c 2015-10-01 23:02:46.932001337 -0700
@@ -1196,11 +1196,7 @@
diff --git a/src/procmime.c b/src/procmime.c
index bd3239e..06a3b26 100644
--- a/src/procmime.c
+++ b/src/procmime.c
@@ -1144,20 +1144,16 @@ GList *procmime_get_mime_type_list(void)
MimeType *mime_type;
gboolean fp_is_glob_file = TRUE;
if (mime_type_list)
return mime_type_list;
-
-#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
- if ((fp = procmime_fopen(DATAROOTDIR "/mime/globs", "rb")) == NULL)
- if ((fp = claws_fopen(DATAROOTDIR "/mime/globs", "rb")) == NULL)
-#else
- if ((fp = procmime_fopen("/usr/share/mime/globs", "rb")) == NULL)
- if ((fp = claws_fopen("/usr/share/mime/globs", "rb")) == NULL)
-#endif
+ if ((fp = procmime_fopen("@MIMEROOTDIR@/mime/globs", "rb")) == NULL)
+
+ if ((fp = claws_fopen("@MIMEROOTDIR@/mime/globs", "rb")) == NULL)
{
fp_is_glob_file = FALSE;
if ((fp = procmime_fopen("/etc/mime.types", "rb")) == NULL) {
if ((fp = claws_fopen("/etc/mime.types", "rb")) == NULL) {
if ((fp = claws_fopen(SYSCONFDIR "/mime.types", "rb"))
== NULL) {
FILE_OP_ERROR(SYSCONFDIR "/mime.types",
"claws_fopen");
return NULL;
}

View file

@ -2,16 +2,16 @@
rustPlatform.buildRustPackage rec {
name = "synapse-bt-unstable-${version}";
version = "2018-06-04";
version = "2018-10-17";
src = fetchFromGitHub {
owner = "Luminarys";
repo = "synapse";
rev = "ec8f23a14af21426ab0c4f8953dd954f747850ab";
sha256 = "0d1rrwnk333zz9g8s40i75xgdkpz6a1j01ajsh32yvzvbi045zkw";
rev = "76d5e9a23ad00c25cfd0469b1adb479b9ded113a";
sha256 = "1lsfvcsmbsg51v8c2hkpwkx0zg25sdjc3q7x72b5bwwnw9l0iglz";
};
cargoSha256 = "1psrmgf6ddzqwx7gf301rx84asfnvxpsvkx2fan453v65819k960";
cargoSha256 = "1sc8c0w2dbvcdv16idw02y35x0jx5ff6ddzij09pmqjx55zgsjf7";
buildInputs = [ pkgconfig openssl ] ++ stdenv.lib.optional stdenv.isDarwin Security;

View file

@ -2,7 +2,7 @@
buildGoPackage rec {
name = "desync-${version}";
version = "0.3.0";
version = "0.4.0";
rev = "v${version}";
goPackagePath = "github.com/folbricht/desync";
@ -11,7 +11,7 @@ buildGoPackage rec {
inherit rev;
owner = "folbricht";
repo = "desync";
sha256 = "1h2i6ai7q1mg2ysd3cnas96rb8g0bpp1v3hh7ip9nrfxhlplyyda";
sha256 = "17qh0g1paa7212j761q9z246k10a3xrwd8fgiizw3lr9adn50kdk";
};
goDeps = ./deps.nix;
@ -21,7 +21,7 @@ buildGoPackage rec {
longDescription = "An alternate implementation of the casync protocol and storage mechanism with a focus on production-readiness";
homepage = https://github.com/folbricht/desync;
license = licenses.bsd3;
platforms = platforms.unix; # windows temporarily broken in 0.3.0 release
platforms = platforms.unix; # *may* work on Windows, but varies between releases.
maintainers = [ maintainers.chaduffy ];
};
}

View file

@ -1,129 +1,312 @@
# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
[
{
goPackagePath = "github.com/datadog/zstd";
fetch = {
type = "git";
url = "https://github.com/datadog/zstd";
rev = "940731c8fc259059120b0e617a69d54dcd7c3eee";
sha256 = "04nmljnk54xm2k4ydhdiidazk3765jk8h4hvcsymkrsggrfyrjfx";
rev = "v1.3.4";
sha256 = "06wphl43ji23c0cmmm6fd3wszbwq36mdp1jarak2a6hmxl6yf0b8";
};
}
{
goPackagePath = "github.com/davecgh/go-spew";
fetch = {
type = "git";
url = "https://github.com/davecgh/go-spew";
rev = "v1.1.1";
sha256 = "0hka6hmyvp701adzag2g26cxdj47g21x6jz4sc6jjz1mn59d474y";
};
}
{
goPackagePath = "github.com/dchest/siphash";
fetch = {
type = "git";
url = "https://github.com/dchest/siphash";
rev = "34f201214d993633bb24f418ba11736ab8b55aa7";
sha256 = "08s076y7vmjqnq7jz0762hkm896r6r31v8b31a3gy0n8rfa01k8k";
rev = "v1.2.0";
sha256 = "01qhv9zd9l6p7pwf1fj022mp9s5496rk4lnm3yvpjsiwp6k4af8c";
};
}
{
goPackagePath = "github.com/fatih/color";
fetch = {
type = "git";
url = "https://github.com/fatih/color";
rev = "v1.7.0";
sha256 = "0v8msvg38r8d1iiq2i5r4xyfx0invhc941kjrsg5gzwvagv55inv";
};
}
{
goPackagePath = "github.com/folbricht/tempfile";
fetch = {
type = "git";
url = "https://github.com/folbricht/tempfile";
rev = "ee190cb5934293f187a9d43ee34de7d5cf9ceb83";
rev = "v0.0.1";
sha256 = "0vz08qvbniqxc24vhmcbq5ncnz97ncp4jbxgcf0hziazxfp114z3";
};
}
{
goPackagePath = "github.com/go-ini/ini";
fetch = {
type = "git";
url = "https://github.com/go-ini/ini";
rev = "fa25069db393aecc09b71267d0489b357781c860";
sha256 = "0fs1c48hni5gc1fyz65d138jpmqm1sqpb7vw5vhx0j6lmj1nf45z";
rev = "v1.38.2";
sha256 = "0xbnw1nd22q6k863n5gs0nxld15w0p8qxbhfky85akcb5rk1vwi9";
};
}
{
goPackagePath = "github.com/gopherjs/gopherjs";
fetch = {
type = "git";
url = "https://github.com/gopherjs/gopherjs";
rev = "0210a2f0f73c";
sha256 = "1n80xjfc1dkxs8h8mkpw83n89wi5n7hzc3rxhwjs76rkxpq3rc9j";
};
}
{
goPackagePath = "github.com/hanwen/go-fuse";
fetch = {
type = "git";
url = "https://github.com/hanwen/go-fuse";
rev = "1d35017e97018335f348413b3aeed67468d80f7b";
rev = "1d35017e9701";
sha256 = "11rggvkd6lc5lcpsfvc9iip4z9cingzpkpshaskv2cirbxdynyi8";
};
}
{
goPackagePath = "github.com/inconshreveable/mousetrap";
fetch = {
type = "git";
url = "https://github.com/inconshreveable/mousetrap";
rev = "v1.0.0";
sha256 = "1mn0kg48xkd74brf48qf5hzp0bc6g8cf5a77w895rl3qnlpfw152";
};
}
{
goPackagePath = "github.com/jtolds/gls";
fetch = {
type = "git";
url = "https://github.com/jtolds/gls";
rev = "v4.2.1";
sha256 = "1vm37pvn0k4r6d3m620swwgama63laz8hhj3pyisdhxwam4m2g1h";
};
}
{
goPackagePath = "github.com/kr/fs";
fetch = {
type = "git";
url = "https://github.com/kr/fs";
rev = "1455def202f6e05b95cc7bfc7e8ae67ae5141eba";
rev = "v0.1.0";
sha256 = "11zg176x9hr9q7fsk95r6q0wf214gg4czy02slax4x56n79g6a7q";
};
}
{
goPackagePath = "github.com/mattn/go-colorable";
fetch = {
type = "git";
url = "https://github.com/mattn/go-colorable";
rev = "v0.0.9";
sha256 = "1nwjmsppsjicr7anq8na6md7b1z84l9ppnlr045hhxjvbkqwalvx";
};
}
{
goPackagePath = "github.com/mattn/go-isatty";
fetch = {
type = "git";
url = "https://github.com/mattn/go-isatty";
rev = "v0.0.4";
sha256 = "0zs92j2cqaw9j8qx1sdxpv3ap0rgbs0vrvi72m40mg8aa36gd39w";
};
}
{
goPackagePath = "github.com/mattn/go-runewidth";
fetch = {
type = "git";
url = "https://github.com/mattn/go-runewidth";
rev = "v0.0.3";
sha256 = "0lc39b6xrxv7h3v3y1kgz49cgi5qxwlygs715aam6ba35m48yi7g";
};
}
{
goPackagePath = "github.com/minio/minio-go";
fetch = {
type = "git";
url = "https://github.com/minio/minio-go";
rev = "f01ef22c977052d716c74724874f932a16f047bb";
sha256 = "0pn1likcwnzb2j4hi4r1ib3xlp31h2vgwyc7xnm1iv7f8l4gk2hc";
rev = "v6.0.6";
sha256 = "0bgivqw1n1189lksp85djw1rqcan2axyh4jv9q54iclrjkpbab37";
};
}
{
goPackagePath = "github.com/mitchellh/go-homedir";
fetch = {
type = "git";
url = "https://github.com/mitchellh/go-homedir";
rev = "ae18d6b8b3205b561c79e8e5f69bff09736185f4";
rev = "v1.0.0";
sha256 = "0f0z0aa4wivk4z1y503dmnw0k0g0g403dly8i4q263gfshs82sbq";
};
}
{
goPackagePath = "github.com/pkg/errors";
fetch = {
type = "git";
url = "https://github.com/pkg/errors";
rev = "c059e472caf75dbe73903f6521a20abac245b17f";
sha256 = "07xg8ym776j2w0k8445ii82lx8yz358cp1z96r739y13i1anqdzi";
rev = "v0.8.0";
sha256 = "001i6n71ghp2l6kdl3qq1v2vmghcz3kicv9a5wgcihrzigm75pp5";
};
}
{
goPackagePath = "github.com/pkg/sftp";
fetch = {
type = "git";
url = "https://github.com/pkg/sftp";
rev = "08de04f133f27844173471167014e1a753655ac8";
sha256 = "090q4xmjbllwl3rpj1hzp0iw3qw1yvp6r3kf5cgw44ai57z96271";
rev = "v1.8.2";
sha256 = "040flbir6sv213xzs75vkd5fd7bmm3fqxfcnsx8fr77zkn52hm4m";
};
}
{
goPackagePath = "github.com/pmezard/go-difflib";
fetch = {
type = "git";
url = "https://github.com/pmezard/go-difflib";
rev = "v1.0.0";
sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw";
};
}
{
goPackagePath = "github.com/smartystreets/assertions";
fetch = {
type = "git";
url = "https://github.com/smartystreets/assertions";
rev = "7c9eb446e3cf";
sha256 = "1dix6qgaj6kw38hicy3zs3lvacl1kn0n267b3xw0vvdkqf1v0395";
};
}
{
goPackagePath = "github.com/smartystreets/goconvey";
fetch = {
type = "git";
url = "https://github.com/smartystreets/goconvey";
rev = "ef6db91d284a";
sha256 = "16znlpsms8z2qc3airawyhzvrzcp70p9bx375i19bg489hgchxb7";
};
}
{
goPackagePath = "github.com/spf13/cobra";
fetch = {
type = "git";
url = "https://github.com/spf13/cobra";
rev = "v0.0.3";
sha256 = "1q1nsx05svyv9fv3fy6xv6gs9ffimkyzsfm49flvl3wnvf1ncrkd";
};
}
{
goPackagePath = "github.com/spf13/pflag";
fetch = {
type = "git";
url = "https://github.com/spf13/pflag";
rev = "v1.0.2";
sha256 = "005598piihl3l83a71ahj10cpq9pbhjck4xishx1b4dzc02r9xr2";
};
}
{
goPackagePath = "github.com/stretchr/testify";
fetch = {
type = "git";
url = "https://github.com/stretchr/testify";
rev = "v1.2.2";
sha256 = "0dlszlshlxbmmfxj5hlwgv3r22x0y1af45gn1vd198nvvs3pnvfs";
};
}
{
goPackagePath = "golang.org/x/crypto";
fetch = {
type = "git";
url = "https://go.googlesource.com/crypto";
rev = "0e37d006457bf46f9e6692014ba72ef82c33022c";
sha256 = "1fj8rvrhgv5j8pmckzphvm3sqkzhcqp3idkxvgv13qrjdfycsa5r";
rev = "0709b304e793";
sha256 = "0i05s09y5pavmfh71fgih7syxg58x7a4krgd8am6d3mnahnmab5c";
};
}
{
goPackagePath = "golang.org/x/net";
fetch = {
type = "git";
url = "https://go.googlesource.com/net";
rev = "2f5d2388922f370f4355f327fcf4cfe9f5583908";
sha256 = "03s92ygxfrd2c1m4697sd6iksgbar6c007w1yf3h6wmd79vr5dxs";
rev = "161cd47e91fd";
sha256 = "0254ld010iijygbzykib2vags1dc0wlmcmhgh4jl8iny159lhbcv";
};
}
{
goPackagePath = "golang.org/x/sync";
fetch = {
type = "git";
url = "https://go.googlesource.com/sync";
rev = "1d60e4601c6f";
sha256 = "046jlanz2lkxq1r57x9bl6s4cvfqaic6p2xybsj8mq1120jv4rs6";
};
}
{
goPackagePath = "golang.org/x/sys";
fetch = {
type = "git";
url = "https://go.googlesource.com/sys";
rev = "d47a0f3392421c5624713c9a19fe781f651f8a50";
sha256 = "01dqcv7vnynwhlmb28fn50svjb9kfj04nk7frvf7mh4jd3qnrsnv";
rev = "49385e6e1522";
sha256 = "0spbldahns09fdxkxflb1x24f8k2awdlnr6k5i7ci4fqd19r1dv4";
};
}
{
goPackagePath = "golang.org/x/text";
fetch = {
type = "git";
url = "https://go.googlesource.com/text";
rev = "905a57155faa8230500121607930ebb9dd8e139c";
sha256 = "1qlvvb44j9ss3mkb5035i20xsd6sm0n05sqpqbi8gjw64g086zcb";
rev = "v0.3.0";
sha256 = "0r6x6zjzhr8ksqlpiwm5gdd7s209kwk5p4lw54xjvz10cs3qlq19";
};
}
{
goPackagePath = "gopkg.in/cheggaaa/pb.v1";
fetch = {
type = "git";
url = "https://gopkg.in/cheggaaa/pb.v1";
rev = "v1.0.25";
sha256 = "0vxqiw6f3xyv0zy3g4lksf8za0z8i0hvfpw92hqimsy84f79j3dp";
};
}
{
goPackagePath = "gopkg.in/ini.v1";
fetch = {
type = "git";
url = "https://gopkg.in/ini.v1";
rev = "v1.38.2";
sha256 = "0xbnw1nd22q6k863n5gs0nxld15w0p8qxbhfky85akcb5rk1vwi9";
};
}
]

View file

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
name = "iverilog-${version}";
version = "2017.08.12";
version = "2018.12.15";
src = fetchFromGitHub {
owner = "steveicarus";
repo = "iverilog";
rev = "ac87138c44cd6089046668c59a328b4d14c16ddc";
sha256 = "1npv0533h0h2wxrxkgiaxqiasw2p4kj2vv5bd69w5xld227xcwpg";
rev = "7cd078e7ab184069b3b458fe6df7e83962254816";
sha256 = "1zc7lsa77dbsxjfz7vdgclmg97r0kw08xss7yfs4vyv5v5gnn98d";
};
patchPhase = ''

View file

@ -2,17 +2,17 @@
stdenv.mkDerivation rec {
name = "why3-${version}";
version = "1.1.0";
version = "1.1.1";
src = fetchurl {
url = https://gforge.inria.fr/frs/download.php/file/37767/why3-1.1.0.tar.gz;
sha256 = "199ziq8mv3r24y3dd1n2r8k2gy09p7kdyyhkg9qn1vzfd2fxwzc1";
url = https://gforge.inria.fr/frs/download.php/file/37842/why3-1.1.1.tar.gz;
sha256 = "065ix1ill009bxg7w27s8wq47vn03vbr63hsaa79arv31d96izny";
};
buildInputs = (with ocamlPackages; [
ocaml findlib num lablgtk ocamlgraph zarith menhir ]) ++
stdenv.lib.optionals (ocamlPackages.ocaml == coq.ocaml ) [
coq coq.camlp5
stdenv.lib.optionals (ocamlPackages.ocaml == coq.ocamlPackages.ocaml ) [
coq ocamlPackages.camlp5
];
installTargets = [ "install" "install-lib" ];

View file

@ -1,6 +1,8 @@
{ stdenv
, lib
, fetchurl
, fetchpatch
, makeWrapper
, m4
, gmp
# don't remove any packages -- results in a ~1.3G size increase
@ -11,24 +13,17 @@
stdenv.mkDerivation rec {
pname = "gap";
# https://www.gap-system.org/Releases/
# newer versions (4.9.0) are available, but still considered beta (https://github.com/gap-system/gap/wiki/GAP-4.9-release-notes)
version = "4r8p10";
pkgVer = "2018_01_15-13_02";
name = "${pname}-${version}";
version = "4.10.0";
src = let
# 4r8p10 -> 48
majorminor = stdenv.lib.replaceStrings ["r"] [""] (
builtins.head (stdenv.lib.splitString "p" version) # 4r8p10 -> 4r8
);
in
fetchurl {
url = "https://www.gap-system.org/pub/gap/gap${majorminor}/tar.bz2/gap${version}_${pkgVer}.tar.bz2";
sha256 = "0wzfdjnn6sfiaizbk5c7x44rhbfayis4lf57qbqqg84c7dqlwr6f";
src = fetchurl {
url = "https://www.gap-system.org/pub/gap/gap-${lib.versions.major version}.${lib.versions.minor version}/tar.bz2/gap-${version}.tar.bz2";
sha256 = "1dmb8v4p7j1nnf7sx8sg54b49yln36bi9acwp7w1d3a1nxj17ird";
};
# remove all non-essential packages (which take up a lot of space)
preConfigure = stdenv.lib.optionalString (!keepAllPackages) ''
preConfigure = ''
patchShebangs .
'' + lib.optionalString (!keepAllPackages) ''
find pkg -type d -maxdepth 1 -mindepth 1 \
-not -name 'GAPDoc-*' \
-not -name 'autpgrp*' \
@ -37,26 +32,63 @@ stdenv.mkDerivation rec {
'';
configureFlags = [ "--with-gmp=system" ];
buildInputs = [ m4 gmp ];
buildInputs = [
m4
gmp
];
nativeBuildInputs = [
makeWrapper
];
patches = [
# fix infinite loop in writeandcheck() when writing an error message fails.
# bugfix: https://github.com/gap-system/gap/pull/3102
(fetchpatch {
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/gap/patches/writeandcheck.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
sha256 = "1r1511x4kc2i2mbdq1b61rb6p3misvkf1v5qy3z6fmn6vqwziaz1";
name = "fix-infinite-loop-in-writeandcheck.patch";
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/gap/patches/0001-a-version-of-the-writeandcheck.patch-from-Sage-that-.patch?id=5e61d7b6a0da3aa53d8176fa1fb9353cc559b098";
sha256 = "1zkv8bbiw3jdn54sqqvfkdkfsd7jxzq0bazwsa14g4sh2265d28j";
})
# needed for libgap (sage): https://github.com/gap-system/gap/pull/3043
(fetchpatch {
name = "add-error-messages-helper.patch";
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/gap/patches/0002-kernel-add-helper-function-for-writing-error-message.patch?id=5e61d7b6a0da3aa53d8176fa1fb9353cc559b098";
sha256 = "0c4ry5znb6hwwp8ld6k62yw8w6cqldflw3x49bbzizbmipfpidh5";
})
# needed for libgap (sage): https://github.com/gap-system/gap/pull/3096
(fetchpatch {
name = "gap-enter.patch";
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/gap/patches/0003-Prototype-for-GAP_Enter-Leave-macros-to-bracket-use-.patch?id=5e61d7b6a0da3aa53d8176fa1fb9353cc559b098";
sha256 = "12fg8mb8rm6khsz1r4k3k26jrkx4q1rv13hcrfnlhn0m7iikvc3q";
})
];
doCheck = true;
checkTarget = "testinstall";
# "teststandard" is a superset of testinstall. It takes ~1h instead of ~1min.
# tests are run twice, once with all packages loaded and once without
# checkTarget = "teststandard";
preCheck = ''
doInstallCheck = true;
installCheckTarget = "testinstall";
preInstallCheck = ''
# gap tests check that the home directory exists
export HOME="$TMP/gap-home"
mkdir -p "$HOME"
# make sure gap is in PATH
export PATH="$out/bin:$PATH"
# make sure we don't accidentally use the wrong gap binary
rm -r bin
# like the defaults the Makefile, but use gap from PATH instead of the
# one from builddir
installCheckFlagsArray+=(
"TESTGAP=gap --quitonbreak -b -m 100m -o 1g -q -x 80 -r -A"
"TESTGAPauto=gap --quitonbreak -b -m 100m -o 1g -q -x 80 -r"
)
'';
postCheck = ''
@ -78,14 +110,20 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p "$out/bin" "$out/share/gap/"
cp -r . "$out/share/gap/build-dir"
mkdir -p "$out/share/gap"
echo "Copying files to target directory"
cp -ar . "$out/share/gap/build-dir"
sed -e "/GAP_DIR=/aGAP_DIR='$out/share/gap/build-dir/'" -i "$out/share/gap/build-dir/bin/gap.sh"
ln -s "$out/share/gap/build-dir/bin/gap.sh" "$out/bin/gap"
makeWrapper "$out/share/gap/build-dir/bin/gap.sh" "$out/bin/gap" \
--set GAP_DIR $out/share/gap/build-dir
'';
meta = with stdenv.lib; {
preFixup = ''
# patchelf won't strip references to the build dir if it still exists
rm -rf pkg
'';
meta = with lib; {
description = "Computational discrete algebra system";
maintainers = with maintainers;
[
@ -96,7 +134,7 @@ stdenv.mkDerivation rec {
# keeping all packages increases the package size considerably, wchich
# is why a local build is preferable in that situation. The timeframe
# is reasonable and that way the binary cache doesn't get overloaded.
hydraPlatforms = stdenv.lib.optionals (!keepAllPackages) meta.platforms;
hydraPlatforms = lib.optionals (!keepAllPackages) meta.platforms;
license = licenses.gpl2;
homepage = http://gap-system.org/;
};

View file

@ -70,7 +70,7 @@ let
sage-env = callPackage ./sage-env.nix {
sagelib = python.pkgs.sagelib;
inherit env-locations;
inherit python rWrapper ecl singular palp flint pynac pythonEnv;
inherit python ecl singular palp flint pynac pythonEnv;
pkg-config = pkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
};
@ -124,19 +124,6 @@ let
ignoreCollisions = true;
} // { extraLibs = pythonRuntimeDeps; }; # make the libs accessible
# needs to be rWrapper, standard "R" doesn't include default packages
rWrapper = pkgs.rWrapper.override {
# https://trac.sagemath.org/ticket/25674
R = pkgs.R.overrideAttrs (attrs: rec {
name = "R-3.4.4";
doCheck = false;
src = fetchurl {
url = "http://cran.r-project.org/src/base/R-3/${name}.tar.gz";
sha256 = "0dq3jsnwsb5j3fhl0wi3p5ycv8avf8s5j1y4ap3d2mkjmcppvsdk";
};
});
};
arb = pkgs.arb.override { inherit flint; };
singular = pkgs.singular.override { inherit flint; };

View file

@ -0,0 +1,13 @@
diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
index 5ff67107c1..1318df86fd 100644
--- a/src/sage/libs/gap/util.pyx
+++ b/src/sage/libs/gap/util.pyx
@@ -165,7 +165,7 @@ def _guess_gap_root():
EXAMPLES::
sage: from sage.libs.gap.util import _guess_gap_root
- sage: _guess_gap_root()
+ sage: _guess_gap_root() # not tested (not necessary on nixos)
The gap-4.5.5.spkg (or later) seems to be not installed!
...
"""

View file

@ -1,911 +0,0 @@
diff --git a/src/doc/en/faq/faq-usage.rst b/src/doc/en/faq/faq-usage.rst
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::
sage: RealNumber = float; Integer = int
sage: from scipy import stats
sage: stats.ttest_ind(list([1,2,3,4,5]),list([2,3,4,5,.6]))
- Ttest_indResult(statistic=0.076752955645333687, pvalue=0.94070490247380478)
+ Ttest_indResult(statistic=0.0767529..., pvalue=0.940704...)
sage: stats.uniform(0,15).ppf([0.5,0.7])
array([ 7.5, 10.5])
diff --git a/src/doc/en/thematic_tutorials/numerical_sage/cvxopt.rst b/src/doc/en/thematic_tutorials/numerical_sage/cvxopt.rst
index 314811c42b..e5f54ec4c2 100644
--- a/src/doc/en/thematic_tutorials/numerical_sage/cvxopt.rst
+++ b/src/doc/en/thematic_tutorials/numerical_sage/cvxopt.rst
@@ -48,11 +48,13 @@ we could do the following.
sage: B = numpy.array([1.0]*5)
sage: B.shape=(5,1)
sage: print(B)
- [[ 1.]
- [ 1.]
- [ 1.]
- [ 1.]
- [ 1.]]
+ [[1.]
+ [1.]
+ [1.]
+ [1.]
+ [1.]]
+
+
sage: print(A)
[ 2.00e+00 3.00e+00 0 0 0 ]
[ 3.00e+00 0 4.00e+00 0 6.00e+00]
diff --git a/src/doc/en/thematic_tutorials/numerical_sage/numpy.rst b/src/doc/en/thematic_tutorials/numerical_sage/numpy.rst
index 5b89cd75ee..e50b2ea5d4 100644
--- a/src/doc/en/thematic_tutorials/numerical_sage/numpy.rst
+++ b/src/doc/en/thematic_tutorials/numerical_sage/numpy.rst
@@ -84,7 +84,7 @@ well as take slices
sage: l[3]
3.0
sage: l[3:6]
- array([ 3., 4., 5.])
+ array([3., 4., 5.])
You can do basic arithmetic operations
@@ -147,11 +147,11 @@ also do matrix vector multiplication, and matrix addition
sage: n = numpy.matrix([[1,2],[3,4]],dtype=float)
sage: v = numpy.array([[1],[2]],dtype=float)
sage: n*v
- matrix([[ 5.],
- [ 11.]])
+ matrix([[ 5.],
+ [11.]])
sage: n+n
- matrix([[ 2., 4.],
- [ 6., 8.]])
+ matrix([[2., 4.],
+ [6., 8.]])
If ``n`` was created with :meth:`numpy.array`, then to do matrix vector
multiplication, you would use ``numpy.dot(n,v)``.
@@ -170,11 +170,11 @@ to manipulate
22., 23., 24.])
sage: n.shape=(5,5)
sage: n
- array([[ 0., 1., 2., 3., 4.],
- [ 5., 6., 7., 8., 9.],
- [ 10., 11., 12., 13., 14.],
- [ 15., 16., 17., 18., 19.],
- [ 20., 21., 22., 23., 24.]])
+ array([[ 0., 1., 2., 3., 4.],
+ [ 5., 6., 7., 8., 9.],
+ [10., 11., 12., 13., 14.],
+ [15., 16., 17., 18., 19.],
+ [20., 21., 22., 23., 24.]])
This changes the one-dimensional array into a `5\times 5` array.
@@ -187,8 +187,8 @@ NumPy arrays can be sliced as well
sage: n=numpy.array(range(25),dtype=float)
sage: n.shape=(5,5)
sage: n[2:4,1:3]
- array([[ 11., 12.],
- [ 16., 17.]])
+ array([[11., 12.],
+ [16., 17.]])
It is important to note that the sliced matrices are references to
the original
@@ -224,8 +224,8 @@ Some particularly useful commands are
sage: x=numpy.arange(0,2,.1,dtype=float)
sage: x
- array([ 0. , 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1. ,
- 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9])
+ array([0. , 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1. , 1.1, 1.2,
+ 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9])
You can see that :meth:`numpy.arange` creates an array of floats increasing by 0.1
from 0 to 2. There is a useful command :meth:`numpy.r_` that is best explained by example
@@ -240,10 +240,11 @@ from 0 to 2. There is a useful command :meth:`numpy.r_` that is best explained b
sage: Integer=int
sage: n=r_[0.0:5.0]
sage: n
- array([ 0., 1., 2., 3., 4.])
+ array([0., 1., 2., 3., 4.])
sage: n=r_[0.0:5.0, [0.0]*5]
sage: n
- array([ 0., 1., 2., 3., 4., 0., 0., 0., 0., 0.])
+ array([0., 1., 2., 3., 4., 0., 0., 0., 0., 0.])
+
:meth:`numpy.r_` provides a shorthand for constructing NumPy arrays efficiently.
Note in the above ``0.0:5.0`` was shorthand for ``0.0, 1.0, 2.0, 3.0, 4.0``.
@@ -255,7 +256,7 @@ intervals. We can do this as follows
::
sage: r_[0.0:5.0:11*j]
- array([ 0. , 0.5, 1. , 1.5, 2. , 2.5, 3. , 3.5, 4. , 4.5, 5. ])
+ array([0. , 0.5, 1. , 1.5, 2. , 2.5, 3. , 3.5, 4. , 4.5, 5. ])
The notation ``0.0:5.0:11*j`` expands to a list of 11 equally space
points between 0 and 5 including both endpoints. Note that ``j`` is the
@@ -287,23 +288,23 @@ an equally spaced grid with `\Delta x = \Delta y = .25` for
sage: y=numpy.r_[0.0:1.0:5*j]
sage: xx,yy= meshgrid(x,y)
sage: xx
- array([[ 0. , 0.25, 0.5 , 0.75, 1. ],
- [ 0. , 0.25, 0.5 , 0.75, 1. ],
- [ 0. , 0.25, 0.5 , 0.75, 1. ],
- [ 0. , 0.25, 0.5 , 0.75, 1. ],
- [ 0. , 0.25, 0.5 , 0.75, 1. ]])
+ array([[0. , 0.25, 0.5 , 0.75, 1. ],
+ [0. , 0.25, 0.5 , 0.75, 1. ],
+ [0. , 0.25, 0.5 , 0.75, 1. ],
+ [0. , 0.25, 0.5 , 0.75, 1. ],
+ [0. , 0.25, 0.5 , 0.75, 1. ]])
sage: yy
- array([[ 0. , 0. , 0. , 0. , 0. ],
- [ 0.25, 0.25, 0.25, 0.25, 0.25],
- [ 0.5 , 0.5 , 0.5 , 0.5 , 0.5 ],
- [ 0.75, 0.75, 0.75, 0.75, 0.75],
- [ 1. , 1. , 1. , 1. , 1. ]])
+ array([[0. , 0. , 0. , 0. , 0. ],
+ [0.25, 0.25, 0.25, 0.25, 0.25],
+ [0.5 , 0.5 , 0.5 , 0.5 , 0.5 ],
+ [0.75, 0.75, 0.75, 0.75, 0.75],
+ [1. , 1. , 1. , 1. , 1. ]])
sage: f(xx,yy)
- array([[ 0. , 0.0625, 0.25 , 0.5625, 1. ],
- [ 0.0625, 0.125 , 0.3125, 0.625 , 1.0625],
- [ 0.25 , 0.3125, 0.5 , 0.8125, 1.25 ],
- [ 0.5625, 0.625 , 0.8125, 1.125 , 1.5625],
- [ 1. , 1.0625, 1.25 , 1.5625, 2. ]])
+ array([[0. , 0.0625, 0.25 , 0.5625, 1. ],
+ [0.0625, 0.125 , 0.3125, 0.625 , 1.0625],
+ [0.25 , 0.3125, 0.5 , 0.8125, 1.25 ],
+ [0.5625, 0.625 , 0.8125, 1.125 , 1.5625],
+ [1. , 1.0625, 1.25 , 1.5625, 2. ]])
You can see that :meth:`numpy.meshgrid` produces a pair of matrices, here denoted
`xx` and `yy`, such that `(xx[i,j],yy[i,j])` has coordinates
@@ -324,7 +325,7 @@ equation `Ax=b` do
sage: b=numpy.array(range(1,6))
sage: x=linalg.solve(A,b)
sage: numpy.dot(A,x)
- array([ 1., 2., 3., 4., 5.])
+ array([1., 2., 3., 4., 5.])
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 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,
sage: zval = numpy.array([[0, 1, 1000],[.2+.3j,1,-.3j],[0,0,0]],dtype = numpy.complex128)
sage: deriv = numpy.array([[.1]],dtype = numpy.float64)
sage: complex_to_spiderweb(zval, deriv,deriv, 4,4,[0,0,0],1,False,0.001)
- array([[[ 1., 1., 1.],
- [ 1., 1., 1.],
- [ 1., 1., 1.]],
+ array([[[1., 1., 1.],
+ [1., 1., 1.],
+ [1., 1., 1.]],
<BLANKLINE>
- [[ 1., 1., 1.],
- [ 0., 0., 0.],
- [ 1., 1., 1.]],
+ [[1., 1., 1.],
+ [0., 0., 0.],
+ [1., 1., 1.]],
<BLANKLINE>
- [[ 1., 1., 1.],
- [ 1., 1., 1.],
- [ 1., 1., 1.]]])
+ [[1., 1., 1.],
+ [1., 1., 1.],
+ [1., 1., 1.]]])
sage: complex_to_spiderweb(zval, deriv,deriv, 4,4,[0,0,0],1,True,0.001)
- array([[[ 1. , 1. , 1. ],
- [ 1. , 0.05558355, 0.05558355],
- [ 0.17301243, 0. , 0. ]],
+ array([[[1. , 1. , 1. ],
+ [1. , 0.05558355, 0.05558355],
+ [0.17301243, 0. , 0. ]],
<BLANKLINE>
- [[ 1. , 0.96804683, 0.48044583],
- [ 0. , 0. , 0. ],
- [ 0.77351965, 0.5470393 , 1. ]],
+ [[1. , 0.96804683, 0.48044583],
+ [0. , 0. , 0. ],
+ [0.77351965, 0.5470393 , 1. ]],
<BLANKLINE>
- [[ 1. , 1. , 1. ],
- [ 1. , 1. , 1. ],
- [ 1. , 1. , 1. ]]])
+ [[1. , 1. , 1. ],
+ [1. , 1. , 1. ],
+ [1. , 1. , 1. ]]])
"""
cdef Py_ssize_t i, j, imax, jmax
cdef FLOAT_T x, y, mag, arg, width, target, precision, dmag, darg
@@ -1279,14 +1279,14 @@ cpdef complex_to_rgb(np.ndarray[COMPLEX_T, ndim = 2] z_values):
sage: from sage.calculus.riemann import complex_to_rgb
sage: import numpy
sage: complex_to_rgb(numpy.array([[0, 1, 1000]], dtype = numpy.complex128))
- array([[[ 1. , 1. , 1. ],
- [ 1. , 0.05558355, 0.05558355],
- [ 0.17301243, 0. , 0. ]]])
+ array([[[1. , 1. , 1. ],
+ [1. , 0.05558355, 0.05558355],
+ [0.17301243, 0. , 0. ]]])
sage: complex_to_rgb(numpy.array([[0, 1j, 1000j]], dtype = numpy.complex128))
- array([[[ 1. , 1. , 1. ],
- [ 0.52779177, 1. , 0.05558355],
- [ 0.08650622, 0.17301243, 0. ]]])
+ array([[[1. , 1. , 1. ],
+ [0.52779177, 1. , 0.05558355],
+ [0.08650622, 0.17301243, 0. ]]])
TESTS::
diff --git a/src/sage/combinat/fully_packed_loop.py b/src/sage/combinat/fully_packed_loop.py
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):
sage: _make_color_list(5, ['blue', 'red'])
['blue', 'red', 'blue', 'red', 'blue']
sage: _make_color_list(5, color_map='summer')
- [(0.0, 0.5, 0.40000000000000002),
- (0.25098039215686274, 0.62549019607843137, 0.40000000000000002),
- (0.50196078431372548, 0.75098039215686274, 0.40000000000000002),
- (0.75294117647058822, 0.87647058823529411, 0.40000000000000002),
- (1.0, 1.0, 0.40000000000000002)]
+ [(0.0, 0.5, 0.4),
+ (0.25098039215686274, 0.6254901960784314, 0.4),
+ (0.5019607843137255, 0.7509803921568627, 0.4),
+ (0.7529411764705882, 0.8764705882352941, 0.4),
+ (1.0, 1.0, 0.4)]
sage: _make_color_list(8, ['blue', 'red'], randomize=True)
['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 28779365df..3ab0282861 100644
--- a/src/sage/finance/time_series.pyx
+++ b/src/sage/finance/time_series.pyx
@@ -111,8 +111,8 @@ cdef class TimeSeries:
sage: import numpy
sage: v = numpy.array([[1,2], [3,4]], dtype=float); v
- array([[ 1., 2.],
- [ 3., 4.]])
+ array([[1., 2.],
+ [3., 4.]])
sage: finance.TimeSeries(v)
[1.0000, 2.0000, 3.0000, 4.0000]
sage: finance.TimeSeries(v[:,0])
@@ -2100,14 +2100,14 @@ cdef class TimeSeries:
sage: w[0] = 20
sage: w
- array([ 20. , -3. , 4.5, -2. ])
+ array([20. , -3. , 4.5, -2. ])
sage: v
[20.0000, -3.0000, 4.5000, -2.0000]
If you want a separate copy do not give the ``copy=False`` option. ::
sage: z = v.numpy(); z
- array([ 20. , -3. , 4.5, -2. ])
+ array([20. , -3. , 4.5, -2. ])
sage: z[0] = -10
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 aff552f450..7a6df931e7 100644
--- a/src/sage/functions/hyperbolic.py
+++ b/src/sage/functions/hyperbolic.py
@@ -214,7 +214,7 @@ class Function_coth(GinacFunction):
sage: import numpy
sage: a = numpy.arange(2, 5)
sage: coth(a)
- array([ 1.03731472, 1.00496982, 1.00067115])
+ array([1.03731472, 1.00496982, 1.00067115])
"""
return 1.0 / tanh(x)
@@ -267,7 +267,7 @@ class Function_sech(GinacFunction):
sage: import numpy
sage: a = numpy.arange(2, 5)
sage: sech(a)
- array([ 0.26580223, 0.09932793, 0.03661899])
+ array([0.26580223, 0.09932793, 0.03661899])
"""
return 1.0 / cosh(x)
@@ -318,7 +318,7 @@ class Function_csch(GinacFunction):
sage: import numpy
sage: a = numpy.arange(2, 5)
sage: csch(a)
- array([ 0.27572056, 0.09982157, 0.03664357])
+ array([0.27572056, 0.09982157, 0.03664357])
"""
return 1.0 / sinh(x)
@@ -586,7 +586,7 @@ class Function_arccoth(GinacFunction):
sage: import numpy
sage: a = numpy.arange(2,5)
sage: acoth(a)
- array([ 0.54930614, 0.34657359, 0.25541281])
+ array([0.54930614, 0.34657359, 0.25541281])
"""
return arctanh(1.0 / x)
diff --git a/src/sage/functions/orthogonal_polys.py b/src/sage/functions/orthogonal_polys.py
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):
sage: z2 = numpy.array([[1,2],[1,2]])
sage: z3 = numpy.array([1,2,3.])
sage: chebyshev_T(1,z)
- array([ 1., 2.])
+ array([1., 2.])
sage: chebyshev_T(1,z2)
- array([[ 1., 2.],
- [ 1., 2.]])
+ array([[1., 2.],
+ [1., 2.]])
sage: chebyshev_T(1,z3)
- array([ 1., 2., 3.])
+ array([1., 2., 3.])
sage: chebyshev_T(z,0.1)
array([ 0.1 , -0.98])
"""
@@ -1095,12 +1095,12 @@ class Func_chebyshev_U(ChebyshevFunction):
sage: z2 = numpy.array([[1,2],[1,2]])
sage: z3 = numpy.array([1,2,3.])
sage: chebyshev_U(1,z)
- array([ 2., 4.])
+ array([2., 4.])
sage: chebyshev_U(1,z2)
- array([[ 2., 4.],
- [ 2., 4.]])
+ array([[2., 4.],
+ [2., 4.]])
sage: chebyshev_U(1,z3)
- array([ 2., 4., 6.])
+ array([2., 4., 6.])
sage: chebyshev_U(z,0.1)
array([ 0.2 , -0.96])
"""
diff --git a/src/sage/functions/other.py b/src/sage/functions/other.py
index 1883daa3e6..9885222817 100644
--- a/src/sage/functions/other.py
+++ b/src/sage/functions/other.py
@@ -389,7 +389,7 @@ class Function_ceil(BuiltinFunction):
sage: import numpy
sage: a = numpy.linspace(0,2,6)
sage: ceil(a)
- array([ 0., 1., 1., 2., 2., 2.])
+ array([0., 1., 1., 2., 2., 2.])
Test pickling::
@@ -553,7 +553,7 @@ class Function_floor(BuiltinFunction):
sage: import numpy
sage: a = numpy.linspace(0,2,6)
sage: floor(a)
- array([ 0., 0., 0., 1., 1., 2.])
+ array([0., 0., 0., 1., 1., 2.])
sage: floor(x)._sympy_()
floor(x)
@@ -869,7 +869,7 @@ def sqrt(x, *args, **kwds):
sage: import numpy
sage: a = numpy.arange(2,5)
sage: sqrt(a)
- array([ 1.41421356, 1.73205081, 2. ])
+ array([1.41421356, 1.73205081, 2. ])
"""
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 501e7ff6b6..5f760912f0 100644
--- a/src/sage/functions/trig.py
+++ b/src/sage/functions/trig.py
@@ -724,7 +724,7 @@ class Function_arccot(GinacFunction):
sage: import numpy
sage: a = numpy.arange(2, 5)
sage: arccot(a)
- array([ 0.46364761, 0.32175055, 0.24497866])
+ array([0.46364761, 0.32175055, 0.24497866])
"""
return math.pi/2 - arctan(x)
@@ -780,7 +780,7 @@ class Function_arccsc(GinacFunction):
sage: import numpy
sage: a = numpy.arange(2, 5)
sage: arccsc(a)
- array([ 0.52359878, 0.33983691, 0.25268026])
+ array([0.52359878, 0.33983691, 0.25268026])
"""
return arcsin(1.0/x)
@@ -838,7 +838,7 @@ class Function_arcsec(GinacFunction):
sage: import numpy
sage: a = numpy.arange(2, 5)
sage: arcsec(a)
- array([ 1.04719755, 1.23095942, 1.31811607])
+ array([1.04719755, 1.23095942, 1.31811607])
"""
return arccos(1.0/x)
@@ -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)
- array([ 0.32175055, 0.41822433, 0.46364761])
+ array([0.32175055, 0.41822433, 0.46364761])
sage: atan2(1,a)
- array([ 0.78539816, 0.46364761, 0.32175055])
+ array([0.78539816, 0.46364761, 0.32175055])
sage: atan2(a, 1)
- array([ 0.78539816, 1.10714872, 1.24904577])
+ array([0.78539816, 1.10714872, 1.24904577])
TESTS::
diff --git a/src/sage/matrix/constructor.pyx b/src/sage/matrix/constructor.pyx
index 12136f1773..491bf22e62 100644
--- a/src/sage/matrix/constructor.pyx
+++ b/src/sage/matrix/constructor.pyx
@@ -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
- array([[ 1. , 0.5 ],
- [ 0.33333333, 0.25 ]])
+ array([[1. , 0.5 ],
+ [0.33333333, 0.25 ]])
sage: matrix(QQ, n)
[ 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 66e54a79a4..0498334f4b 100644
--- a/src/sage/matrix/matrix_double_dense.pyx
+++ b/src/sage/matrix/matrix_double_dense.pyx
@@ -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):
...
- ValueError: failed to create intent(cache|hide)|optional array-- must have defined dimensions but got (0,)
+ error: ((lwork==-1)||(lwork >= MAX(1,2*n))) failed for 3rd keyword lwork: zgees:lwork=0
TESTS::
@@ -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()
- array([[ 0., 1., 2.],
- [ 3., 4., 5.]])
+ array([[0., 1., 2.],
+ [3., 4., 5.]])
Alternatively, numpy automatically calls this function (via
the magic :meth:`__array__` method) to convert Sage matrices
@@ -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)
- array([[ 0., 1., 2.],
- [ 3., 4., 5.]])
+ array([[0., 1., 2.],
+ [3., 4., 5.]])
sage: numpy.array(m).dtype
dtype('float64')
sage: m = matrix(CDF, 2, range(6)); m
[0.0 1.0 2.0]
[3.0 4.0 5.0]
sage: numpy.array(m)
- array([[ 0.+0.j, 1.+0.j, 2.+0.j],
- [ 3.+0.j, 4.+0.j, 5.+0.j]])
+ array([[0.+0.j, 1.+0.j, 2.+0.j],
+ [3.+0.j, 4.+0.j, 5.+0.j]])
sage: numpy.array(m).dtype
dtype('complex128')
diff --git a/src/sage/matrix/special.py b/src/sage/matrix/special.py
index ccbd208810..c3f9a65093 100644
--- a/src/sage/matrix/special.py
+++ b/src/sage/matrix/special.py
@@ -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
- array([ 1.2, 5.6])
+ array([1.2, 5.6])
sage: A = diagonal_matrix(3, entries); A
[1.2 0.0 0.0]
[0.0 5.6 0.0]
@@ -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
- array([ 2.0+1.j , 8.1+0.j , 3.4+2.6j])
+ array([2. +1.j , 8.1+0.j , 3.4+2.6j])
sage: A = diagonal_matrix(entries); A
[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 37d92c1282..955d083b34 100644
--- a/src/sage/modules/free_module_element.pyx
+++ b/src/sage/modules/free_module_element.pyx
@@ -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)
- array([ 1. , 2. , 0.83333333])
+ array([1. , 2. , 0.83333333])
sage: v.numpy(dtype=int)
array([1, 2, 0])
sage: import numpy
@@ -999,7 +999,7 @@ cdef class FreeModuleElement(Vector): # abstract base class
be more efficient but may have unintended consequences::
sage: v.numpy(dtype=None)
- array([ 1. , 2. , 0.83333333])
+ array([1. , 2. , 0.83333333])
sage: w = vector(ZZ, [0, 1, 2^63 -1]); w
(0, 1, 9223372036854775807)
diff --git a/src/sage/modules/vector_double_dense.pyx b/src/sage/modules/vector_double_dense.pyx
index 39fc2970de..2badf98284 100644
--- a/src/sage/modules/vector_double_dense.pyx
+++ b/src/sage/modules/vector_double_dense.pyx
@@ -807,13 +807,13 @@ cdef class Vector_double_dense(FreeModuleElement):
sage: v = vector(CDF,4,range(4))
sage: v.numpy()
- array([ 0.+0.j, 1.+0.j, 2.+0.j, 3.+0.j])
+ array([0.+0.j, 1.+0.j, 2.+0.j, 3.+0.j])
sage: v = vector(CDF,0)
sage: v.numpy()
array([], dtype=complex128)
sage: v = vector(RDF,4,range(4))
sage: v.numpy()
- array([ 0., 1., 2., 3.])
+ array([0., 1., 2., 3.])
sage: v = vector(RDF,0)
sage: v.numpy()
array([], dtype=float64)
@@ -823,11 +823,11 @@ cdef class Vector_double_dense(FreeModuleElement):
sage: import numpy
sage: v = vector(CDF, 3, range(3))
sage: v.numpy()
- array([ 0.+0.j, 1.+0.j, 2.+0.j])
+ array([0.+0.j, 1.+0.j, 2.+0.j])
sage: v.numpy(dtype=numpy.float64)
- array([ 0., 1., 2.])
+ array([0., 1., 2.])
sage: v.numpy(dtype=numpy.float32)
- array([ 0., 1., 2.], dtype=float32)
+ array([0., 1., 2.], dtype=float32)
"""
if dtype is None or dtype is self._vector_numpy.dtype:
from copy import copy
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
+++ b/src/sage/plot/complex_plot.pyx
@@ -61,9 +61,9 @@ cdef inline double mag_to_lightness(double r):
sage: from sage.plot.complex_plot import complex_to_rgb
sage: complex_to_rgb([[0, 1, 10]])
- array([[[ 0. , 0. , 0. ],
- [ 0.77172568, 0. , 0. ],
- [ 1. , 0.22134776, 0.22134776]]])
+ array([[[0. , 0. , 0. ],
+ [0.77172568, 0. , 0. ],
+ [1. , 0.22134776, 0.22134776]]])
"""
return atan(log(sqrt(r)+1)) * (4/PI) - 1
@@ -82,13 +82,13 @@ def complex_to_rgb(z_values):
sage: from sage.plot.complex_plot import complex_to_rgb
sage: complex_to_rgb([[0, 1, 1000]])
- array([[[ 0. , 0. , 0. ],
- [ 0.77172568, 0. , 0. ],
- [ 1. , 0.64421177, 0.64421177]]])
+ array([[[0. , 0. , 0. ],
+ [0.77172568, 0. , 0. ],
+ [1. , 0.64421177, 0.64421177]]])
sage: complex_to_rgb([[0, 1j, 1000j]])
- array([[[ 0. , 0. , 0. ],
- [ 0.38586284, 0.77172568, 0. ],
- [ 0.82210588, 1. , 0.64421177]]])
+ array([[[0. , 0. , 0. ],
+ [0.38586284, 0.77172568, 0. ],
+ [0.82210588, 1. , 0.64421177]]])
"""
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
+++ b/src/sage/plot/line.py
@@ -502,14 +502,12 @@ def line2d(points, **options):
from sage.plot.all import Graphics
from sage.plot.plot import xydata_from_point_list
from sage.rings.all import CC, CDF
+ points = list(points) # make sure points is a python list
if points in CC or points in CDF:
pass
else:
- try:
- if not points:
- return Graphics()
- except ValueError: # numpy raises a ValueError if not empty
- pass
+ if len(points) == 0:
+ return Graphics()
xdata, ydata = xydata_from_point_list(points)
g = Graphics()
g._set_extra_kwds(Graphics._extract_kwds_for_show(options))
diff --git a/src/sage/plot/plot_field.py b/src/sage/plot/plot_field.py
index 0025098a8d..23c80902f3 100644
--- a/src/sage/plot/plot_field.py
+++ b/src/sage/plot/plot_field.py
@@ -49,9 +49,10 @@ class PlotField(GraphicPrimitive):
sage: r.xpos_array
[0.0, 0.0, 1.0, 1.0]
sage: r.yvec_array
- masked_array(data = [0.0 0.70710678118... 0.70710678118... 0.89442719...],
- mask = [False False False False],
- fill_value = 1e+20)
+ masked_array(data=[0.0, 0.70710678118..., 0.70710678118...,
+ 0.89442719...],
+ mask=[False, False, False, False],
+ fill_value=1e+20)
TESTS:
diff --git a/src/sage/plot/streamline_plot.py b/src/sage/plot/streamline_plot.py
index f3da57c370..3806f4b32f 100644
--- a/src/sage/plot/streamline_plot.py
+++ b/src/sage/plot/streamline_plot.py
@@ -38,16 +38,14 @@ class StreamlinePlot(GraphicPrimitive):
sage: r.options()['plot_points']
2
sage: r.xpos_array
- array([ 0., 1.])
+ array([0., 1.])
sage: r.yvec_array
- masked_array(data =
- [[1.0 1.0]
- [0.5403023058681398 0.5403023058681398]],
- mask =
- [[False False]
- [False False]],
- fill_value = 1e+20)
- <BLANKLINE>
+ masked_array(
+ data=[[1.0, 1.0],
+ [0.5403023058681398, 0.5403023058681398]],
+ mask=[[False, False],
+ [False, False]],
+ fill_value=1e+20)
TESTS:
diff --git a/src/sage/probability/probability_distribution.pyx b/src/sage/probability/probability_distribution.pyx
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:
0.0,
1.4650000000000003]
sage: b
- [0.0, 0.20000000000000001, 0.40000000000000002, 0.60000000000000009, 0.80000000000000004, 1.0, 1.2000000000000002, 1.4000000000000001, 1.6000000000000001, 1.8, 2.0]
+ [0.0,
+ 0.2,
+ 0.4,
+ 0.6000000000000001,
+ 0.8,
+ 1.0,
+ 1.2000000000000002,
+ 1.4000000000000001,
+ 1.6,
+ 1.8,
+ 2.0]
"""
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 12ca1b222b..9bad7dae0c 100644
--- a/src/sage/rings/rational.pyx
+++ b/src/sage/rings/rational.pyx
@@ -1041,7 +1041,7 @@ cdef class Rational(sage.structure.element.FieldElement):
dtype('O')
sage: numpy.array([1, 1/2, 3/4])
- array([ 1. , 0.5 , 0.75])
+ array([1. , 0.5 , 0.75])
"""
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 9b90c8833e..1ce05b937d 100644
--- a/src/sage/rings/real_mpfr.pyx
+++ b/src/sage/rings/real_mpfr.pyx
@@ -1439,7 +1439,7 @@ cdef class RealNumber(sage.structure.element.RingElement):
sage: import numpy
sage: numpy.arange(10.0)
- array([ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9.])
+ array([0., 1., 2., 3., 4., 5., 6., 7., 8., 9.])
sage: numpy.array([1.0, 1.1, 1.2]).dtype
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 de31fe9883..7a33ea6f5b 100644
--- a/src/sage/schemes/elliptic_curves/height.py
+++ b/src/sage/schemes/elliptic_curves/height.py
@@ -1627,18 +1627,18 @@ class EllipticCurveCanonicalHeight:
even::
sage: H.wp_on_grid(v,4)
- array([[ 25.43920182, 5.28760943, 5.28760943, 25.43920182],
- [ 6.05099485, 1.83757786, 1.83757786, 6.05099485],
- [ 6.05099485, 1.83757786, 1.83757786, 6.05099485],
- [ 25.43920182, 5.28760943, 5.28760943, 25.43920182]])
+ array([[25.43920182, 5.28760943, 5.28760943, 25.43920182],
+ [ 6.05099485, 1.83757786, 1.83757786, 6.05099485],
+ [ 6.05099485, 1.83757786, 1.83757786, 6.05099485],
+ [25.43920182, 5.28760943, 5.28760943, 25.43920182]])
The array of values on the half-grid::
sage: H.wp_on_grid(v,4,True)
- array([[ 25.43920182, 5.28760943],
- [ 6.05099485, 1.83757786],
- [ 6.05099485, 1.83757786],
- [ 25.43920182, 5.28760943]])
+ array([[25.43920182, 5.28760943],
+ [ 6.05099485, 1.83757786],
+ [ 6.05099485, 1.83757786],
+ [25.43920182, 5.28760943]])
"""
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 9da38002e8..d61e74bf82 100644
--- a/src/sage/symbolic/ring.pyx
+++ b/src/sage/symbolic/ring.pyx
@@ -1136,7 +1136,7 @@ cdef class NumpyToSRMorphism(Morphism):
sage: cos(numpy.int('2'))
cos(2)
sage: numpy.cos(numpy.int('2'))
- -0.41614683654714241
+ -0.4161468365471424
"""
cdef _intermediate_ring

View file

@ -77,6 +77,7 @@ let
singular
giac
palp
# needs to be rWrapper since the default `R` doesn't include R's default libraries
rWrapper
gfan
cddlib

View file

@ -9,14 +9,14 @@
# all get the same sources with the same patches applied.
stdenv.mkDerivation rec {
version = "8.4";
version = "8.5";
name = "sage-src-${version}";
src = fetchFromGitHub {
owner = "sagemath";
repo = "sage";
rev = version;
sha256 = "0gips1hagiz9m7s21bg5as8hrrm2x5k47h1bsq0pc46iplfwmv2d";
sha256 = "08mb9626phsls2phdzqxsnp2df5pn5qr72m0mm4nncby26pwn19c";
};
# Patches needed because of particularities of nix or the way this is packaged.
@ -46,6 +46,8 @@ stdenv.mkDerivation rec {
# tests) are also run. That is necessary to test dochtml individually. See
# https://trac.sagemath.org/ticket/26110 for an upstream discussion.
./patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch
./patches/dont-test-guess-gaproot.patch
];
# Patches needed because of package updates. We could just pin the versions of
@ -68,6 +70,7 @@ stdenv.mkDerivation rec {
);
in [
# New glpk version has new warnings, filter those out until upstream sage has found a solution
# Should be fixed with glpk > 4.65.
# https://trac.sagemath.org/ticket/24824
./patches/pari-stackwarn.patch # not actually necessary since the pari upgrade, but necessary for the glpk patch to apply
(fetchpatch {
@ -76,32 +79,9 @@ stdenv.mkDerivation rec {
stripLen = 1;
})
# https://trac.sagemath.org/ticket/25260
./patches/numpy-1.15.1.patch
# https://trac.sagemath.org/ticket/26315
./patches/giac-1.5.0.patch
# needed for ntl update
# https://trac.sagemath.org/ticket/25532
(fetchpatch {
name = "lcalc-c++11.patch";
url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/sagemath-lcalc-c++11.patch?h=packages/sagemath&id=0e31ae526ab7c6b5c0bfacb3f8b1c4fd490035aa";
sha256 = "0p5wnvbx65i7cp0bjyaqgp4rly8xgnk12pqwaq3dqby0j2bk6ijb";
})
(fetchpatch {
name = "cython-0.29.patch";
url = "https://git.sagemath.org/sage.git/patch/?h=f77de1d0e7f90ee12761140500cb8cbbb789ab20";
sha256 = "14wrpy8jgbnpza1j8a2nx8y2r946y82pll1fv3cn6gpfmm6640l3";
})
# https://trac.sagemath.org/ticket/26360
(fetchpatch {
name = "arb-2.15.1.patch";
url = "https://git.sagemath.org/sage.git/patch/?id=30cc778d46579bd0c7537ed33e8d7a4f40fd5c31";
sha256 = "13vc2q799dh745sm59xjjabllfj0sfjzcacf8k59kwj04x755d30";
})
# https://trac.sagemath.org/ticket/26326
# needs to be split because there is a merge commit in between
(fetchSageDiff {

View file

@ -3,7 +3,12 @@
, sage-with-env
, makeWrapper
, files ? null # "null" means run all tests
, longTests ? true # run tests marked as "long time"
, longTests ? true # run tests marked as "long time" (roughly doubles runtime)
# Run as many tests as possible in approximately n seconds. This will give each
# file to test a "time budget" and stop tests if it is exceeded. 300 is the
# upstream default value.
# https://trac.sagemath.org/ticket/25270 for details.
, timeLimit ? null
}:
# for a quick test of some source files:
@ -14,6 +19,7 @@ let
runAllTests = files == null;
testArgs = if runAllTests then "--all" else testFileList;
patienceSpecifier = if longTests then "--long" else "";
timeSpecifier = if timeLimit == null then "" else "--short ${toString timeLimit}";
relpathToArg = relpath: lib.escapeShellArg "${src}/${relpath}"; # paths need to be absolute
testFileList = lib.concatStringsSep " " (map relpathToArg files);
in
@ -45,7 +51,7 @@ stdenv.mkDerivation rec {
export HOME="$TMPDIR/sage-home"
mkdir -p "$HOME"
# "--long" tests are in the order of 1h, without "--long" its 1/2h
"sage" -t --timeout=0 --nthreads "$NIX_BUILD_CORES" --optional=sage ${patienceSpecifier} ${testArgs}
echo "Running sage tests with arguments ${timeSpecifier} ${patienceSpecifier} ${testArgs}"
"sage" -t --nthreads "$NIX_BUILD_CORES" --optional=sage ${timeSpecifier} ${patienceSpecifier} ${testArgs}
'';
}

View file

@ -54,6 +54,7 @@ stdenv.mkDerivation rec {
passthru = {
tests = sage-tests;
quicktest = sage-tests.override { longTests = false; timeLimit = 600; }; # as many tests as possible in ~10m
doc = sagedoc;
lib = sage-with-env.env.lib;
kernelspec = jupyter-kernel-definition;

View file

@ -2,6 +2,7 @@
let
inherit (pythonPackages) buildPythonApplication pyqt5 sip pyinotify;
in buildPythonApplication rec {
name = "git-cola-${version}";
version = "3.2";

View file

@ -2,7 +2,7 @@
buildGoPackage rec {
name = "hub-${version}";
version = "2.6.1";
version = "2.7.0";
goPackagePath = "github.com/github/hub";
@ -10,7 +10,7 @@ buildGoPackage rec {
owner = "github";
repo = "hub";
rev = "v${version}";
sha256 = "1gq8nmzdsqicjgam3h48l0dad46dn9mx9blr1413rc2cp9qmg7d4";
sha256 = "1p90m1xp3jahs5y0lp0qfmfa7wqn7gxyygn7x45a6cbf2zzlb86l";
};
nativeBuildInputs = [ groff ronn utillinux ];
@ -26,7 +26,7 @@ buildGoPackage rec {
postInstall = ''
cd go/src/${goPackagePath}
install -D etc/hub.zsh_completion "$bin/share/zsh/site-functions/_hub"
install -D etc/hub.bash_completion.sh "$bin/etc/bash_completion.d/hub.bash_completion.sh"
install -D etc/hub.bash_completion.sh "$bin/share/bash-completion/completions/hub"
install -D etc/hub.fish_completion "$bin/share/fish/vendor_completions.d/hub.fish"
make man-pages

View file

@ -1,14 +1,16 @@
{ stdenv, fetchFromGitHub, python3Packages }:
python3Packages.buildPythonApplication rec {
name = "peru-${version}";
version = "1.1.4";
pname = "peru";
version = "1.2.0";
disabled = python3Packages.pythonOlder "3.5";
src = fetchFromGitHub {
owner = "buildinspace";
repo = "peru";
rev = "${version}";
sha256 = "0mzmi797f2h2wy36q4ab701ixl5zy4m0pp1wp9abwdfg2y6qhmnk";
sha256 = "0p4j51m89glx12cd65lcnbwpvin0v49wkhrx06755skr7v37pm2a";
};
propagatedBuildInputs = with python3Packages; [ pyyaml docopt ];

View file

@ -17,7 +17,7 @@ python3Packages.buildPythonApplication rec {
buildInputs = [ gtk3 ];
propagatedBuildInputs = with python3Packages; [ libopenshot pyqt5 requests sip httplib2 pyzmq ];
propagatedBuildInputs = with python3Packages; [ libopenshot pyqt5_with_qtwebkit requests sip httplib2 pyzmq ];
preConfigure = ''

View file

@ -1,24 +1,24 @@
{ stdenv, fetchFromGitHub
, pkgconfig, SDL2, SDL, SDL2_ttf, openssl, spice-protocol, fontconfig
, cmake, pkgconfig, SDL2, SDL, SDL2_ttf, openssl, spice-protocol, fontconfig
, libX11, freefont_ttf, nettle, libconfig
}:
stdenv.mkDerivation rec {
name = "looking-glass-client-${version}";
version = "a11";
version = "a12";
src = fetchFromGitHub {
owner = "gnif";
repo = "LookingGlass";
rev = version;
sha256 = "0q4isn86pl5wddf6h8qd62fw3577ns2sd2myzw969sbl796bwcil";
sha256 = "0r6bvl9q94039r6ff4f2bg8si95axx9w8bf1h1qr5730d2kv5yxq";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [
SDL SDL2 SDL2_ttf openssl spice-protocol fontconfig
libX11 freefont_ttf nettle libconfig
libX11 freefont_ttf nettle libconfig cmake
];
enableParallelBuilding = true;
@ -26,8 +26,8 @@ stdenv.mkDerivation rec {
sourceRoot = "source/client";
installPhase = ''
mkdir -p $out
mv bin $out/
mkdir -p $out/bin
mv looking-glass-client $out/bin
'';
meta = with stdenv.lib; {

View file

@ -1,17 +1,18 @@
{ mkDerivation, lib, fetchFromGitHub, cmake, pkgconfig
, qtbase, qtmultimedia, qtsvg, qttools, krdc
, libvncserver, libvirt, pcre, pixman, qtermwidget, spice-gtk, spice-protocol
, libselinux, libsepol, utillinux
}:
mkDerivation rec {
name = "virt-manager-qt-${version}";
version = "0.60.88";
version = "0.70.91";
src = fetchFromGitHub {
owner = "F1ash";
repo = "qt-virt-manager";
rev = "${version}";
sha256 = "0hd5d8zdghc5clv8pa4h9zigshdrarfpmzyvrq56rjkm13lrdz52";
sha256 = "1z2kq88lljvr24z1kizvg3h7ckf545h4kjhhrjggkr0w4wjjwr43";
};
cmakeFlags = [
@ -22,6 +23,7 @@ mkDerivation rec {
buildInputs = [
qtbase qtmultimedia qtsvg krdc
libvirt libvncserver pcre pixman qtermwidget spice-gtk spice-protocol
libselinux libsepol utillinux
];
nativeBuildInputs = [ cmake pkgconfig qttools ];

View file

@ -1,30 +1,30 @@
{ stdenv, lib, rustPlatform, fetchFromGitHub, dbus, gdk_pixbuf, libnotify, makeWrapper, pkgconfig, xorg
, enableAlsaUtils ? true, alsaUtils, bash, coreutils }:
, enableAlsaUtils ? true, alsaUtils, coreutils
, enableNetwork ? true, dnsutils, iproute, wirelesstools }:
let
binPath = stdenv.lib.makeBinPath [
alsaUtils bash coreutils
];
bins = lib.optionals enableAlsaUtils [ alsaUtils coreutils ]
++ lib.optionals enableNetwork [ dnsutils iproute wirelesstools ];
in
rustPlatform.buildRustPackage rec {
name = "dwm-status-${version}";
version = "1.5.0";
version = "1.6.0";
src = fetchFromGitHub {
owner = "Gerschtli";
repo = "dwm-status";
rev = version;
sha256 = "0mfzpyacd7i6ipbjwyl1zc0x3lnz0f4qqzsmsb07p047z95mw4v6";
sha256 = "02gvlxv6ylx4mdkf59crm2zyahiz1zd4cr5zz29dnhx7r7738i9a";
};
nativeBuildInputs = [ makeWrapper pkgconfig ];
buildInputs = [ dbus gdk_pixbuf libnotify xorg.libX11 ];
cargoSha256 = "1cngcacsbzijs55k4kz8fidki3p8jblk3v5s21hjsn4glzjdbkmm";
cargoSha256 = "1khknf1bjs80cc2n4jnpilf8cc15crykhhyvvff6q4ay40353gr6";
postInstall = lib.optionalString enableAlsaUtils ''
wrapProgram $out/bin/dwm-status --prefix "PATH" : "${binPath}"
postInstall = lib.optionalString (bins != []) ''
wrapProgram $out/bin/dwm-status --prefix "PATH" : "${stdenv.lib.makeBinPath bins}"
'';
meta = with stdenv.lib; {

View file

@ -176,4 +176,13 @@ rec {
];
};
};
# 12. example of running something as root on top of a parent image
# Regression test related to PR #52109
runAsRootParentImage = buildImage {
name = "runAsRootParentImage";
tag = "latest";
runAsRoot = "touch /example-file";
fromImage = bash;
};
}

View file

@ -0,0 +1,38 @@
{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "material-design-icons-${version}";
version = "3.2.89";
src = fetchFromGitHub {
owner = "Templarian";
repo = "MaterialDesign-Webfont";
rev = "v${version}";
sha256 = "1rxaiiij96kqncsrlkyp109m36v28cgxild7z04k4jh79fvmhjvn";
};
installPhase = ''
mkdir -p $out/share/fonts/{eot,svg,truetype,woff,woff2}
cp fonts/*.eot $out/share/fonts/eot/
cp fonts/*.svg $out/share/fonts/svg/
cp fonts/*.ttf $out/share/fonts/truetype/
cp fonts/*.woff $out/share/fonts/woff/
cp fonts/*.woff2 $out/share/fonts/woff2/
'';
meta = with stdenv.lib; {
description = "3200+ Material Design Icons from the Community";
longDescription = ''
Material Design Icons' growing icon collection allows designers and
developers targeting various platforms to download icons in the format,
color and size they need for any project.
'';
homepage = https://materialdesignicons.com;
license = with licenses; [
asl20 # for icons from: https://github.com/google/material-design-icons
ofl
];
platforms = platforms.all;
maintainers = with maintainers; [ vlaci ];
};
}

View file

@ -1,15 +1,14 @@
{ stdenv, fetchFromGitHub, gtk3 }:
stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "zafiro-icons";
version = "0.7.7";
version = "0.8";
src = fetchFromGitHub {
owner = "zayronxio";
repo = pname;
rev = "v${version}";
sha256 = "0471gf4s32dhcm3667l1bnam04jk4miw3c6s557vix59rih1y71p";
sha256 = "05g94ln3xfp8adw09fckjaml1dpl1simphyhd407lx2mmwkgw6rh";
};
nativeBuildInputs = [ gtk3 ];

View file

@ -0,0 +1,31 @@
{ stdenv, fetchFromGitHub, gdk_pixbuf, librsvg, gtk-engine-murrine }:
stdenv.mkDerivation rec {
pname = "qogir-theme";
version = "2018-11-12";
src = fetchFromGitHub {
owner = "vinceliuice";
repo = pname;
rev = version;
sha256 = "16hzgdl7d6jrd3gq0kmxad46gijc4hlxzy2rs3gqsfxqfj32nhqz";
};
buildInputs = [ gdk_pixbuf librsvg ];
propagatedUserEnvPkgs = [ gtk-engine-murrine ];
installPhase = ''
patchShebangs .
mkdir -p $out/share/themes
name= ./Install -d $out/share/themes
'';
meta = with stdenv.lib; {
description = "A flat Design theme for GTK based desktop environments";
homepage = https://vinceliuice.github.io/Qogir-theme;
license = licenses.gpl3;
platforms = platforms.unix;
maintainers = [ maintainers.romildo ];
};
}

View file

@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = "http://goodies.xfce.org/projects/panel-plugins/${p_name}";
description = "Battery plugin for Xfce panel";
description = "A simple XFCE panel plugin that lets the user run an alarm at a specified time or at the end of a specified countdown period";
platforms = platforms.linux;
license = licenses.gpl2;
maintainers = [ ];

View file

@ -0,0 +1,21 @@
{ newScope } :
let
callPackage = newScope self;
self = {
pkgs = self;
fetchegg = callPackage ./fetchegg { };
eggDerivation = callPackage ./eggDerivation.nix { };
chicken = callPackage ./chicken.nix {
bootstrap-chicken = self.chicken.override { bootstrap-chicken = null; };
};
chickenEggs = callPackage ./eggs.nix { };
egg2nix = callPackage ./egg2nix.nix { };
};
in self

View file

@ -17,9 +17,8 @@ let
in
stdenv.mkDerivation ({
name = "chicken-${name}";
propagatedBuildInputs = buildInputs ++ [ chicken ];
propagatedUserEnvPkgs = buildInputs ++ [ chicken ];
buildInputs = [ makeWrapper ];
propagatedBuildInputs = buildInputs;
buildInputs = [ makeWrapper chicken ];
CSC_OPTIONS = stdenv.lib.concatStringsSep " " cscOptions;

View file

@ -0,0 +1,62 @@
{ stdenv, fetchurl, makeWrapper, bootstrap-chicken ? null }:
let
version = "5.0.0";
platform = with stdenv;
if isDarwin then "macosx"
else if isCygwin then "cygwin"
else if (isFreeBSD || isOpenBSD) then "bsd"
else if isSunOS then "solaris"
else "linux"; # Should be a sane default
lib = stdenv.lib;
in
stdenv.mkDerivation {
name = "chicken-${version}";
binaryVersion = 9;
src = fetchurl {
url = "https://code.call-cc.org/releases/${version}/chicken-${version}.tar.gz";
sha256 = "15b5yrzfa8aimzba79x7v6y282f898rxqxfxrr446sjx9jwlpfd8";
};
setupHook = lib.ifEnable (bootstrap-chicken != null) ./setup-hook.sh;
buildFlags = "PLATFORM=${platform} PREFIX=$(out) VARDIR=$(out)/var/lib";
installFlags = "PLATFORM=${platform} PREFIX=$(out) VARDIR=$(out)/var/lib";
buildInputs = [
makeWrapper
] ++ (lib.ifEnable (bootstrap-chicken != null) [
bootstrap-chicken
]);
postInstall = ''
for f in $out/bin/*
do
wrapProgram $f \
--prefix PATH : ${stdenv.cc}/bin
done
mv $out/var/lib/chicken $out/lib
rmdir $out/var/lib
rmdir $out/var
'';
# TODO: Assert csi -R files -p '(pathname-file (repository-path))' == binaryVersion
meta = {
homepage = http://www.call-cc.org/;
license = stdenv.lib.licenses.bsd3;
maintainers = with stdenv.lib.maintainers; [ the-kenny ];
platforms = stdenv.lib.platforms.linux; # Maybe other non-darwin Unix
description = "A portable compiler for the Scheme programming language";
longDescription = ''
CHICKEN is a compiler for the Scheme programming language.
CHICKEN produces portable and efficient C, supports almost all
of the R5RS Scheme language standard, and includes many
enhancements and extensions. CHICKEN runs on Linux, macOS,
Windows, and many Unix flavours.
'';
};
}

View file

@ -0,0 +1,21 @@
{ newScope } :
let
callPackage = newScope self;
self = {
pkgs = self;
fetchegg = callPackage ./fetchegg { };
eggDerivation = callPackage ./eggDerivation.nix { };
chicken = callPackage ./chicken.nix {
bootstrap-chicken = self.chicken.override { bootstrap-chicken = null; };
};
chickenEggs = callPackage ./eggs.nix { };
egg2nix = callPackage ./egg2nix.nix { };
};
in self

View file

@ -0,0 +1,29 @@
{ stdenv, eggDerivation, fetchFromGitHub, chickenEggs }:
# Note: This mostly reimplements the default.nix already contained in
# the tarball. Is there a nicer way than duplicating code?
let
version = "c5-git";
in
eggDerivation {
src = fetchFromGitHub {
owner = "corngood";
repo = "egg2nix";
rev = "chicken-5";
sha256 = "1vfnhbcnyakywgjafhs0k5kpsdnrinzvdjxpz3fkwas1jsvxq3d1";
};
name = "egg2nix-${version}";
buildInputs = with chickenEggs; [
args matchable
];
meta = {
description = "Generate nix-expression from CHICKEN scheme eggs";
homepage = https://github.com/the-kenny/egg2nix;
license = stdenv.lib.licenses.bsd3;
platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.the-kenny ];
};
}

View file

@ -0,0 +1,41 @@
{ stdenv, chicken, makeWrapper }:
{ name, src
, buildInputs ? []
, chickenInstallFlags ? []
, cscOptions ? []
, ...} @ args:
let
overrides = import ./overrides.nix;
baseName = (builtins.parseDrvName name).name;
override = if builtins.hasAttr baseName overrides
then
builtins.getAttr baseName overrides
else
{};
in
stdenv.mkDerivation ({
name = "chicken-${name}";
propagatedBuildInputs = buildInputs;
buildInputs = [ makeWrapper chicken ];
CSC_OPTIONS = stdenv.lib.concatStringsSep " " cscOptions;
installPhase = ''
runHook preInstall
export CHICKEN_INSTALL_PREFIX=$out
export CHICKEN_INSTALL_REPOSITORY=$out/lib/chicken/${toString chicken.binaryVersion}
chicken-install ${stdenv.lib.concatStringsSep " " chickenInstallFlags}
for f in $out/bin/*
do
wrapProgram $f \
--prefix CHICKEN_REPOSITORY_PATH : "$out/lib/chicken/${toString chicken.binaryVersion}/:$CHICKEN_REPOSITORY_PATH" \
--prefix CHICKEN_INCLUDE_PATH : "$CHICKEN_INCLUDE_PATH:$out/share/" \
--prefix PATH : "$out/bin:${chicken}/bin:$CHICKEN_REPOSITORY_PATH"
done
runHook postInstall
'';
} // (builtins.removeAttrs args ["name" "buildInputs"]) // override)

View file

@ -0,0 +1,91 @@
{ pkgs, stdenv }:
rec {
inherit (pkgs) eggDerivation fetchegg;
args = eggDerivation {
name = "args-1.6.0";
src = fetchegg {
name = "args";
version = "1.6.0";
sha256 = "1y9sznh4kxqxvhd8k44bjx0s7xspp52sx4bn8i8i0f8lwch6r2g4";
};
buildInputs = [
srfi-1
srfi-13
srfi-37
];
};
matchable = eggDerivation {
name = "matchable-1.0";
src = fetchegg {
name = "matchable";
version = "1.0";
sha256 = "01vy2ppq3sq0wirvsvl3dh0bwa5jqs1i6rdjdd7pnwj4nncxd1ga";
};
buildInputs = [
];
};
srfi-1 = eggDerivation {
name = "srfi-1-0.5";
src = fetchegg {
name = "srfi-1";
version = "0.5";
sha256 = "0gh1h406xbxwm5gvc5znc93nxp9xjbhyqf7zzga08k5y6igxrlvk";
};
buildInputs = [
];
};
srfi-13 = eggDerivation {
name = "srfi-13-0.2";
src = fetchegg {
name = "srfi-13";
version = "0.2";
sha256 = "0jazbdnn9bjm7wwxqq7xzqxc9zfvaapq565rf1czj6ayl96yvk3n";
};
buildInputs = [
srfi-14
];
};
srfi-14 = eggDerivation {
name = "srfi-14-0.2";
src = fetchegg {
name = "srfi-14";
version = "0.2";
sha256 = "13nm4nn1d52nkvhjizy26z3s6q41x1ml4zm847xzf86x1zwvymni";
};
buildInputs = [
];
};
srfi-37 = eggDerivation {
name = "srfi-37-1.4";
src = fetchegg {
name = "srfi-37";
version = "1.4";
sha256 = "17f593497n70gldkj6iab6ilgryiqar051v6azn1szhnm1lk7dwd";
};
buildInputs = [
];
};
}

View file

@ -0,0 +1,3 @@
;; Eggs used by egg2nix
args
matchable

View file

@ -0,0 +1,10 @@
source $stdenv/setup
header "exporting egg ${eggName} (version $version) into $out"
mkdir -p $out
CHICKEN_EGG_CACHE=. chicken-install -r "${eggName}:${version}"
rm ${eggName}/{STATUS,TIMESTAMP}
cp -r ${eggName}/* $out/
stopNest

View file

@ -0,0 +1,25 @@
# Fetches a chicken egg from henrietta using `chicken-install -r'
# See: http://wiki.call-cc.org/chicken-projects/egg-index-5.html
{ stdenvNoCC, chicken }:
{ name, version, md5 ? "", sha256 ? "" }:
if md5 != "" then
throw "fetchegg does not support md5 anymore, please use sha256"
else
stdenvNoCC.mkDerivation {
name = "chicken-${name}-export";
builder = ./builder.sh;
nativeBuildInputs = [ chicken ];
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = sha256;
inherit version;
eggName = name;
impureEnvVars = stdenvNoCC.lib.fetchers.proxyImpureEnvVars;
}

View file

@ -0,0 +1,2 @@
{
}

View file

@ -0,0 +1,6 @@
addChickenRepositoryPath() {
addToSearchPathWithCustomDelimiter : CHICKEN_REPOSITORY_PATH "$1/lib/chicken/9/"
addToSearchPathWithCustomDelimiter : CHICKEN_INCLUDE_PATH "$1/share/"
}
addEnvHooks "$targetOffset" addChickenRepositoryPath

View file

@ -7,13 +7,13 @@ let
in
stdenv.mkDerivation rec {
name = "nextpnr-${version}";
version = "2018.10.17";
version = "2018.12.29";
src = fetchFromGitHub {
owner = "yosyshq";
repo = "nextpnr";
rev = "529a595157a2eef24f8529b0de0c504a40ed503b";
sha256 = "06yp89rpvb2s4zc1qkbcp76kqwkk9s8j2ckblqw547dy5ah2cl7h";
rev = "eb456ef476e8342b4709d71cbff6ef22a714d6ec";
sha256 = "1gw9r8c6wyfhbzhm3hz1xpbq8ax27qnjwlrimzcykrr9r1cykiik";
};
nativeBuildInputs = [ cmake ];

View file

@ -4,7 +4,7 @@
}:
let
version = "0.7.1";
version = "0.7.2";
# Build a sort of "union package" with all the native dependencies we
# have: Lua (or LuaJIT), readline, etc. Then, we can depend on this
# and refer to ${urn-rt} instead of ${lua}, ${readline}, etc.
@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
owner = "urn";
repo = "urn";
rev = "v${version}";
sha256 = "1vw0sljrczbwl7fl5d3frbpklb0larzyp7s7mwwprkb07b027sd5";
sha256 = "0nclr3d8ap0y5cg36i7g4ggdqci6m5q27y9f26b57km8p266kcpy";
};
buildInputs = [ makeWrapper ];

View file

@ -87,6 +87,7 @@ self: super: {
psqueues = dontCheck super.psqueues; # won't cope with QuickCheck 2.12.x
system-fileio = dontCheck super.system-fileio; # avoid dependency on broken "patience"
unicode-transforms = dontCheck super.unicode-transforms;
RSA = dontCheck super.RSA; # https://github.com/GaloisInc/RSA/issues/14
monad-par = dontCheck super.monad-par; # https://github.com/simonmar/monad-par/issues/66
# https://github.com/jgm/skylighting/issues/55

View file

@ -1,22 +1,26 @@
{ stdenv, fetchurl, jdk }:
{ stdenv, fetchurl, jdk, makeWrapper }:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "picoLisp-${version}";
version = "16.12";
version = "18.12";
src = fetchurl {
url = "https://www.software-lab.de/${name}.tgz";
sha256 = "1k3x6mvk9b34iiyml142bzh3gf241f25ywjlaagbxzb9vklpws75";
sha256 = "0hvgq2vc03bki528jqn95xmvv7mw8xx832spfczhxc16wwbrnrhk";
};
buildInputs = optional stdenv.is64bit jdk;
patchPhase = optionalString stdenv.isAarch32 ''
sed -i s/-m32//g Makefile
cat >>Makefile <<EOF
ext.o: ext.c
\$(CC) \$(CFLAGS) -fPIC -D_OS='"\$(OS)"' \$*.c
ht.o: ht.c
\$(CC) \$(CFLAGS) -fPIC -D_OS='"\$(OS)"' \$*.c
EOF
buildInputs = [makeWrapper] ++ optional stdenv.is64bit jdk;
patchPhase = ''
sed -i "s/which java/command -v java/g" mkAsm
${optionalString stdenv.isAarch32 ''
sed -i s/-m32//g Makefile
cat >>Makefile <<EOF
ext.o: ext.c
\$(CC) \$(CFLAGS) -fPIC -D_OS='"\$(OS)"' \$*.c
ht.o: ht.c
\$(CC) \$(CFLAGS) -fPIC -D_OS='"\$(OS)"' \$*.c
EOF
''}
'';
sourceRoot = ''picoLisp/src${optionalString stdenv.is64bit "64"}'';
installPhase = ''
@ -27,11 +31,13 @@ stdenv.mkDerivation rec {
ln -s "$out/share/picolisp/build-dir" "$out/lib/picolisp"
ln -s "$out/lib/picolisp/bin/picolisp" "$out/bin/picolisp"
cat >"$out/bin/pil" <<EOF
#! /bin/sh
exec $out/bin/picolisp $out/lib/picolisp/lib.l @lib/misc.l @lib/btree.l @lib/db.l @lib/pilog.l
EOF
chmod +x "$out/bin/pil"
makeWrapper $out/bin/picolisp $out/bin/pil \
--add-flags "$out/lib/picolisp/lib.l" \
--add-flags "@lib/misc.l" \
--add-flags "@lib/btree.l" \
--add-flags "@lib/db.l" \
--add-flags "@lib/pilog.l"
mkdir -p "$out/share/emacs"
ln -s "$out/lib/picolisp/lib/el" "$out/share/emacs/site-lisp"

View file

@ -3,13 +3,13 @@
stdenv.mkDerivation rec
{
name = "alembic-${version}";
version = "1.7.9";
version = "1.7.10";
src = fetchFromGitHub {
owner = "alembic";
repo = "alembic";
rev = "${version}";
sha256 = "0xyclln1m4079akr31vib242912004lln678prda0qwmwvsdrf7z";
sha256 = "186wwlbz90gmzr4vsykk4z8bgkd45yhbyfpn8bqwidf9fcimcr2a";
};
outputs = [ "bin" "dev" "out" "lib" ];

View file

@ -0,0 +1,26 @@
--- a/addons/allegrogl/include/alleggl.h
+++ b/addons/allegrogl/include/alleggl.h
@@ -63,9 +63,11 @@ typedef __int64 INT64;
/* HACK: Prevent both Mesa and SGI's broken headers from screwing us */
#define __glext_h_
#define __glxext_h_
+#define __glx_glxext_h_
#include <GL/gl.h>
#undef __glext_h_
#undef __glxext_h_
+#undef __glx_glxext_h_
#endif /* ALLEGRO_MACOSX */
--- a/addons/allegrogl/include/allegrogl/GLext/glx_ext_defs.h
+++ b/addons/allegrogl/include/allegrogl/GLext/glx_ext_defs.h
@@ -1,7 +1,9 @@
/* HACK: Prevent both Mesa and SGI's broken headers from screwing us */
#define __glxext_h_
+#define __glx_glxext_h_
#include <GL/glx.h>
#undef __glxext_h_
+#undef __glx_glxext_h_
#ifndef GLX_VERSION_1_3
#define AGLX_VERSION_1_3

View file

@ -13,6 +13,7 @@ stdenv.mkDerivation rec {
};
patches = [
./allegro4-mesa-18.2.5.patch
./nix-unstable-sandbox-fix.patch
];

View file

@ -1,4 +1,4 @@
{ stdenv, symlinkJoin, fetchurl, fetchFromGitHub, boost, brotli, cmake, double-conversion, flatbuffers, gflags, glog, gtest_static, lz4, perl, python, rapidjson, snappy, thrift, which, zlib, zstd }:
{ stdenv, symlinkJoin, fetchurl, fetchFromGitHub, boost, brotli, cmake, double-conversion, flatbuffers, gflags, glog, gtest, lz4, perl, python, rapidjson, snappy, thrift, which, zlib, zstd }:
let
parquet-testing = fetchFromGitHub {
@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
FLATBUFFERS_HOME = flatbuffers;
GFLAGS_HOME = gflags;
GLOG_HOME = glog;
GTEST_HOME = symlinkJoin { name="gtest-wrap"; paths = [ gtest_static gtest_static.dev ]; };
GTEST_HOME = symlinkJoin { name="gtest-wrap"; paths = [ gtest gtest.dev ]; };
LZ4_HOME = symlinkJoin { name="lz4-wrap"; paths = [ lz4 lz4.dev ]; };
RAPIDJSON_HOME = rapidjson;
SNAPPY_HOME = symlinkJoin { name="snappy-wrap"; paths = [ snappy snappy.dev ]; };

View file

@ -146,11 +146,11 @@ in rec {
};
en = buildDict rec {
shortName = "en-2016.06.26-0";
shortName = "en-2018.04.16-0";
fullName = "English";
src = fetchurl {
url = "mirror://gnu/aspell/dict/en/aspell6-${shortName}.tar.bz2";
sha256 = "1clzsfq2cbgp6wvfr2qwfsd2nziipml5m5vqm45r748wczlxihv1";
sha256 = "0bxxdzkk9g27plg22y9qzsx9cfjw3aa29w5bmzs561qc9gkp247i";
};
};

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "capstone-${version}";
version = "3.0.5";
version = "4.0";
src = fetchurl {
url = "https://github.com/aquynh/capstone/archive/${version}.tar.gz";
sha256 = "1wbd1g3r32ni6zd9vwrq3kn7fdp9y8qwn9zllrrbk8n5wyaxcgci";
sha256 = "0yp6y5m3v674i2pq6s804ikvz43gzgsjwq1maqhmj3b730b4dii6";
};
configurePhase = '' patchShebangs make.sh '';

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, autoreconfHook }:
{ stdenv, fetchFromGitHub, fetchpatch, autoreconfHook }:
stdenv.mkDerivation rec {
name = "editline-${version}";
@ -10,6 +10,15 @@ stdenv.mkDerivation rec {
sha256 = "0a751dp34mk9hwv59ss447csknpm5i5cgd607m3fqf24rszyhbf2";
};
patches = [
# will be in 1.17.0
(fetchpatch {
name = "redisplay-clear-screen.patch";
url = "https://github.com/troglobit/editline/commit/a4b67d226829a55bc8501f36708d5e104a52fbe4.patch";
sha256 = "0dbgdqxa4x9wgr9kx89ql74np4qq6fzdbph9j9c65ns3gnaanjkw";
})
];
nativeBuildInputs = [ autoreconfHook ];
outputs = [ "out" "dev" "man" "doc" ];

View file

@ -2,38 +2,16 @@
, autoconf }:
stdenv.mkDerivation rec {
name = "exiv2-0.26.2018.06.09";
name = "exiv2-0.26.2018.12.30";
#url = "http://www.exiv2.org/builds/${name}-trunk.tar.gz";
src = fetchFromGitHub rec {
owner = "exiv2";
repo = "exiv2";
rev = "4aa57ad";
sha256 = "1kblpxbi4wlb0l57xmr7g23zn9adjmfswhs6kcwmd7skwi2yivcd";
rev = "f5d0b25"; # https://github.com/Exiv2/exiv2/commits/0.26
sha256 = "1blaz3g8dlij881g14nv2nsgr984wy6ypbwgi2pixk978p0gm70i";
};
patches = [
(fetchurl rec {
name = "CVE-2017-9239.patch";
url = let patchname = "0006-1296-Fix-submitted.patch";
in "https://src.fedoraproject.org/lookaside/pkgs/exiv2/${patchname}"
+ "/sha512/${sha512}/${patchname}";
sha512 = "3f9242dbd4bfa9dcdf8c9820243b13dc14990373a800c4ebb6cf7eac5653cfef"
+ "e6f2c47a94fbee4ed24f0d8c2842729d721f6100a2b215e0f663c89bfefe9e32";
})
# Two backports from master, submitted as https://github.com/Exiv2/exiv2/pull/398
(fetchpatch {
name = "CVE-2018-12264.diff";
url = "https://github.com/vcunat/exiv2/commit/fd18e853.diff";
sha256 = "0y7ahh45lpaiazjnfllndfaa5pyixh6z4kcn2ywp7qy4ra7qpwdr";
})
(fetchpatch {
name = "CVE-2018-12265.diff";
url = "https://github.com/vcunat/exiv2/commit/9ed1671bd4.diff";
sha256 = "1cn446pfcgsh1bn9vxikkkcy1cqq7ghz2w291h1094ydqg6w7q6w";
})
];
postPatch = "patchShebangs ./src/svn_version.sh";
preConfigure = "make config"; # needed because not using tarball

View file

@ -1,4 +1,5 @@
{ stdenv, fetchFromGitHub, autoreconfHook, givaro, pkgconfig, blas
, fetchpatch
, gmpxx
, optimize ? false # impure
}:
@ -14,6 +15,15 @@ stdenv.mkDerivation rec {
sha256 = "1cqhassj2dny3gx0iywvmnpq8ca0d6m82xl5rz4mb8gaxr2kwddl";
};
patches = [
# https://github.com/linbox-team/fflas-ffpack/issues/146
(fetchpatch {
name = "fix-flaky-test-fgemm-check.patch";
url = "https://github.com/linbox-team/fflas-ffpack/commit/d8cd67d91a9535417a5cb193cf1540ad6758a3db.patch";
sha256 = "1gnfc616fvnlr0smvz6lb2d445vn8fgv6vqcr6pwm3dj4wa6v3b3";
})
];
checkInputs = [
gmpxx
];

View file

@ -2,7 +2,7 @@
, glib, libgudev, udisks2, libgcrypt, libcap, polkit
, libgphoto2, avahi, libarchive, fuse, libcdio
, libxml2, libxslt, docbook_xsl, docbook_xml_dtd_42, samba, libmtp
, gnomeSupport ? false, gnome, makeWrapper, gcr
, gnomeSupport ? false, gnome, gcr, wrapGAppsHook
, libimobiledevice, libbluray, libcdio-paranoia, libnfs, openssh
, libsecret, libgdata, python3
}:
@ -28,7 +28,7 @@ in stdenv.mkDerivation rec {
nativeBuildInputs = [
meson ninja python3
pkgconfig gettext makeWrapper
pkgconfig gettext wrapGAppsHook
libxml2 libxslt docbook_xsl docbook_xml_dtd_42
];
@ -40,6 +40,7 @@ in stdenv.mkDerivation rec {
# ToDo: a ligther version of libsoup to have FTP/HTTP support?
] ++ stdenv.lib.optionals gnomeSupport (with gnome; [
libsoup gcr
glib-networking # TLS support
gnome-online-accounts libsecret libgdata
]);
@ -57,14 +58,6 @@ in stdenv.mkDerivation rec {
doCheck = false; # fails with "ModuleNotFoundError: No module named 'gi'"
doInstallCheck = doCheck;
preFixup = ''
for f in $out/libexec/*; do
wrapProgram $f \
${stdenv.lib.optionalString gnomeSupport "--prefix GIO_EXTRA_MODULES : \"${stdenv.lib.getLib gnome.dconf}/lib/gio/modules\""} \
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
done
'';
passthru = {
updateScript = gnome3.updateScript {
packageName = pname;

View file

@ -1,4 +1,4 @@
{ stdenv, fetchgit, yasm, perl, cmake, pkgconfig, python3Packages }:
{ stdenv, fetchgit, yasm, perl, cmake, pkgconfig, python3, writeText }:
stdenv.mkDerivation rec {
name = "libaom-${version}";
@ -10,8 +10,23 @@ stdenv.mkDerivation rec {
sha256 = "07h2vhdiq7c3fqaz44rl4vja3dgryi6n7kwbwbj1rh485ski4j82";
};
buildInputs = [ perl yasm ];
nativeBuildInputs = [ cmake pkgconfig python3Packages.python ];
nativeBuildInputs = [
yasm perl cmake pkgconfig python3
];
cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
];
preConfigure = ''
# build uses `git describe` to set the build version
cat > $NIX_BUILD_TOP/git << "EOF"
#!${stdenv.shell}
echo v${version}
EOF
chmod +x $NIX_BUILD_TOP/git
export PATH=$NIX_BUILD_TOP:$PATH
'';
meta = with stdenv.lib; {
description = "AV1 Bitstream and Decoding Library";

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