tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
0
fork
atom
overview
issues
pulls
pipelines
python3Packages.git-annex-adapter: init at 0.2.0
Robert Schütz
8 years ago
17899afd
7dfa9796
+53
2 changed files
expand all
collapse all
unified
split
pkgs
development
python-modules
git-annex-adapter
default.nix
top-level
python-packages.nix
+49
pkgs/development/python-modules/git-annex-adapter/default.nix
···
1
1
+
{ stdenv, buildPythonPackage, isPy3k, fetchFromGitHub, fetchurl
2
2
+
, eject, pygit2, gitMinimal, git-annex }:
3
3
+
4
4
+
buildPythonPackage rec {
5
5
+
pname = "git-annex-adapter";
6
6
+
version = "0.2.0";
7
7
+
name = "${pname}-${version}";
8
8
+
9
9
+
disabled = (!isPy3k);
10
10
+
11
11
+
# There is only a wheel on PyPI - build from source instead
12
12
+
src = fetchFromGitHub {
13
13
+
owner = "alpernebbi";
14
14
+
repo = pname;
15
15
+
rev = "v${version}";
16
16
+
sha256 = "1sbgp4ivgw4m8nngrlb1f78xdnssh639c1khv4z98753w3sdsxdz";
17
17
+
};
18
18
+
19
19
+
prePatch = ''
20
20
+
substituteInPlace git_annex_adapter/process.py \
21
21
+
--replace "'git', 'annex'" "'${git-annex}/bin/git-annex'" \
22
22
+
--replace "'git-annex'" "'${git-annex}/bin/git-annex'"
23
23
+
'';
24
24
+
25
25
+
# TODO: Remove for next version
26
26
+
patches = fetchurl {
27
27
+
url = "https://github.com/alpernebbi/git-annex-adapter/commit/9f64c4b99cae7b681820c6c7382e1e40489f4d1e.patch";
28
28
+
sha256 = "1hbw8651amjskakvs1wv2msd1wryrq0vpryvbispg5267rs8q7hp";
29
29
+
};
30
30
+
31
31
+
nativeBuildInputs = [
32
32
+
eject # `rev` is needed in tests/test_process.py
33
33
+
];
34
34
+
35
35
+
propagatedBuildInputs = [ pygit2 gitMinimal ];
36
36
+
37
37
+
buildInputs = [ git-annex ];
38
38
+
39
39
+
checkPhase = ''
40
40
+
python -m unittest
41
41
+
'';
42
42
+
43
43
+
meta = with stdenv.lib; {
44
44
+
homepage = https://github.com/alpernebbi/git-annex-adapter;
45
45
+
description = "Call git-annex commands from Python";
46
46
+
license = licenses.gpl3Plus;
47
47
+
maintainers = with maintainers; [ dotlambda ];
48
48
+
};
49
49
+
}
+4
pkgs/top-level/python-packages.nix
···
5449
5449
};
5450
5450
};
5451
5451
5452
5452
+
git-annex-adapter = callPackage ../development/python-modules/git-annex-adapter {
5453
5453
+
inherit (pkgs.gitAndTools) git-annex;
5454
5454
+
};
5455
5455
+
5452
5456
google-cloud-sdk = callPackage ../tools/admin/google-cloud-sdk { };
5453
5457
google-cloud-sdk-gce = callPackage ../tools/admin/google-cloud-sdk { with-gce=true; };
5454
5458