depot/third_party/nixpkgs/pkgs/by-name/fn/fn-cli/package.nix

42 lines
686 B
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
docker,
}:
buildGoModule rec {
pname = "fn";
version = "0.6.36";
src = fetchFromGitHub {
owner = "fnproject";
repo = "cli";
rev = version;
hash = "sha256-JL1Xobmt6T7sSbEEj8L5+XB8/LbxMjhcmRxO//xVSQQ=";
};
vendorHash = null;
subPackages = [ "." ];
buildInputs = [
docker
];
preBuild = ''
export HOME=$TMPDIR
'';
postInstall = ''
mv $out/bin/cli $out/bin/fn
'';
meta = with lib; {
description = "Command-line tool for the fn project";
mainProgram = "fn";
homepage = "https://fnproject.io";
license = licenses.asl20;
maintainers = [ maintainers.c4605 ];
};
}