nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitLab,
5 autoreconfHook,
6}:
7
8stdenv.mkDerivation (finalAttrs: {
9 pname = "a52dec";
10 version = "0.8.0";
11
12 src = fetchFromGitLab {
13 domain = "git.adelielinux.org";
14 owner = "community";
15 repo = "a52dec";
16 tag = "v${finalAttrs.version}";
17 hash = "sha256-Z4riiwetJkhQYa+AD8qOiwB1+cuLbOyN/g7D8HM8Pkw=";
18 };
19
20 nativeBuildInputs = [ autoreconfHook ];
21
22 configureFlags = [
23 "--enable-shared"
24 # Define inline as __attribute__ ((__always_inline__))
25 "ac_cv_c_inline=yes"
26 ];
27
28 makeFlags = [ "AR=${stdenv.cc.targetPrefix}ar" ];
29
30 # fails 1 out of 1 tests with "BAD GLOBAL SYMBOLS" on i686
31 # which can also be fixed with
32 # hardeningDisable = lib.optional stdenv.hostPlatform.isi686 "pic";
33 # but it's better to disable tests than loose ASLR on i686
34 doCheck = !stdenv.hostPlatform.isi686;
35
36 meta = {
37 description = "ATSC A/52 stream decoder";
38 homepage = "https://liba52.sourceforge.io/";
39 changelog = "https://git.adelielinux.org/community/a52dec/-/blob/v${finalAttrs.version}/ChangeLog?ref_type=tags";
40 license = lib.licenses.gpl2Plus;
41 maintainers = with lib.maintainers; [ wegank ];
42 mainProgram = "a52dec";
43 platforms = lib.platforms.unix;
44 };
45})