at 24.11-pre 44 lines 1.4 kB view raw
1{ lib, fetchFromGitHub, python3Packages }: 2 3python3Packages.buildPythonApplication rec { 4 pname = "gitfs"; 5 version = "0.5.2"; 6 7 src = fetchFromGitHub { 8 owner = "PressLabs"; 9 repo = "gitfs"; 10 rev = version; 11 sha256 = "1jzwdwan8ndvp2lw6j7zbvg5k9rgf2d8dcxjrwc6bwyk59xdxn4p"; 12 }; 13 14 patchPhase = '' 15 # requirement checks are unnecessary at runtime 16 echo > requirements.txt 17 18 # NOTE: As of gitfs 0.5.2, The pygit2 release that upstream uses is a major 19 # version behind the one packaged in nixpkgs. 20 substituteInPlace gitfs/mounter.py --replace \ 21 'from pygit2.remote import RemoteCallbacks' \ 22 'from pygit2 import RemoteCallbacks' 23 ''; 24 25 nativeCheckInputs = with python3Packages; [ pytest pytest-cov mock ]; 26 propagatedBuildInputs = with python3Packages; [ atomiclong fusepy pygit2 six ]; 27 28 checkPhase = "py.test"; 29 doCheck = false; 30 31 meta = { 32 description = "A FUSE filesystem that fully integrates with git"; 33 longDescription = '' 34 A git remote repository's branch can be mounted locally, 35 and any subsequent changes made to the files will be 36 automatically committed to the remote. 37 ''; 38 homepage = "https://github.com/PressLabs/gitfs"; 39 license = lib.licenses.asl20; 40 platforms = lib.platforms.unix; 41 maintainers = [ lib.maintainers.robbinch ]; 42 mainProgram = "gitfs"; 43 }; 44}