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: 161539a1ea82
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4c817f9d6e6a
Choose a head ref
  • 4 commits
  • 1 file changed
  • 1 contributor

Commits on Sep 22, 2020

  1. Copy the full SHA
    ed16fb0 View commit details
  2. qrupdate: Add which to native build inputs

    The build won't fail without it, but it's needed according to:
    https://sourceforge.net/p/qrupdate/code/HEAD/tree/test/report_results
    doronbehar committed Sep 22, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9c3f7ad View commit details
  3. qrupdate: refactor & assert compatible blas && lapack

    Use `pname` and `version`. Use my preferred indentation style. Use
    makeFlagsArray in preBuild instead of overriding configurePhase, per:
    https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/explicit-phases.md
    
    Assert that lapack and blas are compatible regarding 64 bit indexing, do
    it near evaluation of preBuild, per jtojnar's explanation:
    #94892 (comment)
    
    Use gpl3Plus, as gpl3 is unclear and deprecated.
    doronbehar committed Sep 22, 2020
    Copy the full SHA
    8109377 View commit details

Commits on Nov 5, 2020

  1. Copy the full SHA
    4c817f9 View commit details
Showing with 29 additions and 16 deletions.
  1. +29 −16 pkgs/development/libraries/qrupdate/default.nix
45 changes: 29 additions & 16 deletions pkgs/development/libraries/qrupdate/default.nix
Original file line number Diff line number Diff line change
@@ -3,25 +3,35 @@
, gfortran
, blas
, lapack
, which
}:
stdenv.mkDerivation {
name = "qrupdate-1.1.2";

stdenv.mkDerivation rec {
pname = "qrupdate";
version = "1.1.2";
src = fetchurl {
url = "mirror://sourceforge/qrupdate/qrupdate-1.1.2.tar.gz";
url = "mirror://sourceforge/qrupdate/${pname}-${version}.tar.gz";
sha256 = "024f601685phcm1pg8lhif3lpy5j9j0k6n0r46743g4fvh8wg8g2";
};

configurePhase =
''
export PREFIX=$out
sed -i -e 's,^BLAS=.*,BLAS=-L${blas}/lib -lblas,' \
-e 's,^LAPACK=.*,LAPACK=-L${lapack}/lib -llapack,' \
Makeconf
''
+ stdenv.lib.optionalString blas.isILP64
''
sed -i Makeconf -e '/^FFLAGS=.*/ s/$/-fdefault-integer-8/'
'';
preBuild =
# Check that blas and lapack are compatible
assert (blas.isILP64 == lapack.isILP64);
# We don't have structuredAttrs yet implemented, and we need to use space
# seprated values in makeFlags, so only this works.
''
makeFlagsArray+=(
"LAPACK=-L${lapack}/lib -llapack"
"BLAS=-L${blas}/lib -lblas"
"PREFIX=${placeholder "out"}"
${stdenv.lib.optionalString blas.isILP64
# Use their FFLAGS along with `-fdefault-integer-8`. If another
# application intends to use arpack, it should add this to it's FFLAGS as
# well. Otherwise (e.g): https://savannah.gnu.org/bugs/?50339
"FFLAGS=-fimplicit-none -O3 -funroll-loops -fdefault-integer-8"
}
)
'';

doCheck = true;

@@ -31,12 +41,15 @@ stdenv.mkDerivation {

installTargets = stdenv.lib.optionals stdenv.isDarwin [ "install-staticlib" "install-shlib" ];

buildInputs = [ gfortran blas lapack ];
buildInputs = [ gfortran ];

nativeBuildInputs = [ which ];

meta = with stdenv.lib; {
description = "Library for fast updating of qr and cholesky decompositions";
homepage = "https://sourceforge.net/projects/qrupdate/";
license = licenses.gpl3;
license = licenses.gpl3Plus;
maintainers = with maintainers; [ doronbehar ];
platforms = platforms.unix;
};
}