summary refs log tree commit diff
path: root/pkgs/tools/filesystems/svnfs
diff options
context:
space:
mode:
authormidchildan <git@midchildan.org>2021-03-28 00:11:40 +0900
committermidchildan <git@midchildan.org>2021-04-20 00:52:05 +0900
commit15204342ee1dd38cacecf4918e9e8ae90db92228 (patch)
tree8686ddd4eb720fb2c19b9119625287854462bf1d /pkgs/tools/filesystems/svnfs
parent97edf282ea17cc56531f82991ec0414fea2e92b7 (diff)
downloadnixpkgs-15204342ee1dd38cacecf4918e9e8ae90db92228.tar
nixpkgs-15204342ee1dd38cacecf4918e9e8ae90db92228.tar.gz
nixpkgs-15204342ee1dd38cacecf4918e9e8ae90db92228.tar.bz2
nixpkgs-15204342ee1dd38cacecf4918e9e8ae90db92228.tar.lz
nixpkgs-15204342ee1dd38cacecf4918e9e8ae90db92228.tar.xz
nixpkgs-15204342ee1dd38cacecf4918e9e8ae90db92228.tar.zst
nixpkgs-15204342ee1dd38cacecf4918e9e8ae90db92228.zip
svnfs: add darwin build
Diffstat (limited to 'pkgs/tools/filesystems/svnfs')
-rw-r--r--pkgs/tools/filesystems/svnfs/default.nix26
1 files changed, 19 insertions, 7 deletions
diff --git a/pkgs/tools/filesystems/svnfs/default.nix b/pkgs/tools/filesystems/svnfs/default.nix
index bef4d6b5cea..a192032aa93 100644
--- a/pkgs/tools/filesystems/svnfs/default.nix
+++ b/pkgs/tools/filesystems/svnfs/default.nix
@@ -1,14 +1,26 @@
-{ lib, stdenv, fetchurl, automake, autoconf, subversion, fuse, apr, perl }:
+{ lib, stdenv, fetchurl, autoreconfHook, subversion, fuse, apr, perl }:
 
-stdenv.mkDerivation {
-  name = "svnfs-0.4";
+stdenv.mkDerivation rec {
+  pname = "svnfs";
+  version = "0.4";
 
   src = fetchurl {
-    url = "http://www.jmadden.eu/wp-content/uploads/svnfs/svnfs-0.4.tgz";
+    url = "http://www.jmadden.eu/wp-content/uploads/svnfs/svnfs-${version}.tgz";
     sha256 = "1lrzjr0812lrnkkwk60bws9k1hq2iibphm0nhqyv26axdsygkfky";
   };
 
-  buildInputs = [automake autoconf subversion fuse apr perl];
+  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" ];
 
   # why is this required?
   preConfigure=''
@@ -21,8 +33,8 @@ stdenv.mkDerivation {
   meta = {
     description = "FUSE filesystem for accessing Subversion repositories";
     homepage = "http://www.jmadden.eu/index.php/svnfs/";
-    license = lib.licenses.gpl2;
+    license = lib.licenses.gpl2Only;
     maintainers = [lib.maintainers.marcweber];
-    platforms = lib.platforms.linux;
+    platforms = lib.platforms.unix;
   };
 }