plfit: python -> withPython

Improves the override interface, because `withPython` does not conflict
with the old `python` package.
This commit is contained in:
Wolfgang Walther
2026-01-25 22:33:00 -05:00
committed by Michael Daniels
parent e85ec3a4d5
commit e4a92b858d
3 changed files with 12 additions and 8 deletions
+6 -3
View File
@@ -3,11 +3,14 @@
fetchFromGitHub,
lib,
llvmPackages,
withPython ? false,
python ? null,
stdenv,
swig,
}:
assert withPython -> python != null;
stdenv.mkDerivation (finalAttrs: {
pname = "plfit";
version = "1.0.1";
@@ -19,7 +22,7 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-0JrPAq/4yzr7XbxvcnFj8CKmMyZT05PkSdGprNdAsJA=";
};
postPatch = lib.optionalString (python != null) ''
postPatch = lib.optionalString withPython ''
substituteInPlace src/CMakeLists.txt \
--replace-fail ' ''${Python3_SITEARCH}' ' ${placeholder "out"}/${python.sitePackages}' \
--replace-fail ' ''${Python3_SITELIB}' ' ${placeholder "out"}/${python.sitePackages}'
@@ -28,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [
cmake
]
++ lib.optionals (python != null) [
++ lib.optionals withPython [
python
swig
];
@@ -36,7 +39,7 @@ stdenv.mkDerivation (finalAttrs: {
cmakeFlags = [
"-DPLFIT_USE_OPENMP=ON"
]
++ lib.optionals (python != null) [
++ lib.optionals withPython [
"-DPLFIT_COMPILE_PYTHON_MODULE=ON"
];
-4
View File
@@ -3453,10 +3453,6 @@ with pkgs;
tautulli = python3Packages.callPackage ../servers/tautulli { };
plfit = callPackage ../by-name/pl/plfit/package.nix {
python = null;
};
inherit (callPackage ../development/tools/pnpm { })
pnpm_8
pnpm_9
+6 -1
View File
@@ -12340,7 +12340,12 @@ self: super: with self; {
plexwebsocket = callPackage ../development/python-modules/plexwebsocket { };
plfit = toPythonModule (pkgs.plfit.override { inherit (self) python; });
plfit = toPythonModule (
pkgs.plfit.override {
withPython = true;
inherit (self) python;
}
);
plink = callPackage ../development/python-modules/plink { };