scalp: fix build (#453184)
This commit is contained in:
@@ -19,16 +19,17 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-bUq/9cxqqpM66ObBeiJt8PwLZxxDj2lxXUHQn+gfkC8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
binutils
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
cctools
|
||||
fixDarwinDylibNames
|
||||
]
|
||||
++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
|
||||
autoSignDarwinBinariesHook
|
||||
];
|
||||
nativeBuildInputs =
|
||||
lib.optionals (!stdenv.hostPlatform.isDarwin) [
|
||||
binutils
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
cctools
|
||||
fixDarwinDylibNames
|
||||
]
|
||||
++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
|
||||
autoSignDarwinBinariesHook
|
||||
];
|
||||
|
||||
env = {
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-int";
|
||||
|
||||
@@ -74,6 +74,10 @@ stdenv.mkDerivation {
|
||||
./flopoco BuildAutocomplete
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "3.5")
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
|
||||
@@ -1,38 +1,26 @@
|
||||
{
|
||||
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";
|
||||
|
||||
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user