Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, popt }: 2 3stdenv.mkDerivation rec { 4 pname = "libdv"; 5 version = "1.0.0"; 6 7 src = fetchurl { 8 url = "mirror://sourceforge/libdv/libdv-${version}.tar.gz"; 9 sha256 = "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"; 10 }; 11 12 # Disable priority scheduling on Darwin because it doesn’t support sched_setscheduler. 13 postPatch = lib.optionalString stdenv.isDarwin '' 14 substituteInPlace encodedv/dvconnect.c \ 15 --replace '#ifdef _SC_PRIORITY_SCHEDULING' '#if 0' 16 ''; 17 18 configureFlags = [ 19 "--disable-asm" 20 "--disable-sdl" 21 "--disable-gtk" 22 "--disable-xv" 23 "--disable-gprof" 24 ]; 25 26 buildInputs = [ popt ]; 27 28 meta = with lib; { 29 description = "Software decoder for DV format video, as defined by the IEC 61834 and SMPTE 314M standards"; 30 homepage = "https://sourceforge.net/projects/libdv/"; 31 license = licenses.lgpl21Plus; 32 platforms = platforms.unix; 33 }; 34}