2021-01-25 09:26:54 +01:00
|
|
|
{ lib, fetchFromGitHub, python3Packages }:
|
2015-07-01 12:54:08 +02:00
|
|
|
|
2020-02-06 00:20:47 +01:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2019-08-31 13:41:23 +02:00
|
|
|
pname = "gitfs";
|
2019-11-26 02:46:26 +01:00
|
|
|
version = "0.5.2";
|
2015-07-01 12:54:08 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PressLabs";
|
|
|
|
repo = "gitfs";
|
2017-03-02 16:35:33 +01:00
|
|
|
rev = version;
|
2019-11-26 02:46:26 +01:00
|
|
|
sha256 = "1jzwdwan8ndvp2lw6j7zbvg5k9rgf2d8dcxjrwc6bwyk59xdxn4p";
|
2015-07-01 12:54:08 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
# requirement checks are unnecessary at runtime
|
|
|
|
echo > requirements.txt
|
2021-03-25 17:30:38 +01:00
|
|
|
|
|
|
|
# NOTE: As of gitfs 0.5.2, The pygit2 release that upstream uses is a major
|
|
|
|
# version behind the one packaged in nixpkgs.
|
|
|
|
substituteInPlace gitfs/mounter.py --replace \
|
|
|
|
'from pygit2.remote import RemoteCallbacks' \
|
|
|
|
'from pygit2 import RemoteCallbacks'
|
2015-07-01 12:54:08 +02:00
|
|
|
'';
|
|
|
|
|
2021-07-20 22:42:24 +02:00
|
|
|
checkInputs = with python3Packages; [ pytest pytest-cov mock ];
|
2020-02-06 00:20:47 +01:00
|
|
|
propagatedBuildInputs = with python3Packages; [ atomiclong fusepy pygit2 six ];
|
2016-10-17 16:10:56 +02:00
|
|
|
|
2017-03-02 16:35:33 +01:00
|
|
|
checkPhase = "py.test";
|
|
|
|
doCheck = false;
|
2015-07-01 12:54:08 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A FUSE filesystem that fully integrates with git";
|
|
|
|
longDescription = ''
|
|
|
|
A git remote repository's branch can be mounted locally,
|
|
|
|
and any subsequent changes made to the files will be
|
|
|
|
automatically committed to the remote.
|
|
|
|
'';
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/PressLabs/gitfs";
|
2021-01-15 10:19:50 +01:00
|
|
|
license = lib.licenses.asl20;
|
2021-03-25 17:30:38 +01:00
|
|
|
platforms = lib.platforms.unix;
|
2021-01-15 10:19:50 +01:00
|
|
|
maintainers = [ lib.maintainers.robbinch ];
|
2015-07-01 12:54:08 +02:00
|
|
|
};
|
2016-10-17 16:10:56 +02:00
|
|
|
}
|