nixpkgs/pkgs/tools/filesystems/gitfs/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.3 KiB
Nix
Raw Normal View History

{ lib, fetchFromGitHub, python3Packages }:
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";
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";
};
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'
'';
nativeCheckInputs = with python3Packages; [ pytest pytest-cov mock ];
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;
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.
'';
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 ];
2023-11-23 22:09:35 +01:00
mainProgram = "gitfs";
};
2016-10-17 16:10:56 +02:00
}