2020-09-22 22:06:11 +02:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
2021-04-19 18:16:41 +02:00
|
|
|
, installShellFiles
|
2020-09-22 22:06:11 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "qrcp";
|
2022-03-14 19:10:42 +01:00
|
|
|
version = "0.9.1";
|
2020-09-22 22:06:11 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "claudiodangelis";
|
|
|
|
repo = "qrcp";
|
|
|
|
rev = version;
|
2022-03-14 19:10:42 +01:00
|
|
|
sha256 = "sha256-oXtFkjCnbfjV15XWkmmJmhG82GyaY4FAcF5NrGnxHm0=";
|
2020-09-22 22:06:11 +02:00
|
|
|
};
|
|
|
|
|
2021-04-19 18:16:41 +02:00
|
|
|
vendorSha256 = "1hn8c72fvih6ws1y2c4963pww3ld64m0yh3pmx62hwcy83bhb0v4";
|
2020-09-22 22:06:11 +02:00
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2021-04-19 18:16:41 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
2022-03-12 22:02:18 +01:00
|
|
|
installShellCompletion --cmd qrcp \
|
|
|
|
--bash <($out/bin/qrcp completion bash) \
|
|
|
|
--fish <($out/bin/qrcp completion fish) \
|
|
|
|
--zsh <($out/bin/qrcp completion zsh)
|
2021-04-19 18:16:41 +02:00
|
|
|
'';
|
|
|
|
|
2020-09-22 22:06:11 +02: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;
|
2022-03-12 00:12:11 +01:00
|
|
|
maintainers = with maintainers; [ fgaz SuperSandro2000 ];
|
2020-09-22 22:06:11 +02:00
|
|
|
};
|
|
|
|
}
|