Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, pkg-config, fuse }: 2 3stdenv.mkDerivation rec { 4 pname = "djmount"; 5 version = "0.71"; 6 src = fetchurl { 7 url = "mirror://sourceforge/djmount/${version}/${pname}-${version}.tar.gz"; 8 sha256 = "0kqf0cy3h4cfiy5a2sigmisx0lvvsi1n0fbyb9ll5gacmy1b8nxa"; 9 }; 10 11 postPatch = '' 12 # Taken from https://github.com/pupnp/pupnp/pull/334/files 13 substituteInPlace libupnp/threadutil/inc/ithread.h \ 14 --replace \ 15 "#define ithread_mutexattr_setkind_np pthread_mutexattr_setkind_np" \ 16 '#define ithread_mutexattr_setkind_np pthread_mutexattr_settype' 17 ''; 18 19 nativeBuildInputs = [ pkg-config ]; 20 buildInputs = [ fuse ]; 21 22 # Workaround build failure on -fno-common toolchains like upstream 23 # gcc-10. Otherwise build fails as: 24 # ld: libupnp/upnp/.libs/libupnp.a(libupnp_la-gena_ctrlpt.o):libupnp/upnp/src/inc/upnpapi.h:163: 25 # multiple definition of `pVirtualDirList'; libupnp/upnp/.libs/libupnp.a(libupnp_la-upnpapi.o):libupnp/upnp/src/inc/upnpapi.h:163: first defined here 26 env.NIX_CFLAGS_COMPILE = "-fcommon"; 27 28 meta = { 29 homepage = "https://djmount.sourceforge.net/"; 30 description = "UPnP AV client, mounts as a Linux filesystem the media content of compatible UPnP AV devices"; 31 platforms = lib.platforms.linux; 32 maintainers = [ lib.maintainers.jagajaga ]; 33 license = lib.licenses.gpl2; 34 }; 35}