mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
cephes: update override to build with new version from quicklisp
embedded binaries are now removed from the source tree before build
This commit is contained in:
parent
fd3e88ed7f
commit
f6b9e011c5
@ -177,15 +177,23 @@ let
|
||||
asdf = "${asdfFasl}/asdf.${faslExt}";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
||||
source ${./setup-hook.sh}
|
||||
buildAsdfPath
|
||||
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
buildPhase = optionalString (src != null) ''
|
||||
runHook preBuild
|
||||
|
||||
export CL_SOURCE_REGISTRY=$CL_SOURCE_REGISTRY:$src//
|
||||
export ASDF_OUTPUT_TRANSLATIONS="$src:$(pwd):${storeDir}:${storeDir}"
|
||||
${pkg}/bin/${program} ${toString flags} < $buildScript
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
# Copy compiled files to store
|
||||
@ -200,6 +208,8 @@ let
|
||||
concatMapStringsSep "\\|" (replaceStrings ["." "+"] ["[.]" "[+]"]) systems;
|
||||
in
|
||||
''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -pv $out
|
||||
cp -r * $out
|
||||
|
||||
@ -207,6 +217,8 @@ let
|
||||
find $out -name "*.asd" \
|
||||
| grep -v "/\(${mkSystemsRegex systems}\)\.asd$" \
|
||||
| xargs rm -fv || true
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
dontPatchShebangs = true;
|
||||
|
@ -28,20 +28,29 @@ let
|
||||
build = (build-asdf-system (args' // { version = args'.version + "-build"; }))
|
||||
.overrideAttrs(o: {
|
||||
buildPhase = with builtins; ''
|
||||
runHook preBuild
|
||||
|
||||
mkdir __fasls
|
||||
export ASDF_OUTPUT_TRANSLATIONS="$(pwd):$(pwd)/__fasls:${storeDir}:${storeDir}"
|
||||
export CL_SOURCE_REGISTRY=$CL_SOURCE_REGISTRY:$(pwd)//
|
||||
${o.pkg}/bin/${o.program} ${toString (o.flags or [])} < ${o.buildScript}
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -pv $out
|
||||
rm -rf __fasls
|
||||
cp -r * $out
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
});
|
||||
in build-asdf-system (args' // {
|
||||
# Patches are already applied in `build`
|
||||
patches = [];
|
||||
postPatch = "";
|
||||
src = build;
|
||||
});
|
||||
|
||||
@ -151,9 +160,15 @@ let
|
||||
cephes = build-with-compile-into-pwd {
|
||||
inherit (super.cephes) pname version src lispLibs;
|
||||
patches = [ ./patches/cephes-make.patch ];
|
||||
postPatch = ''
|
||||
find \( -name '*.dll' -o -name '*.dylib' -o -name '*.so' \) -delete
|
||||
'';
|
||||
postConfigure = ''
|
||||
substituteAllInPlace cephes.asd
|
||||
'';
|
||||
postInstall = ''
|
||||
find $out -name '*.o' -delete
|
||||
'';
|
||||
};
|
||||
|
||||
clx-truetype = build-asdf-system {
|
||||
|
@ -1,22 +1,21 @@
|
||||
--- a/cephes.asd
|
||||
+++ b/cephes.asd
|
||||
@@ -5,7 +5,7 @@
|
||||
@@ -16,7 +16,7 @@
|
||||
(defclass makefile (source-file) ((type :initform "m")))
|
||||
(defmethod perform ((o load-op) (c makefile)) t)
|
||||
(defmethod perform ((o compile-op) (c makefile))
|
||||
- (let* ((lib-dir (system-relative-pathname "cephes" "scipy-cephes"))
|
||||
+ (let* ((lib-dir #P"@out@/scipy-cephes")
|
||||
(lib (make-pathname :directory `(:relative ,(namestring lib-dir))
|
||||
:name "libmd"
|
||||
:type #+darwin "dylib" #+(and unix (not darwin)) "so" #+(or windows win32) "dll"))
|
||||
@@ -14,7 +14,7 @@
|
||||
- (let* ((lib-dir (system-relative-pathname "cephes" "scipy-cephes/"))
|
||||
+ (let* ((lib-dir #P"@out@/scipy-cephes/")
|
||||
(lib (make-pathname :directory (pathname-directory lib-dir)
|
||||
:name #+(or (and unix (not darwin)) windows win32) "libmd"
|
||||
#+(and darwin arm64) "libmd-arm64"
|
||||
@@ -30,7 +30,7 @@
|
||||
(format *error-output* "Library ~S exists, skipping build" lib)
|
||||
(format *error-output* "Building ~S~%" lib))
|
||||
(unless built
|
||||
- (chdir (native-namestring lib-dir))
|
||||
+ (chdir "scipy-cephes")
|
||||
(run-program "make" :output t))))
|
||||
(run-program "make" :output t)))))
|
||||
|
||||
(defsystem "cephes"
|
||||
|
||||
Diff finished. Thu Mar 28 08:13:30 2024
|
||||
|
Loading…
Reference in New Issue
Block a user