Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 060a98e9f4ad
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: be1461fc0ab2
Choose a head ref

Commits on Jun 28, 2018

  1. lynis: 2.6.4 -> 2.6.5

    Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.
    
    This update was made based on information from https://repology.org/metapackage/lynis/versions.
    
    These checks were done:
    
    - built on NixOS
    - /nix/store/nbrk6fjsbanqgx89v0mwgq9x6cqkwx6p-lynis-2.6.5/bin/lynis passed the binary check.
    - /nix/store/nbrk6fjsbanqgx89v0mwgq9x6cqkwx6p-lynis-2.6.5/bin/.lynis-wrapped passed the binary check.
    - 2 of 2 passed binary check by having a zero exit code.
    - 2 of 2 passed binary check by having the new version present in output.
    - found 2.6.5 with grep in /nix/store/nbrk6fjsbanqgx89v0mwgq9x6cqkwx6p-lynis-2.6.5
    - directory tree listing: https://gist.github.com/4ec2eae2a408cbec08c7f34ea3d85e66
    - du listing: https://gist.github.com/f8d9c962be7ba2b02df3ad9111a622ae
    R. RyanTM committed Jun 28, 2018
    Copy the full SHA
    2208767 View commit details
  2. gnucash: 3.1-1 -> 3.2

    Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.
    
    This update was made based on information from https://repology.org/metapackage/gnucash/versions.
    
    These checks were done:
    
    - built on NixOS
    - /nix/store/29l8ziil4znyr07dm7f8ki893bqfzqm5-gnucash-3.2/bin/gnc-fq-check passed the binary check.
    - /nix/store/29l8ziil4znyr07dm7f8ki893bqfzqm5-gnucash-3.2/bin/gnc-fq-helper passed the binary check.
    - /nix/store/29l8ziil4znyr07dm7f8ki893bqfzqm5-gnucash-3.2/bin/gnc-fq-dump passed the binary check.
    - /nix/store/29l8ziil4znyr07dm7f8ki893bqfzqm5-gnucash-3.2/bin/gnucash passed the binary check.
    - /nix/store/29l8ziil4znyr07dm7f8ki893bqfzqm5-gnucash-3.2/bin/.gnucash-wrapped passed the binary check.
    - 5 of 5 passed binary check by having a zero exit code.
    - 0 of 5 passed binary check by having the new version present in output.
    - found 3.2 with grep in /nix/store/29l8ziil4znyr07dm7f8ki893bqfzqm5-gnucash-3.2
    - directory tree listing: https://gist.github.com/c6f09b837c81684d4febbc1c369ae53d
    - du listing: https://gist.github.com/f9960cc6c0b43d70986bb1b51c109a68
    R. RyanTM committed Jun 28, 2018
    Copy the full SHA
    690b66e View commit details

Commits on Jun 29, 2018

  1. Copy the full SHA
    892a0e8 View commit details
  2. Copy the full SHA
    082169a View commit details
  3. Copy the full SHA
    68394a7 View commit details
  4. Copy the full SHA
    83a839c View commit details
  5. graphs: init at 20161026

    timokau committed Jun 29, 2018
    Copy the full SHA
    2f76f66 View commit details
  6. Copy the full SHA
    7c92c26 View commit details
  7. Copy the full SHA
    60fe33b View commit details
  8. Copy the full SHA
    6fc8b0d View commit details
  9. Copy the full SHA
    c7d4528 View commit details
  10. elliptic_curves: init at 0.8

    timokau committed Jun 29, 2018
    Copy the full SHA
    b6f07b1 View commit details
  11. Copy the full SHA
    b7a6689 View commit details
  12. tachyon: add armv7l support

    timokau committed Jun 29, 2018
    Copy the full SHA
    4655b87 View commit details
  13. cysignals: add pari support

    timokau committed Jun 29, 2018
    Copy the full SHA
    f49f133 View commit details
  14. Copy the full SHA
    fca3ea0 View commit details
  15. Copy the full SHA
    5d78baa View commit details
  16. symmetrica: add patches

    timokau committed Jun 29, 2018
    Copy the full SHA
    424835a View commit details
  17. Copy the full SHA
    a0eace3 View commit details
  18. linbox: remove liblapack dependency

    Not actually needed by any package and adds and indirect dependency to
    atlas.
    timokau committed Jun 29, 2018
    Copy the full SHA
    224f73b View commit details
  19. pythonPackages.flask-autoindex: 0.6 -> 2018-06-28

    Fixes the build with current flask, which deprecated the old import
    syntax.
    timokau committed Jun 29, 2018
    Copy the full SHA
    7df80c4 View commit details
  20. pythonPackages.flask-silk: 0.2 -> 2018-06-28

    Fixes the build with current flask, which deprecated the old import
    syntax.
    timokau committed Jun 29, 2018
    Copy the full SHA
    84d89a1 View commit details
  21. Copy the full SHA
    17e6b39 View commit details

