about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libblocksruntime/default.nix
blob: 0ab380064429361784c3601f726d995f44a3e801 (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
{ lib, stdenv, fetchFromGitHub, clang }:

stdenv.mkDerivation {
  pname = "blocksruntime";
  version = "unstable-2014-06-24";

  src = fetchFromGitHub {
    owner = "mackyle";
    repo = "blocksruntime";
    rev = "b5c5274daf1e0e46ecc9ad8f6f69889bce0a0a5d";
    sha256 = "0ic4lagagkylcvwgf10mg0s1i57h4i25ds2fzvms22xj4zwzk1sd";
  };

  buildInputs = [ clang ];

  configurePhase = ''
    export CC=clang
    export CXX=clang++
  '';

  buildPhase = "./buildlib";

  checkPhase = "./checktests";

  doCheck = false; # hasdescriptor.c test fails, hrm.

  installPhase = ''prefix="/" DESTDIR=$out ./installlib'';

  meta = with lib; {
    description = "Installs the BlocksRuntime library from the compiler-rt";
    homepage = "https://github.com/mackyle/blocksruntime";
    license = licenses.mit;
  };
}