plfit: python -> withPython (#483860)

This commit is contained in:
Gergő Gutyina
2026-01-27 23:33:29 +00:00
committed by GitHub
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
@@ -3438,10 +3438,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
@@ -12360,7 +12360,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 { };