otadump: init at 0.1.2 (#329129)
[NixPkgs.git] / pkgs / by-name / cm / cminpack / package.nix
blob08f5ea016148d6524429c799d1194374bf93eb08
2   lib,
3   stdenv,
4   cmake,
5   darwin,
6   fetchFromGitHub,
7   withBlas ? true,
8   blas,
9 }:
11 stdenv.mkDerivation rec {
12   pname = "cminpack";
13   version = "1.3.8";
15   src = fetchFromGitHub {
16     owner = "devernay";
17     repo = "cminpack";
18     rev = "v${version}";
19     hash = "sha256-eFJ43cHbSbWld+gPpMaNiBy1X5TIcN9aVxjh8PxvVDU=";
20   };
22   strictDeps = true;
24   nativeBuildInputs = [
25     cmake
26   ];
28   buildInputs =
29     lib.optionals withBlas [
30       blas
31     ]
32     ++ lib.optionals (withBlas && stdenv.hostPlatform.isDarwin) [
33       darwin.apple_sdk.frameworks.Accelerate
34       darwin.apple_sdk.frameworks.CoreGraphics
35       darwin.apple_sdk.frameworks.CoreVideo
36     ];
38   cmakeFlags = [
39     "-DUSE_BLAS=${if withBlas then "ON" else "OFF"}"
40     "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
41   ];
43   meta = {
44     description = "Software for solving nonlinear equations and nonlinear least squares problems";
45     homepage = "http://devernay.free.fr/hacks/cminpack/";
46     changelog = "https://github.com/devernay/cminpack/blob/v${version}/README.md#history";
47     license = lib.licenses.bsd3;
48     platforms = lib.platforms.all;
49     maintainers = [ ];
50   };