at 18.09-beta 72 lines 2.7 kB view raw
1{ stdenv, fetchurl, openssl }: 2stdenv.mkDerivation rec { 3 name = "apg-2.3.0b"; 4 src = fetchurl { 5 url = "http://www.adel.nursat.kz/apg/download/${name}.tar.gz"; 6 sha256 = "14lbq81xrcsmpk1b9qmqyz7n6ypf08zcxvcvp6f7ybcyf0lj1rfi"; 7 }; 8 configurePhase = '' 9 substituteInPlace Makefile --replace /usr/local "$out" 10 ''; 11 makeFlags = stdenv.lib.optionals stdenv.isDarwin ["CC=cc"]; 12 13 patches = [ 14 ./apg.patch 15 ./phony-install-target.patch 16 ]; 17 18 postPatch = stdenv.lib.optionalString stdenv.isDarwin '' 19 sed -i -e 's|APG_CLIBS += -lcrypt|APG_CLIBS += -L${openssl.out}/lib -lcrypto|' Makefile 20 ''; 21 22 meta = { 23 description = "Tools for random password generation"; 24 longDescription = '' 25 APG (Automated Password Generator) is the tool set for random 26 password generation. 27 28 Standalone version 29 30 Generates some random words of required type and prints them 31 to standard output. 32 33 Network version 34 35 APG server: When client's request is arrived generates some 36 random words of predefined type and send them to client over 37 the network (according to RFC0972). 38 39 APG client: Sends the password generation request to the APG 40 server, wait for generated Passwords arrival and then prints 41 them to the standard output. 42 43 Advantages 44 45 * Built-in ANSI X9.17 RNG (Random Number Generator) (CAST/SHA1) 46 * Built-in password quality checking system (it has support for 47 Bloom filter for faster access) 48 * Two Password Generation Algorithms: 49 1. Pronounceable Password Generation Algorithm (according to 50 NIST FIPS 181) 51 2. Random Character Password Generation Algorithm with 35 52 configurable modes of operation 53 * Configurable password length parameters 54 * Configurable amount of generated passwords 55 * Ability to initialize RNG with user string 56 * Support for /dev/random 57 * Ability to crypt() generated passwords and print them as 58 additional output 59 * Special parameters to use APG in script 60 * Ability to log password generation requests for network version 61 * Ability to control APG service access using tcpd 62 * Ability to use password generation service from any type of box 63 (Mac, WinXX, etc.) that connected to network 64 * Ability to enforce remote users to use only allowed type of 65 password generation 66 ''; 67 homepage = http://www.adel.nursat.kz/apg/; 68 license = stdenv.lib.licenses.bsd3; 69 maintainers = with stdenv.lib.maintainers; [ astsmtl ]; 70 platforms = stdenv.lib.platforms.unix; 71 }; 72}