Commits on Jun 30, 2018

  1. iwd: 0.2 -> 0.3

    dywedir committed Jun 30, 2018
    Copy the full SHA
    04967f3 View commit details
  2. sage, arb: update sage dependencies arb and pynac

    Removes the version pinning for arb and pynac by backporting the
    upstream (sage) package upgrades. This necessitates a new patch for arb,
    which was however already proposed and accepted upstream.
    timokau committed Jun 30, 2018
    Copy the full SHA
    398dad2 View commit details
  3. sage: replace JUPYTER_PATH patch by upstream patch

    The patch was replaced by a better upstream patch that doesn't mvoe the
    jupyter dir to the user's home.
    timokau committed Jun 30, 2018
    Copy the full SHA
    70ba695 View commit details

Commits on Jul 1, 2018

  1. Merge pull request #39981 from timokau/sage-on-nixos

    Sage on nixos
    7c6f434c authored Jul 1, 2018
    Copy the full SHA
    055a29c View commit details
  2. Merge pull request #42816 from dywedir/iwd

    iwd: 0.2 -> 0.3
    Mic92 authored Jul 1, 2018
    Copy the full SHA
    f73aae6 View commit details
  3. Copy the full SHA
    6e54e92 View commit details
  4. goldendict: 1.5.0.rc2 -> 2018-06-13

    fixes build
    gebner committed Jul 1, 2018
    Copy the full SHA
    693a4ce View commit details
  5. libsidplayfp: 1.8.6 -> 1.8.7

    dezgeg committed Jul 1, 2018
    Copy the full SHA
    ace7b25 View commit details
  6. sidplayfp: Init at 1.4.3

    dezgeg committed Jul 1, 2018
    Copy the full SHA
    d1b9bf9 View commit details
  7. icmake: 9.02.07 -> 9.02.08

    Project moved from github to gitlab
    pSub committed Jul 1, 2018
    Copy the full SHA
    c8ce98d View commit details
  8. yodl: update homepage

    pSub committed Jul 1, 2018
    Copy the full SHA
    fbb047e View commit details
  9. fswatch: 1.11.3 -> 1.12.0

    pSub committed Jul 1, 2018
    Copy the full SHA
    92a6fec View commit details
  10. checkstyle: 8.10.1 -> 8.11

    fetch artifact from github as it is no longer available on sourceforge
    pSub committed Jul 1, 2018
    Copy the full SHA
    14a9ca2 View commit details
  11. anonscm.debian.org_gcc6.patch-not-found - replace anonscm.debian.org …

    …with sources.debian.org
    sander committed Jul 1, 2018
    Copy the full SHA
    621072a View commit details
  12. openblas: 0.3.0 -> 0.3.1

    Since the exposure of the version attribute done in
    892a0e8, the OpenBLAS build fails for
    i686-linux:
    
    https://nix-cache.s3.amazonaws.com/log/wi79zyfmwdpwx7bm29dzqh4vglx3x550-openblas-0.3.0.drv
    
    According to @edolstra the build slaves of Hydra updated to a new
    kernel, which seems to be the real cause for this issue. The latter is
    already tracked upstream[1] and a fix[2] is already included in version
    0.3.1.
    
    This very update cases 4795 rebuilds across all architectures we
    support, so it's still not significant enough to go through staging. In
    addition the number of rebuilds doesn't include the amount of builds
    that are currently failing.
    
    My original idea was to add a patch just for fixing this on i686-linux
    and do the real update via staging, but the amount of rebuilds still is
    in an acceptable range IMO and @edolstra agreed on that on IRC.
    
    [1]: OpenMathLib/OpenBLAS#1575
    [2]: OpenMathLib/OpenBLAS#1583
    
    Signed-off-by: aszlig <aszlig@nix.build>
    Cc: @ttuegel
    aszlig committed Jul 1, 2018
    Copy the full SHA
    c8ed322 View commit details
  13. boost: Disable Python / Numpy support by default

    We can't have a C++ library pulling in Numpy and its gazillion
    dependencies by default.
    edolstra committed Jul 1, 2018
    Copy the full SHA
    772eef9 View commit details
  14. Copy the full SHA
    c85f23a View commit details
  15. ledger: Use Boost Python support if applicable

    Since 772eef9 Boost no longer has
    Python support enabled by default, so depending on whether Ledger has
    Python support built in we also use either Boost with Python support or
    without.
    
    Tested building with and without Python support and both builds now
    succeed.
    
    Signed-off-by: aszlig <aszlig@nix.build>
    Cc: @the-kenny, @jwiegley
    aszlig committed Jul 1, 2018
    Copy the full SHA
    179f9c4 View commit details
  16. twister: Use boost with Python support

    Since 772eef9, Boost by default doesn't
    support Python anymore, so we need to override it with Python support.
    
    Signed-off-by: aszlig <aszlig@nix.build>
    aszlig committed Jul 1, 2018
    Copy the full SHA
    b916ed3 View commit details
  17. curl: fix configure flag for random device.

    Fixes #42778.
    
    Thanks for reporting, @dingxiangfei2009!
    dtzWill committed Jul 1, 2018
    Copy the full SHA
    81c9f71 View commit details
  18. libtorrent-rasterbar: Use Boost supporting Python

    Since 772eef9, the Boost package
    doesn't support Python by default anymore, so we need to override it
    with Python support because --enable-python-binding is enabled by
    default in libtorrent-rasterbar.
    
    The build of the package now succeeds again on my x86_64-linux machine.
    
    Signed-off-by: aszlig <aszlig@nix.build>
    Cc: @Phreedom
    aszlig committed Jul 1, 2018
    Copy the full SHA
    f081ccc View commit details
  19. Merge pull request #42706 from r-ryantm/auto-update/gnucash

    gnucash: 3.1-1 -> 3.2
    nlewo authored Jul 1, 2018
    Copy the full SHA
    f5acacf View commit details
  20. Merge pull request #42692 from r-ryantm/auto-update/lynis

    lynis: 2.6.4 -> 2.6.5
    nlewo authored Jul 1, 2018
    Copy the full SHA
    deb82d8 View commit details
  21. Merge pull request #42844 from dtzWill/fix/curl-random-cross

    curl: fix configure flag for random device.
    dtzWill authored Jul 1, 2018
    Copy the full SHA
    6bb1593 View commit details
  22. Merge pull request #42837 from ookhoi/anonscm.debian.org_gcc6.patch-n…

    …ot-found
    
    anonscm.debian.org_gcc6.patch-not-found - replace anonscm.debian.org …
    matthewbauer authored Jul 1, 2018
    Copy the full SHA
    49f6ea4 View commit details
  23. python37: fix openssl detection

    Before python37 was build without ssl support.
    Tested with `python  -c 'import ssl'`
    Mic92 committed Jul 1, 2018
    Copy the full SHA
    cb2862e View commit details
  24. LTS Haskell 11.15

    peti committed Jul 1, 2018
    Copy the full SHA
    48300a5 View commit details
