Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 perl, 6}: 7 8stdenv.mkDerivation rec { 9 pname = "uthash"; 10 version = "2.3.0"; 11 12 src = fetchFromGitHub { 13 owner = "troydhanson"; 14 repo = "uthash"; 15 rev = "v${version}"; 16 sha256 = "sha256-F0M5ENT3bMn3dD16Oaq9mBFYOWzVliVWupAIrLc2nkQ="; 17 }; 18 19 doCheck = true; 20 nativeCheckInputs = [ perl ]; 21 checkTarget = "all"; 22 preCheck = "cd tests"; 23 24 installPhase = '' 25 install -Dm644 $src/include/*.h -t $out/include 26 ''; 27 28 meta = with lib; { 29 description = "Hash table for C structures"; 30 homepage = "http://troydhanson.github.io/uthash"; 31 license = licenses.bsd2; # it's one-clause, actually, as it's source-only 32 platforms = platforms.all; 33 }; 34}