···56 or list elements should be aligned:
57<programlisting>
58# A long list.
59-list =
60- [ elem1
61- elem2
62- elem3
63- ];
6465# A long attribute set.
66-attrs =
67- { attr1 = short_expr;
68- attr2 =
69- if true then big_expr else big_expr;
70- };
71-72-# Alternatively:
73attrs = {
74 attr1 = short_expr;
75 attr2 =
76 if true then big_expr else big_expr;
77};
00000000000078</programlisting>
79 </para>
80 </listitem>
···56 or list elements should be aligned:
57<programlisting>
58# A long list.
59+list = [
60+ elem1
61+ elem2
62+ elem3
63+];
6465# A long attribute set.
000000066attrs = {
67 attr1 = short_expr;
68 attr2 =
69 if true then big_expr else big_expr;
70};
71+72+# Combined
73+listOfAttrs = [
74+ {
75+ attr1 = 3;
76+ attr2 = "fff";
77+ }
78+ {
79+ attr1 = 5;
80+ attr2 = "ggg";
81+ }
82+];
83</programlisting>
84 </para>
85 </listitem>
+1-1
doc/cross-compilation.xml
···385 Eventually we would like to make these platform examples an unnecessary
386 convenience so that
387<programlisting>
388-nix-build <nixpkgs> --arg crossSystem.config '<arch>-<os>-<vendor>-<abi>' -A whatever</programlisting>
389 works in the vast majority of cases. The problem today is dependencies on
390 other sorts of configuration which aren't given proper defaults. We rely on
391 the examples to crudely to set those configuration parameters in some
···385 Eventually we would like to make these platform examples an unnecessary
386 convenience so that
387<programlisting>
388+nix-build <nixpkgs> --arg crossSystem '{ config = "<arch>-<os>-<vendor>-<abi>"; }' -A whatever</programlisting>
389 works in the vast majority of cases. The problem today is dependencies on
390 other sorts of configuration which aren't given proper defaults. We rely on
391 the examples to crudely to set those configuration parameters in some
+11
doc/languages-frameworks/ruby.xml
···51 </para>
5253 <para>
0000000000054 For tools written in Ruby - i.e. where the desire is to install a package and
55 then execute e.g. <command>rake</command> at the command line, there is an
56 alternative builder called <literal>bundlerApp</literal>. Set up the
···51 </para>
5253 <para>
54+ Updating Ruby packages can then be done like this:
55+ </para>
56+57+<screen>
58+<![CDATA[$ cd pkgs/servers/monitoring/sensu
59+$ nix-shell -p bundler --run 'bundle lock --update'
60+$ nix-shell -p bundix --run 'bundix'
61+]]>
62+</screen>
63+64+ <para>
65 For tools written in Ruby - i.e. where the desire is to install a package and
66 then execute e.g. <command>rake</command> at the command line, there is an
67 alternative builder called <literal>bundlerApp</literal>. Set up the
+36-7
doc/stdenv.xml
···2428 <para>
2429 This is a special setup hook which helps in packaging proprietary
2430 software in that it automatically tries to find missing shared library
2431- dependencies of ELF files. All packages within the
2432- <envar>runtimeDependencies</envar> environment variable are
2433- unconditionally added to executables, which is useful for programs that
2434- use <citerefentry>
2435- <refentrytitle>dlopen</refentrytitle>
2436- <manvolnum>3</manvolnum> </citerefentry> to load libraries at runtime.
00000000000000000002437 </para>
2438 </listitem>
2439 </varlistentry>
···2455 use the cntr exec subcommand. Note that <command>cntr</command> also
2456 needs to be executed on the machine that is doing the build, which might
2457 be not the case when remote builders are enabled.
2458- <command>cntr</command> is only supported on linux based platforms.
00000000002459 </para>
2460 </listitem>
2461 </varlistentry>
···2428 <para>
2429 This is a special setup hook which helps in packaging proprietary
2430 software in that it automatically tries to find missing shared library
2431+ dependencies of ELF files based on the given
2432+ <varname>buildInputs</varname> and <varname>nativeBuildInputs</varname>.
2433+ </para>
2434+ <para>
2435+ You can also specify a <envar>runtimeDependencies</envar> environment
2436+ variable which lists dependencies that are unconditionally added to all
2437+ executables.
2438+ </para>
2439+ <para>
2440+ This is useful for programs that use <citerefentry>
2441+ <refentrytitle>dlopen</refentrytitle>
2442+ <manvolnum>3</manvolnum>
2443+ </citerefentry> to load libraries at runtime.
2444+ </para>
2445+ <para>
2446+ In certain situations you may want to run the main command
2447+ (<command>autoPatchelf</command>) of the setup hook on a file or a set
2448+ of directories instead of unconditionally patching all outputs. This
2449+ can be done by setting the <envar>dontAutoPatchelf</envar> environment
2450+ variable to a non-empty value.
2451+ </para>
2452+ <para>
2453+ The <command>autoPatchelf</command> command also recognizes a
2454+ <parameter class="command">--no-recurse</parameter> command line flag,
2455+ which prevents it from recursing into subdirectories.
2456 </para>
2457 </listitem>
2458 </varlistentry>
···2474 use the cntr exec subcommand. Note that <command>cntr</command> also
2475 needs to be executed on the machine that is doing the build, which might
2476 be not the case when remote builders are enabled.
2477+ <command>cntr</command> is only supported on Linux-based platforms. To
2478+ use it first add <literal>cntr</literal> to your
2479+ <literal>environment.systemPackages</literal> on NixOS or alternatively to
2480+ the root user on non-NixOS systems. Then in the package that is supposed
2481+ to be inspected, add <literal>breakpointHook</literal> to
2482+ <literal>nativeBuildInputs</literal>.
2483+<programlisting>
2484+ nativeBuildInputs = [ breakpointHook ];
2485+ </programlisting>
2486+ When a build failure happens there will be an instruction printed that
2487+ shows how to attach with <literal>cntr</literal> to the build sandbox.
2488 </para>
2489 </listitem>
2490 </varlistentry>
···127[ "example.org" "example.gov" ]
128</screen>
129 </para>
130+131+ <para>
132+ While abstracting your configuration, you may find it useful to generate
133+ modules using code, instead of writing files. The example
134+ below would have the same effect as importing a file which sets those
135+ options.
136+ <screen>
137+ { config, pkgs, ... }:
138+139+ let netConfig = { hostName }: {
140+ networking.hostName = hostName;
141+ networking.useDHCP = false;
142+ };
143+144+ in
145+146+ { imports = [ (netConfig "nixos.localdomain") ]; }
147+ </screen>
148+</para>
149</section>
···19> startAll
20> testScript
21> $machine->succeed("touch /tmp/foo")
22-> print($machine->succeed("pwd"), "\n") # Show stdout of command
23</screen>
24 The function <command>testScript</command> executes the entire test script
25 and drops you back into the test driver command line upon its completion.
···19> startAll
20> testScript
21> $machine->succeed("touch /tmp/foo")
22+> print($machine->succeed("pwd")) # Show stdout of command
23</screen>
24 The function <command>testScript</command> executes the entire test script
25 and drops you back into the test driver command line upon its completion.
···108<programlisting>
109$machine->start;
110$machine->waitForUnit("default.target");
111-die unless $machine->succeed("uname") =~ /Linux/;
112</programlisting>
113 The first line is actually unnecessary; machines are implicitly started when
114 you first execute an action on them (such as <literal>waitForUnit</literal>
···108<programlisting>
109$machine->start;
110$machine->waitForUnit("default.target");
111+$machine->succeed("uname") =~ /Linux/ or die;
112</programlisting>
113 The first line is actually unnecessary; machines are implicitly started when
114 you first execute an action on them (such as <literal>waitForUnit</literal>
+10
nixos/doc/manual/release-notes/rl-1903.xml
···113 </listitem>
114 <listitem>
115 <para>
0000000000116 Package <varname>rabbitmq_server</varname> is renamed to
117 <varname>rabbitmq-server</varname>.
118 </para>
···113 </listitem>
114 <listitem>
115 <para>
116+ The <literal>ntp</literal> module now has sane default restrictions.
117+ If you're relying on the previous defaults, which permitted all queries
118+ and commands from all firewall-permitted sources, you can set
119+ <varname>services.ntp.restrictDefault</varname> and
120+ <varname>services.ntp.restrictSource</varname> to
121+ <literal>[]</literal>.
122+ </para>
123+ </listitem>
124+ <listitem>
125+ <para>
126 Package <varname>rabbitmq_server</varname> is renamed to
127 <varname>rabbitmq-server</varname>.
128 </para>
+12-8
nixos/lib/make-system-tarball.nix
···1-{ stdenv, perl, pixz, pathsFromGraph
23, # The file name of the resulting tarball
4 fileName ? "nixos-system-${stdenv.hostPlatform.system}"
···29, extraInputs ? [ pixz ]
30}:
310000032stdenv.mkDerivation {
33 name = "tarball";
34 builder = ./make-system-tarball.sh;
35- buildInputs = [ perl ] ++ extraInputs;
3637- inherit fileName pathsFromGraph extraArgs extraCommands compressCommand;
3839 # !!! should use XML.
40 sources = map (x: x.source) contents;
41 targets = map (x: x.target) contents;
4243 # !!! should use XML.
44- objects = map (x: x.object) storeContents;
45- symlinks = map (x: x.symlink) storeContents;
4647- # For obtaining the closure of `storeContents'.
48- exportReferencesGraph =
49- map (x: [("closure-" + baseNameOf x.object) x.object]) storeContents;
5051 extension = compressionExtension;
52}
···3sources_=($sources)
4targets_=($targets)
56-echo $objects
7objects=($objects)
8symlinks=($symlinks)
9···13 res="$1"
14 if test "${res:0:1}" = /; then res=${res:1}; fi
15}
16-17-touch pathlist
1819# Add the individual files.
20for ((i = 0; i < ${#targets_[@]}; i++)); do
···252627# Add the closures of the top-level store objects.
028mkdir -p nix/store
29-storePaths=$(perl $pathsFromGraph closure-*)
30-for i in $storePaths; do
31 cp -a "$i" "${i:1}"
32done
33···35# TODO tar ruxo
36# Also include a manifest of the closures in a format suitable for
37# nix-store --load-db.
38-printRegistration=1 perl $pathsFromGraph closure-* > nix-path-registration
3940# Add symlinks to the top-level store objects.
41for ((n = 0; n < ${#objects[*]}; n++)); do
···3sources_=($sources)
4targets_=($targets)
506objects=($objects)
7symlinks=($symlinks)
8···12 res="$1"
13 if test "${res:0:1}" = /; then res=${res:1}; fi
14}
001516# Add the individual files.
17for ((i = 0; i < ${#targets_[@]}; i++)); do
···222324# Add the closures of the top-level store objects.
25+chmod +w .
26mkdir -p nix/store
27+for i in $(< $closureInfo/store-paths); do
028 cp -a "$i" "${i:1}"
29done
30···32# TODO tar ruxo
33# Also include a manifest of the closures in a format suitable for
34# nix-store --load-db.
35+cp $closureInfo/registration nix-path-registration
3637# Add symlinks to the top-level store objects.
38for ((n = 0; n < ${#objects[*]}; n++)); do
+1-1
nixos/lib/testing.nix
···1{ system
2-, pkgs
3 # Use a minimal kernel?
4, minimal ? false
5 # Ignored
···1{ system
2+, pkgs ? import ../.. { inherit system config; }
3 # Use a minimal kernel?
4, minimal ? false
5 # Ignored
···238 User = "postgres";
239 Group = "postgres";
240 PermissionsStartOnly = true;
000241242 # Shut down Postgres using SIGINT ("Fast Shutdown mode"). See
243 # http://www.postgresql.org/docs/current/static/server-shutdown.html
···238 User = "postgres";
239 Group = "postgres";
240 PermissionsStartOnly = true;
241+ Type = if lib.versionAtLeast cfg.package.version "9.6"
242+ then "notify"
243+ else "simple";
244245 # Shut down Postgres using SIGINT ("Fast Shutdown mode"). See
246 # http://www.postgresql.org/docs/current/static/server-shutdown.html
+14-3
nixos/modules/services/mail/rspamd.nix
···45 else "${config.socket}${maybeOption "mode"}${maybeOption "owner"}${maybeOption "group"}";
46 };
4748- workerOpts = { name, ... }: {
0049 options = {
50 enable = mkOption {
51 type = types.nullOr types.bool;
···59 };
60 type = mkOption {
61 type = types.nullOr (types.enum [
62- "normal" "controller" "fuzzy_storage" "rspamd_proxy" "lua"
63 ]);
64- description = "The type of this worker";
00000000065 };
66 bindSockets = mkOption {
67 type = types.listOf (types.either types.str (types.submodule bindSocketOpts));
···45 else "${config.socket}${maybeOption "mode"}${maybeOption "owner"}${maybeOption "group"}";
46 };
4748+ traceWarning = w: x: builtins.trace "[1;31mwarning: ${w}[0m" x;
49+50+ workerOpts = { name, options, ... }: {
51 options = {
52 enable = mkOption {
53 type = types.nullOr types.bool;
···61 };
62 type = mkOption {
63 type = types.nullOr (types.enum [
64+ "normal" "controller" "fuzzy_storage" "rspamd_proxy" "lua" "proxy"
65 ]);
66+ description = ''
67+ The type of this worker. The type <literal>proxy</literal> is
68+ deprecated and only kept for backwards compatibility and should be
69+ replaced with <literal>rspamd_proxy</literal>.
70+ '';
71+ apply = let
72+ from = "services.rspamd.workers.\”${name}\".type";
73+ files = options.type.files;
74+ warning = "The option `${from}` defined in ${showFiles files} has enum value `proxy` which has been renamed to `rspamd_proxy`";
75+ in x: if x == "proxy" then traceWarning warning "rspamd_proxy" else x;
76 };
77 bindSockets = mkOption {
78 type = types.listOf (types.either types.str (types.submodule bindSocketOpts));
···22 # Not supported in systemd-nspawn containers.
23 security.audit.enable = false;
2425- # Make sure that root user in container will talk to host nix-daemon
26- environment.etc."profile".text = ''
27- export NIX_REMOTE=daemon
28- '';
29-30-3132 };
33
···22 # Not supported in systemd-nspawn containers.
23 security.audit.enable = false;
2425+ # Use the host's nix-daemon.
26+ environment.variables.NIX_REMOTE = "daemon";
00002728 };
29
+38
nixos/modules/virtualisation/docker-image.nix
···17 # Socket activated ssh presents problem in Docker.
18 services.openssh.startWhenNeeded = false;
19}
00000000000000000000000000000000000000
···17 # Socket activated ssh presents problem in Docker.
18 services.openssh.startWhenNeeded = false;
19}
20+21+# Example usage:
22+#
23+## default.nix
24+# let
25+# nixos = import <nixpkgs/nixos> {
26+# configuration = ./configuration.nix;
27+# system = "x86_64-linux";
28+# };
29+# in
30+# nixos.config.system.build.tarball
31+#
32+## configuration.nix
33+# { pkgs, config, lib, ... }:
34+# {
35+# imports = [
36+# <nixpkgs/nixos/modules/virtualisation/docker-image.nix>
37+# <nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
38+# ];
39+#
40+# documentation.doc.enable = false;
41+#
42+# environment.systemPackages = with pkgs; [
43+# bashInteractive
44+# cacert
45+# nix
46+# ];
47+# }
48+#
49+## Run
50+# Build the tarball:
51+# $ nix-build default.nix
52+# Load into docker:
53+# $ docker import result/tarball/nixos-system-*.tar.xz nixos-docker
54+# Boots into systemd
55+# $ docker run --privileged -it nixos-docker /init
56+# Log into the container
57+# $ docker exec -it <container-name> /run/current-system/sw/bin/bash
···39 '';
4041 meta = with stdenv.lib; {
42- homepage = http://repo.or.cz/w/llpp.git;
43 description = "A MuPDF based PDF pager written in OCaml";
44 platforms = platforms.linux;
45 maintainers = with maintainers; [ pSub ];
···39 '';
4041 meta = with stdenv.lib; {
42+ homepage = https://repo.or.cz/w/llpp.git;
43 description = "A MuPDF based PDF pager written in OCaml";
44 platforms = platforms.linux;
45 maintainers = with maintainers; [ pSub ];
···1{ stdenv, fetchFromGitHub, gettext, makeWrapper, tcl, which, writeScript
2, ncurses, perl , cyrus_sasl, gss, gpgme, kerberos, libidn, libxml2, notmuch, openssl
3-, lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42, mime-types }:
045let
6 muttWrapper = writeScript "mutt" ''
···28 buildInputs = [
29 cyrus_sasl gss gpgme kerberos libidn ncurses
30 notmuch openssl perl lmdb
31- mime-types
32 ];
3334 nativeBuildInputs = [
···47 --replace http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd ${docbook_xml_dtd_42}/xml/dtd/docbook/docbookx.dtd
48 done
49050 # allow neomutt to map attachments to their proper mime.types if specified wrongly
51 # and use a far more comprehensive list than the one shipped with neomutt
52 substituteInPlace sendlib.c \
53- --replace /etc/mime.types ${mime-types}/etc/mime.types
5455 # The string conversion tests all fail with the first version of neomutt
56 # that has tests (20180223) as well as 20180716 so we disable them for now.
···1{ stdenv, fetchFromGitHub, gettext, makeWrapper, tcl, which, writeScript
2, ncurses, perl , cyrus_sasl, gss, gpgme, kerberos, libidn, libxml2, notmuch, openssl
3+, lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42, mailcap
4+}:
56let
7 muttWrapper = writeScript "mutt" ''
···29 buildInputs = [
30 cyrus_sasl gss gpgme kerberos libidn ncurses
31 notmuch openssl perl lmdb
32+ mailcap
33 ];
3435 nativeBuildInputs = [
···48 --replace http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd ${docbook_xml_dtd_42}/xml/dtd/docbook/docbookx.dtd
49 done
5051+52 # allow neomutt to map attachments to their proper mime.types if specified wrongly
53 # and use a far more comprehensive list than the one shipped with neomutt
54 substituteInPlace sendlib.c \
55+ --replace /etc/mime.types ${mailcap}/etc/mime.types
5657 # The string conversion tests all fail with the first version of neomutt
58 # that has tests (20180223) as well as 20180716 so we disable them for now.
···23Sage is a pretty complex package that depends on many other complex packages and patches some of those. As a result, the sage nix package is also quite complex.
45-Don't feel discouraged to fix, simplify or improve things though. Here's a quick overview over the functions of the individual files:
6-7-- `sage-src.nix`
8- Downloads the source code and applies patches. This makes sure that all the other files work with the same sage source. If you want to apply a patch to sage or update sage to a new version, this is the place to do it.
9-10-- `env-locations.nix`
11- Creates a bash file that sets a bunch of environment variables telling sage where to find various packages and files. The definitions of those environment variables can be found in the sage source in the `src/env.py` file. This bash file needs to be sourced before sage is started (done in `sage-env.nix` and `sagedoc.nix`).
12-13-- `sage-env.nix`
14- Sets all environment variables sage needs to run. This includes the package locations defined in `env-locations.nix` as well as the location of sage itself and its various subdirectories.
15-16-- `sagelib.nix`
17- Defines the main sage package (without setting the necessary environments or running any tests).
18-19-- `sage-with-env.nix`
20- Wraps sage in the necessary environment.
21-22-- `sage.nix`
23- Runs sages doctests.
24-25-- `sage-wrapper.nix`
26- Optionally tells sage where do find the docs.
27-28-- `sagedoc.nix`
29- Builds and tests the sage html documentation. Can be used for offline documentation viewing as well as the sage `browse_sage_doc` and `search_doc` functions.
30-31-- `sagenb.nix`
32- The (semi deprecated) sage notebook.
33-34-- `default.nix`
35- Introduces necessary overrides, defines new packages and ties everything together (returning the `sage` package).
36-37-- `flask-oldsessions.nix`, `flask-openid.nix`, `python-openid.nix`
38- These are python packages that were rejected from the main nixpkgs tree because they appear unmaintained. They are needed for the (semi-deprecated) sage notebook. Since that notebook is still needed to run the sage doctests, these packages are included but not exposed to the rest of nixpkgs.
39-40-- `pybrial.nix`
41- pybrial is a dependency of sage. However, pybrial itself also has sage as a dependency. Because of that circular dependency, pybrial is hidden from the rest of nixpkgs (just as the flask packages and python-openid.
42-43-- `openblas-pc.nix`
44- This creates a `.pc` file to be read by `pkg-config` that allows openblas to take on different roles, like `cblas` or `lapack`.
4546## The sage build is broken
47
···23Sage is a pretty complex package that depends on many other complex packages and patches some of those. As a result, the sage nix package is also quite complex.
45+Don't feel discouraged to fix, simplify or improve things though. The individual files have comments explaining their purpose. The most importent ones are `default.nix` linking everything together, `sage-src.nix` adding patches and `sagelib.nix` building the actual sage package.
00000000000000000000000000000000000000067## The sage build is broken
8
+90-54
pkgs/applications/science/math/sage/default.nix
···1-{ nixpkgs
2, withDoc ? false
3}:
400005let
6- inherit (nixpkgs) fetchpatch fetchurl symlinkJoin callPackage nodePackages;
78 # https://trac.sagemath.org/ticket/15980 for tracking of python3 support
9- python = nixpkgs.python2.override {
10 packageOverrides = self: super: {
11 # python packages that appear unmaintained and were not accepted into the nixpkgs
12 # tree because of that. These packages are only dependencies of the more-or-less
13 # deprecated sagenb. However sagenb is still a default dependency and the doctests
14 # depend on it.
15 # See https://github.com/NixOS/nixpkgs/pull/38787 for a discussion.
00016 flask-oldsessions = self.callPackage ./flask-oldsessions.nix {};
17 flask-openid = self.callPackage ./flask-openid.nix {};
18 python-openid = self.callPackage ./python-openid.nix {};
00019020 pybrial = self.callPackage ./pybrial.nix {};
21022 sagelib = self.callPackage ./sagelib.nix {
23 inherit flint ecl arb;
24- inherit sage-src openblas-blas-pc openblas-cblas-pc openblas-lapack-pc pynac singular;
25- linbox = nixpkgs.linbox.override { withSage = true; };
26- };
27-28- sagenb = self.callPackage ./sagenb.nix {
29- mathjax = nodePackages.mathjax;
30- };
31-32- sagedoc = self.callPackage ./sagedoc.nix {
33- inherit sage-src;
34 };
003536- env-locations = self.callPackage ./env-locations.nix {
37- inherit pari_data ecl;
38- inherit singular;
39- three = nodePackages.three;
40- mathjax = nodePackages.mathjax;
41- };
0000000004243- sage-env = self.callPackage ./sage-env.nix {
44- inherit sage-src python rWrapper openblas-cblas-pc ecl singular palp flint pynac pythonEnv;
45- pkg-config = nixpkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
46- };
000004748- sage-with-env = self.callPackage ./sage-with-env.nix {
49- inherit pythonEnv;
50- inherit sage-src openblas-blas-pc openblas-cblas-pc openblas-lapack-pc pynac singular;
51- pkg-config = nixpkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
52- three = nodePackages.three;
53- };
005455- sage = self.callPackage ./sage.nix { };
00005657- sage-wrapper = self.callPackage ./sage-wrapper.nix {
58- inherit sage-src withDoc;
59- };
60- };
00061 };
6263- openblas-blas-pc = callPackage ./openblas-pc.nix { name = "blas"; };
64- openblas-cblas-pc = callPackage ./openblas-pc.nix { name = "cblas"; };
65- openblas-lapack-pc = callPackage ./openblas-pc.nix { name = "lapack"; };
00006667 sage-src = callPackage ./sage-src.nix {};
68···77 sympy
78 fpylll
79 matplotlib
080 scipy
81 ipywidgets
82 rpy2
···91 } // { extraLibs = pythonRuntimeDeps; }; # make the libs accessible
9293 # needs to be rWrapper, standard "R" doesn't include default packages
94- rWrapper = nixpkgs.rWrapper.override {
95 # https://trac.sagemath.org/ticket/25674
96- R = nixpkgs.R.overrideAttrs (attrs: rec {
97 name = "R-3.4.4";
098 src = fetchurl {
99 url = "http://cran.r-project.org/src/base/R-3/${name}.tar.gz";
100 sha256 = "0dq3jsnwsb5j3fhl0wi3p5ycv8avf8s5j1y4ap3d2mkjmcppvsdk";
···102 });
103 };
104105- arb = nixpkgs.arb.override { inherit flint; };
106107- singular = nixpkgs.singular.override { inherit flint; };
108109 # *not* to confuse with the python package "pynac"
110- pynac = nixpkgs.pynac.override { inherit singular flint; };
111112 # With openblas (64 bit), the tests fail the same way as when sage is build with
113 # openblas instead of openblasCompat. Apparently other packages somehow use flints
114 # blas when it is available. Alternative would be to override flint to use
115 # openblasCompat.
116- flint = nixpkgs.flint.override { withBlas = false; };
117118 # Multiple palp dimensions need to be available and sage expects them all to be
119 # in the same folder.
120 palp = symlinkJoin {
121- name = "palp-${nixpkgs.palp.version}";
122 paths = [
123- (nixpkgs.palp.override { dimensions = 4; doSymlink = false; })
124- (nixpkgs.palp.override { dimensions = 5; doSymlink = false; })
125- (nixpkgs.palp.override { dimensions = 6; doSymlink = true; })
126- (nixpkgs.palp.override { dimensions = 11; doSymlink = false; })
127 ];
128 };
129130 # Sage expects those in the same directory.
131 pari_data = symlinkJoin {
132 name = "pari_data";
133- paths = with nixpkgs; [
134 pari-galdata
135 pari-seadata-small
136 ];
137 };
138139 # https://trac.sagemath.org/ticket/22191
140- ecl = nixpkgs.ecl_16_1_2;
141in
142- python.pkgs.sage-wrapper // {
143- doc = python.pkgs.sagedoc;
144- lib = python.pkgs.sagelib;
145- }
0
···1+{ pkgs
2, withDoc ? false
3}:
45+# Here sage and its dependencies are put together. Some dependencies may be pinned
6+# as a last resort. Patching sage for compatibility with newer dependency versions
7+# is always preferred, see `sage-src.nix` for that.
8+9let
10+ inherit (pkgs) fetchurl symlinkJoin callPackage nodePackages;
1112 # https://trac.sagemath.org/ticket/15980 for tracking of python3 support
13+ python = pkgs.python2.override {
14 packageOverrides = self: super: {
15 # python packages that appear unmaintained and were not accepted into the nixpkgs
16 # tree because of that. These packages are only dependencies of the more-or-less
17 # deprecated sagenb. However sagenb is still a default dependency and the doctests
18 # depend on it.
19 # See https://github.com/NixOS/nixpkgs/pull/38787 for a discussion.
20+ # The dependency on the sage notebook (and therefore these packages) will be
21+ # removed in the future:
22+ # https://trac.sagemath.org/ticket/25837
23 flask-oldsessions = self.callPackage ./flask-oldsessions.nix {};
24 flask-openid = self.callPackage ./flask-openid.nix {};
25 python-openid = self.callPackage ./python-openid.nix {};
26+ sagenb = self.callPackage ./sagenb.nix {
27+ mathjax = nodePackages.mathjax;
28+ };
2930+ # Package with a cyclic dependency with sage
31 pybrial = self.callPackage ./pybrial.nix {};
3233+ # `sagelib`, i.e. all of sage except some wrappers and runtime dependencies
34 sagelib = self.callPackage ./sagelib.nix {
35 inherit flint ecl arb;
36+ inherit sage-src pynac singular;
37+ linbox = pkgs.linbox.override { withSage = true; };
0000000038 };
39+ };
40+ };
4142+ jupyter-kernel-definition = {
43+ displayName = "SageMath ${sage-src.version}";
44+ argv = [
45+ "${sage-with-env}/bin/sage" # FIXME which sage
46+ "--python"
47+ "-m"
48+ "sage.repl.ipython_kernel"
49+ "-f"
50+ "{connection_file}"
51+ ];
52+ language = "sagemath";
53+ # just one 16x16 logo is available
54+ logo32 = "${sage-src}/doc/common/themes/sage/static/sageicon.png";
55+ logo64 = "${sage-src}/doc/common/themes/sage/static/sageicon.png";
56+ };
5758+ # A bash script setting various environment variables to tell sage where
59+ # the files its looking fore are located. Also see `sage-env`.
60+ env-locations = callPackage ./env-locations.nix {
61+ inherit pari_data ecl;
62+ inherit singular;
63+ cysignals = python.pkgs.cysignals;
64+ three = nodePackages.three;
65+ mathjax = nodePackages.mathjax;
66+ };
6768+ # The shell file that gets sourced on every sage start. Will also source
69+ # the env-locations file.
70+ sage-env = callPackage ./sage-env.nix {
71+ sagelib = python.pkgs.sagelib;
72+ inherit env-locations;
73+ inherit python rWrapper ecl singular palp flint pynac pythonEnv;
74+ pkg-config = pkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
75+ };
7677+ # The documentation for sage, building it takes a lot of ram.
78+ sagedoc = callPackage ./sagedoc.nix {
79+ inherit sage-with-env;
80+ inherit python;
81+ };
8283+ # sagelib with added wrappers and a dependency on sage-tests to make sure thet tests were run.
84+ sage-with-env = callPackage ./sage-with-env.nix {
85+ inherit pythonEnv;
86+ inherit sage-env;
87+ inherit pynac singular;
88+ pkg-config = pkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
89+ three = nodePackages.three;
90 };
9192+ # Doesn't actually build anything, just runs sages testsuite. This is a
93+ # separate derivation to make it possible to re-run the tests without
94+ # rebuilding sagelib (which takes ~30 minutes).
95+ # Running the tests should take something in the order of 1h.
96+ sage-tests = callPackage ./sage-tests.nix {
97+ inherit sage-with-env;
98+ };
99100 sage-src = callPackage ./sage-src.nix {};
101···110 sympy
111 fpylll
112 matplotlib
113+ tkinter # optional, as a matplotlib backend (use with `%matplotlib tk`)
114 scipy
115 ipywidgets
116 rpy2
···125 } // { extraLibs = pythonRuntimeDeps; }; # make the libs accessible
126127 # needs to be rWrapper, standard "R" doesn't include default packages
128+ rWrapper = pkgs.rWrapper.override {
129 # https://trac.sagemath.org/ticket/25674
130+ R = pkgs.R.overrideAttrs (attrs: rec {
131 name = "R-3.4.4";
132+ doCheck = false;
133 src = fetchurl {
134 url = "http://cran.r-project.org/src/base/R-3/${name}.tar.gz";
135 sha256 = "0dq3jsnwsb5j3fhl0wi3p5ycv8avf8s5j1y4ap3d2mkjmcppvsdk";
···137 });
138 };
139140+ arb = pkgs.arb.override { inherit flint; };
141142+ singular = pkgs.singular.override { inherit flint; };
143144 # *not* to confuse with the python package "pynac"
145+ pynac = pkgs.pynac.override { inherit singular flint; };
146147 # With openblas (64 bit), the tests fail the same way as when sage is build with
148 # openblas instead of openblasCompat. Apparently other packages somehow use flints
149 # blas when it is available. Alternative would be to override flint to use
150 # openblasCompat.
151+ flint = pkgs.flint.override { withBlas = false; };
152153 # Multiple palp dimensions need to be available and sage expects them all to be
154 # in the same folder.
155 palp = symlinkJoin {
156+ name = "palp-${pkgs.palp.version}";
157 paths = [
158+ (pkgs.palp.override { dimensions = 4; doSymlink = false; })
159+ (pkgs.palp.override { dimensions = 5; doSymlink = false; })
160+ (pkgs.palp.override { dimensions = 6; doSymlink = true; })
161+ (pkgs.palp.override { dimensions = 11; doSymlink = false; })
162 ];
163 };
164165 # Sage expects those in the same directory.
166 pari_data = symlinkJoin {
167 name = "pari_data";
168+ paths = with pkgs; [
169 pari-galdata
170 pari-seadata-small
171 ];
172 };
173174 # https://trac.sagemath.org/ticket/22191
175+ ecl = pkgs.ecl_16_1_2;
176in
177+# A wrapper around sage that makes sure sage finds its docs (if they were build).
178+callPackage ./sage.nix {
179+ inherit sage-tests sage-with-env sagedoc jupyter-kernel-definition;
180+ inherit withDoc;
181+}
···16, cysignals
17}:
1819+# A bash script setting various environment variables to tell sage where
20+# the files its looking fore are located. Also see `sage-env`.
21writeTextFile rec {
22 name = "sage-env-locations";
23 destination = "/${name}";
···1-diff --git a/build/pkgs/openblas/package-version.txt b/build/pkgs/openblas/package-version.txt
2-index 3bc45c25d4..7c7c224887 100644
3---- a/src/sage/schemes/elliptic_curves/padics.py
4-+++ b/src/sage/schemes/elliptic_curves/padics.py
5-@@ -292,8 +292,8 @@ def padic_regulator(self, p, prec=20, height=None, check_hypotheses=True):
6-7- sage: max_prec = 30 # make sure we get past p^2 # long time
8- sage: full = E.padic_regulator(5, max_prec) # long time
9-- sage: for prec in range(1, max_prec): # long time
10-- ....: assert E.padic_regulator(5, prec) == full # long time
11-+ sage: for prec in range(1, max_prec): # known bug (#25969) # long time
12-+ ....: assert E.padic_regulator(5, prec) == full # known bug (#25969) # long time
13-14- A case where the generator belongs to the formal group already
15- (:trac:`3632`)::
···1-diff --git a/src/sage/all.py b/src/sage/all.py
2-index 14cec431f1..25a35a0522 100644
3---- a/src/sage/all.py
4-+++ b/src/sage/all.py
5-@@ -310,6 +310,7 @@ warnings.filters.remove(('ignore', None, DeprecationWarning, None, 0))
6- # Ignore all deprecations from IPython etc.
7- warnings.filterwarnings('ignore',
8- module='.*(IPython|ipykernel|jupyter_client|jupyter_core|nbformat|notebook|ipywidgets|storemagic)')
9-+warnings.filterwarnings('ignore', "The 'normed' kwarg is deprecated, and has been replaced by the 'density' kwarg.") # matplotlib normed deprecation
10- # However, be sure to keep OUR deprecation warnings
11- warnings.filterwarnings('default',
12- '[\s\S]*See http://trac.sagemath.org/[0-9]* for details.')
···000000000000
+17-11
pkgs/applications/science/math/sage/sage-env.nix
···2, lib
3, writeTextFile
4, python
5-, sage-src
6, sagelib
7, env-locations
8, gfortran
···37, lcalc
38, rubiks
39, flintqs
40-, openblas-cblas-pc
41, flint
42, gmp
43, mpfr
···46, gsl
47, ntl
48}:
00004950let
51 runtimepath = (lib.makeBinPath ([
···96 destination = "/${name}";
97 text = ''
98 export PKG_CONFIG_PATH='${lib.concatStringsSep ":" (map (pkg: "${pkg}/lib/pkgconfig") [
99- # This is only needed in the src/sage/misc/cython.py test and I'm not sure if there's really a use-case
100- # for it outside of the tests. However since singular and openblas are runtime dependencies anyways
101- # and openblas-cblas-pc is tiny, it doesn't really hurt to include.
0102 singular
103- openblas-cblas-pc
104 ])
105 }'
106- export SAGE_ROOT='${sage-src}'
107 export SAGE_LOCAL='@sage-local@'
108 export SAGE_SHARE='${sagelib}/share'
109 orig_path="$PATH"
110 export PATH='${runtimepath}'
111112 # set dependent vars, like JUPYTER_CONFIG_DIR
113- source "${sage-src}/src/bin/sage-env"
114 export PATH="${runtimepath}:$orig_path" # sage-env messes with PATH
115116 export SAGE_LOGS="$TMPDIR/sage-logs"
117 export SAGE_DOC="''${SAGE_DOC_OVERRIDE:-doc-placeholder}"
118- export SAGE_DOC_SRC="''${SAGE_DOC_SRC_OVERRIDE:-${sage-src}/src/doc}"
119120 # set locations of dependencies
121 . ${env-locations}/sage-env-locations
···154155 export SAGE_LIB='${sagelib}/${python.sitePackages}'
156157- export SAGE_EXTCODE='${sage-src}/src/ext'
158159- # for find_library
160 export DYLD_LIBRARY_PATH="${lib.makeLibraryPath [stdenv.cc.libc singular]}:$DYLD_LIBRARY_PATH"
161 '';
00162}
···2, lib
3, writeTextFile
4, python
05, sagelib
6, env-locations
7, gfortran
···36, lcalc
37, rubiks
38, flintqs
39+, openblasCompat
40, flint
41, gmp
42, mpfr
···45, gsl
46, ntl
47}:
48+49+# This generates a `sage-env` shell file that will be sourced by sage on startup.
50+# It sets up various environment variables, telling sage where to find its
51+# dependencies.
5253let
54 runtimepath = (lib.makeBinPath ([
···99 destination = "/${name}";
100 text = ''
101 export PKG_CONFIG_PATH='${lib.concatStringsSep ":" (map (pkg: "${pkg}/lib/pkgconfig") [
102+ # This is only needed in the src/sage/misc/cython.py test and I'm not
103+ # sure if there's really a usecase for it outside of the tests. However
104+ # since singular and openblas are runtime dependencies anyways, it doesn't
105+ # really hurt to include.
106 singular
107+ openblasCompat
108 ])
109 }'
110+ export SAGE_ROOT='${sagelib.src}'
111 export SAGE_LOCAL='@sage-local@'
112 export SAGE_SHARE='${sagelib}/share'
113 orig_path="$PATH"
114 export PATH='${runtimepath}'
115116 # set dependent vars, like JUPYTER_CONFIG_DIR
117+ source "${sagelib.src}/src/bin/sage-env"
118 export PATH="${runtimepath}:$orig_path" # sage-env messes with PATH
119120 export SAGE_LOGS="$TMPDIR/sage-logs"
121 export SAGE_DOC="''${SAGE_DOC_OVERRIDE:-doc-placeholder}"
122+ export SAGE_DOC_SRC="''${SAGE_DOC_SRC_OVERRIDE:-${sagelib.src}/src/doc}"
123124 # set locations of dependencies
125 . ${env-locations}/sage-env-locations
···158159 export SAGE_LIB='${sagelib}/${python.sitePackages}'
160161+ export SAGE_EXTCODE='${sagelib.src}/src/ext'
162163+ # for find_library
164 export DYLD_LIBRARY_PATH="${lib.makeLibraryPath [stdenv.cc.libc singular]}:$DYLD_LIBRARY_PATH"
165 '';
166+} // {
167+ lib = sagelib; # equivalent of `passthru`, which `writeTextFile` doesn't support
168}
+22-9
pkgs/applications/science/math/sage/sage-src.nix
···2, fetchFromGitHub
3, fetchpatch
4}:
0000005stdenv.mkDerivation rec {
6 version = "8.4";
7 name = "sage-src-${version}";
···13 sha256 = "0gips1hagiz9m7s21bg5as8hrrm2x5k47h1bsq0pc46iplfwmv2d";
14 };
150016 nixPatches = [
17 # https://trac.sagemath.org/ticket/25358
18 (fetchpatch {
···31 # Revert the commit that made the sphinx build fork even in the single thread
32 # case. For some yet unknown reason, that breaks the docbuild on nix and archlinux.
33 # See https://groups.google.com/forum/#!msg/sage-packaging/VU4h8IWGFLA/mrmCMocYBwAJ.
034 ./patches/revert-sphinx-always-fork.patch
3536 # Make sure py2/py3 tests are only run when their expected context (all "sage"
···39 ./patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch
40 ];
4100000042 packageUpgradePatches = let
43- # fetch a diff between base and rev on sage's git server
44- # used to fetch trac tickets by setting the base to the release and the
45- # revision to the last commit that should be included
46 fetchSageDiff = { base, rev, ...}@args: (
47 fetchpatch ({
48 url = "https://git.sagemath.org/sage.git/patch?id2=${base}&id=${rev}";
···54 in [
55 # New glpk version has new warnings, filter those out until upstream sage has found a solution
56 # https://trac.sagemath.org/ticket/24824
57- ./patches/pari-stackwarn.patch # not actually necessary since tha pari upgrade, but necessary for the glpk patch to apply
58 (fetchpatch {
59 url = "https://salsa.debian.org/science-team/sagemath/raw/58bbba93a807ca2933ca317501d093a1bb4b84db/debian/patches/dt-version-glpk-4.65-ignore-warnings.patch";
60 sha256 = "0b9293v73wb4x13wv5zwyjgclc01zn16msccfzzi6znswklgvddp";
···64 # https://trac.sagemath.org/ticket/25260
65 ./patches/numpy-1.15.1.patch
6667- # ntl upgrade
68- # https://trac.sagemath.org/ticket/25532#comment:29
69 (fetchpatch {
70 name = "lcalc-c++11.patch";
71 url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/sagemath-lcalc-c++11.patch?h=packages/sagemath&id=0e31ae526ab7c6b5c0bfacb3f8b1c4fd490035aa";
···100 })
101 ];
102103- patches = nixPatches ++ packageUpgradePatches ++ [
104- ./patches/known-padics-bug.patch
105- ];
106107 postPatch = ''
108 # make sure shebangs etc are fixed, but sage-python23 still works
···2, fetchFromGitHub
3, fetchpatch
4}:
5+6+# This file is responsible for fetching the sage source and adding necessary patches.
7+# It does not actually build anything, it just copies the patched sources to $out.
8+# This is done because multiple derivations rely on these sources and they should
9+# all get the same sources with the same patches applied.
10+11stdenv.mkDerivation rec {
12 version = "8.4";
13 name = "sage-src-${version}";
···19 sha256 = "0gips1hagiz9m7s21bg5as8hrrm2x5k47h1bsq0pc46iplfwmv2d";
20 };
2122+ # Patches needed because of particularities of nix or the way this is packaged.
23+ # The goal is to upstream all of them and get rid of this list.
24 nixPatches = [
25 # https://trac.sagemath.org/ticket/25358
26 (fetchpatch {
···39 # Revert the commit that made the sphinx build fork even in the single thread
40 # case. For some yet unknown reason, that breaks the docbuild on nix and archlinux.
41 # See https://groups.google.com/forum/#!msg/sage-packaging/VU4h8IWGFLA/mrmCMocYBwAJ.
42+ # https://trac.sagemath.org/ticket/26608
43 ./patches/revert-sphinx-always-fork.patch
4445 # Make sure py2/py3 tests are only run when their expected context (all "sage"
···48 ./patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch
49 ];
5051+ # Patches needed because of package updates. We could just pin the versions of
52+ # dependencies, but that would lead to rebuilds, confusion and the burdons of
53+ # maintaining multiple versions of dependencies. Instead we try to make sage
54+ # compatible with never dependency versions when possible. All these changes
55+ # should come from or be proposed to upstream. This list will probably never
56+ # be empty since dependencies update all the time.
57 packageUpgradePatches = let
58+ # Fetch a diff between `base` and `rev` on sage's git server.
59+ # Used to fetch trac tickets by setting the `base` to the last release and the
60+ # `rev` to the last commit of the ticket.
61 fetchSageDiff = { base, rev, ...}@args: (
62 fetchpatch ({
63 url = "https://git.sagemath.org/sage.git/patch?id2=${base}&id=${rev}";
···69 in [
70 # New glpk version has new warnings, filter those out until upstream sage has found a solution
71 # https://trac.sagemath.org/ticket/24824
72+ ./patches/pari-stackwarn.patch # not actually necessary since the pari upgrade, but necessary for the glpk patch to apply
73 (fetchpatch {
74 url = "https://salsa.debian.org/science-team/sagemath/raw/58bbba93a807ca2933ca317501d093a1bb4b84db/debian/patches/dt-version-glpk-4.65-ignore-warnings.patch";
75 sha256 = "0b9293v73wb4x13wv5zwyjgclc01zn16msccfzzi6znswklgvddp";
···79 # https://trac.sagemath.org/ticket/25260
80 ./patches/numpy-1.15.1.patch
8182+ # needed for ntl update
83+ # https://trac.sagemath.org/ticket/25532
84 (fetchpatch {
85 name = "lcalc-c++11.patch";
86 url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/sagemath-lcalc-c++11.patch?h=packages/sagemath&id=0e31ae526ab7c6b5c0bfacb3f8b1c4fd490035aa";
···115 })
116 ];
117118+ patches = nixPatches ++ packageUpgradePatches;
00119120 postPatch = ''
121 # make sure shebangs etc are fixed, but sage-python23 still works
···3, buildPythonPackage
4, arb
5, openblasCompat
0006, brial
7, cliquer
8, cypari2
···48, libbraiding
49}:
5051+# This is the core sage python package. Everything else is just wrappers gluing
52+# stuff together. It is not very useful on its own though, since it will not
53+# find many of its dependencies without `sage-env`, will not be tested without
54+# `sage-tests` and will not have html docs without `sagedoc`.
55+56buildPythonPackage rec {
57 format = "other";
58+ version = src.version;
59+ name = "sagelib-${version}";
060 src = sage-src;
6162 nativeBuildInputs = [
63 iml
64 perl
00065 jupyter_core
66 ];
67
+4-1
pkgs/applications/science/math/sage/sagenb.nix
···1-# Has a cyclic dependency with sage (not expressed here) and is not useful outside of sage
2{ stdenv
3, fetchpatch
4, python
···12, flask-autoindex
13, flask-babel
14}:
00001516buildPythonPackage rec {
17 pname = "sagenb";
···01{ stdenv
2, fetchpatch
3, python
···11, flask-autoindex
12, flask-babel
13}:
14+15+# Has a cyclic dependency with sage (not expressed here) and is not useful outside of sage.
16+# Deprecated, hopefully soon to be removed. See
17+# https://trac.sagemath.org/ticket/25837
1819buildPythonPackage rec {
20 pname = "sagenb";
···147 fi
148}
1490000000000000000000000000150autoPatchelf() {
0000000000000000000151 echo "automatically fixing dependencies for ELF files" >&2
152153 # Add all shared objects of the current output path to the start of
154 # cachedDependencies so that it's choosen first in findDependency.
155- cachedDependencies+=(
156- $(find "$prefix" \! -type d \( -name '*.so' -o -name '*.so.*' \))
157- )
158- local elffile
159160 # Here we actually have a subshell, which also means that
161 # $cachedDependencies is final at this point, so whenever we want to run
···164 # outside of this function.
165 while IFS= read -r -d $'\0' file; do
166 isELF "$file" || continue
000167 if isExecutable "$file"; then
168 # Skip if the executable is statically linked.
169- LANG=C readelf -l "$file" | grep -q "^ *INTERP\\>" || continue
170 fi
171 autoPatchelfFile "$file"
172- done < <(find "$prefix" -type f -print0)
173}
174175# XXX: This should ultimately use fixupOutputHooks but we currently don't have
···180# So what we do here is basically run in postFixup and emulate the same
181# behaviour as fixupOutputHooks because the setup hook for patchelf is run in
182# fixupOutput and the postFixup hook runs later.
183-postFixupHooks+=(
184- 'for output in $outputs; do prefix="${!output}" autoPatchelf; done'
185-)
00000
···147 fi
148}
149150+# Can be used to manually add additional directories with shared object files
151+# to be included for the next autoPatchelf invocation.
152+addAutoPatchelfSearchPath() {
153+ local -a findOpts=()
154+155+ # XXX: Somewhat similar to the one in the autoPatchelf function, maybe make
156+ # it DRY someday...
157+ while [ $# -gt 0 ]; do
158+ case "$1" in
159+ --) shift; break;;
160+ --no-recurse) shift; findOpts+=("-maxdepth" 1);;
161+ --*)
162+ echo "addAutoPatchelfSearchPath: ERROR: Invalid command line" \
163+ "argument: $1" >&2
164+ return 1;;
165+ *) break;;
166+ esac
167+ done
168+169+ cachedDependencies+=(
170+ $(find "$@" "${findOpts[@]}" \! -type d \
171+ \( -name '*.so' -o -name '*.so.*' \))
172+ )
173+}
174+175autoPatchelf() {
176+ local norecurse=
177+178+ while [ $# -gt 0 ]; do
179+ case "$1" in
180+ --) shift; break;;
181+ --no-recurse) shift; norecurse=1;;
182+ --*)
183+ echo "autoPatchelf: ERROR: Invalid command line" \
184+ "argument: $1" >&2
185+ return 1;;
186+ *) break;;
187+ esac
188+ done
189+190+ if [ $# -eq 0 ]; then
191+ echo "autoPatchelf: No paths to patch specified." >&2
192+ return 1
193+ fi
194+195 echo "automatically fixing dependencies for ELF files" >&2
196197 # Add all shared objects of the current output path to the start of
198 # cachedDependencies so that it's choosen first in findDependency.
199+ addAutoPatchelfSearchPath ${norecurse:+--no-recurse} -- "$@"
000200201 # Here we actually have a subshell, which also means that
202 # $cachedDependencies is final at this point, so whenever we want to run
···205 # outside of this function.
206 while IFS= read -r -d $'\0' file; do
207 isELF "$file" || continue
208+ segmentHeaders="$(LANG=C readelf -l "$file")"
209+ # Skip if the ELF file doesn't have segment headers (eg. object files).
210+ echo "$segmentHeaders" | grep -q '^Program Headers:' || continue
211 if isExecutable "$file"; then
212 # Skip if the executable is statically linked.
213+ echo "$segmentHeaders" | grep -q "^ *INTERP\\>" || continue
214 fi
215 autoPatchelfFile "$file"
216+ done < <(find "$@" ${norecurse:+-maxdepth 1} -type f -print0)
217}
218219# XXX: This should ultimately use fixupOutputHooks but we currently don't have
···224# So what we do here is basically run in postFixup and emulate the same
225# behaviour as fixupOutputHooks because the setup hook for patchelf is run in
226# fixupOutput and the postFixup hook runs later.
227+postFixupHooks+=('
228+ if [ -z "$dontAutoPatchelf" ]; then
229+ autoPatchelf -- $(for output in $outputs; do
230+ [ -e "${!output}" ] || continue
231+ echo "${!output}"
232+ done)
233+ fi
234+')
···6 owner = "eosrei";
7 repo = "twemoji-color-font";
8 rev = "v${meta.version}";
9- sha256 = "0z8r7z2r0r2wng4a7hvqvkcpd43l0d57yl402r7ci5bnmb02yvsa";
10 };
1112 nativeBuildInputs = [ inkscape imagemagick potrace svgo scfbuild ];
···21 '';
2223 meta = with stdenv.lib; {
24- version = "1.4";
25 description = "Color emoji SVGinOT font using Twitter Unicode 10 emoji with diversity and country flags";
26 longDescription = ''
27 A color and B&W emoji SVGinOT font built from the Twitter Emoji for
···6 owner = "eosrei";
7 repo = "twemoji-color-font";
8 rev = "v${meta.version}";
9+ sha256 = "07yawvbdkk15d7ac9dj7drs1rqln9sba1fd6jx885ms7ww2sfm7r";
10 };
1112 nativeBuildInputs = [ inkscape imagemagick potrace svgo scfbuild ];
···21 '';
2223 meta = with stdenv.lib; {
24+ version = "11.2.0";
25 description = "Color emoji SVGinOT font using Twitter Unicode 10 emoji with diversity and country flags";
26 longDescription = ''
27 A color and B&W emoji SVGinOT font built from the Twitter Emoji for
···15 # Patches coming from debian package
16 # https://packages.debian.org/source/sid/libs/libmatheval
17 patches = [ (fetchpatch {
18- url = "http://anonscm.debian.org/cgit/debian-science/packages/libmatheval.git/plain/debian/patches/002-skip-docs.patch";
19 sha256 = "1nnkk9aw4jj6nql46zhwq6vx74zrmr1xq5ix0xyvpawhabhgjg62";
20 } )
21 (fetchpatch {
22- url = "http://anonscm.debian.org/cgit/debian-science/packages/libmatheval.git/plain/debian/patches/003-guile2.0.patch";
23 sha256 = "1xgfw4finfvr20kjbpr4yl2djxmyr4lmvfa11pxirfvhrdi602qj";
24 } )
25 (fetchpatch {
26- url = "http://anonscm.debian.org/cgit/debian-science/packages/libmatheval.git/plain/debian/patches/disable_coth_test.patch";
27 sha256 = "0bai8jrd5azfz5afmjixlvifk34liq58qb7p9kb45k6kc1fqqxzm";
28 } )
29 ];
30-31 meta = {
32 description = "A library to parse and evaluate symbolic expressions input as text";
33 longDescription = ''
34- GNU libmatheval is a library (callable from C and Fortran) to parse and evaluate symbolic
35- expressions input as text. It supports expressions in any number of variables of arbitrary
36- names, decimal and symbolic constants, basic unary and binary operators, and elementary
37- mathematical functions. In addition to parsing and evaluation, libmatheval can also compute
38 symbolic derivatives and output expressions to strings.
39 '';
40 homepage = https://www.gnu.org/software/libmatheval/;
···15 # Patches coming from debian package
16 # https://packages.debian.org/source/sid/libs/libmatheval
17 patches = [ (fetchpatch {
18+ url = "https://salsa.debian.org/science-team/libmatheval/raw/debian/1.1.11+dfsg-3/debian/patches/002-skip-docs.patch";
19 sha256 = "1nnkk9aw4jj6nql46zhwq6vx74zrmr1xq5ix0xyvpawhabhgjg62";
20 } )
21 (fetchpatch {
22+ url = "https://salsa.debian.org/science-team/libmatheval/raw/debian/1.1.11+dfsg-3/debian/patches/003-guile2.0.patch";
23 sha256 = "1xgfw4finfvr20kjbpr4yl2djxmyr4lmvfa11pxirfvhrdi602qj";
24 } )
25 (fetchpatch {
26+ url = "https://salsa.debian.org/science-team/libmatheval/raw/debian/1.1.11+dfsg-3/debian/patches/disable_coth_test.patch";
27 sha256 = "0bai8jrd5azfz5afmjixlvifk34liq58qb7p9kb45k6kc1fqqxzm";
28 } )
29 ];
30+31 meta = {
32 description = "A library to parse and evaluate symbolic expressions input as text";
33 longDescription = ''
34+ GNU libmatheval is a library (callable from C and Fortran) to parse and evaluate symbolic
35+ expressions input as text. It supports expressions in any number of variables of arbitrary
36+ names, decimal and symbolic constants, basic unary and binary operators, and elementary
37+ mathematical functions. In addition to parsing and evaluation, libmatheval can also compute
38 symbolic derivatives and output expressions to strings.
39 '';
40 homepage = https://www.gnu.org/software/libmatheval/;
···1516 meta = with stdenv.lib; {
17 description = "Protocol headers for the SPICE protocol";
18- homepage = http://www.spice-space.org;
19 license = licenses.bsd3;
20 maintainers = with maintainers; [ bluescreen303 ];
21 platforms = platforms.linux;
···1516 meta = with stdenv.lib; {
17 description = "Protocol headers for the SPICE protocol";
18+ homepage = https://www.spice-space.org/;
19 license = licenses.bsd3;
20 maintainers = with maintainers; [ bluescreen303 ];
21 platforms = platforms.linux;
+1-1
pkgs/development/libraries/spice/default.nix
···41 VD-Interfaces. The VD-Interfaces (VDI) enable both ends of the solution to be easily
42 utilized by a third-party component.
43 '';
44- homepage = http://www.spice-space.org/;
45 license = licenses.lgpl21;
4647 maintainers = [ maintainers.bluescreen303 ];
···41 VD-Interfaces. The VD-Interfaces (VDI) enable both ends of the solution to be easily
42 utilized by a third-party component.
43 '';
44+ homepage = https://www.spice-space.org/;
45 license = licenses.lgpl21;
4647 maintainers = [ maintainers.bluescreen303 ];
+2-2
pkgs/development/libraries/taglib/1.9.nix
···4 name = "taglib-1.9.1";
56 src = fetchurl {
7- url = http://taglib.github.io/releases/taglib-1.9.1.tar.gz;
8 sha256 = "06n7gnbcqa3r6c9gv00y0y1r48dyyazm6yj403i7ma0r2k6p3lvj";
9 };
10···13 buildInputs = [ zlib ];
1415 meta = {
16- homepage = http://developer.kde.org/~wheeler/taglib.html;
17 repositories.git = git://github.com/taglib/taglib.git;
18 description = "A library for reading and editing the meta-data of several popular audio formats";
19 inherit (cmake.meta) platforms;
···4 name = "taglib-1.9.1";
56 src = fetchurl {
7+ url = https://taglib.github.io/releases/taglib-1.9.1.tar.gz;
8 sha256 = "06n7gnbcqa3r6c9gv00y0y1r48dyyazm6yj403i7ma0r2k6p3lvj";
9 };
10···13 buildInputs = [ zlib ];
1415 meta = {
16+ homepage = https://taglib.org/;
17 repositories.git = git://github.com/taglib/taglib.git;
18 description = "A library for reading and editing the meta-data of several popular audio formats";
19 inherit (cmake.meta) platforms;
···1+{ lib, stdenv, buildPythonPackage, fetchPypi }:
2+3+buildPythonPackage rec {
4+ pname = "yattag";
5+ version = "1.10.1";
6+7+ src = fetchPypi {
8+ inherit pname version;
9+ sha256 = "0r3pwfygvpkgc0hzxc6z8dl56g6brlh52r0x8kcjhywr1biahqb2";
10+ };
11+12+ meta = with lib; {
13+ description = "Generate HTML or XML in a pythonic way. Pure python alternative to web template engines. Can fill HTML forms with default values and error messages.";
14+ license = [ licenses.lgpl21 ];
15+ homepage = http://www.yattag.org/;
16+ };
17+}
···56 buildInputs = [makeWrapper R] ++ recommendedPackages ++ packages;
78+ # Make the list of recommended R packages accessible to other packages such as rpy2
9+ passthru.recommendedPackages = recommendedPackages;
10+11 unpackPhase = ":";
1213 installPhase = ''
···25 efiBootStub = false;
26 } // (args.features or {});
2728- extraMeta.hydraPlatforms = [];
29})) (oldAttrs: {
30 postConfigure = ''
31 # The v7 defconfig has this set to '-v7' which screws up our modDirVersion.
···25 efiBootStub = false;
26 } // (args.features or {});
2728+ extraMeta.hydraPlatforms = with stdenv.lib.platforms; [ aarch64 ];
29})) (oldAttrs: {
30 postConfigure = ''
31 # The v7 defconfig has this set to '-v7' which screws up our modDirVersion.
+3-3
pkgs/os-specific/linux/kernel/linux-testing.nix
···1{ stdenv, buildPackages, fetchurl, perl, buildLinux, libelf, utillinux, ... } @ args:
23buildLinux (args // rec {
4- version = "4.20-rc3";
5- modDirVersion = "4.20.0-rc3";
6 extraMeta.branch = "4.20";
78 src = fetchurl {
9 url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz";
10- sha256 = "0iin34alr5ax15pvilhdn5pifqav4gkxalb7vqb8zvxnhsm6kk58";
11 };
1213 # Should the testing kernels ever be built on Hydra?
···1{ stdenv, buildPackages, fetchurl, perl, buildLinux, libelf, utillinux, ... } @ args:
23buildLinux (args // rec {
4+ version = "4.20-rc4";
5+ modDirVersion = "4.20.0-rc4";
6 extraMeta.branch = "4.20";
78 src = fetchurl {
9 url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz";
10+ sha256 = "0kni1l1gk9mva7ym091mrkn9f2bdbh80i7589ahk6j5blpj9m3ns";
11 };
1213 # Should the testing kernels ever be built on Hydra?
+1-1
pkgs/os-specific/linux/keyutils/default.nix
···23 ];
2425 meta = with stdenv.lib; {
26- homepage = http://people.redhat.com/dhowells/keyutils/;
27 description = "Tools used to control the Linux kernel key management system";
28 license = licenses.gpl2Plus;
29 platforms = platforms.linux;
···23 ];
2425 meta = with stdenv.lib; {
26+ homepage = https://people.redhat.com/dhowells/keyutils/;
27 description = "Tools used to control the Linux kernel key management system";
28 license = licenses.gpl2Plus;
29 platforms = platforms.linux;
+1-1
pkgs/os-specific/linux/libcap-ng/default.nix
···3233 meta = let inherit (stdenv.lib) platforms licenses maintainers; in {
34 description = "Library for working with POSIX capabilities";
35- homepage = http://people.redhat.com/sgrubb/libcap-ng/;
36 platforms = platforms.linux;
37 license = licenses.lgpl21;
38 maintainers = with maintainers; [ wkennington ];
···3233 meta = let inherit (stdenv.lib) platforms licenses maintainers; in {
34 description = "Library for working with POSIX capabilities";
35+ homepage = https://people.redhat.com/sgrubb/libcap-ng/;
36 platforms = platforms.linux;
37 license = licenses.lgpl21;
38 maintainers = with maintainers; [ wkennington ];