mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 03:12:51 +00:00
c456ff1d92
Closes #291088
48 lines
1.2 KiB
Nix
48 lines
1.2 KiB
Nix
{ lib
|
|
, stdenv
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "qrcp";
|
|
version = "0.11.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "claudiodangelis";
|
|
repo = "qrcp";
|
|
rev = version;
|
|
hash = "sha256-BuZn+7gTjsHTUDu33JXTrntb5LUzcq3ZsmgFg+6ivZg=";
|
|
};
|
|
|
|
vendorHash = "sha256-lqGPPyoSO12MyeYIuYcqDVHukj7oR3zmHgsS6SxY3yo=";
|
|
|
|
subPackages = [ "." ];
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
postInstall = ''
|
|
installShellCompletion --cmd qrcp \
|
|
--bash <($out/bin/qrcp completion bash) \
|
|
--fish <($out/bin/qrcp completion fish) \
|
|
--zsh <($out/bin/qrcp completion zsh)
|
|
'';
|
|
|
|
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;
|
|
maintainers = with maintainers; [ fgaz ];
|
|
mainProgram = "qrcp";
|
|
};
|
|
}
|