depot/third_party/nixpkgs/pkgs/applications/science/math/colpack/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

43 lines
1.2 KiB
Nix

{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
stdenv.mkDerivation rec {
pname = "ColPack";
version = "1.0.10";
src = fetchFromGitHub {
owner = "CSCsw";
repo = pname;
rev = "v" + version;
sha256 = "1p05vry940mrjp6236c0z83yizmw9pk6ly2lb7d8rpb7j9h03glr";
};
nativeBuildInputs = [ autoreconfHook ];
configureFlags = [
"--enable-openmp=${if stdenv.isLinux then "yes" else "no"}"
"--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; {
description = "Package comprising of implementations of algorithms for
vertex coloring and derivative computation";
homepage = "https://cscapes.cs.purdue.edu/coloringpage/software.htm#functionalities";
license = licenses.lgpl3Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ edwtjo ];
};
}