···5656 or list elements should be aligned:
5757<programlisting>
5858# A long list.
5959-list =
6060- [ elem1
6161- elem2
6262- elem3
6363- ];
5959+list = [
6060+ elem1
6161+ elem2
6262+ elem3
6363+];
64646565# A long attribute set.
6666-attrs =
6767- { attr1 = short_expr;
6868- attr2 =
6969- if true then big_expr else big_expr;
7070- };
7171-7272-# Alternatively:
7366attrs = {
7467 attr1 = short_expr;
7568 attr2 =
7669 if true then big_expr else big_expr;
7770};
7171+7272+# Combined
7373+listOfAttrs = [
7474+ {
7575+ attr1 = 3;
7676+ attr2 = "fff";
7777+ }
7878+ {
7979+ attr1 = 5;
8080+ attr2 = "ggg";
8181+ }
8282+];
7883</programlisting>
7984 </para>
8085 </listitem>
+1-1
doc/cross-compilation.xml
···385385 Eventually we would like to make these platform examples an unnecessary
386386 convenience so that
387387<programlisting>
388388-nix-build <nixpkgs> --arg crossSystem.config '<arch>-<os>-<vendor>-<abi>' -A whatever</programlisting>
388388+nix-build <nixpkgs> --arg crossSystem '{ config = "<arch>-<os>-<vendor>-<abi>"; }' -A whatever</programlisting>
389389 works in the vast majority of cases. The problem today is dependencies on
390390 other sorts of configuration which aren't given proper defaults. We rely on
391391 the examples to crudely to set those configuration parameters in some
+11
doc/languages-frameworks/ruby.xml
···5151 </para>
52525353 <para>
5454+ Updating Ruby packages can then be done like this:
5555+ </para>
5656+5757+<screen>
5858+<![CDATA[$ cd pkgs/servers/monitoring/sensu
5959+$ nix-shell -p bundler --run 'bundle lock --update'
6060+$ nix-shell -p bundix --run 'bundix'
6161+]]>
6262+</screen>
6363+6464+ <para>
5465 For tools written in Ruby - i.e. where the desire is to install a package and
5566 then execute e.g. <command>rake</command> at the command line, there is an
5667 alternative builder called <literal>bundlerApp</literal>. Set up the
+36-7
doc/stdenv.xml
···24282428 <para>
24292429 This is a special setup hook which helps in packaging proprietary
24302430 software in that it automatically tries to find missing shared library
24312431- dependencies of ELF files. All packages within the
24322432- <envar>runtimeDependencies</envar> environment variable are
24332433- unconditionally added to executables, which is useful for programs that
24342434- use <citerefentry>
24352435- <refentrytitle>dlopen</refentrytitle>
24362436- <manvolnum>3</manvolnum> </citerefentry> to load libraries at runtime.
24312431+ dependencies of ELF files based on the given
24322432+ <varname>buildInputs</varname> and <varname>nativeBuildInputs</varname>.
24332433+ </para>
24342434+ <para>
24352435+ You can also specify a <envar>runtimeDependencies</envar> environment
24362436+ variable which lists dependencies that are unconditionally added to all
24372437+ executables.
24382438+ </para>
24392439+ <para>
24402440+ This is useful for programs that use <citerefentry>
24412441+ <refentrytitle>dlopen</refentrytitle>
24422442+ <manvolnum>3</manvolnum>
24432443+ </citerefentry> to load libraries at runtime.
24442444+ </para>
24452445+ <para>
24462446+ In certain situations you may want to run the main command
24472447+ (<command>autoPatchelf</command>) of the setup hook on a file or a set
24482448+ of directories instead of unconditionally patching all outputs. This
24492449+ can be done by setting the <envar>dontAutoPatchelf</envar> environment
24502450+ variable to a non-empty value.
24512451+ </para>
24522452+ <para>
24532453+ The <command>autoPatchelf</command> command also recognizes a
24542454+ <parameter class="command">--no-recurse</parameter> command line flag,
24552455+ which prevents it from recursing into subdirectories.
24372456 </para>
24382457 </listitem>
24392458 </varlistentry>
···24552474 use the cntr exec subcommand. Note that <command>cntr</command> also
24562475 needs to be executed on the machine that is doing the build, which might
24572476 be not the case when remote builders are enabled.
24582458- <command>cntr</command> is only supported on linux based platforms.
24772477+ <command>cntr</command> is only supported on Linux-based platforms. To
24782478+ use it first add <literal>cntr</literal> to your
24792479+ <literal>environment.systemPackages</literal> on NixOS or alternatively to
24802480+ the root user on non-NixOS systems. Then in the package that is supposed
24812481+ to be inspected, add <literal>breakpointHook</literal> to
24822482+ <literal>nativeBuildInputs</literal>.
24832483+<programlisting>
24842484+ nativeBuildInputs = [ breakpointHook ];
24852485+ </programlisting>
24862486+ When a build failure happens there will be an instruction printed that
24872487+ shows how to attach with <literal>cntr</literal> to the build sandbox.
24592488 </para>
24602489 </listitem>
24612490 </varlistentry>
+19
nixos/doc/manual/configuration/modularity.xml
···127127[ "example.org" "example.gov" ]
128128</screen>
129129 </para>
130130+131131+ <para>
132132+ While abstracting your configuration, you may find it useful to generate
133133+ modules using code, instead of writing files. The example
134134+ below would have the same effect as importing a file which sets those
135135+ options.
136136+ <screen>
137137+ { config, pkgs, ... }:
138138+139139+ let netConfig = { hostName }: {
140140+ networking.hostName = hostName;
141141+ networking.useDHCP = false;
142142+ };
143143+144144+ in
145145+146146+ { imports = [ (netConfig "nixos.localdomain") ]; }
147147+ </screen>
148148+</para>
130149</section>
···1919> startAll
2020> testScript
2121> $machine->succeed("touch /tmp/foo")
2222-> print($machine->succeed("pwd"), "\n") # Show stdout of command
2222+> print($machine->succeed("pwd")) # Show stdout of command
2323</screen>
2424 The function <command>testScript</command> executes the entire test script
2525 and drops you back into the test driver command line upon its completion.
···108108<programlisting>
109109$machine->start;
110110$machine->waitForUnit("default.target");
111111-die unless $machine->succeed("uname") =~ /Linux/;
111111+$machine->succeed("uname") =~ /Linux/ or die;
112112</programlisting>
113113 The first line is actually unnecessary; machines are implicitly started when
114114 you first execute an action on them (such as <literal>waitForUnit</literal>
+10
nixos/doc/manual/release-notes/rl-1903.xml
···113113 </listitem>
114114 <listitem>
115115 <para>
116116+ The <literal>ntp</literal> module now has sane default restrictions.
117117+ If you're relying on the previous defaults, which permitted all queries
118118+ and commands from all firewall-permitted sources, you can set
119119+ <varname>services.ntp.restrictDefault</varname> and
120120+ <varname>services.ntp.restrictSource</varname> to
121121+ <literal>[]</literal>.
122122+ </para>
123123+ </listitem>
124124+ <listitem>
125125+ <para>
116126 Package <varname>rabbitmq_server</varname> is renamed to
117127 <varname>rabbitmq-server</varname>.
118128 </para>
···33sources_=($sources)
44targets_=($targets)
5566-echo $objects
76objects=($objects)
87symlinks=($symlinks)
98···1312 res="$1"
1413 if test "${res:0:1}" = /; then res=${res:1}; fi
1514}
1616-1717-touch pathlist
18151916# Add the individual files.
2017for ((i = 0; i < ${#targets_[@]}; i++)); do
···252226232724# Add the closures of the top-level store objects.
2525+chmod +w .
2826mkdir -p nix/store
2929-storePaths=$(perl $pathsFromGraph closure-*)
3030-for i in $storePaths; do
2727+for i in $(< $closureInfo/store-paths); do
3128 cp -a "$i" "${i:1}"
3229done
3330···3532# TODO tar ruxo
3633# Also include a manifest of the closures in a format suitable for
3734# nix-store --load-db.
3838-printRegistration=1 perl $pathsFromGraph closure-* > nix-path-registration
3535+cp $closureInfo/registration nix-path-registration
39364037# Add symlinks to the top-level store objects.
4138for ((n = 0; n < ${#objects[*]}; n++)); do
+1-1
nixos/lib/testing.nix
···11{ system
22-, pkgs
22+, pkgs ? import ../.. { inherit system config; }
33 # Use a minimal kernel?
44, minimal ? false
55 # Ignored
···238238 User = "postgres";
239239 Group = "postgres";
240240 PermissionsStartOnly = true;
241241+ Type = if lib.versionAtLeast cfg.package.version "9.6"
242242+ then "notify"
243243+ else "simple";
241244242245 # Shut down Postgres using SIGINT ("Fast Shutdown mode"). See
243246 # http://www.postgresql.org/docs/current/static/server-shutdown.html
+14-3
nixos/modules/services/mail/rspamd.nix
···4545 else "${config.socket}${maybeOption "mode"}${maybeOption "owner"}${maybeOption "group"}";
4646 };
47474848- workerOpts = { name, ... }: {
4848+ traceWarning = w: x: builtins.trace "[1;31mwarning: ${w}[0m" x;
4949+5050+ workerOpts = { name, options, ... }: {
4951 options = {
5052 enable = mkOption {
5153 type = types.nullOr types.bool;
···5961 };
6062 type = mkOption {
6163 type = types.nullOr (types.enum [
6262- "normal" "controller" "fuzzy_storage" "rspamd_proxy" "lua"
6464+ "normal" "controller" "fuzzy_storage" "rspamd_proxy" "lua" "proxy"
6365 ]);
6464- description = "The type of this worker";
6666+ description = ''
6767+ The type of this worker. The type <literal>proxy</literal> is
6868+ deprecated and only kept for backwards compatibility and should be
6969+ replaced with <literal>rspamd_proxy</literal>.
7070+ '';
7171+ apply = let
7272+ from = "services.rspamd.workers.\”${name}\".type";
7373+ files = options.type.files;
7474+ warning = "The option `${from}` defined in ${showFiles files} has enum value `proxy` which has been renamed to `rspamd_proxy`";
7575+ in x: if x == "proxy" then traceWarning warning "rspamd_proxy" else x;
6576 };
6677 bindSockets = mkOption {
6778 type = types.listOf (types.either types.str (types.submodule bindSocketOpts));
···2222 # Not supported in systemd-nspawn containers.
2323 security.audit.enable = false;
24242525- # Make sure that root user in container will talk to host nix-daemon
2626- environment.etc."profile".text = ''
2727- export NIX_REMOTE=daemon
2828- '';
2929-3030-2525+ # Use the host's nix-daemon.
2626+ environment.variables.NIX_REMOTE = "daemon";
31273228 };
3329
+38
nixos/modules/virtualisation/docker-image.nix
···1717 # Socket activated ssh presents problem in Docker.
1818 services.openssh.startWhenNeeded = false;
1919}
2020+2121+# Example usage:
2222+#
2323+## default.nix
2424+# let
2525+# nixos = import <nixpkgs/nixos> {
2626+# configuration = ./configuration.nix;
2727+# system = "x86_64-linux";
2828+# };
2929+# in
3030+# nixos.config.system.build.tarball
3131+#
3232+## configuration.nix
3333+# { pkgs, config, lib, ... }:
3434+# {
3535+# imports = [
3636+# <nixpkgs/nixos/modules/virtualisation/docker-image.nix>
3737+# <nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
3838+# ];
3939+#
4040+# documentation.doc.enable = false;
4141+#
4242+# environment.systemPackages = with pkgs; [
4343+# bashInteractive
4444+# cacert
4545+# nix
4646+# ];
4747+# }
4848+#
4949+## Run
5050+# Build the tarball:
5151+# $ nix-build default.nix
5252+# Load into docker:
5353+# $ docker import result/tarball/nixos-system-*.tar.xz nixos-docker
5454+# Boots into systemd
5555+# $ docker run --privileged -it nixos-docker /init
5656+# Log into the container
5757+# $ docker exec -it <container-name> /run/current-system/sw/bin/bash
···3939 '';
40404141 meta = with stdenv.lib; {
4242- homepage = http://repo.or.cz/w/llpp.git;
4242+ homepage = https://repo.or.cz/w/llpp.git;
4343 description = "A MuPDF based PDF pager written in OCaml";
4444 platforms = platforms.linux;
4545 maintainers = with maintainers; [ pSub ];
···11{ stdenv, fetchFromGitHub, gettext, makeWrapper, tcl, which, writeScript
22, ncurses, perl , cyrus_sasl, gss, gpgme, kerberos, libidn, libxml2, notmuch, openssl
33-, lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42, mime-types }:
33+, lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42, mailcap
44+}:
4556let
67 muttWrapper = writeScript "mutt" ''
···2829 buildInputs = [
2930 cyrus_sasl gss gpgme kerberos libidn ncurses
3031 notmuch openssl perl lmdb
3131- mime-types
3232+ mailcap
3233 ];
33343435 nativeBuildInputs = [
···4748 --replace http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd ${docbook_xml_dtd_42}/xml/dtd/docbook/docbookx.dtd
4849 done
49505151+5052 # allow neomutt to map attachments to their proper mime.types if specified wrongly
5153 # and use a far more comprehensive list than the one shipped with neomutt
5254 substituteInPlace sendlib.c \
5353- --replace /etc/mime.types ${mime-types}/etc/mime.types
5555+ --replace /etc/mime.types ${mailcap}/etc/mime.types
54565557 # The string conversion tests all fail with the first version of neomutt
5658 # that has tests (20180223) as well as 20180716 so we disable them for now.
···2233Sage 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.
4455-Don't feel discouraged to fix, simplify or improve things though. Here's a quick overview over the functions of the individual files:
66-77-- `sage-src.nix`
88- 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.
99-1010-- `env-locations.nix`
1111- 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`).
1212-1313-- `sage-env.nix`
1414- 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.
1515-1616-- `sagelib.nix`
1717- Defines the main sage package (without setting the necessary environments or running any tests).
1818-1919-- `sage-with-env.nix`
2020- Wraps sage in the necessary environment.
2121-2222-- `sage.nix`
2323- Runs sages doctests.
2424-2525-- `sage-wrapper.nix`
2626- Optionally tells sage where do find the docs.
2727-2828-- `sagedoc.nix`
2929- 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.
3030-3131-- `sagenb.nix`
3232- The (semi deprecated) sage notebook.
3333-3434-- `default.nix`
3535- Introduces necessary overrides, defines new packages and ties everything together (returning the `sage` package).
3636-3737-- `flask-oldsessions.nix`, `flask-openid.nix`, `python-openid.nix`
3838- 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.
3939-4040-- `pybrial.nix`
4141- 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.
4242-4343-- `openblas-pc.nix`
4444- This creates a `.pc` file to be read by `pkg-config` that allows openblas to take on different roles, like `cblas` or `lapack`.
55+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.
456467## The sage build is broken
478
+90-54
pkgs/applications/science/math/sage/default.nix
···11-{ nixpkgs
11+{ pkgs
22, withDoc ? false
33}:
4455+# Here sage and its dependencies are put together. Some dependencies may be pinned
66+# as a last resort. Patching sage for compatibility with newer dependency versions
77+# is always preferred, see `sage-src.nix` for that.
88+59let
66- inherit (nixpkgs) fetchpatch fetchurl symlinkJoin callPackage nodePackages;
1010+ inherit (pkgs) fetchurl symlinkJoin callPackage nodePackages;
711812 # https://trac.sagemath.org/ticket/15980 for tracking of python3 support
99- python = nixpkgs.python2.override {
1313+ python = pkgs.python2.override {
1014 packageOverrides = self: super: {
1115 # python packages that appear unmaintained and were not accepted into the nixpkgs
1216 # tree because of that. These packages are only dependencies of the more-or-less
1317 # deprecated sagenb. However sagenb is still a default dependency and the doctests
1418 # depend on it.
1519 # See https://github.com/NixOS/nixpkgs/pull/38787 for a discussion.
2020+ # The dependency on the sage notebook (and therefore these packages) will be
2121+ # removed in the future:
2222+ # https://trac.sagemath.org/ticket/25837
1623 flask-oldsessions = self.callPackage ./flask-oldsessions.nix {};
1724 flask-openid = self.callPackage ./flask-openid.nix {};
1825 python-openid = self.callPackage ./python-openid.nix {};
2626+ sagenb = self.callPackage ./sagenb.nix {
2727+ mathjax = nodePackages.mathjax;
2828+ };
19293030+ # Package with a cyclic dependency with sage
2031 pybrial = self.callPackage ./pybrial.nix {};
21323333+ # `sagelib`, i.e. all of sage except some wrappers and runtime dependencies
2234 sagelib = self.callPackage ./sagelib.nix {
2335 inherit flint ecl arb;
2424- inherit sage-src openblas-blas-pc openblas-cblas-pc openblas-lapack-pc pynac singular;
2525- linbox = nixpkgs.linbox.override { withSage = true; };
2626- };
2727-2828- sagenb = self.callPackage ./sagenb.nix {
2929- mathjax = nodePackages.mathjax;
3030- };
3131-3232- sagedoc = self.callPackage ./sagedoc.nix {
3333- inherit sage-src;
3636+ inherit sage-src pynac singular;
3737+ linbox = pkgs.linbox.override { withSage = true; };
3438 };
3939+ };
4040+ };
35413636- env-locations = self.callPackage ./env-locations.nix {
3737- inherit pari_data ecl;
3838- inherit singular;
3939- three = nodePackages.three;
4040- mathjax = nodePackages.mathjax;
4141- };
4242+ jupyter-kernel-definition = {
4343+ displayName = "SageMath ${sage-src.version}";
4444+ argv = [
4545+ "${sage-with-env}/bin/sage" # FIXME which sage
4646+ "--python"
4747+ "-m"
4848+ "sage.repl.ipython_kernel"
4949+ "-f"
5050+ "{connection_file}"
5151+ ];
5252+ language = "sagemath";
5353+ # just one 16x16 logo is available
5454+ logo32 = "${sage-src}/doc/common/themes/sage/static/sageicon.png";
5555+ logo64 = "${sage-src}/doc/common/themes/sage/static/sageicon.png";
5656+ };
42574343- sage-env = self.callPackage ./sage-env.nix {
4444- inherit sage-src python rWrapper openblas-cblas-pc ecl singular palp flint pynac pythonEnv;
4545- pkg-config = nixpkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
4646- };
5858+ # A bash script setting various environment variables to tell sage where
5959+ # the files its looking fore are located. Also see `sage-env`.
6060+ env-locations = callPackage ./env-locations.nix {
6161+ inherit pari_data ecl;
6262+ inherit singular;
6363+ cysignals = python.pkgs.cysignals;
6464+ three = nodePackages.three;
6565+ mathjax = nodePackages.mathjax;
6666+ };
47674848- sage-with-env = self.callPackage ./sage-with-env.nix {
4949- inherit pythonEnv;
5050- inherit sage-src openblas-blas-pc openblas-cblas-pc openblas-lapack-pc pynac singular;
5151- pkg-config = nixpkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
5252- three = nodePackages.three;
5353- };
6868+ # The shell file that gets sourced on every sage start. Will also source
6969+ # the env-locations file.
7070+ sage-env = callPackage ./sage-env.nix {
7171+ sagelib = python.pkgs.sagelib;
7272+ inherit env-locations;
7373+ inherit python rWrapper ecl singular palp flint pynac pythonEnv;
7474+ pkg-config = pkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
7575+ };
54765555- sage = self.callPackage ./sage.nix { };
7777+ # The documentation for sage, building it takes a lot of ram.
7878+ sagedoc = callPackage ./sagedoc.nix {
7979+ inherit sage-with-env;
8080+ inherit python;
8181+ };
56825757- sage-wrapper = self.callPackage ./sage-wrapper.nix {
5858- inherit sage-src withDoc;
5959- };
6060- };
8383+ # sagelib with added wrappers and a dependency on sage-tests to make sure thet tests were run.
8484+ sage-with-env = callPackage ./sage-with-env.nix {
8585+ inherit pythonEnv;
8686+ inherit sage-env;
8787+ inherit pynac singular;
8888+ pkg-config = pkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
8989+ three = nodePackages.three;
6190 };
62916363- openblas-blas-pc = callPackage ./openblas-pc.nix { name = "blas"; };
6464- openblas-cblas-pc = callPackage ./openblas-pc.nix { name = "cblas"; };
6565- openblas-lapack-pc = callPackage ./openblas-pc.nix { name = "lapack"; };
9292+ # Doesn't actually build anything, just runs sages testsuite. This is a
9393+ # separate derivation to make it possible to re-run the tests without
9494+ # rebuilding sagelib (which takes ~30 minutes).
9595+ # Running the tests should take something in the order of 1h.
9696+ sage-tests = callPackage ./sage-tests.nix {
9797+ inherit sage-with-env;
9898+ };
669967100 sage-src = callPackage ./sage-src.nix {};
68101···77110 sympy
78111 fpylll
79112 matplotlib
113113+ tkinter # optional, as a matplotlib backend (use with `%matplotlib tk`)
80114 scipy
81115 ipywidgets
82116 rpy2
···91125 } // { extraLibs = pythonRuntimeDeps; }; # make the libs accessible
9212693127 # needs to be rWrapper, standard "R" doesn't include default packages
9494- rWrapper = nixpkgs.rWrapper.override {
128128+ rWrapper = pkgs.rWrapper.override {
95129 # https://trac.sagemath.org/ticket/25674
9696- R = nixpkgs.R.overrideAttrs (attrs: rec {
130130+ R = pkgs.R.overrideAttrs (attrs: rec {
97131 name = "R-3.4.4";
132132+ doCheck = false;
98133 src = fetchurl {
99134 url = "http://cran.r-project.org/src/base/R-3/${name}.tar.gz";
100135 sha256 = "0dq3jsnwsb5j3fhl0wi3p5ycv8avf8s5j1y4ap3d2mkjmcppvsdk";
···102137 });
103138 };
104139105105- arb = nixpkgs.arb.override { inherit flint; };
140140+ arb = pkgs.arb.override { inherit flint; };
106141107107- singular = nixpkgs.singular.override { inherit flint; };
142142+ singular = pkgs.singular.override { inherit flint; };
108143109144 # *not* to confuse with the python package "pynac"
110110- pynac = nixpkgs.pynac.override { inherit singular flint; };
145145+ pynac = pkgs.pynac.override { inherit singular flint; };
111146112147 # With openblas (64 bit), the tests fail the same way as when sage is build with
113148 # openblas instead of openblasCompat. Apparently other packages somehow use flints
114149 # blas when it is available. Alternative would be to override flint to use
115150 # openblasCompat.
116116- flint = nixpkgs.flint.override { withBlas = false; };
151151+ flint = pkgs.flint.override { withBlas = false; };
117152118153 # Multiple palp dimensions need to be available and sage expects them all to be
119154 # in the same folder.
120155 palp = symlinkJoin {
121121- name = "palp-${nixpkgs.palp.version}";
156156+ name = "palp-${pkgs.palp.version}";
122157 paths = [
123123- (nixpkgs.palp.override { dimensions = 4; doSymlink = false; })
124124- (nixpkgs.palp.override { dimensions = 5; doSymlink = false; })
125125- (nixpkgs.palp.override { dimensions = 6; doSymlink = true; })
126126- (nixpkgs.palp.override { dimensions = 11; doSymlink = false; })
158158+ (pkgs.palp.override { dimensions = 4; doSymlink = false; })
159159+ (pkgs.palp.override { dimensions = 5; doSymlink = false; })
160160+ (pkgs.palp.override { dimensions = 6; doSymlink = true; })
161161+ (pkgs.palp.override { dimensions = 11; doSymlink = false; })
127162 ];
128163 };
129164130165 # Sage expects those in the same directory.
131166 pari_data = symlinkJoin {
132167 name = "pari_data";
133133- paths = with nixpkgs; [
168168+ paths = with pkgs; [
134169 pari-galdata
135170 pari-seadata-small
136171 ];
137172 };
138173139174 # https://trac.sagemath.org/ticket/22191
140140- ecl = nixpkgs.ecl_16_1_2;
175175+ ecl = pkgs.ecl_16_1_2;
141176in
142142- python.pkgs.sage-wrapper // {
143143- doc = python.pkgs.sagedoc;
144144- lib = python.pkgs.sagelib;
145145- }
177177+# A wrapper around sage that makes sure sage finds its docs (if they were build).
178178+callPackage ./sage.nix {
179179+ inherit sage-tests sage-with-env sagedoc jupyter-kernel-definition;
180180+ inherit withDoc;
181181+}
···1616, cysignals
1717}:
18181919+# A bash script setting various environment variables to tell sage where
2020+# the files its looking fore are located. Also see `sage-env`.
1921writeTextFile rec {
2022 name = "sage-env-locations";
2123 destination = "/${name}";
···11-diff --git a/build/pkgs/openblas/package-version.txt b/build/pkgs/openblas/package-version.txt
22-index 3bc45c25d4..7c7c224887 100644
33---- a/src/sage/schemes/elliptic_curves/padics.py
44-+++ b/src/sage/schemes/elliptic_curves/padics.py
55-@@ -292,8 +292,8 @@ def padic_regulator(self, p, prec=20, height=None, check_hypotheses=True):
66-77- sage: max_prec = 30 # make sure we get past p^2 # long time
88- sage: full = E.padic_regulator(5, max_prec) # long time
99-- sage: for prec in range(1, max_prec): # long time
1010-- ....: assert E.padic_regulator(5, prec) == full # long time
1111-+ sage: for prec in range(1, max_prec): # known bug (#25969) # long time
1212-+ ....: assert E.padic_regulator(5, prec) == full # known bug (#25969) # long time
1313-1414- A case where the generator belongs to the formal group already
1515- (:trac:`3632`)::
···11-diff --git a/src/sage/all.py b/src/sage/all.py
22-index 14cec431f1..25a35a0522 100644
33---- a/src/sage/all.py
44-+++ b/src/sage/all.py
55-@@ -310,6 +310,7 @@ warnings.filters.remove(('ignore', None, DeprecationWarning, None, 0))
66- # Ignore all deprecations from IPython etc.
77- warnings.filterwarnings('ignore',
88- module='.*(IPython|ipykernel|jupyter_client|jupyter_core|nbformat|notebook|ipywidgets|storemagic)')
99-+warnings.filterwarnings('ignore', "The 'normed' kwarg is deprecated, and has been replaced by the 'density' kwarg.") # matplotlib normed deprecation
1010- # However, be sure to keep OUR deprecation warnings
1111- warnings.filterwarnings('default',
1212- '[\s\S]*See http://trac.sagemath.org/[0-9]* for details.')
+17-11
pkgs/applications/science/math/sage/sage-env.nix
···22, lib
33, writeTextFile
44, python
55-, sage-src
65, sagelib
76, env-locations
87, gfortran
···3736, lcalc
3837, rubiks
3938, flintqs
4040-, openblas-cblas-pc
3939+, openblasCompat
4140, flint
4241, gmp
4342, mpfr
···4645, gsl
4746, ntl
4847}:
4848+4949+# This generates a `sage-env` shell file that will be sourced by sage on startup.
5050+# It sets up various environment variables, telling sage where to find its
5151+# dependencies.
49525053let
5154 runtimepath = (lib.makeBinPath ([
···9699 destination = "/${name}";
97100 text = ''
98101 export PKG_CONFIG_PATH='${lib.concatStringsSep ":" (map (pkg: "${pkg}/lib/pkgconfig") [
9999- # This is only needed in the src/sage/misc/cython.py test and I'm not sure if there's really a use-case
100100- # for it outside of the tests. However since singular and openblas are runtime dependencies anyways
101101- # and openblas-cblas-pc is tiny, it doesn't really hurt to include.
102102+ # This is only needed in the src/sage/misc/cython.py test and I'm not
103103+ # sure if there's really a usecase for it outside of the tests. However
104104+ # since singular and openblas are runtime dependencies anyways, it doesn't
105105+ # really hurt to include.
102106 singular
103103- openblas-cblas-pc
107107+ openblasCompat
104108 ])
105109 }'
106106- export SAGE_ROOT='${sage-src}'
110110+ export SAGE_ROOT='${sagelib.src}'
107111 export SAGE_LOCAL='@sage-local@'
108112 export SAGE_SHARE='${sagelib}/share'
109113 orig_path="$PATH"
110114 export PATH='${runtimepath}'
111115112116 # set dependent vars, like JUPYTER_CONFIG_DIR
113113- source "${sage-src}/src/bin/sage-env"
117117+ source "${sagelib.src}/src/bin/sage-env"
114118 export PATH="${runtimepath}:$orig_path" # sage-env messes with PATH
115119116120 export SAGE_LOGS="$TMPDIR/sage-logs"
117121 export SAGE_DOC="''${SAGE_DOC_OVERRIDE:-doc-placeholder}"
118118- export SAGE_DOC_SRC="''${SAGE_DOC_SRC_OVERRIDE:-${sage-src}/src/doc}"
122122+ export SAGE_DOC_SRC="''${SAGE_DOC_SRC_OVERRIDE:-${sagelib.src}/src/doc}"
119123120124 # set locations of dependencies
121125 . ${env-locations}/sage-env-locations
···154158155159 export SAGE_LIB='${sagelib}/${python.sitePackages}'
156160157157- export SAGE_EXTCODE='${sage-src}/src/ext'
161161+ export SAGE_EXTCODE='${sagelib.src}/src/ext'
158162159159- # for find_library
163163+ # for find_library
160164 export DYLD_LIBRARY_PATH="${lib.makeLibraryPath [stdenv.cc.libc singular]}:$DYLD_LIBRARY_PATH"
161165 '';
166166+} // {
167167+ lib = sagelib; # equivalent of `passthru`, which `writeTextFile` doesn't support
162168}
+22-9
pkgs/applications/science/math/sage/sage-src.nix
···22, fetchFromGitHub
33, fetchpatch
44}:
55+66+# This file is responsible for fetching the sage source and adding necessary patches.
77+# It does not actually build anything, it just copies the patched sources to $out.
88+# This is done because multiple derivations rely on these sources and they should
99+# all get the same sources with the same patches applied.
1010+511stdenv.mkDerivation rec {
612 version = "8.4";
713 name = "sage-src-${version}";
···1319 sha256 = "0gips1hagiz9m7s21bg5as8hrrm2x5k47h1bsq0pc46iplfwmv2d";
1420 };
15212222+ # Patches needed because of particularities of nix or the way this is packaged.
2323+ # The goal is to upstream all of them and get rid of this list.
1624 nixPatches = [
1725 # https://trac.sagemath.org/ticket/25358
1826 (fetchpatch {
···3139 # Revert the commit that made the sphinx build fork even in the single thread
3240 # case. For some yet unknown reason, that breaks the docbuild on nix and archlinux.
3341 # See https://groups.google.com/forum/#!msg/sage-packaging/VU4h8IWGFLA/mrmCMocYBwAJ.
4242+ # https://trac.sagemath.org/ticket/26608
3443 ./patches/revert-sphinx-always-fork.patch
35443645 # Make sure py2/py3 tests are only run when their expected context (all "sage"
···3948 ./patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch
4049 ];
41505151+ # Patches needed because of package updates. We could just pin the versions of
5252+ # dependencies, but that would lead to rebuilds, confusion and the burdons of
5353+ # maintaining multiple versions of dependencies. Instead we try to make sage
5454+ # compatible with never dependency versions when possible. All these changes
5555+ # should come from or be proposed to upstream. This list will probably never
5656+ # be empty since dependencies update all the time.
4257 packageUpgradePatches = let
4343- # fetch a diff between base and rev on sage's git server
4444- # used to fetch trac tickets by setting the base to the release and the
4545- # revision to the last commit that should be included
5858+ # Fetch a diff between `base` and `rev` on sage's git server.
5959+ # Used to fetch trac tickets by setting the `base` to the last release and the
6060+ # `rev` to the last commit of the ticket.
4661 fetchSageDiff = { base, rev, ...}@args: (
4762 fetchpatch ({
4863 url = "https://git.sagemath.org/sage.git/patch?id2=${base}&id=${rev}";
···5469 in [
5570 # New glpk version has new warnings, filter those out until upstream sage has found a solution
5671 # https://trac.sagemath.org/ticket/24824
5757- ./patches/pari-stackwarn.patch # not actually necessary since tha pari upgrade, but necessary for the glpk patch to apply
7272+ ./patches/pari-stackwarn.patch # not actually necessary since the pari upgrade, but necessary for the glpk patch to apply
5873 (fetchpatch {
5974 url = "https://salsa.debian.org/science-team/sagemath/raw/58bbba93a807ca2933ca317501d093a1bb4b84db/debian/patches/dt-version-glpk-4.65-ignore-warnings.patch";
6075 sha256 = "0b9293v73wb4x13wv5zwyjgclc01zn16msccfzzi6znswklgvddp";
···6479 # https://trac.sagemath.org/ticket/25260
6580 ./patches/numpy-1.15.1.patch
66816767- # ntl upgrade
6868- # https://trac.sagemath.org/ticket/25532#comment:29
8282+ # needed for ntl update
8383+ # https://trac.sagemath.org/ticket/25532
6984 (fetchpatch {
7085 name = "lcalc-c++11.patch";
7186 url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/sagemath-lcalc-c++11.patch?h=packages/sagemath&id=0e31ae526ab7c6b5c0bfacb3f8b1c4fd490035aa";
···100115 })
101116 ];
102117103103- patches = nixPatches ++ packageUpgradePatches ++ [
104104- ./patches/known-padics-bug.patch
105105- ];
118118+ patches = nixPatches ++ packageUpgradePatches;
106119107120 postPatch = ''
108121 # make sure shebangs etc are fixed, but sage-python23 still works
···33, buildPythonPackage
44, arb
55, openblasCompat
66-, openblas-blas-pc
77-, openblas-cblas-pc
88-, openblas-lapack-pc
96, brial
107, cliquer
118, cypari2
···5148, libbraiding
5249}:
53505151+# This is the core sage python package. Everything else is just wrappers gluing
5252+# stuff together. It is not very useful on its own though, since it will not
5353+# find many of its dependencies without `sage-env`, will not be tested without
5454+# `sage-tests` and will not have html docs without `sagedoc`.
5555+5456buildPythonPackage rec {
5557 format = "other";
5656- version = sage-src.version;
5757- pname = "sagelib";
5858-5858+ version = src.version;
5959+ name = "sagelib-${version}";
5960 src = sage-src;
60616162 nativeBuildInputs = [
6263 iml
6364 perl
6464- openblas-blas-pc
6565- openblas-cblas-pc
6666- openblas-lapack-pc
6765 jupyter_core
6866 ];
6967
+4-1
pkgs/applications/science/math/sage/sagenb.nix
···11-# Has a cyclic dependency with sage (not expressed here) and is not useful outside of sage
21{ stdenv
32, fetchpatch
43, python
···1211, flask-autoindex
1312, flask-babel
1413}:
1414+1515+# Has a cyclic dependency with sage (not expressed here) and is not useful outside of sage.
1616+# Deprecated, hopefully soon to be removed. See
1717+# https://trac.sagemath.org/ticket/25837
15181619buildPythonPackage rec {
1720 pname = "sagenb";
···147147 fi
148148}
149149150150+# Can be used to manually add additional directories with shared object files
151151+# to be included for the next autoPatchelf invocation.
152152+addAutoPatchelfSearchPath() {
153153+ local -a findOpts=()
154154+155155+ # XXX: Somewhat similar to the one in the autoPatchelf function, maybe make
156156+ # it DRY someday...
157157+ while [ $# -gt 0 ]; do
158158+ case "$1" in
159159+ --) shift; break;;
160160+ --no-recurse) shift; findOpts+=("-maxdepth" 1);;
161161+ --*)
162162+ echo "addAutoPatchelfSearchPath: ERROR: Invalid command line" \
163163+ "argument: $1" >&2
164164+ return 1;;
165165+ *) break;;
166166+ esac
167167+ done
168168+169169+ cachedDependencies+=(
170170+ $(find "$@" "${findOpts[@]}" \! -type d \
171171+ \( -name '*.so' -o -name '*.so.*' \))
172172+ )
173173+}
174174+150175autoPatchelf() {
176176+ local norecurse=
177177+178178+ while [ $# -gt 0 ]; do
179179+ case "$1" in
180180+ --) shift; break;;
181181+ --no-recurse) shift; norecurse=1;;
182182+ --*)
183183+ echo "autoPatchelf: ERROR: Invalid command line" \
184184+ "argument: $1" >&2
185185+ return 1;;
186186+ *) break;;
187187+ esac
188188+ done
189189+190190+ if [ $# -eq 0 ]; then
191191+ echo "autoPatchelf: No paths to patch specified." >&2
192192+ return 1
193193+ fi
194194+151195 echo "automatically fixing dependencies for ELF files" >&2
152196153197 # Add all shared objects of the current output path to the start of
154198 # cachedDependencies so that it's choosen first in findDependency.
155155- cachedDependencies+=(
156156- $(find "$prefix" \! -type d \( -name '*.so' -o -name '*.so.*' \))
157157- )
158158- local elffile
199199+ addAutoPatchelfSearchPath ${norecurse:+--no-recurse} -- "$@"
159200160201 # Here we actually have a subshell, which also means that
161202 # $cachedDependencies is final at this point, so whenever we want to run
···164205 # outside of this function.
165206 while IFS= read -r -d $'\0' file; do
166207 isELF "$file" || continue
208208+ segmentHeaders="$(LANG=C readelf -l "$file")"
209209+ # Skip if the ELF file doesn't have segment headers (eg. object files).
210210+ echo "$segmentHeaders" | grep -q '^Program Headers:' || continue
167211 if isExecutable "$file"; then
168212 # Skip if the executable is statically linked.
169169- LANG=C readelf -l "$file" | grep -q "^ *INTERP\\>" || continue
213213+ echo "$segmentHeaders" | grep -q "^ *INTERP\\>" || continue
170214 fi
171215 autoPatchelfFile "$file"
172172- done < <(find "$prefix" -type f -print0)
216216+ done < <(find "$@" ${norecurse:+-maxdepth 1} -type f -print0)
173217}
174218175219# XXX: This should ultimately use fixupOutputHooks but we currently don't have
···180224# So what we do here is basically run in postFixup and emulate the same
181225# behaviour as fixupOutputHooks because the setup hook for patchelf is run in
182226# fixupOutput and the postFixup hook runs later.
183183-postFixupHooks+=(
184184- 'for output in $outputs; do prefix="${!output}" autoPatchelf; done'
185185-)
227227+postFixupHooks+=('
228228+ if [ -z "$dontAutoPatchelf" ]; then
229229+ autoPatchelf -- $(for output in $outputs; do
230230+ [ -e "${!output}" ] || continue
231231+ echo "${!output}"
232232+ done)
233233+ fi
234234+')
+239
pkgs/build-support/writers/default.nix
···11+{ pkgs, lib }:
22+33+with lib;
44+rec {
55+ # Base implementation for non-compiled executables.
66+ # Takes an interpreter, for example `${pkgs.bash}/bin/bash`
77+ #
88+ # Examples:
99+ # writeBash = makeScriptWriter { interpreter = "${pkgs.bash}/bin/bash"; }
1010+ # makeScriptWriter { interpreter = "${pkgs.dash}/bin/dash"; } "hello" "echo hello world"
1111+ makeScriptWriter = { interpreter, check ? "" }: name: text:
1212+ assert lib.or (types.path.check name) (builtins.match "([0-9A-Za-z._])[0-9A-Za-z._-]*" name != null);
1313+1414+ pkgs.writeTextFile {
1515+ name = last (builtins.split "/" name);
1616+ executable = true;
1717+ destination = if types.path.check name then name else "";
1818+ text = ''
1919+ #! ${interpreter}
2020+ ${text}
2121+ '';
2222+ checkPhase = check;
2323+ };
2424+2525+ # Like writeScript but the first line is a shebang to bash
2626+ #
2727+ # Example:
2828+ # writeBash "example" ''
2929+ # echo hello world
3030+ # ''
3131+ writeBash = makeScriptWriter {
3232+ interpreter = "${pkgs.bash}/bin/bash";
3333+ };
3434+3535+ # Like writeScriptBIn but the first line is a shebang to bash
3636+ writeBashBin = name:
3737+ writeBash "/bin/${name}";
3838+3939+ # writeC writes an executable c package called `name` to `destination` using `libraries`.
4040+ #
4141+ # Examples:
4242+ # writeC "hello-world-ncurses" { libraries = [ pkgs.ncurses ]; } ''
4343+ # #include <ncurses.h>
4444+ # int main() {
4545+ # initscr();
4646+ # printw("Hello World !!!");
4747+ # refresh(); endwin();
4848+ # return 0;
4949+ # }
5050+ # ''
5151+ writeC = name: {
5252+ libraries ? [],
5353+ }: text: pkgs.runCommand name {
5454+ inherit text;
5555+ buildInputs = [ pkgs.pkgconfig ] ++ libraries;
5656+ passAsFile = [ "text" ];
5757+ } ''
5858+ PATH=${makeBinPath [
5959+ pkgs.binutils-unwrapped
6060+ pkgs.coreutils
6161+ pkgs.gcc
6262+ pkgs.pkgconfig
6363+ ]}
6464+ mkdir -p "$(dirname "$out")"
6565+ gcc \
6666+ ${optionalString (libraries != [])
6767+ "$(pkg-config --cflags --libs ${
6868+ concatMapStringsSep " " (lib: escapeShellArg (builtins.parseDrvName lib.name).name) (libraries)
6969+ })"
7070+ } \
7171+ -O \
7272+ -o "$out" \
7373+ -Wall \
7474+ -x c \
7575+ "$textPath"
7676+ strip --strip-unneeded "$out"
7777+ '';
7878+7979+ # writeCBin takes the same arguments as writeC but outputs a directory (like writeScriptBin)
8080+ writeCBin = name: spec: text:
8181+ pkgs.runCommand name {
8282+ } ''
8383+ mkdir -p $out/bin
8484+ ln -s ${writeC name spec text} $out/bin/${name}
8585+ '';
8686+8787+ # Like writeScript but the first line is a shebang to dash
8888+ #
8989+ # Example:
9090+ # writeDash "example" ''
9191+ # echo hello world
9292+ # ''
9393+ writeDash = makeScriptWriter {
9494+ interpreter = "${pkgs.dash}/bin/dash";
9595+ };
9696+9797+ # Like writeScriptBin but the first line is a shebang to dash
9898+ writeDashBin = name:
9999+ writeDash "/bin/${name}";
100100+101101+ # writeHaskell takes a name, an attrset with libraries and haskell version (both optional)
102102+ # and some haskell source code and returns an executable.
103103+ #
104104+ # Example:
105105+ # writeHaskell "missiles" { libraries = [ pkgs.haskellPackages.acme-missiles ]; } ''
106106+ # Import Acme.Missiles
107107+ #
108108+ # main = launchMissiles
109109+ # '';
110110+ writeHaskell = name: {
111111+ libraries ? [],
112112+ ghc ? pkgs.ghc
113113+ }: text: pkgs.runCommand name {
114114+ inherit text;
115115+ passAsFile = [ "text" ];
116116+ } ''
117117+ cp $textPath ${name}.hs
118118+ ${ghc.withPackages (_: libraries )}/bin/ghc ${name}.hs
119119+ cp ${name} $out
120120+ '';
121121+122122+ # writeHaskellBin takes the same arguments as writeHaskell but outputs a directory (like writeScriptBin)
123123+ writeHaskellBin = name: spec: text:
124124+ pkgs.runCommand name {
125125+ } ''
126126+ mkdir -p $out/bin
127127+ ln -s ${writeHaskell name spec text} $out/bin/${name}
128128+ '';
129129+130130+ # writeJS takes a name an attributeset with libraries and some JavaScript sourcecode and
131131+ # returns an executable
132132+ #
133133+ # Example:
134134+ # writeJS "example" { libraries = [ pkgs.nodePackages.uglify-js ]; } ''
135135+ # var UglifyJS = require("uglify-js");
136136+ # var code = "function add(first, second) { return first + second; }";
137137+ # var result = UglifyJS.minify(code);
138138+ # console.log(result.code);
139139+ # ''
140140+ writeJS = name: { libraries ? [] }: text:
141141+ let
142142+ node-env = pkgs.buildEnv {
143143+ name = "node";
144144+ paths = libraries;
145145+ pathsToLink = [
146146+ "/lib/node_modules"
147147+ ];
148148+ };
149149+ in writeDash name ''
150150+ export NODE_PATH=${node-env}/lib/node_modules
151151+ exec ${pkgs.nodejs}/bin/node ${pkgs.writeText "js" text}
152152+ '';
153153+154154+ # writeJSBin takes the same arguments as writeJS but outputs a directory (like writeScriptBin)
155155+ writeJSBin = name:
156156+ writeJS "/bin/${name}";
157157+158158+ # writePerl takes a name an attributeset with libraries and some perl sourcecode and
159159+ # returns an executable
160160+ #
161161+ # Example:
162162+ # writePerl "example" { libraries = [ pkgs.perlPackages.boolean ]; } ''
163163+ # use boolean;
164164+ # print "Howdy!\n" if true;
165165+ # ''
166166+ writePerl = name: { libraries ? [] }:
167167+ let
168168+ perl-env = pkgs.buildEnv {
169169+ name = "perl-environment";
170170+ paths = libraries;
171171+ pathsToLink = [
172172+ "/lib/perl5/site_perl"
173173+ ];
174174+ };
175175+ in
176176+ makeScriptWriter {
177177+ interpreter = "${pkgs.perl}/bin/perl -I ${perl-env}/lib/perl5/site_perl";
178178+ } name;
179179+180180+ # writePerlBin takes the same arguments as writePerl but outputs a directory (like writeScriptBin)
181181+ writePerlBin = name:
182182+ writePerl "/bin/${name}";
183183+184184+ # writePython2 takes a name an attributeset with libraries and some python2 sourcecode and
185185+ # returns an executable
186186+ #
187187+ # Example:
188188+ # writePython2 "test_python2" { libraries = [ pkgs.python2Packages.enum ]; } ''
189189+ # from enum import Enum
190190+ #
191191+ # class Test(Enum):
192192+ # a = "success"
193193+ #
194194+ # print Test.a
195195+ # ''
196196+ writePython2 = name: { libraries ? [], flakeIgnore ? [] }:
197197+ let
198198+ py = pkgs.python2.withPackages (ps: libraries);
199199+ ignoreAttribute = optionalString (flakeIgnore != []) "--ignore ${concatMapStringsSep "," escapeShellArg flakeIgnore}";
200200+ in
201201+ makeScriptWriter {
202202+ interpreter = "${py}/bin/python";
203203+ check = writeDash "python2check.sh" ''
204204+ exec ${pkgs.python2Packages.flake8}/bin/flake8 --show-source ${ignoreAttribute} "$1"
205205+ '';
206206+ } name;
207207+208208+ # writePython2Bin takes the same arguments as writePython2 but outputs a directory (like writeScriptBin)
209209+ writePython2Bin = name:
210210+ writePython2 "/bin/${name}";
211211+212212+ # writePython3 takes a name an attributeset with libraries and some python3 sourcecode and
213213+ # returns an executable
214214+ #
215215+ # Example:
216216+ # writePython3 "test_python3" { libraries = [ pkgs.python3Packages.pyyaml ]; } ''
217217+ # import yaml
218218+ #
219219+ # y = yaml.load("""
220220+ # - test: success
221221+ # """)
222222+ # print(y[0]['test'])
223223+ # ''
224224+ writePython3 = name: { libraries ? [], flakeIgnore ? [] }:
225225+ let
226226+ py = pkgs.python3.withPackages (ps: libraries);
227227+ ignoreAttribute = optionalString (flakeIgnore != []) "--ignore ${concatMapStringsSep "," escapeShellArg flakeIgnore}";
228228+ in
229229+ makeScriptWriter {
230230+ interpreter = "${py}/bin/python";
231231+ check = writeDash "python3check.sh" ''
232232+ exec ${pkgs.python3Packages.flake8}/bin/flake8 --show-source ${ignoreAttribute} "$1"
233233+ '';
234234+ } name;
235235+236236+ # writePython3Bin takes the same arguments as writePython3 but outputs a directory (like writeScriptBin)
237237+ writePython3Bin = name:
238238+ writePython3 "/bin/${name}";
239239+}
···66 owner = "eosrei";
77 repo = "twemoji-color-font";
88 rev = "v${meta.version}";
99- sha256 = "0z8r7z2r0r2wng4a7hvqvkcpd43l0d57yl402r7ci5bnmb02yvsa";
99+ sha256 = "07yawvbdkk15d7ac9dj7drs1rqln9sba1fd6jx885ms7ww2sfm7r";
1010 };
11111212 nativeBuildInputs = [ inkscape imagemagick potrace svgo scfbuild ];
···2121 '';
22222323 meta = with stdenv.lib; {
2424- version = "1.4";
2424+ version = "11.2.0";
2525 description = "Color emoji SVGinOT font using Twitter Unicode 10 emoji with diversity and country flags";
2626 longDescription = ''
2727 A color and B&W emoji SVGinOT font built from the Twitter Emoji for
···1515 # Patches coming from debian package
1616 # https://packages.debian.org/source/sid/libs/libmatheval
1717 patches = [ (fetchpatch {
1818- url = "http://anonscm.debian.org/cgit/debian-science/packages/libmatheval.git/plain/debian/patches/002-skip-docs.patch";
1818+ url = "https://salsa.debian.org/science-team/libmatheval/raw/debian/1.1.11+dfsg-3/debian/patches/002-skip-docs.patch";
1919 sha256 = "1nnkk9aw4jj6nql46zhwq6vx74zrmr1xq5ix0xyvpawhabhgjg62";
2020 } )
2121 (fetchpatch {
2222- url = "http://anonscm.debian.org/cgit/debian-science/packages/libmatheval.git/plain/debian/patches/003-guile2.0.patch";
2222+ url = "https://salsa.debian.org/science-team/libmatheval/raw/debian/1.1.11+dfsg-3/debian/patches/003-guile2.0.patch";
2323 sha256 = "1xgfw4finfvr20kjbpr4yl2djxmyr4lmvfa11pxirfvhrdi602qj";
2424 } )
2525 (fetchpatch {
2626- url = "http://anonscm.debian.org/cgit/debian-science/packages/libmatheval.git/plain/debian/patches/disable_coth_test.patch";
2626+ url = "https://salsa.debian.org/science-team/libmatheval/raw/debian/1.1.11+dfsg-3/debian/patches/disable_coth_test.patch";
2727 sha256 = "0bai8jrd5azfz5afmjixlvifk34liq58qb7p9kb45k6kc1fqqxzm";
2828 } )
2929 ];
3030-3030+3131 meta = {
3232 description = "A library to parse and evaluate symbolic expressions input as text";
3333 longDescription = ''
3434- GNU libmatheval is a library (callable from C and Fortran) to parse and evaluate symbolic
3535- expressions input as text. It supports expressions in any number of variables of arbitrary
3636- names, decimal and symbolic constants, basic unary and binary operators, and elementary
3737- mathematical functions. In addition to parsing and evaluation, libmatheval can also compute
3434+ GNU libmatheval is a library (callable from C and Fortran) to parse and evaluate symbolic
3535+ expressions input as text. It supports expressions in any number of variables of arbitrary
3636+ names, decimal and symbolic constants, basic unary and binary operators, and elementary
3737+ mathematical functions. In addition to parsing and evaluation, libmatheval can also compute
3838 symbolic derivatives and output expressions to strings.
3939 '';
4040 homepage = https://www.gnu.org/software/libmatheval/;
···15151616 meta = with stdenv.lib; {
1717 description = "Protocol headers for the SPICE protocol";
1818- homepage = http://www.spice-space.org;
1818+ homepage = https://www.spice-space.org/;
1919 license = licenses.bsd3;
2020 maintainers = with maintainers; [ bluescreen303 ];
2121 platforms = platforms.linux;
+1-1
pkgs/development/libraries/spice/default.nix
···4141 VD-Interfaces. The VD-Interfaces (VDI) enable both ends of the solution to be easily
4242 utilized by a third-party component.
4343 '';
4444- homepage = http://www.spice-space.org/;
4444+ homepage = https://www.spice-space.org/;
4545 license = licenses.lgpl21;
46464747 maintainers = [ maintainers.bluescreen303 ];
+2-2
pkgs/development/libraries/taglib/1.9.nix
···44 name = "taglib-1.9.1";
5566 src = fetchurl {
77- url = http://taglib.github.io/releases/taglib-1.9.1.tar.gz;
77+ url = https://taglib.github.io/releases/taglib-1.9.1.tar.gz;
88 sha256 = "06n7gnbcqa3r6c9gv00y0y1r48dyyazm6yj403i7ma0r2k6p3lvj";
99 };
1010···1313 buildInputs = [ zlib ];
14141515 meta = {
1616- homepage = http://developer.kde.org/~wheeler/taglib.html;
1616+ homepage = https://taglib.org/;
1717 repositories.git = git://github.com/taglib/taglib.git;
1818 description = "A library for reading and editing the meta-data of several popular audio formats";
1919 inherit (cmake.meta) platforms;
···11+{ lib, stdenv, buildPythonPackage, fetchPypi }:
22+33+buildPythonPackage rec {
44+ pname = "yattag";
55+ version = "1.10.1";
66+77+ src = fetchPypi {
88+ inherit pname version;
99+ sha256 = "0r3pwfygvpkgc0hzxc6z8dl56g6brlh52r0x8kcjhywr1biahqb2";
1010+ };
1111+1212+ meta = with lib; {
1313+ 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.";
1414+ license = [ licenses.lgpl21 ];
1515+ homepage = http://www.yattag.org/;
1616+ };
1717+}
···5566 buildInputs = [makeWrapper R] ++ recommendedPackages ++ packages;
7788+ # Make the list of recommended R packages accessible to other packages such as rpy2
99+ passthru.recommendedPackages = recommendedPackages;
1010+811 unpackPhase = ":";
9121013 installPhase = ''
···2525 efiBootStub = false;
2626 } // (args.features or {});
27272828- extraMeta.hydraPlatforms = [];
2828+ extraMeta.hydraPlatforms = with stdenv.lib.platforms; [ aarch64 ];
2929})) (oldAttrs: {
3030 postConfigure = ''
3131 # The v7 defconfig has this set to '-v7' which screws up our modDirVersion.
+3-3
pkgs/os-specific/linux/kernel/linux-testing.nix
···11{ stdenv, buildPackages, fetchurl, perl, buildLinux, libelf, utillinux, ... } @ args:
2233buildLinux (args // rec {
44- version = "4.20-rc3";
55- modDirVersion = "4.20.0-rc3";
44+ version = "4.20-rc4";
55+ modDirVersion = "4.20.0-rc4";
66 extraMeta.branch = "4.20";
7788 src = fetchurl {
99 url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz";
1010- sha256 = "0iin34alr5ax15pvilhdn5pifqav4gkxalb7vqb8zvxnhsm6kk58";
1010+ sha256 = "0kni1l1gk9mva7ym091mrkn9f2bdbh80i7589ahk6j5blpj9m3ns";
1111 };
12121313 # Should the testing kernels ever be built on Hydra?
+1-1
pkgs/os-specific/linux/keyutils/default.nix
···2323 ];
24242525 meta = with stdenv.lib; {
2626- homepage = http://people.redhat.com/dhowells/keyutils/;
2626+ homepage = https://people.redhat.com/dhowells/keyutils/;
2727 description = "Tools used to control the Linux kernel key management system";
2828 license = licenses.gpl2Plus;
2929 platforms = platforms.linux;
+1-1
pkgs/os-specific/linux/libcap-ng/default.nix
···32323333 meta = let inherit (stdenv.lib) platforms licenses maintainers; in {
3434 description = "Library for working with POSIX capabilities";
3535- homepage = http://people.redhat.com/sgrubb/libcap-ng/;
3535+ homepage = https://people.redhat.com/sgrubb/libcap-ng/;
3636 platforms = platforms.linux;
3737 license = licenses.lgpl21;
3838 maintainers = with maintainers; [ wkennington ];