2021-03-27 15:11:40 +00:00
|
|
|
{ lib, stdenv, fetchurl, autoreconfHook, subversion, fuse, apr, perl }:
|
2010-04-21 14:47:13 +00:00
|
|
|
|
2021-03-27 15:11:40 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "svnfs";
|
|
|
|
version = "0.4";
|
2010-04-16 15:56:31 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-03-27 15:11:40 +00:00
|
|
|
url = "http://www.jmadden.eu/wp-content/uploads/svnfs/svnfs-${version}.tgz";
|
2010-04-16 15:56:31 +00:00
|
|
|
sha256 = "1lrzjr0812lrnkkwk60bws9k1hq2iibphm0nhqyv26axdsygkfky";
|
|
|
|
};
|
|
|
|
|
2021-03-27 15:11:40 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
buildInputs = [ subversion fuse apr perl ];
|
|
|
|
|
|
|
|
# autoconf's AC_CHECK_HEADERS and AC_CHECK_LIBS fail to detect libfuse on
|
|
|
|
# Darwin if FUSE_USE_VERSION isn't set at configure time.
|
|
|
|
#
|
|
|
|
# NOTE: Make sure the value of FUSE_USE_VERSION specified here matches the
|
|
|
|
# actual version used in the source code:
|
|
|
|
#
|
|
|
|
# $ tar xf "$(nix-build -A svnfs.src)"
|
|
|
|
# $ grep -R FUSE_USE_VERSION
|
|
|
|
configureFlags = lib.optionals stdenv.isDarwin [ "CFLAGS=-DFUSE_USE_VERSION=25" ];
|
2010-04-16 15:56:31 +00:00
|
|
|
|
|
|
|
# why is this required?
|
|
|
|
preConfigure=''
|
2015-10-26 10:30:48 +00:00
|
|
|
export LD_LIBRARY_PATH=${subversion.out}/lib
|
2010-04-16 15:56:31 +00:00
|
|
|
'';
|
|
|
|
|
2022-05-29 07:24:43 +00:00
|
|
|
# -fcommon: workaround build failure on -fno-common toolchains like upstream
|
|
|
|
# gcc-10. Otherwise build fails as:
|
|
|
|
# ld: svnclient.o:/build/svnfs-0.4/src/svnfs.h:40: multiple definition of
|
|
|
|
# `dirbuf'; svnfs.o:/build/svnfs-0.4/src/svnfs.h:40: first defined here
|
2023-02-20 15:17:34 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-I ${subversion.dev}/include/subversion-1 -fcommon";
|
2019-01-04 19:33:51 +00:00
|
|
|
NIX_LDFLAGS="-lsvn_client-1 -lsvn_subr-1";
|
2010-04-16 15:56:31 +00:00
|
|
|
|
|
|
|
meta = {
|
2014-08-24 14:21:08 +00:00
|
|
|
description = "FUSE filesystem for accessing Subversion repositories";
|
2023-01-21 21:41:12 +00:00
|
|
|
homepage = "https://www.jmadden.eu/index.php/svnfs/";
|
2021-03-27 15:11:40 +00:00
|
|
|
license = lib.licenses.gpl2Only;
|
2021-01-15 09:19:50 +00:00
|
|
|
maintainers = [lib.maintainers.marcweber];
|
2021-03-27 15:11:40 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2010-04-16 15:56:31 +00:00
|
|
|
};
|
|
|
|
}
|