depot/pkgs/applications/misc/clipqr/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

75 lines
1.4 KiB
Nix

{ buildGoModule
, copyDesktopItems
, fetchFromGitLab
, lib
, libGL
, libX11
, libXcursor
, libXext
, libXi
, libXinerama
, libXrandr
, libXxf86vm
, makeDesktopItem
, mesa
, pkg-config
, stdenv
}:
buildGoModule rec {
pname = "clipqr";
version = "1.3.0";
src = fetchFromGitLab {
owner = "imatt-foss";
repo = "clipqr";
rev = "v${version}";
hash = "sha256-iuA6RqclMm1CWaiM1kpOpgfYvKaYGOIwFQkLr/nCL5M=";
};
vendorHash = null;
ldflags = [ "-s" "-w" ];
buildInputs = [
libGL
libX11
libXcursor
libXext
libXi
libXinerama
libXrandr
libXxf86vm
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";
broken = stdenv.hostPlatform.isDarwin;
mainProgram = "clipqr";
};
}