Unverified Commit adb5d91c authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

scalp: fix build (#453184)

parents d473fe63 a9eee7c2
Loading
Loading
Loading
Loading
+11 −10
Original line number Diff line number Diff line
@@ -19,7 +19,8 @@ stdenv.mkDerivation rec {
    sha256 = "sha256-bUq/9cxqqpM66ObBeiJt8PwLZxxDj2lxXUHQn+gfkC8=";
  };

  nativeBuildInputs = [
  nativeBuildInputs =
    lib.optionals (!stdenv.hostPlatform.isDarwin) [
      binutils
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
+4 −0
Original line number Diff line number Diff line
@@ -74,6 +74,10 @@ stdenv.mkDerivation {
    ./flopoco BuildAutocomplete
  '';

  cmakeFlags = [
    (lib.cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "3.5")
  ];

  installPhase = ''
    runHook preInstall

+12 −21
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchurl,
  fetchpatch,
  fetchFromGitLab,
  cmake,
  unzip,
  gmp,
  scalp,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation {
  pname = "pagsuite";
  version = "1.80";
  version = "1.80-unstable-2025-05-03";

  src = fetchurl {
    url = "https://gitlab.com/kumm/pagsuite/-/raw/master/releases/pagsuite_${
      lib.replaceStrings [ "." ] [ "_" ] version
    }.zip";
    hash = "sha256-TYd+dleVPWEWU9Cb3XExd7ixJZyiUAp9QLtorYJSIbQ=";
  src = fetchFromGitLab {
    domain = "gitlab.com";
    owner = "kumm";
    repo = "pagsuite";
    rev = "1cc657765658cb2eb622d4a9c656ab9854150e7d";
    hash = "sha256-jyp3h5n6SkyTpLzqMezvu2nri6rDkX3ACcCO9r4/bBA=";
  };

  patches = [
    # Fix issue with latest ScaLP update
    (fetchpatch {
      url = "https://gitlab.com/kumm/pagsuite/-/commit/cae9f78bec93a7f197461358f2f796f6b5778781.patch";
      hash = "sha256-12IisS6oGYLRicORTemHB7bw9EB9cuQjxG8f6X0WMrU=";
    })
  ];

  sourceRoot = "pagsuite_${lib.replaceStrings [ "." ] [ "_" ] version}";

  nativeBuildInputs = [
    cmake
    unzip
  ];

  buildInputs = [
@@ -40,6 +28,9 @@ stdenv.mkDerivation rec {
    scalp
  ];

  # make[2]: ***  No rule to make target 'lib/libpag.dylib', needed by 'bin/osr'.  Stop.
  enableParallelBuilding = false;

  meta = with lib; {
    description = "Optimization tools for the (P)MCM problem";
    homepage = "https://gitlab.com/kumm/pagsuite";
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ stdenv.mkDerivation rec {

  postPatch = ''
    substituteInPlace CMakeLists.txt \
      --replace-fail "cmake_minimum_required (VERSION 3.3.2)" "cmake_minimum_required (VERSION 3.5)" \
      --replace-fail "\''$ORIGIN" "\''${CMAKE_INSTALL_PREFIX}/lib" \
      --replace-fail "-m64" ""
    substituteInPlace src/tests/CMakeLists.txt \