1 { lib, stdenv, fetchurl, pkg-config, fuse }:
3 stdenv.mkDerivation rec {
7 url = "mirror://sourceforge/djmount/${version}/${pname}-${version}.tar.gz";
8 sha256 = "0kqf0cy3h4cfiy5a2sigmisx0lvvsi1n0fbyb9ll5gacmy1b8nxa";
12 # Taken from https://github.com/pupnp/pupnp/pull/334/files
13 substituteInPlace libupnp/threadutil/inc/ithread.h \
15 "#define ithread_mutexattr_setkind_np pthread_mutexattr_setkind_np" \
16 '#define ithread_mutexattr_setkind_np pthread_mutexattr_settype'
19 nativeBuildInputs = [ pkg-config ];
20 buildInputs = [ fuse ];
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 NIX_CFLAGS_COMPILE = "-fcommon";
29 homepage = "http://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;