nixpkgs/pkgs/tools/misc/plfit/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
932 B
Nix
Raw Normal View History

2022-04-03 20:05:50 +02:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
, python ? null
, swig
, llvmPackages
}:
stdenv.mkDerivation rec {
pname = "plfit";
version = "0.9.4";
2022-04-03 20:05:50 +02:00
src = fetchFromGitHub {
owner = "ntamas";
repo = "plfit";
rev = version;
hash = "sha256-hnmP/56P2anR0S8zQyQqN1lbge5GgK+P8Lx8bRkwSxA=";
2022-04-03 20:05:50 +02:00
};
nativeBuildInputs = [
cmake
] ++ lib.optionals (python != null) [
2022-04-03 20:05:50 +02:00
python
swig
];
cmakeFlags = [
"-DPLFIT_USE_OPENMP=ON"
] ++ lib.optionals (python != null) [
2022-04-03 20:05:50 +02:00
"-DPLFIT_COMPILE_PYTHON_MODULE=ON"
];
buildInputs = lib.optionals stdenv.cc.isClang [
llvmPackages.openmp
];
meta = with lib; {
description = "Fitting power-law distributions to empirical data";
homepage = "https://github.com/ntamas/plfit";
changelog = "https://github.com/ntamas/plfit/blob/${src.rev}/CHANGELOG.md";
2022-04-03 20:05:50 +02:00
license = licenses.gpl2Plus;
maintainers = with maintainers; [ dotlambda ];
};
}