From 418baf49783ea414650de33fac31a96b1e1354c1 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Tue, 3 Sep 2024 22:50:46 +0400 Subject: [PATCH 1/2] =?UTF-8?q?qrcp:=200.11.2=20=E2=86=92=200.11.3,=20fix?= =?UTF-8?q?=20cross=20compilation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/tools/networking/qrcp/default.nix | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/networking/qrcp/default.nix b/pkgs/tools/networking/qrcp/default.nix index c9b463d252989..748412e17cba6 100644 --- a/pkgs/tools/networking/qrcp/default.nix +++ b/pkgs/tools/networking/qrcp/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , buildGoModule , fetchFromGitHub , installShellFiles @@ -6,32 +7,34 @@ buildGoModule rec { pname = "qrcp"; - version = "0.11.2"; + version = "0.11.3"; src = fetchFromGitHub { owner = "claudiodangelis"; repo = "qrcp"; rev = version; - hash = "sha256-BuZn+7gTjsHTUDu33JXTrntb5LUzcq3ZsmgFg+6ivZg="; + hash = "sha256-MmWBcDtZUDX5IV7XXifBp7KfeRh+0qU4vdfCoMv/UNk="; }; vendorHash = "sha256-lqGPPyoSO12MyeYIuYcqDVHukj7oR3zmHgsS6SxY3yo="; subPackages = [ "." ]; + ldflags = [ "-s" "-w" "-X github.com/claudiodangelis/qrcp/version.version=${version}" ]; + nativeBuildInputs = [ installShellFiles ]; - postInstall = '' + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 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/"; + meta = { + homepage = "https://qrcp.sh/"; 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 @@ -39,8 +42,8 @@ buildGoModule rec { handler serves the content and exits the program when the transfer is complete. ''; - license = licenses.mit; - maintainers = with maintainers; [ fgaz ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fgaz ]; mainProgram = "qrcp"; }; } From dcb32231391a6b2e039ab672883f21d679806ae0 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Tue, 3 Sep 2024 22:51:56 +0400 Subject: [PATCH 2/2] qrcp: migrate to by-name --- .../networking/qrcp/default.nix => by-name/qr/qrcp/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{tools/networking/qrcp/default.nix => by-name/qr/qrcp/package.nix} (100%) diff --git a/pkgs/tools/networking/qrcp/default.nix b/pkgs/by-name/qr/qrcp/package.nix similarity index 100% rename from pkgs/tools/networking/qrcp/default.nix rename to pkgs/by-name/qr/qrcp/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c734ccfa53581..49e87c02c9780 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11874,8 +11874,6 @@ with pkgs; qprint = callPackage ../tools/text/qprint { }; - qrcp = callPackage ../tools/networking/qrcp { }; - qrscan = callPackage ../tools/misc/qrscan { }; qtikz = libsForQt5.callPackage ../applications/graphics/ktikz { };