Merge pull request #134390 from smancill/colpack-darwin

colpack: refactor builder and build on darwin

authored by

Sandro and committed by
GitHub
a9f66e94 f2473267

+20 -8
+20 -8
pkgs/applications/science/math/colpack/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, gettext }: 1 + { lib, stdenv, fetchFromGitHub, autoreconfHook }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 ··· 12 12 sha256 = "1p05vry940mrjp6236c0z83yizmw9pk6ly2lb7d8rpb7j9h03glr"; 13 13 }; 14 14 15 - buildInputs = [ autoconf automake gettext libtool ]; 15 + nativeBuildInputs = [ autoreconfHook ]; 16 16 17 - configurePhase = '' 18 - autoreconf -vif 19 - ./configure --prefix=$out --enable-openmp 17 + configureFlags = [ 18 + "--enable-openmp=${if stdenv.isLinux then "yes" else "no"}" 19 + "--enable-examples=no" 20 + ]; 21 + 22 + postInstall = '' 23 + # Remove libtool archive 24 + rm $out/lib/*.la 25 + 26 + # Remove compiled examples (Basic examples get compiled anyway) 27 + rm -r $out/examples 28 + 29 + # Copy the example sources (Basic tree contains scripts and object files) 30 + mkdir -p $out/share/ColPack/examples/Basic 31 + cp SampleDrivers/Basic/*.cpp $out/share/ColPack/examples/Basic 32 + cp -r SampleDrivers/Matrix* $out/share/ColPack/examples 20 33 ''; 21 34 22 35 meta = with lib; { 23 36 description = "A package comprising of implementations of algorithms for 24 37 vertex coloring and derivative computation"; 25 38 homepage = "http://cscapes.cs.purdue.edu/coloringpage/software.htm#functionalities"; 26 - license = licenses.lgpl3; 27 - platforms = platforms.linux; 39 + license = licenses.lgpl3Plus; 40 + platforms = platforms.unix; 28 41 maintainers = with maintainers; [ edwtjo ]; 29 42 }; 30 - 31 43 }