Showing with 4,989 additions and 1,163 deletions.
  1. +4 −0 nixos/modules/services/networking/iwd.nix
  2. +22 −0 pkgs/applications/audio/sidplayfp/default.nix
  3. +8 −6 pkgs/applications/misc/goldendict/default.nix
  4. +4 −2 pkgs/applications/networking/p2p/twister/default.nix
  5. +2 −2 pkgs/applications/office/gnucash/default.nix
  6. +4 −1 pkgs/applications/office/ledger/default.nix
  7. +117 −0 pkgs/applications/science/math/sage/README.md
  8. +202 −221 pkgs/applications/science/math/sage/default.nix
  9. +46 −0 pkgs/applications/science/math/sage/env-locations.nix
  10. +0 −22 pkgs/applications/science/math/sage/env.patch
  11. +0 −11 pkgs/applications/science/math/sage/fetch-mirrors.sh
  12. +36 −0 pkgs/applications/science/math/sage/flask-oldsessions.nix
  13. +28 −0 pkgs/applications/science/math/sage/flask-openid.nix
  14. +18 −0 pkgs/applications/science/math/sage/openblas-pc.nix
  15. +0 −51 pkgs/applications/science/math/sage/patchSageShebangs.sh
  16. +427 −0 pkgs/applications/science/math/sage/patches/arb-2.13.0.patch
  17. +127 −0 pkgs/applications/science/math/sage/patches/dochtml-optional.patch
  18. +98 −0 pkgs/applications/science/math/sage/patches/eclib-regulator-precision.patch
  19. +12 −0 pkgs/applications/science/math/sage/patches/matplotlib-normed-deprecated.patch
  20. +48 −0 pkgs/applications/science/math/sage/patches/maxima-5.41.0-doctests.patch
  21. +812 −0 pkgs/applications/science/math/sage/patches/numpy-1.14.3.patch
  22. +20 −0 pkgs/applications/science/math/sage/patches/pari-stackwarn.patch
  23. +479 −0 pkgs/applications/science/math/sage/patches/pynac-0.7.22.patch
  24. +28 −0 pkgs/applications/science/math/sage/patches/python-5755-hotpatch.patch
  25. +40 −0 pkgs/applications/science/math/sage/patches/python3-syntax-without-write.patch
  26. +14 −0 pkgs/applications/science/math/sage/patches/revert-269c1e1551285.patch
  27. +31 −0 pkgs/applications/science/math/sage/patches/sagenb-sphinx-1.7.patch
  28. +62 −0 pkgs/applications/science/math/sage/patches/sphinx-1.7.patch
  29. +31 −0 pkgs/applications/science/math/sage/patches/test-in-tmpdir.patch
  30. +13 −0 pkgs/applications/science/math/sage/patches/zn_poly_version.patch
  31. +29 −0 pkgs/applications/science/math/sage/pybrial.nix
  32. +42 −0 pkgs/applications/science/math/sage/python-openid.nix
  33. +162 −0 pkgs/applications/science/math/sage/sage-env.nix
  34. +205 −0 pkgs/applications/science/math/sage/sage-src.nix
  35. +129 −0 pkgs/applications/science/math/sage/sage-with-env.nix
  36. +41 −0 pkgs/applications/science/math/sage/sage-wrapper.nix
  37. +32 −0 pkgs/applications/science/math/sage/sage.nix
  38. +97 −0 pkgs/applications/science/math/sage/sagedoc.nix
  39. +139 −0 pkgs/applications/science/math/sage/sagelib.nix
  40. +49 −0 pkgs/applications/science/math/sage/sagenb.nix
  41. +0 −36 pkgs/applications/science/math/sage/shebangs.patch
  42. +0 −20 pkgs/applications/science/math/sage/spkg-giac.patch
  43. +0 −18 pkgs/applications/science/math/sage/spkg-git.patch
  44. +0 −13 pkgs/applications/science/math/sage/spkg-python.patch
  45. +0 −18 pkgs/applications/science/math/sage/spkg-singular.patch
  46. +20 −3 pkgs/applications/science/math/symmetrica/default.nix
  47. +31 −34 pkgs/build-support/fetchurl/mirrors.nix
  48. +31 −0 pkgs/data/misc/combinatorial_designs/default.nix
  49. +43 −0 pkgs/data/misc/conway_polynomials/default.nix
  50. +51 −0 pkgs/data/misc/elliptic_curves/default.nix
  51. +26 −0 pkgs/data/misc/graphs/default.nix
  52. +26 −0 pkgs/data/misc/pari-galdata/default.nix
  53. +26 −0 pkgs/data/misc/pari-seadata-small/default.nix
  54. +26 −0 pkgs/data/misc/polytopes_db/default.nix
  55. +8 −0 pkgs/development/compilers/ecl/16.1.2.nix
  56. +210 −0 pkgs/development/compilers/ghc/8.6.1.nix
  57. +1 −1 pkgs/development/haskell-modules/configuration-common.nix
  58. +4 −3 pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix
  59. +30 −29 pkgs/development/haskell-modules/configuration-hackage2nix.yaml
  60. +646 −606 pkgs/development/haskell-modules/hackage-packages.nix
  61. +1 −0 pkgs/development/interpreters/python/cpython/3.7/default.nix
  62. +1 −1 pkgs/development/interpreters/spidermonkey/1.8.5.nix
  63. +9 −1 pkgs/development/libraries/arb/default.nix
  64. +2 −2 pkgs/development/libraries/boost/generic.nix
  65. +10 −3 pkgs/development/libraries/libgap/default.nix
  66. +2 −2 pkgs/development/libraries/libsidplayfp/default.nix
  67. +6 −3 pkgs/development/libraries/libtorrent-rasterbar/default.nix
  68. +0 −3 pkgs/development/libraries/linbox/default.nix
  69. +1 −1 pkgs/development/libraries/science/math/lcalc/default.nix
  70. +3 −4 pkgs/development/libraries/science/math/openblas/default.nix
  71. +1 −1 pkgs/development/libraries/science/math/rankwidth/default.nix
  72. +1 −1 pkgs/development/libraries/science/math/rubiks/default.nix
  73. +2 −2 pkgs/development/libraries/science/math/sympow/default.nix
  74. +1 −0 pkgs/development/libraries/tachyon/default.nix
  75. +9 −1 pkgs/development/python-modules/cysignals/default.nix
  76. +10 −15 pkgs/development/python-modules/flask-autoindex/default.nix
  77. +9 −5 pkgs/development/python-modules/flask-silk/default.nix
  78. +18 −1 pkgs/development/python-modules/sympy/default.nix
  79. +6 −4 pkgs/development/tools/analysis/checkstyle/default.nix
  80. +5 −5 pkgs/development/tools/build-managers/icmake/default.nix
  81. +2 −2 pkgs/development/tools/misc/fswatch/default.nix
  82. +1 −1 pkgs/development/tools/misc/yodl/default.nix
  83. +5 −4 pkgs/os-specific/linux/iwd/default.nix
  84. +1 −1 pkgs/tools/networking/curl/default.nix
  85. +2 −2 pkgs/tools/security/lynis/default.nix
  86. +38 −1 pkgs/top-level/all-packages.nix
  87. +6 −0 pkgs/top-level/haskell-packages.nix
