Skip to content
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
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8a5b1425452e
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1bb28f26e837
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Apr 11, 2018

  1. Copy the full SHA
    32cf225 View commit details

Commits on Apr 19, 2018

  1. Merge pull request #38810 from timokau/giac-improvements

    giac: enable checks, separate outputs
    matthewbauer authored Apr 19, 2018
    Copy the full SHA
    1bb28f2 View commit details
Showing with 20 additions and 3 deletions.
  1. +20 −3 pkgs/applications/science/math/giac/default.nix
23 changes: 20 additions & 3 deletions pkgs/applications/science/math/giac/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, texlive, bison, flex
{ stdenv, fetchurl, fetchpatch, texlive, bison, flex
, gmp, mpfr, pari, ntl, gsl, blas, mpfi, liblapackWithAtlas
, readline, gettext, libpng, libao, gfortran, perl
, enableGUI ? false, libGLU_combined ? null, xorg ? null, fltk ? null
@@ -16,6 +16,15 @@ stdenv.mkDerivation rec {
sha256 = "0dv5p5y6gkrsmz3xa7fw87rjyabwdwk09mqb09kb7gai9n9dgayk";
};

patches = stdenv.lib.optionals (!enableGUI) [
# when enableGui is false, giac is compiled without fltk. That means some
# outputs differ in the make check. Patch around this:
(fetchpatch {
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/giac/patches/nofltk-check.patch?id=7553a3c8dfa7bcec07241a07e6a4e7dcf5bb4f26";
sha256 = "0xkmfc028vg5w6va04gp2x2iv31n8v4shd6vbyvk4blzgfmpj2cw";
})
];

postPatch = ''
for i in doc/*/Makefile*; do
substituteInPlace "$i" --replace "/bin/cp" "cp";
@@ -37,10 +46,11 @@ stdenv.mkDerivation rec {
libGLU_combined fltk xorg.libX11
];

outputs = [ "out" ];
outputs = [ "out" "doc" ];

doCheck = true;

enableParallelBuilding = true;
hardeningDisable = [ "format" "bindnow" "relro" ];

configureFlags = [
"--enable-gc" "--enable-png" "--enable-gsl" "--enable-lapack"
@@ -57,6 +67,13 @@ stdenv.mkDerivation rec {
for file in $(find $out -name Makefile) ; do
sed -i "s@/nix/store/[^/]*/bin/@@" "$file" ;
done;
# reference cycle
rm "$out/share/giac/doc/el/"{casinter,tutoriel}/Makefile
mkdir -p "$doc/share/giac"
mv "$out/share/giac/doc" "$doc/share/giac"
mv "$out/share/giac/examples" "$doc/share/giac"
'';

meta = with stdenv.lib; {