at 23.05-pre 40 lines 1.1 kB view raw
1{ stdenv, lib, fetchzip, cmake }: 2 3stdenv.mkDerivation rec { 4 pname = "openfec"; 5 version = "1.4.2"; 6 7 src = fetchzip { 8 url = "http://openfec.org/files/openfec_v1_4_2.tgz"; 9 sha256 = "sha256:0c2lg8afr7lqpzrsi0g44a6h6s7nq4vz7yc9vm2k57ph2y6r86la"; 10 }; 11 12 outputs = [ "out" "dev" ]; 13 14 nativeBuildInputs = [ 15 cmake 16 ]; 17 18 cmakeFlags = [ "-DDEBUG:STRING=OFF" ]; 19 20 installPhase = 21 let so = stdenv.hostPlatform.extensions.sharedLibrary; 22 in '' 23 # This is pretty horrible but sadly there is not installation procedure 24 # provided. 25 mkdir -p $dev/include 26 cp -R ../src/* $dev/include 27 find $dev/include -type f -a ! -iname '*.h' -delete 28 29 install -D -m755 -t $out/lib ../bin/Release/libopenfec${so} 30 ln -s libopenfec${so} $out/lib/libopenfec${so}.1 31 ''; 32 33 meta = with lib; { 34 description = "Application-level Forward Erasure Correction codes"; 35 homepage = "https://github.com/roc-streaming/openfec"; 36 license = licenses.cecill-c; 37 maintainers = with maintainers; [ bgamari ]; 38 platforms = platforms.unix; 39 }; 40}