Loading pkgs/development/lisp-modules/nix-cl.nix +13 −1 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -200,6 +208,8 @@ let concatMapStringsSep "\\|" (replaceStrings ["." "+"] ["[.]" "[+]"]) systems; in '' runHook preInstall mkdir -pv $out cp -r * $out Loading @@ -207,6 +217,8 @@ let find $out -name "*.asd" \ | grep -v "/\(${mkSystemsRegex systems}\)\.asd$" \ | xargs rm -fv || true runHook postInstall ''; dontPatchShebangs = true; Loading pkgs/development/lisp-modules/packages.nix +15 −0 Original line number Diff line number Diff line Loading @@ -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; }); Loading Loading @@ -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 { Loading pkgs/development/lisp-modules/patches/cephes-make.patch +16 −17 Original line number Diff line number Diff line --- 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
pkgs/development/lisp-modules/nix-cl.nix +13 −1 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -200,6 +208,8 @@ let concatMapStringsSep "\\|" (replaceStrings ["." "+"] ["[.]" "[+]"]) systems; in '' runHook preInstall mkdir -pv $out cp -r * $out Loading @@ -207,6 +217,8 @@ let find $out -name "*.asd" \ | grep -v "/\(${mkSystemsRegex systems}\)\.asd$" \ | xargs rm -fv || true runHook postInstall ''; dontPatchShebangs = true; Loading
pkgs/development/lisp-modules/packages.nix +15 −0 Original line number Diff line number Diff line Loading @@ -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; }); Loading Loading @@ -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 { Loading
pkgs/development/lisp-modules/patches/cephes-make.patch +16 −17 Original line number Diff line number Diff line --- 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