mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 13:10:33 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
42 lines
1.8 KiB
Nix
42 lines
1.8 KiB
Nix
{ lib, stdenv, fetchurl, mkDerivation, pkgconfig, qtbase, qmake, imagemagick
|
|
, libyubikey, yubikey-personalization }:
|
|
|
|
mkDerivation rec {
|
|
name = "yubikey-personalization-gui-3.1.25";
|
|
|
|
src = fetchurl {
|
|
url = "https://developers.yubico.com/yubikey-personalization-gui/Releases/${name}.tar.gz";
|
|
sha256 = "1knyv5yss8lhzaff6jpfqv12fjf1b8b21mfxzx3qi0hw4nl8n2v8";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkgconfig qmake imagemagick ];
|
|
buildInputs = [ yubikey-personalization qtbase libyubikey ];
|
|
|
|
installPhase = ''
|
|
install -D -m0755 build/release/yubikey-personalization-gui "$out/bin/yubikey-personalization-gui"
|
|
install -D -m0644 resources/lin/yubikey-personalization-gui.1 "$out/share/man/man1/yubikey-personalization-gui.1"
|
|
|
|
# Desktop files
|
|
install -D -m0644 resources/lin/yubikey-personalization-gui.desktop "$out/share/applications/yubikey-personalization-gui.desktop"
|
|
install -D -m0644 resources/lin/yubikey-personalization-gui.desktop "$out/share/pixmaps/yubikey-personalization-gui.xpm"
|
|
|
|
# Icons
|
|
install -D -m0644 resources/lin/yubikey-personalization-gui.png "$out/share/icons/hicolor/128x128/apps/yubikey-personalization-gui.png"
|
|
for SIZE in 16 24 32 48 64 96; do
|
|
# set modify/create for reproducible builds
|
|
convert -scale ''${SIZE} +set date:create +set date:modify \
|
|
resources/lin/yubikey-personalization-gui.png \
|
|
yubikey-personalization-gui.png
|
|
|
|
install -D -m0644 yubikey-personalization-gui.png "$out/share/icons/hicolor/''${SIZE}x''${SIZE}/apps/yubikey-personalization-gui.png"
|
|
done
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://developers.yubico.com/yubikey-personalization-gui";
|
|
description = "A QT based cross-platform utility designed to facilitate reconfiguration of the Yubikey";
|
|
license = licenses.bsd2;
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|