nixpkgs/pkgs/applications/misc/clipqr/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

74 lines
1.3 KiB
Nix
Raw Normal View History

{ buildGoModule
, copyDesktopItems
, fetchFromGitLab
, lib
, libGL
, libX11
, libXcursor
, libXext
, libXi
, libXinerama
, libXrandr
, makeDesktopItem
, mesa
, pkg-config
2022-11-07 22:30:18 +01:00
, stdenv
}:
buildGoModule rec {
pname = "clipqr";
2023-12-22 11:45:11 +01:00
version = "1.2.0";
src = fetchFromGitLab {
owner = "imatt-foss";
repo = "clipqr";
rev = "v${version}";
2023-12-22 11:45:11 +01:00
hash = "sha256-gfKCuTZY9VsiXMlw6XX6YylMO4xGoLQU/5QvnDV7GbE=";
};
2023-05-26 04:54:26 +02:00
vendorHash = null;
ldflags = [ "-s" "-w" ];
buildInputs = [
libGL
libX11
libXcursor
libXext
libXi
libXinerama
libXrandr
mesa
];
nativeBuildInputs = [
copyDesktopItems
pkg-config
];
postInstall = ''
install -Dm644 icon.svg $out/share/icons/hicolor/scalable/apps/clipqr.svg
'';
desktopItems = [
(makeDesktopItem {
name = "ClipQR";
desktopName = "ClipQR";
exec = "clipqr";
categories = [ "Utility" ];
icon = "clipqr";
comment = "Scan QR codes on screen and from camera";
genericName = "ClipQR";
})
];
meta = with lib; {
description = "Scan QR codes on screen and from camera, the result is in your clipboard";
license = licenses.mit;
maintainers = with maintainers; [ MatthieuBarthel ];
homepage = "https://gitlab.com/imatt-foss/clipqr";
2022-11-07 22:30:18 +01:00
broken = stdenv.isDarwin;
2024-02-11 03:19:15 +01:00
mainProgram = "clipqr";
};
}