summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2020-01-25 15:52:36 +0100
committerGitHub <noreply@github.com>2020-01-25 15:52:36 +0100
commit6e6c16f90e318dc6994c502185ca930ff6e5603a (patch)
tree609fcf9426dafc79b46572e14225132c45aec2a4 /pkgs/development
parent992a680fab09b647417e6c4023cf036daed8a370 (diff)
parent128db1b3f0d398d9fcebaaae1003159ee0790544 (diff)
downloadnixpkgs-6e6c16f90e318dc6994c502185ca930ff6e5603a.tar
nixpkgs-6e6c16f90e318dc6994c502185ca930ff6e5603a.tar.gz
nixpkgs-6e6c16f90e318dc6994c502185ca930ff6e5603a.tar.bz2
nixpkgs-6e6c16f90e318dc6994c502185ca930ff6e5603a.tar.lz
nixpkgs-6e6c16f90e318dc6994c502185ca930ff6e5603a.tar.xz
nixpkgs-6e6c16f90e318dc6994c502185ca930ff6e5603a.tar.zst
nixpkgs-6e6c16f90e318dc6994c502185ca930ff6e5603a.zip
Merge pull request #78429 from thefloweringash/llfuse-darwin
pythonPackages.llfuse: darwin support, use in borgbackup
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/llfuse/default.nix29
1 files changed, 24 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/llfuse/default.nix b/pkgs/development/python-modules/llfuse/default.nix
index 6a497358404..02adb5a8d16 100644
--- a/pkgs/development/python-modules/llfuse/default.nix
+++ b/pkgs/development/python-modules/llfuse/default.nix
@@ -1,7 +1,11 @@
-{ stdenv, fetchurl, buildPythonPackage, pkgconfig, pytest, fuse, attr, which
-, contextlib2
+{ stdenv, fetchurl, fetchpatch, buildPythonPackage, pkgconfig, pytest, fuse, attr, which
+, contextlib2, osxfuse
 }:
 
+let
+  inherit (stdenv.lib) optionals optionalString;
+in
+
 buildPythonPackage rec {
   pname = "llfuse";
   version = "1.3.6";
@@ -11,14 +15,29 @@ buildPythonPackage rec {
     sha256 = "1j9fzxpgmb4rxxyl9jcf84zvznhgi3hnh4hg5vb0qaslxkvng8ii";
   };
 
+  patches = [
+    # https://github.com/python-llfuse/python-llfuse/pull/23 (2 commits)
+    (fetchpatch {
+      url = "https://github.com/python-llfuse/python-llfuse/commit/7579b0e626da1a7882b13caedcdbd4a834702e94.diff";
+      sha256 = "0vpybj4k222h20lyn0q7hz86ziqlapqs5701cknw8d11jakbhhb0";
+    })
+    (fetchpatch {
+      url = "https://github.com/python-llfuse/python-llfuse/commit/438c00ab9e10d6c485bb054211c01b7f8524a736.diff";
+      sha256 = "1zhb05b7k3c9mjqshy9in8yzpbihy7f33x1myq5kdjip1k50cwrn";
+    })
+  ];
+
   nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ fuse ];
-  checkInputs = [ pytest attr which ];
+  buildInputs =
+    optionals stdenv.isLinux [ fuse ]
+    ++ optionals stdenv.isDarwin [ osxfuse ];
+  checkInputs = [ pytest which ] ++
+    optionals stdenv.isLinux [ attr ];
 
   propagatedBuildInputs = [ contextlib2 ];
 
   checkPhase = ''
-    py.test -k "not test_listdir"
+    py.test -k "not test_listdir" ${optionalString stdenv.isDarwin ''-m "not uses_fuse"''}
   '';
 
   meta = with stdenv.lib; {