nixpkgs/pkgs/development/mobile/fdroidcl/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

38 lines
887 B
Nix

{ 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 ];
};
}