Skip to content

Commit

Permalink
oath-toolkit: Rename from oathToolkit to oath-toolkit
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronjheng committed Apr 4, 2022
1 parent e0dc072 commit f0c470f
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 15 deletions.
6 changes: 3 additions & 3 deletions nixos/modules/security/pam.nix
Expand Up @@ -476,7 +476,7 @@ let
auth sufficient ${pkgs.pam_usb}/lib/security/pam_usb.so
'' +
(let oath = config.security.pam.oath; in optionalString cfg.oathAuth ''
auth requisite ${pkgs.oathToolkit}/lib/security/pam_oath.so window=${toString oath.window} usersfile=${toString oath.usersFile} digits=${toString oath.digits}
auth requisite ${pkgs.oath-toolkit}/lib/security/pam_oath.so window=${toString oath.window} usersfile=${toString oath.usersFile} digits=${toString oath.digits}
'') +
(let yubi = config.security.pam.yubico; in optionalString cfg.yubicoAuth ''
auth ${yubi.control} ${pkgs.yubico-pam}/lib/security/pam_yubico.so mode=${toString yubi.mode} ${optionalString (yubi.challengeResponsePath != null) "chalresp_path=${yubi.challengeResponsePath}"} ${optionalString (yubi.mode == "client") "id=${toString yubi.id}"} ${optionalString yubi.debug "debug"}
Expand Down Expand Up @@ -1024,7 +1024,7 @@ in
++ optional config.services.sssd.enable pkgs.sssd
++ optionals config.krb5.enable [pam_krb5 pam_ccreds]
++ optionals config.security.pam.enableOTPW [ pkgs.otpw ]
++ optionals config.security.pam.oath.enable [ pkgs.oathToolkit ]
++ optionals config.security.pam.oath.enable [ pkgs.oath-toolkit ]
++ optionals config.security.pam.p11.enable [ pkgs.pam_p11 ]
++ optionals config.security.pam.u2f.enable [ pkgs.pam_u2f ];

Expand Down Expand Up @@ -1111,7 +1111,7 @@ in
mr ${pkgs.pam_usb}/lib/security/pam_usb.so,
'' +
optionalString (isEnabled (cfg: cfg.oathAuth)) ''
"mr ${pkgs.oathToolkit}/lib/security/pam_oath.so,
"mr ${pkgs.oath-toolkit}/lib/security/pam_oath.so,
'' +
optionalString (isEnabled (cfg: cfg.yubicoAuth)) ''
mr ${pkgs.yubico-pam}/lib/security/pam_yubico.so,
Expand Down
2 changes: 1 addition & 1 deletion nixos/tests/pam/pam-oath-login.nix
Expand Up @@ -7,7 +7,7 @@ let
# how many passwords have been made. In this env, we'll always be on
# the 0th counter, so the password is static.
#
# Generated in nix-shell -p oathToolkit
# Generated in nix-shell -p oath-toolkit
# via: oathtool -v -d6 -w10 cdd4083ef8ff1fa9178c6d46bfb1a3
# and picking a the first 4:
oathSnakeOilPassword1 = "143349";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/servers/web-apps/sogo/default.nix
@@ -1,6 +1,6 @@
{ gnustep, lib, fetchFromGitHub, fetchpatch, makeWrapper, python3, lndir
, openssl, openldap, sope, libmemcached, curl, libsodium, libytnef, libzip, pkg-config, nixosTests
, oathToolkit }:
, oath-toolkit }:
gnustep.stdenv.mkDerivation rec {
pname = "SOGo";
version = "5.5.0";
Expand All @@ -13,7 +13,7 @@ gnustep.stdenv.mkDerivation rec {
};

nativeBuildInputs = [ gnustep.make makeWrapper python3 ];
buildInputs = [ gnustep.base sope openssl libmemcached curl libsodium libytnef libzip pkg-config openldap oathToolkit ];
buildInputs = [ gnustep.base sope openssl libmemcached curl libsodium libytnef libzip pkg-config openldap oath-toolkit ];

patches = [
# TODO: take a closer look at other patches in https://sources.debian.org/patches/sogo/ and https://github.com/Skrupellos/sogo-patches
Expand Down
4 changes: 2 additions & 2 deletions pkgs/tools/filesystems/ceph/default.nix
Expand Up @@ -9,7 +9,7 @@
, gtest
, cunit, snappy
, makeWrapper
, leveldb, oathToolkit
, leveldb, oath-toolkit
, libnl, libcap_ng
, rdkafka
, nixosTests
Expand Down Expand Up @@ -161,7 +161,7 @@ in rec {
buildInputs = cryptoLibsMap.${cryptoStr} ++ [
boost ceph-python-env libxml2 optYasm optLibatomic_ops optLibs3
malloc zlib openldap lttng-ust babeltrace gperf gtest cunit
snappy lz4 oathToolkit leveldb libnl libcap_ng rdkafka
snappy lz4 oath-toolkit leveldb libnl libcap_ng rdkafka
cryptsetup sqlite lua icu bzip2
] ++ lib.optionals stdenv.isLinux [
linuxHeaders util-linux libuuid udev keyutils liburing optLibaio optLibxfs optZfs
Expand Down
2 changes: 1 addition & 1 deletion pkgs/tools/security/oath-toolkit/update.sh
Expand Up @@ -5,7 +5,7 @@ set -euo pipefail

nixfile='default.nix'
release_url='https://download.savannah.nongnu.org/releases/oath-toolkit/'
attr='oathToolkit'
attr='oath-toolkit'
command='oathtool --version'

color() {
Expand Down
6 changes: 3 additions & 3 deletions pkgs/tools/security/pass/extensions/otp.nix
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, oathToolkit }:
{ lib, stdenv, fetchFromGitHub, oath-toolkit }:

stdenv.mkDerivation rec {
pname = "pass-otp";
Expand All @@ -11,12 +11,12 @@ stdenv.mkDerivation rec {
sha256 = "0cpqrf3939hcvwg7sd8055ghc8x964ilimlri16czzx188a9jx9v";
};

buildInputs = [ oathToolkit ];
buildInputs = [ oath-toolkit ];

dontBuild = true;

patchPhase = ''
sed -i -e 's|OATH=\$(which oathtool)|OATH=${oathToolkit}/bin/oathtool|' otp.bash
sed -i -e 's|OATH=\$(which oathtool)|OATH=${oath-toolkit}/bin/oathtool|' otp.bash
'';

installFlags = [ "PREFIX=$(out)"
Expand Down
4 changes: 2 additions & 2 deletions pkgs/tools/security/plasma-pass/default.nix
@@ -1,7 +1,7 @@
{ mkDerivation, lib, fetchFromGitLab, cmake, extra-cmake-modules
, ki18n
, kitemmodels
, oathToolkit
, oath-toolkit
, qgpgme
, plasma-framework
, qt5 }:
Expand All @@ -21,7 +21,7 @@ mkDerivation rec {
buildInputs = [
ki18n
kitemmodels
oathToolkit
oath-toolkit
qgpgme
plasma-framework
qt5.qtbase
Expand Down
1 change: 1 addition & 0 deletions pkgs/top-level/aliases.nix
Expand Up @@ -803,6 +803,7 @@ mapAliases ({

### O ###

oathToolkit = oath-toolkit; # Added 2022-04-04
oracleXE = throw "oracleXE has been removed, as it's heavily outdated and unmaintained"; # Added 2020-10-09
OVMF-CSM = throw "OVMF-CSM has been removed in favor of OVMFFull"; # Added 2021-10-16
OVMF-secureBoot = throw "OVMF-secureBoot has been removed in favor of OVMFFull"; # Added 2021-10-16
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Expand Up @@ -8542,7 +8542,7 @@ with pkgs;

oapi-codegen = callPackage ../tools/networking/oapi-codegen { };

oathToolkit = callPackage ../tools/security/oath-toolkit { };
oath-toolkit = callPackage ../tools/security/oath-toolkit { };

oatpp = callPackage ../development/libraries/oatpp { };

Expand Down

0 comments on commit f0c470f

Please sign in to comment.