mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 07:34:11 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
76 lines
1.4 KiB
Nix
76 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";
|
|
};
|
|
}
|