10 stdenv.mkDerivation (finalAttrs: {
14 src = fetchFromGitHub {
17 rev = finalAttrs.version;
18 hash = "sha256-XRl6poEdgPNorFideQmEJHCU+phs4rIhMYa8iAOtL1A=";
21 postPatch = lib.optionalString (python != null) ''
22 substituteInPlace src/CMakeLists.txt \
23 --replace-fail ' ''${Python3_SITEARCH}' ' ${placeholder "out"}/${python.sitePackages}' \
24 --replace-fail ' ''${Python3_SITELIB}' ' ${placeholder "out"}/${python.sitePackages}'
29 ] ++ lib.optionals (python != null) [
35 "-DPLFIT_USE_OPENMP=ON"
36 ] ++ lib.optionals (python != null) [
37 "-DPLFIT_COMPILE_PYTHON_MODULE=ON"
40 buildInputs = lib.optionals stdenv.cc.isClang [
47 description = "Fitting power-law distributions to empirical data";
48 homepage = "https://github.com/ntamas/plfit";
49 changelog = "https://github.com/ntamas/plfit/blob/${finalAttrs.src.rev}/CHANGELOG.md";
50 license = licenses.gpl2Plus;
51 maintainers = with maintainers; [ dotlambda ];