about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/guile/guile-hall/default.nix
blob: 3c57fb4da8ce03f2ce9421378e3689d0dabb90f9 (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
{ lib, stdenv, fetchFromGitLab, autoreconfHook, pkg-config
, texinfo, makeWrapper, guile, guile-config }:

stdenv.mkDerivation rec {
  pname = "guile-hall";
  version = "0.4.1";

  src = fetchFromGitLab {
    owner = "a-sassmannshausen";
    repo = "guile-hall";
    rev = version;
    hash = "sha256-TUCN8kW44X6iGbSJURurcz/Tc2eCH1xgmXH1sMOMOXs=";
  };

  nativeBuildInputs = [ autoreconfHook pkg-config texinfo makeWrapper ];

  buildInputs = [ guile guile-config ];

  enableParallelBuilding = true;

  doCheck = true;

  postInstall = ''
    wrapProgram $out/bin/hall \
      --prefix GUILE_LOAD_PATH : "$out/${guile.siteDir}:$GUILE_LOAD_PATH" \
      --prefix GUILE_LOAD_COMPILED_PATH : "$out/${guile.siteCcacheDir}:$GUILE_LOAD_COMPILED_PATH"
  '';

  doInstallCheck = true;
  installCheckPhase = ''
    runHook preInstallCheck
    export HOME=$TMPDIR
    $out/bin/hall --version | grep ${version} > /dev/null
    runHook postInstallCheck
  '';

  meta = with lib; {
    description = "Project manager and build tool for GNU guile";
    mainProgram = "hall";
    homepage = "https://gitlab.com/a-sassmannshausen/guile-hall";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ sikmir ];
    platforms = guile.meta.platforms;
  };
}