2020-12-25 13:55:36 +00:00
|
|
|
{ lib
|
2022-11-27 09:42:12 +00:00
|
|
|
, stdenv
|
2020-12-25 13:55:36 +00:00
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
2021-04-22 02:08:21 +00:00
|
|
|
, installShellFiles
|
2020-12-25 13:55:36 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "qrcp";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "0.10.1";
|
2020-12-25 13:55:36 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "claudiodangelis";
|
|
|
|
repo = "qrcp";
|
|
|
|
rev = version;
|
2023-04-29 16:46:19 +00:00
|
|
|
sha256 = "sha256-3GPZ6+gx5i/xULM3lq7D+b0onBC6clgeZsI1CvZ943s=";
|
2020-12-25 13:55:36 +00:00
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
vendorSha256 = "sha256-XVBDPhQsnUdftS+jZ1zWZlfSbFXxXrKSqiGTPpLq5i0=";
|
2020-12-25 13:55:36 +00:00
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2021-04-22 02:08:21 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
2022-03-30 09:31:56 +00:00
|
|
|
installShellCompletion --cmd qrcp \
|
|
|
|
--bash <($out/bin/qrcp completion bash) \
|
|
|
|
--fish <($out/bin/qrcp completion fish) \
|
|
|
|
--zsh <($out/bin/qrcp completion zsh)
|
2021-04-22 02:08:21 +00:00
|
|
|
'';
|
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://claudiodangelis.com/qrcp/";
|
|
|
|
description = "Transfer files over wifi by scanning a QR code from your terminal";
|
|
|
|
longDescription = ''
|
|
|
|
qrcp binds a web server to the address of your Wi-Fi network
|
|
|
|
interface on a random port and creates a handler for it. The default
|
|
|
|
handler serves the content and exits the program when the transfer is
|
|
|
|
complete.
|
|
|
|
'';
|
|
|
|
license = licenses.mit;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ fgaz ];
|
2022-11-27 09:42:12 +00:00
|
|
|
broken = stdenv.isDarwin; # needs golang.org/x/sys bump
|
2020-12-25 13:55:36 +00:00
|
|
|
};
|
|
|
|
}
|