about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/clpm/default.nix
blob: ae2e1011ae2590cc5b7bbe946ff970afeba6cbde (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ lib
, stdenv
, fetchgit
, wrapLisp
, sbcl_2_0_9
, openssl
}:

stdenv.mkDerivation rec {
  pname = "clpm";
  version = "0.3.6";

  src = fetchgit {
    url = "https://gitlab.common-lisp.net/clpm/clpm";
    rev = "v${version}";
    fetchSubmodules = true;
    sha256 = "04w46yhv31p4cfb84b6qvyfw7x5nx6lzyd4yzhd9x6qvb7p5kmfh";
  };

  buildInputs = [
    (wrapLisp sbcl_2_0_9)
    openssl
  ];

  buildPhase = ''
    runHook preBuild

    ln -s ${openssl.out}/lib/libcrypto.so.* .
    ln -s ${openssl.out}/lib/libssl.so.* .
    common-lisp.sh --script scripts/build.lisp

    runHook postBuild
  '';

  installPhase = ''
    runHook preInstall

    INSTALL_ROOT=$out sh install.sh

    runHook postInstall
  '';

  # fixupPhase results in fatal error in SBCL, `Can't find sbcl.core`
  dontFixup = true;

  meta = with lib; {
    description = "Common Lisp Package Manager";
    homepage = "https://www.clpm.dev/";
    license = licenses.bsd2;
    maintainers = [ maintainers.petterstorvik ];
    platforms = platforms.all;
  };
}