Unverified Commit be1e0fad authored by Gergő Gutyina's avatar Gergő Gutyina Committed by GitHub
Browse files

plfit: python -> withPython (#483860)

parents 80887453 e4a92b85
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -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"
  ];

+0 −4
Original line number Diff line number Diff line
@@ -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
Original line number Diff line number Diff line
@@ -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 { };