From 8a653e7cf8094fc306ba95a2df311ad3523f8a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 22 Aug 2021 15:34:10 +0200 Subject: [PATCH] apg: 2.3.0b -> unstable-2015-01-29 Also switch to newer maintained upstream. --- pkgs/tools/security/apg/apg.patch | 44 ------------------- pkgs/tools/security/apg/default.nix | 27 +++++------- .../security/apg/phony-install-target.patch | 11 ----- 3 files changed, 10 insertions(+), 72 deletions(-) delete mode 100644 pkgs/tools/security/apg/apg.patch delete mode 100644 pkgs/tools/security/apg/phony-install-target.patch diff --git a/pkgs/tools/security/apg/apg.patch b/pkgs/tools/security/apg/apg.patch deleted file mode 100644 index abc22647d52..00000000000 --- a/pkgs/tools/security/apg/apg.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -rc apg-2.2.3/Makefile apg-2.2.3-new/Makefile -*** apg-2.2.3/Makefile 2003-08-07 17:40:30.000000000 +0200 ---- apg-2.2.3-new/Makefile 2013-07-24 12:25:31.159938436 +0200 -*************** -*** 113,131 **** - if test -x ./apg; then \ - ./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \ - ./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \ -! ./install-sh -c -m 0755 -o root -g ${FIND_GROUP} ./apg ${INSTALL_PREFIX}${APG_BIN_DIR}; \ - ./install-sh -c -m 0444 ./doc/man/apg.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \ - fi - if test -x ./apgd; then \ - ./mkinstalldirs ${INSTALL_PREFIX}${APGD_BIN_DIR}; \ - ./mkinstalldirs ${INSTALL_PREFIX}${APGD_MAN_DIR}; \ -! ./install-sh -c -m 0755 -o root -g ${FIND_GROUP} ./apgd ${INSTALL_PREFIX}${APGD_BIN_DIR}; \ - ./install-sh -c -m 0444 ./doc/man/apgd.8 ${INSTALL_PREFIX}${APGD_MAN_DIR}; \ - fi - if test -x ./apgbfm; then \ - ./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \ - ./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \ -! ./install-sh -c -m 0755 -o root -g ${FIND_GROUP} ./apgbfm ${INSTALL_PREFIX}${APG_BIN_DIR}; \ - ./install-sh -c -m 0444 ./doc/man/apgbfm.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \ - fi - ---- 113,131 ---- - if test -x ./apg; then \ - ./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \ - ./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \ -! ./install-sh -c -m 0755 ./apg ${INSTALL_PREFIX}${APG_BIN_DIR}; \ - ./install-sh -c -m 0444 ./doc/man/apg.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \ - fi - if test -x ./apgd; then \ - ./mkinstalldirs ${INSTALL_PREFIX}${APGD_BIN_DIR}; \ - ./mkinstalldirs ${INSTALL_PREFIX}${APGD_MAN_DIR}; \ -! ./install-sh -c -m 0755 ./apgd ${INSTALL_PREFIX}${APGD_BIN_DIR}; \ - ./install-sh -c -m 0444 ./doc/man/apgd.8 ${INSTALL_PREFIX}${APGD_MAN_DIR}; \ - fi - if test -x ./apgbfm; then \ - ./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \ - ./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \ -! ./install-sh -c -m 0755 ./apgbfm ${INSTALL_PREFIX}${APG_BIN_DIR}; \ - ./install-sh -c -m 0444 ./doc/man/apgbfm.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \ - fi - diff --git a/pkgs/tools/security/apg/default.nix b/pkgs/tools/security/apg/default.nix index cfcadd75740..a283678e0a1 100644 --- a/pkgs/tools/security/apg/default.nix +++ b/pkgs/tools/security/apg/default.nix @@ -1,25 +1,18 @@ -{ lib, stdenv, fetchurl, openssl }: +{ lib, stdenv, fetchFromGitHub, openssl, autoreconfHook }: stdenv.mkDerivation rec { pname = "apg"; - version = "2.3.0b"; + version = "unstable-2015-01-29"; - src = fetchurl { - url = "http://www.adel.nursat.kz/apg/download/apg-${version}.tar.gz"; - sha256 = "14lbq81xrcsmpk1b9qmqyz7n6ypf08zcxvcvp6f7ybcyf0lj1rfi"; + src = fetchFromGitHub { + owner = "wilx"; + repo = "apg"; + rev = "7ecdbac79156c8864fa3ff8d61e9f1eb264e56c2"; + sha256 = "sha256-+7TrJACdm/i/pc0dsp8edEIOjx8cip+x0Qc2gONajSE="; }; - configurePhase = '' - substituteInPlace Makefile --replace /usr/local "$out" - ''; - makeFlags = ["CC=${stdenv.cc.targetPrefix}cc"]; - patches = [ - ./apg.patch - ./phony-install-target.patch - ]; + nativeBuildInputs = [ autoreconfHook ]; - postPatch = lib.optionalString stdenv.isDarwin '' - sed -i -e 's|APG_CLIBS += -lcrypt|APG_CLIBS += -L${openssl.out}/lib -lcrypto|' Makefile - ''; + buildInputs = [ openssl ]; meta = { description = "Tools for random password generation"; @@ -66,7 +59,7 @@ stdenv.mkDerivation rec { * Ability to enforce remote users to use only allowed type of password generation ''; - homepage = "http://www.adel.nursat.kz/apg/"; + homepage = "https://github.com/wilx/apg"; license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ astsmtl ]; platforms = lib.platforms.unix; diff --git a/pkgs/tools/security/apg/phony-install-target.patch b/pkgs/tools/security/apg/phony-install-target.patch deleted file mode 100644 index 9edf50b4b59..00000000000 --- a/pkgs/tools/security/apg/phony-install-target.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ur a/Makefile b/Makefile ---- a/Makefile 2003-08-08 00:40:39.000000000 +0900 -+++ b/Makefile 2018-04-05 22:29:39.284191020 +0900 -@@ -142,6 +142,7 @@ - strip ${CS_PROGNAME} - strip ${BFM_PROGNAME} - -+.PHONY: install - install: - if test -x ./apg; then \ - ./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \