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