4 changes: 4 additions & 0 deletions nixos/modules/services/networking/iwd.nix
Original file line number Diff line number Diff line change
@@ -28,6 +28,10 @@ in {

serviceConfig.ExecStart = "${pkgs.iwd}/libexec/iwd";
};

systemd.tmpfiles.rules = [
"d /var/lib/iwd 0700 root root -"
];
};

meta.maintainers = with lib.maintainers; [ mic92 ];
22 changes: 22 additions & 0 deletions pkgs/applications/audio/sidplayfp/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{ stdenv, fetchurl, pkgconfig, libsidplayfp }:

stdenv.mkDerivation rec {
version = "1.4.3";
name = "sidplayfp-${version}";

src = fetchurl {
url = "mirror://sourceforge/sidplay-residfp/sidplayfp/1.4/${name}.tar.gz";
sha256 = "04gqhxs4w0riabp1svgcs6gsxdmbfmrs4kaqr5lifvxjvv03vzsn";
};

nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libsidplayfp ];

meta = with stdenv.lib; {
description = "A SID player using libsidplayfp";
homepage = https://sourceforge.net/projects/sidplay-residfp/;
license = with licenses; [ gpl2Plus ];
maintainers = with maintainers; [ dezgeg ];
platforms = with platforms; linux;
};
}
14 changes: 8 additions & 6 deletions pkgs/applications/misc/goldendict/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{ stdenv, fetchurl, pkgconfig, libXtst, libvorbis, hunspell
{ stdenv, fetchFromGitHub, pkgconfig, libXtst, libvorbis, hunspell
, libao, ffmpeg, libeb, lzo, xz, libtiff
, qtbase, qtsvg, qtwebkit, qtx11extras, qttools, qmake }:
stdenv.mkDerivation rec {

name = "goldendict-1.5.0.rc2";
src = fetchurl {
url = "https://github.com/goldendict/goldendict/archive/1.5.0-RC2.tar.gz";
sha256 = "1pizz39l61rbps0wby75fkvzyrah805257j33siqybwhsfiy1kmw";
name = "goldendict-2018-06-13";
src = fetchFromGitHub {
owner = "goldendict";
repo = "goldendict";
rev = "48e850c7ec11d83cba7499f7fdce377ef3849bbb";
sha256 = "0i4q4waqjv45hgwillvjik97pg26kwlmz4925djjkx8s6hxgjlq9";
};

nativeBuildInputs = [ pkgconfig qmake ];
@@ -22,6 +24,6 @@ stdenv.mkDerivation rec {
description = "A feature-rich dictionary lookup program";

platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.astsmtl ];
maintainers = with stdenv.lib.maintainers; [ gebner astsmtl ];
};
}
6 changes: 4 additions & 2 deletions pkgs/applications/networking/p2p/twister/default.nix
Original file line number Diff line number Diff line change
@@ -13,6 +13,8 @@ let
};
};

