summary refs log tree commit diff
path: root/pkgs/development/libraries/uthash/default.nix
blob: 57a1cbf73c2cd9ea3a9fb9c1f02ef257330668e0 (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
{ stdenv, fetchurl, perl }:

let
  version = "2.0.2";
in
stdenv.mkDerivation rec {
  name = "uthash-${version}";

  src = fetchurl {
    url = "https://github.com/troydhanson/uthash/archive/v${version}.tar.gz";
    sha256 = "1la82gdlyl7m8ahdjirigwfh7zjgkc24cvydrqcri0vsvm8iv8rl";
  };

  dontBuild = false;

  doCheck = true;
  checkInputs = [ perl ];
  checkTarget = "-C tests/";

  installPhase = ''
    mkdir -p "$out/include"
    cp ./src/* "$out/include/"
  '';

  meta = with stdenv.lib; {
    description = "A hash table for C structures";
    homepage    = http://troydhanson.github.io/uthash;
    license     = licenses.bsd2; # it's one-clause, actually, as it's source-only
    platforms   = platforms.all;
  };
}