svnfs: add darwin build

+19 -7
+19 -7
pkgs/tools/filesystems/svnfs/default.nix
··· 1 - { lib, stdenv, fetchurl, automake, autoconf, subversion, fuse, apr, perl }: 1 + { lib, stdenv, fetchurl, autoreconfHook, subversion, fuse, apr, perl }: 2 2 3 - stdenv.mkDerivation { 4 - name = "svnfs-0.4"; 3 + stdenv.mkDerivation rec { 4 + pname = "svnfs"; 5 + version = "0.4"; 5 6 6 7 src = fetchurl { 7 - url = "http://www.jmadden.eu/wp-content/uploads/svnfs/svnfs-0.4.tgz"; 8 + url = "http://www.jmadden.eu/wp-content/uploads/svnfs/svnfs-${version}.tgz"; 8 9 sha256 = "1lrzjr0812lrnkkwk60bws9k1hq2iibphm0nhqyv26axdsygkfky"; 9 10 }; 10 11 11 - buildInputs = [automake autoconf subversion fuse apr perl]; 12 + nativeBuildInputs = [ autoreconfHook ]; 13 + buildInputs = [ subversion fuse apr perl ]; 14 + 15 + # autoconf's AC_CHECK_HEADERS and AC_CHECK_LIBS fail to detect libfuse on 16 + # Darwin if FUSE_USE_VERSION isn't set at configure time. 17 + # 18 + # NOTE: Make sure the value of FUSE_USE_VERSION specified here matches the 19 + # actual version used in the source code: 20 + # 21 + # $ tar xf "$(nix-build -A svnfs.src)" 22 + # $ grep -R FUSE_USE_VERSION 23 + configureFlags = lib.optionals stdenv.isDarwin [ "CFLAGS=-DFUSE_USE_VERSION=25" ]; 12 24 13 25 # why is this required? 14 26 preConfigure='' ··· 21 33 meta = { 22 34 description = "FUSE filesystem for accessing Subversion repositories"; 23 35 homepage = "http://www.jmadden.eu/index.php/svnfs/"; 24 - license = lib.licenses.gpl2; 36 + license = lib.licenses.gpl2Only; 25 37 maintainers = [lib.maintainers.marcweber]; 26 - platforms = lib.platforms.linux; 38 + platforms = lib.platforms.unix; 27 39 }; 28 40 }