2022-07-20 18:01:37 +02:00
|
|
|
{ buildGoModule
|
|
|
|
, copyDesktopItems
|
|
|
|
, fetchFromGitLab
|
|
|
|
, lib
|
|
|
|
, libGL
|
|
|
|
, libX11
|
|
|
|
, libXcursor
|
|
|
|
, libXext
|
|
|
|
, libXi
|
|
|
|
, libXinerama
|
|
|
|
, libXrandr
|
|
|
|
, makeDesktopItem
|
|
|
|
, mesa
|
|
|
|
, pkg-config
|
2022-11-07 22:30:18 +01:00
|
|
|
, stdenv
|
2022-07-20 18:01:37 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "clipqr";
|
2023-12-22 11:45:11 +01:00
|
|
|
version = "1.2.0";
|
2022-07-20 18:01:37 +02:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "imatt-foss";
|
|
|
|
repo = "clipqr";
|
|
|
|
rev = "v${version}";
|
2023-12-22 11:45:11 +01:00
|
|
|
hash = "sha256-gfKCuTZY9VsiXMlw6XX6YylMO4xGoLQU/5QvnDV7GbE=";
|
2022-07-20 18:01:37 +02:00
|
|
|
};
|
|
|
|
|
2023-05-26 04:54:26 +02:00
|
|
|
vendorHash = null;
|
2022-07-20 18:01:37 +02:00
|
|
|
|
|
|
|
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";
|
2022-07-20 18:01:37 +02:00
|
|
|
};
|
|
|
|
}
|