plfit: 0.9.6 -> 1.0.0 (#357921)

This commit is contained in:
Robert Schütz 2024-11-22 15:43:16 -08:00 committed by GitHub
commit 922ba1fed2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 29 additions and 24 deletions

View File

@ -1,21 +1,22 @@
{ lib {
, stdenv cmake,
, fetchFromGitHub fetchFromGitHub,
, cmake lib,
, python ? null llvmPackages,
, swig python ? null,
, llvmPackages stdenv,
swig,
}: }:
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "plfit"; pname = "plfit";
version = "0.9.6"; version = "1.0.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ntamas"; owner = "ntamas";
repo = "plfit"; repo = "plfit";
rev = finalAttrs.version; rev = finalAttrs.version;
hash = "sha256-XRl6poEdgPNorFideQmEJHCU+phs4rIhMYa8iAOtL1A="; hash = "sha256-ur+ai0in7PaoDZcPzuUzQTrZ3nB0H5FDSfPBpl1e9ug=";
}; };
postPatch = lib.optionalString (python != null) '' postPatch = lib.optionalString (python != null) ''
@ -24,18 +25,22 @@ stdenv.mkDerivation (finalAttrs: {
--replace-fail ' ''${Python3_SITELIB}' ' ${placeholder "out"}/${python.sitePackages}' --replace-fail ' ''${Python3_SITELIB}' ' ${placeholder "out"}/${python.sitePackages}'
''; '';
nativeBuildInputs = [ nativeBuildInputs =
cmake [
] ++ lib.optionals (python != null) [ cmake
python ]
swig ++ lib.optionals (python != null) [
]; python
swig
];
cmakeFlags = [ cmakeFlags =
"-DPLFIT_USE_OPENMP=ON" [
] ++ lib.optionals (python != null) [ "-DPLFIT_USE_OPENMP=ON"
"-DPLFIT_COMPILE_PYTHON_MODULE=ON" ]
]; ++ lib.optionals (python != null) [
"-DPLFIT_COMPILE_PYTHON_MODULE=ON"
];
buildInputs = lib.optionals stdenv.cc.isClang [ buildInputs = lib.optionals stdenv.cc.isClang [
llvmPackages.openmp llvmPackages.openmp
@ -43,11 +48,11 @@ stdenv.mkDerivation (finalAttrs: {
doCheck = true; doCheck = true;
meta = with lib; { meta = {
description = "Fitting power-law distributions to empirical data"; description = "Fitting power-law distributions to empirical data";
homepage = "https://github.com/ntamas/plfit"; homepage = "https://github.com/ntamas/plfit";
changelog = "https://github.com/ntamas/plfit/blob/${finalAttrs.src.rev}/CHANGELOG.md"; changelog = "https://github.com/ntamas/plfit/blob/${finalAttrs.src.rev}/CHANGELOG.md";
license = licenses.gpl2Plus; license = lib.licenses.gpl2Plus;
maintainers = with maintainers; [ dotlambda ]; maintainers = with lib.maintainers; [ dotlambda ];
}; };
}) })

View File

@ -4957,7 +4957,7 @@ with pkgs;
beamPackages = beamPackages.extend (self: super: { elixir = elixir_1_17; }); beamPackages = beamPackages.extend (self: super: { elixir = elixir_1_17; });
}; };
plfit = callPackage ../tools/misc/plfit { plfit = callPackage ../by-name/pl/plfit/package.nix {
python = null; python = null;
}; };