mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-09 14:33:22 +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.
45 lines
1.0 KiB
Nix
45 lines
1.0 KiB
Nix
{ coreutils, fetchFromGitHub, file, libcaca, makeWrapper, python3, openssl, qrencode, lib, 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";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
dontBuild = true;
|
|
|
|
installPhase =
|
|
let
|
|
path = lib.makeBinPath [
|
|
coreutils
|
|
file
|
|
libcaca.bin
|
|
openssl.bin
|
|
python3
|
|
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 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 ];
|
|
mainProgram = "gen-oath-safe";
|
|
};
|
|
|
|
}
|