about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/mobile/fdroidcl/default.nix
blob: 9b23443a3a2ad6e56d7ebfc6ddec05d180aa216f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ lib
, buildGoModule
, fetchFromGitHub
, android-tools
}:

buildGoModule rec {
  pname = "fdroidcl";
  version = "0.7.0";

  src = fetchFromGitHub {
    owner = "mvdan";
    repo = "fdroidcl";
    rev = "v${version}";
    hash = "sha256-tqhs3b/DHfnGOm9qcM56NSzt1GJflJfbemkp7+nXbug=";
  };

  patches = [ ./go_mod_version_update.patch ];

  vendorHash = "sha256-BWbwhHjfmMjiRurrZfW/YgIzJUH/hn+7qonD0BcTLxs=";

  postPatch = ''
    substituteInPlace adb/{server,device}.go \
      --replace 'exec.Command("adb"' 'exec.Command("${android-tools}/bin/adb"'
  '';

  # TestScript/search attempts to connect to fdroid
  doCheck = false;

  meta = with lib; {
    description = "F-Droid command line interface written in Go";
    mainProgram = "fdroidcl";
    homepage = "https://github.com/mvdan/fdroidcl";
    license = licenses.bsd3;
    maintainers = with maintainers; [ aleksana ];
  };
}