acr-cli: init at 0.14 (#359508)
[NixPkgs.git] / pkgs / by-name / cl / clipqr / package.nix
blob90d4e0b66b5254b46c92c793e1b0122f610be8bb
1 { buildGoModule
2 , copyDesktopItems
3 , fetchFromGitLab
4 , lib
5 , libGL
6 , libX11
7 , libXcursor
8 , libXext
9 , libXi
10 , libXinerama
11 , libXrandr
12 , libXxf86vm
13 , makeDesktopItem
14 , mesa
15 , pkg-config
16 , stdenv
19 buildGoModule rec {
20   pname = "clipqr";
21   version = "1.3.0";
23   src = fetchFromGitLab {
24     owner = "imatt-foss";
25     repo = "clipqr";
26     rev = "v${version}";
27     hash = "sha256-iuA6RqclMm1CWaiM1kpOpgfYvKaYGOIwFQkLr/nCL5M=";
28   };
30   vendorHash = null;
32   ldflags = [ "-s" "-w" ];
34   buildInputs = [
35     libGL
36     libX11
37     libXcursor
38     libXext
39     libXi
40     libXinerama
41     libXrandr
42     libXxf86vm
43     mesa
44   ];
46   nativeBuildInputs = [
47     copyDesktopItems
48     pkg-config
49   ];
51   postInstall = ''
52     install -Dm644 icon.svg $out/share/icons/hicolor/scalable/apps/clipqr.svg
53   '';
55   desktopItems = [
56     (makeDesktopItem {
57       name = "ClipQR";
58       desktopName = "ClipQR";
59       exec = "clipqr";
60       categories = [ "Utility" ];
61       icon = "clipqr";
62       comment = "Scan QR codes on screen and from camera";
63       genericName = "ClipQR";
64     })
65   ];
67   meta = with lib; {
68     description = "Scan QR codes on screen and from camera, the result is in your clipboard";
69     license = licenses.mit;
70     maintainers = with maintainers; [ MatthieuBarthel ];
71     homepage = "https://gitlab.com/imatt-foss/clipqr";
72     broken = stdenv.hostPlatform.isDarwin;
73     mainProgram = "clipqr";
74   };