boostPython = boost.override { enablePython = true; };

in stdenv.mkDerivation rec {
name = "twister-${version}";
version = "0.9.34";
@@ -29,13 +31,13 @@ in stdenv.mkDerivation rec {
"--disable-deprecated-functions"
"--enable-tests"
"--enable-python-binding"
"--with-boost-libdir=${boost.out}/lib"
"--with-boost-libdir=${boostPython.out}/lib"
];

nativeBuildInputs = [ pkgconfig ];
buildInputs = [
autoconf automake libtool python2
boost db openssl geoip miniupnpc libiconv
boostPython db openssl geoip miniupnpc libiconv
];

patches = stdenv.lib.singleton (fetchpatch {
4 changes: 2 additions & 2 deletions pkgs/applications/office/gnucash/default.nix
Original file line number Diff line number Diff line change
@@ -25,11 +25,11 @@ in

stdenv.mkDerivation rec {
name = "gnucash-${version}";
version = "3.1-1";
version = "3.2";

src = fetchurl {
url = "mirror://sourceforge/gnucash/${name}.tar.bz2";
sha256 = "0qfjpmr6hnr0v7l2fi00rilnlyan4kqiyygyidxlpdxqqg76dvx1";
sha256 = "0li4b6pvlahgh5n9v91yxfgm972a1kky80xw3q1ggl4f2h6b1rb3";
};

nativeBuildInputs = [ pkgconfig makeWrapper cmake gtest ];
5 changes: 4 additions & 1 deletion pkgs/applications/office/ledger/default.nix
Original file line number Diff line number Diff line change
@@ -13,7 +13,10 @@ stdenv.mkDerivation rec {
fetchSubmodules = true;
};

buildInputs = [ boost gmp mpfr libedit python texinfo gnused ];
buildInputs = [
(boost.override { enablePython = usePython; })
gmp mpfr libedit python texinfo gnused
];

nativeBuildInputs = [ cmake ];

117 changes: 117 additions & 0 deletions pkgs/applications/science/math/sage/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Sage on nixos

Sage 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.

Don't feel discouraged to fix, simplify or improve things though. Here's a quick overview over the functions of the individual files:

- `sage-src.nix`
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.

- `env-locations.nix`
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`).

- `sage-env.nix`
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.

- `sagelib.nix`
Defines the main sage package (without setting the necessary environments or running any tests).

- `sage-with-env.nix`
Wraps sage in the necessary environment.

- `sage.nix`
Runs sages doctests.

- `sage-wrapper.nix`
Optionally tells sage where do find the docs.

- `sagedoc.nix`
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.

- `sagenb.nix`
The (semi deprecated) sage notebook.

- `default.nix`
Introduces necessary overrides, defines new packages and ties everything together (returning the `sage` package).

- `flask-oldsessions.nix`, `flask-openid.nix`, `python-openid.nix`
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.

- `pybrial.nix`
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.

- `openblas-pc.nix`
This creates a `.pc` file to be read by `pkg-config` that allows openblas to take on different roles, like `cblas` or `lapack`.

## The sage build is broken

First you should find out which change to nixpkgs is at fault (if you don't already know). You can use `git-bisect` for that (see the manpage).

If the build broke as a result of a package update, try those solutions in order:

- search the [sage trac](https://trac.sagemath.org/) for keywords like "Upgrade <package>". Maybe somebody has already proposed a patch that fixes the issue. You can then add a `fetchpatch` to `sage-src.nix`.

- check if [gentoo](https://github.com/cschwan/sage-on-gentoo/tree/master/sci-mathematics/sage), [debian](https://salsa.debian.org/science-team/sagemath/tree/master/debian) or [arch linux](https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/sagemath) already solved the problem. You can then again add a `fetchpatch` to `sage-src.nix`. If applicable you should also [propose the patch upstream](#proposing-a-sage-patch).

- fix the problem yourself. First clone the sagemath source and then check out the sage version you want to patch:

```
[user@localhost ~]$ git clone git://github.com/sagemath/sage.git
[user@localhost ~]$ cd sage
[user@localhost sage]$ git checkout 8.2 # substitute the relevant version here
```

Then make the needed changes and generate a patch with `git diff`:

```
[user@localhost ~]$ <make changes>
[user@localhost ~]$ git diff -u > /path/to/nixpkgs/pkgs/applications/science/math/sage/patches/name-of-patch.patch
```

Now just add the patch to `sage-src.nix` and test your changes. If they fix the problem, [propose them upstream](#proposing-a-sage-patch) and add a link to the trac ticket.

- pin the package version in `default.nix` and add a note that explains why that is necessary.


## Proposing a sage patch

You can [login the sage trac using GitHub](https://trac.sagemath.org/login). Your username will then be `gh-<your-github-name>`. The only other way is to request a trac account via email. After that refer to [git the hard way](http://doc.sagemath.org/html/en/developer/manual_git.html#chapter-manual-git) in the sage documentation. The "easy way" requires a non-GitHub account (requested via email) and a special tool. The "hard way" is really not all that hard if you're a bit familiar with git.

Here's the gist, assuming you want to use ssh key authentication. First, [add your public ssh key](https://trac.sagemath.org/prefs/sshkeys). Then:

```
[user@localhost ~]$ git clone git://github.com/sagemath/sage.git
[user@localhost ~]$ cd sage
[user@localhost sage]$ git remote add trac git@trac.sagemath.org:sage.git -t master
[user@localhost sage]$ git checkout -b u/gh-<your-github-username>/<your-branch-name> develop
[user@localhost sage]$ <make changes>
[user@localhost sage]$ git add .
[user@localhost sage]$ git commit
[user@localhost sage]$ git show # review your changes
[user@localhost sage]$ git push --set-upstream trac u/gh-<your-github-username>/<your-branch-name>
```

You now created a branch on the trac server (you *must* follow the naming scheme as you only have push access to branches with the `u/gh-<your-github-username>/` prefix).
Now you can [create a new trac ticket](https://trac.sagemath.org/newticket).
- Write a description of the change
- set the type and component as appropriate
- write your real name in the "Authors" field
- write `u/gh-<your-github-username>/<your-branch-name>` in the "Branch" field
- click "Create ticket"
- click "Modify" on the top right of your ticket (for some reason you can only change the ticket status after you have created it)
- set the ticket status from `new` to `needs_review`
- click "Save changes"

Refer to sages [Developer's Guide](http://doc.sagemath.org/html/en/developer/index.html) for further details.

## I want to update sage

You'll need to change the `version` field in `sage-src.nix`. Afterwards just try to build and let nix tell you which patches no longer apply (hopefully because they were adopted upstream). Remove those.

Hopefully the build will succeed now. If it doesn't and the problem is obvious, fix it as described in [The sage build is broken](#the-sage-build-is-broken).
If the problem is not obvious, you can try to first update sage to an intermediate version (remember that you can also set the `version` field to any git revision of sage) and locate the sage commit that introduced the issue. You can even use `git-bisect` for that (it will only be a bit tricky to keep track of which patches to apply). Hopefully after that the issue will be obvious.

## Well, that didn't help!

If you couldn't fix the problem, create a GitHub issue on the nixpkgs repo and ping @timokau (or whoever is listed in the `maintainers` list of the sage package).
Describe what you did and why it didn't work. Afterwards it would be great if you help the next guy out and improve this documentation!
Loading