Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 fetchFromGitHub, 4 python3Packages, 5}: 6 7python3Packages.buildPythonApplication rec { 8 pname = "gitfs"; 9 version = "0.5.2"; 10 format = "setuptools"; 11 12 src = fetchFromGitHub { 13 owner = "PressLabs"; 14 repo = "gitfs"; 15 rev = version; 16 sha256 = "1jzwdwan8ndvp2lw6j7zbvg5k9rgf2d8dcxjrwc6bwyk59xdxn4p"; 17 }; 18 19 patchPhase = '' 20 # requirement checks are unnecessary at runtime 21 echo > requirements.txt 22 23 # NOTE: As of gitfs 0.5.2, The pygit2 release that upstream uses is a major 24 # version behind the one packaged in nixpkgs. 25 substituteInPlace gitfs/mounter.py --replace \ 26 'from pygit2.remote import RemoteCallbacks' \ 27 'from pygit2 import RemoteCallbacks' 28 ''; 29 30 nativeCheckInputs = with python3Packages; [ 31 pytestCheckHook 32 pytest-cov-stub 33 mock 34 ]; 35 propagatedBuildInputs = with python3Packages; [ 36 atomiclong 37 fusepy 38 pygit2 39 six 40 ]; 41 42 pythonImportsCheck = [ "gitfs" ]; 43 44 meta = { 45 description = "FUSE filesystem that fully integrates with git"; 46 longDescription = '' 47 A git remote repository's branch can be mounted locally, 48 and any subsequent changes made to the files will be 49 automatically committed to the remote. 50 ''; 51 homepage = "https://github.com/PressLabs/gitfs"; 52 license = lib.licenses.asl20; 53 platforms = lib.platforms.unix; 54 maintainers = [ lib.maintainers.robbinch ]; 55 mainProgram = "gitfs"; 56 # requires <=python39, otherwise you get this at runtime: 57 # AttributeError: module 'collections' has no attribute 'MutableMapping' 58 broken = true; 59 }; 60}