mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-23 05:14:45 +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.
41 lines
1.2 KiB
Nix
41 lines
1.2 KiB
Nix
{ lib, libnotify, gpgme, buildGoModule, fetchFromGitHub, pkg-config }:
|
|
|
|
buildGoModule rec {
|
|
pname = "yubikey-touch-detector";
|
|
version = "1.11.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "maximbaz";
|
|
repo = "yubikey-touch-detector";
|
|
rev = version;
|
|
hash = "sha256-XpaCKNQpQD9dNj4EOGJ6PdjfSAxxG5dC8mIzYr7t/+I=";
|
|
};
|
|
vendorHash = "sha256-mhmYTicj/ihGNzeCZd1ZijWPkvxQZjBxaC5dyAU1O7U=";
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ libnotify gpgme ];
|
|
|
|
postInstall = ''
|
|
install -Dm444 -t $out/share/doc/${pname} *.{md,example}
|
|
|
|
install -Dm444 -t $out/share/licenses/${pname} LICENSE
|
|
|
|
install -Dm444 -t $out/share/icons/hicolor/128x128/apps yubikey-touch-detector.png
|
|
|
|
install -Dm444 -t $out/lib/systemd/user *.{service,socket}
|
|
|
|
substituteInPlace $out/lib/systemd/user/*.service \
|
|
--replace /usr/bin/yubikey-touch-detector "$out/bin/yubikey-touch-detector"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Tool to detect when your YubiKey is waiting for a touch";
|
|
homepage = "https://github.com/maximbaz/yubikey-touch-detector";
|
|
maintainers = with maintainers; [ sumnerevans ];
|
|
license = licenses.isc;
|
|
platforms = platforms.linux;
|
|
mainProgram = "yubikey-touch-detector";
|
|
};
|
|
}
|