clpm: 0.3.6 -> 0.4.1 (#143163)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
Petter S. Storvik 2021-10-31 23:43:03 +01:00 committed by GitHub
parent 45a6e2f1aa
commit ec05118429
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,32 +2,45 @@
, stdenv , stdenv
, fetchgit , fetchgit
, wrapLisp , wrapLisp
, sbcl_2_0_9 , sbcl
, openssl , openssl
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "clpm"; pname = "clpm";
version = "0.3.6"; version = "0.4.1";
src = fetchgit { src = fetchgit {
url = "https://gitlab.common-lisp.net/clpm/clpm"; url = "https://gitlab.common-lisp.net/clpm/clpm";
rev = "v${version}"; rev = "v${version}";
fetchSubmodules = true; fetchSubmodules = true;
sha256 = "04w46yhv31p4cfb84b6qvyfw7x5nx6lzyd4yzhd9x6qvb7p5kmfh"; sha256 = "sha256-UhaLmbdsIPj6O+s262HUMxuz/5t43JR+TlOjq8Y2CDs=";
}; };
buildInputs = [ buildInputs = [
(wrapLisp sbcl_2_0_9) (wrapLisp sbcl)
];
propagatedBuildInputs = [
openssl openssl
]; ];
postPatch = ''
# patch cl-plus-ssl to ensure that it finds libssl and libcrypto
sed 's|libssl.so|${openssl.out}/lib/libssl.so|' -i ext/cl-plus-ssl/src/reload.lisp
sed 's|libcrypto.so|${openssl.out}/lib/libcrypto.so|' -i ext/cl-plus-ssl/src/reload.lisp
# patch dexador to avoid error due to dexador being loaded multiple times
sed -i 's/defpackage/uiop:define-package/g' ext/dexador/src/dexador.lisp
'';
buildPhase = '' buildPhase = ''
runHook preBuild runHook preBuild
ln -s ${openssl.out}/lib/libcrypto*${stdenv.hostPlatform.extensions.sharedLibrary}* . # exporting home to avoid using /homeless-shelter/.cache/ as this will cause
ln -s ${openssl.out}/lib/libssl*${stdenv.hostPlatform.extensions.sharedLibrary}* . # ld to complaing about `impure path used in link`.
common-lisp.sh --script scripts/build.lisp export HOME=$TMP
common-lisp.sh --script scripts/build-release.lisp
runHook postBuild runHook postBuild
''; '';
@ -35,7 +48,8 @@ stdenv.mkDerivation rec {
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
INSTALL_ROOT=$out sh install.sh cd build/release-staging/dynamic/clpm-${version}*/
INSTALL_ROOT=$out/ bash install.sh
runHook postInstall runHook postInstall
''; '';
@ -48,6 +62,6 @@ stdenv.mkDerivation rec {
homepage = "https://www.clpm.dev/"; homepage = "https://www.clpm.dev/";
license = licenses.bsd2; license = licenses.bsd2;
maintainers = [ maintainers.petterstorvik ]; maintainers = [ maintainers.petterstorvik ];
platforms = platforms.all; platforms = [ "i686-linux" "x86_64-linux" ];
}; };
} }