1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 android-tools,
6}:
7
8buildGoModule rec {
9 pname = "fdroidcl";
10 version = "0.7.0";
11
12 src = fetchFromGitHub {
13 owner = "mvdan";
14 repo = "fdroidcl";
15 rev = "v${version}";
16 hash = "sha256-tqhs3b/DHfnGOm9qcM56NSzt1GJflJfbemkp7+nXbug=";
17 };
18
19 patches = [ ./go_mod_version_update.patch ];
20
21 vendorHash = "sha256-BWbwhHjfmMjiRurrZfW/YgIzJUH/hn+7qonD0BcTLxs=";
22
23 postPatch = ''
24 substituteInPlace adb/{server,device}.go \
25 --replace 'exec.Command("adb"' 'exec.Command("${android-tools}/bin/adb"'
26 '';
27
28 # TestScript/search attempts to connect to fdroid
29 doCheck = false;
30
31 meta = with lib; {
32 description = "F-Droid command line interface written in Go";
33 mainProgram = "fdroidcl";
34 homepage = "https://github.com/mvdan/fdroidcl";
35 license = licenses.bsd3;
36 maintainers = with maintainers; [ aleksana ];
37 };
38}