1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-26 07:31:20 +00:00
nixpkgs/pkgs/tools/security/gen-oath-safe/default.nix
volth 46420bbaa3 treewide: name -> pname (easy cases) (#66585)
treewide replacement of

stdenv.mkDerivation rec {
  name = "*-${version}";
  version = "*";

to pname
2019-08-15 13:41:18 +01:00

43 lines
1,012 B
Nix

{ coreutils, fetchFromGitHub, libcaca, makeWrapper, python, openssl, qrencode, stdenv, yubikey-manager }:
stdenv.mkDerivation rec {
pname = "gen-oath-safe";
version = "0.11.0";
src = fetchFromGitHub {
owner = "mcepl";
repo = "gen-oath-safe";
rev = version;
sha256 = "1914z0jgj7lni0nf3hslkjgkv87mhxdr92cmhmbzhpjgjgr23ydp";
};
buildInputs = [ makeWrapper ];
buildPhase = ":";
installPhase =
let
path = stdenv.lib.makeBinPath [
coreutils
libcaca.bin
openssl.bin
python
qrencode
yubikey-manager
];
in
''
mkdir -p $out/bin
cp gen-oath-safe $out/bin/
wrapProgram $out/bin/gen-oath-safe \
--prefix PATH : ${path}
'';
meta = with stdenv.lib; {
homepage = https://github.com/mcepl/gen-oath-safe;
description = "Script for generating HOTP/TOTP keys (and QR code)";
platforms = platforms.unix;
license = licenses.mit;
maintainers = [ maintainers.makefu ];
};
}