From f053652a8a4134762acc8eed1114f24819772a06 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Sat, 1 Jan 2022 11:41:51 -0500 Subject: [PATCH] openfec: init at 1.4.2 --- .../development/libraries/openfec/default.nix | 40 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/libraries/openfec/default.nix diff --git a/pkgs/development/libraries/openfec/default.nix b/pkgs/development/libraries/openfec/default.nix new file mode 100644 index 000000000000..2a0588a71ebd --- /dev/null +++ b/pkgs/development/libraries/openfec/default.nix @@ -0,0 +1,40 @@ +{ stdenv, lib, fetchzip, cmake }: + +stdenv.mkDerivation rec { + pname = "openfec"; + version = "1.4.2"; + + src = fetchzip { + url = "http://openfec.org/files/openfec_v1_4_2.tgz"; + sha256 = "sha256:0c2lg8afr7lqpzrsi0g44a6h6s7nq4vz7yc9vm2k57ph2y6r86la"; + }; + + outputs = [ "out" "dev" ]; + + nativeBuildInputs = [ + cmake + ]; + + cmakeFlags = [ "-DDEBUG:STRING=OFF" ]; + + installPhase = + let so = stdenv.hostPlatform.extensions.sharedLibrary; + in '' + # This is pretty horrible but sadly there is not installation procedure + # provided. + mkdir -p $dev/include + cp -R ../src/* $dev/include + find $dev/include -type f -a ! -iname '*.h' -delete + + install -D -m755 -t $out/lib ../bin/Release/libopenfec${so} + ln -s libopenfec${so} $out/lib/libopenfec${so}.1 + ''; + + meta = with lib; { + description = "Application-level Forward Erasure Correction codes"; + homepage = "https://github.com/roc-streaming/openfec"; + license = licenses.cecill-c; + maintainers = with maintainers; [ bgamari ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 482f17ce47ec..ed07c0fb9290 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8366,6 +8366,8 @@ with pkgs; opendylan-bootstrap = opendylan_bin; }; + openfec = callPackage ../development/libraries/openfec { }; + ophis = python3Packages.callPackage ../development/compilers/ophis { }; opendylan_bin = callPackage ../development/compilers/opendylan/bin.nix { };