Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl }: 2 3stdenv.mkDerivation rec { 4 pname = "a52dec"; 5 version = "0.7.4"; 6 7 src = fetchurl { 8 url = "https://liba52.sourceforge.io/files/${pname}-${version}.tar.gz"; 9 sha256 = "oh1ySrOzkzMwGUNTaH34LEdbXfuZdRPu9MJd5shl7DM="; 10 }; 11 12 configureFlags = [ 13 "--enable-shared" 14 # Define inline as __attribute__ ((__always_inline__)) 15 "ac_cv_c_inline=yes" 16 ]; 17 18 makeFlags = [ 19 "AR=${stdenv.cc.targetPrefix}ar" 20 ]; 21 22 # fails 1 out of 1 tests with "BAD GLOBAL SYMBOLS" on i686 23 # which can also be fixed with 24 # hardeningDisable = lib.optional stdenv.isi686 "pic"; 25 # but it's better to disable tests than loose ASLR on i686 26 doCheck = !stdenv.isi686; 27 28 meta = with lib; { 29 description = "ATSC A/52 stream decoder"; 30 homepage = "https://liba52.sourceforge.io/"; 31 platforms = platforms.unix; 32 license = licenses.gpl2Plus; 33 }; 34}