2021-02-17 14:28:31 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2021-01-11 23:08:42 +01:00
|
|
|
, fetchgit
|
|
|
|
, wrapLisp
|
2021-04-11 09:21:35 +02:00
|
|
|
, sbcl_2_0_9
|
2021-01-11 23:08:42 +01:00
|
|
|
, openssl
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "clpm";
|
2021-02-17 14:28:31 +01:00
|
|
|
version = "0.3.6";
|
2021-01-11 23:08:42 +01:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://gitlab.common-lisp.net/clpm/clpm";
|
|
|
|
rev = "v${version}";
|
|
|
|
fetchSubmodules = true;
|
2021-02-17 14:28:31 +01:00
|
|
|
sha256 = "04w46yhv31p4cfb84b6qvyfw7x5nx6lzyd4yzhd9x6qvb7p5kmfh";
|
2021-01-11 23:08:42 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2021-04-11 09:21:35 +02:00
|
|
|
(wrapLisp sbcl_2_0_9)
|
2021-01-11 23:08:42 +01:00
|
|
|
openssl
|
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
2021-02-17 14:28:31 +01:00
|
|
|
runHook preBuild
|
|
|
|
|
2021-05-17 00:57:29 +02:00
|
|
|
ln -s ${openssl.out}/lib/libcrypto*${stdenv.hostPlatform.extensions.sharedLibrary}* .
|
|
|
|
ln -s ${openssl.out}/lib/libssl*${stdenv.hostPlatform.extensions.sharedLibrary}* .
|
2021-01-11 23:08:42 +01:00
|
|
|
common-lisp.sh --script scripts/build.lisp
|
2021-02-17 14:28:31 +01:00
|
|
|
|
|
|
|
runHook postBuild
|
2021-01-11 23:08:42 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-02-17 14:28:31 +01:00
|
|
|
runHook preInstall
|
|
|
|
|
2021-01-11 23:08:42 +01:00
|
|
|
INSTALL_ROOT=$out sh install.sh
|
2021-02-17 14:28:31 +01:00
|
|
|
|
|
|
|
runHook postInstall
|
2021-01-11 23:08:42 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
# fixupPhase results in fatal error in SBCL, `Can't find sbcl.core`
|
|
|
|
dontFixup = true;
|
|
|
|
|
2021-01-23 13:26:19 +01:00
|
|
|
meta = with lib; {
|
2021-01-11 23:08:42 +01:00
|
|
|
description = "Common Lisp Package Manager";
|
|
|
|
homepage = "https://www.clpm.dev/";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = [ maintainers.petterstorvik ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|