mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
colpack: refactor builder and build on darwin
- Use autoreconfHook and set flags with configureFlags. - Only enable OpenMP on Linux, so it can be built on Darwin. - Do not install .la file. Other distros also remove them. - Do not build examples. - Install example sources into a proper location. - Fixed license.
This commit is contained in:
parent
18c7c355fb
commit
50062cc371
@ -1,4 +1,4 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, gettext }:
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
|
||||||
@ -12,20 +12,32 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1p05vry940mrjp6236c0z83yizmw9pk6ly2lb7d8rpb7j9h03glr";
|
sha256 = "1p05vry940mrjp6236c0z83yizmw9pk6ly2lb7d8rpb7j9h03glr";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ autoconf automake gettext libtool ];
|
nativeBuildInputs = [ autoreconfHook ];
|
||||||
|
|
||||||
configurePhase = ''
|
configureFlags = [
|
||||||
autoreconf -vif
|
"--enable-openmp=${if stdenv.isLinux then "yes" else "no"}"
|
||||||
./configure --prefix=$out --enable-openmp
|
"--enable-examples=no"
|
||||||
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
# Remove libtool archive
|
||||||
|
rm $out/lib/*.la
|
||||||
|
|
||||||
|
# Remove compiled examples (Basic examples get compiled anyway)
|
||||||
|
rm -r $out/examples
|
||||||
|
|
||||||
|
# Copy the example sources (Basic tree contains scripts and object files)
|
||||||
|
mkdir -p $out/share/ColPack/examples/Basic
|
||||||
|
cp SampleDrivers/Basic/*.cpp $out/share/ColPack/examples/Basic
|
||||||
|
cp -r SampleDrivers/Matrix* $out/share/ColPack/examples
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A package comprising of implementations of algorithms for
|
description = "A package comprising of implementations of algorithms for
|
||||||
vertex coloring and derivative computation";
|
vertex coloring and derivative computation";
|
||||||
homepage = "http://cscapes.cs.purdue.edu/coloringpage/software.htm#functionalities";
|
homepage = "http://cscapes.cs.purdue.edu/coloringpage/software.htm#functionalities";
|
||||||
license = licenses.lgpl3;
|
license = licenses.lgpl3Plus;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.unix;
|
||||||
maintainers = with maintainers; [ edwtjo ];
|
maintainers = with maintainers; [ edwtjo ];
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user