diff options
Diffstat (limited to 'pkgs/tools/security')
-rw-r--r-- | pkgs/tools/security/muscleframework/default.nix | 31 | ||||
-rw-r--r-- | pkgs/tools/security/muscletool/default.nix | 20 | ||||
-rw-r--r-- | pkgs/tools/security/opensc-dnie-wrapper/default.nix | 67 | ||||
-rw-r--r-- | pkgs/tools/security/pamtester/default.nix | 20 | ||||
-rw-r--r-- | pkgs/tools/security/pinentry-mac/default.nix | 26 |
5 files changed, 46 insertions, 118 deletions
diff --git a/pkgs/tools/security/muscleframework/default.nix b/pkgs/tools/security/muscleframework/default.nix deleted file mode 100644 index c1b9dad91ff4..000000000000 --- a/pkgs/tools/security/muscleframework/default.nix +++ /dev/null @@ -1,31 +0,0 @@ -# The tarball has different plugins in it, and as I don't need all of them, -# I only build one of those in this derivation -# This is an arbitrary decision, and this simplicity fit my needs. -# Anyone can extend the extension to build all the plugins, or to make -# different derivations for each plugin. - -{stdenv, fetchurl, libmusclecard, pkgconfig, pcsclite}: -stdenv.mkDerivation { - name = "muscleframework-mcardplugin-1.1.7"; - - src = fetchurl { - url = https://alioth.debian.org/frs/download.php/3056/muscleframework-1.1.7.tar.gz; - sha256 = "081sq25fa3k1gz0asq2995krx7pzxbfq5vx1ahsd5sbmwnplv94v"; - }; - - preConfigure = '' - cd MCardPlugin - configureFlags="$configureFlags --enable-muscledropdir=$out/pcsc/services" - ''; - - buildInputs = [ libmusclecard pkgconfig pcsclite]; - - meta = with stdenv.lib; { - description = "MUSCLE smart card framework - mcard plugin"; - homepage = http://muscleplugins.alioth.debian.org/; - license = licenses.bsd3; - maintainers = with maintainers; [viric]; - # XXX: don't build before libmusclecard is fixed - # platforms = with stdenv.lib.platforms; linux; - }; -} diff --git a/pkgs/tools/security/muscletool/default.nix b/pkgs/tools/security/muscletool/default.nix deleted file mode 100644 index 34f75609e4ff..000000000000 --- a/pkgs/tools/security/muscletool/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{stdenv, fetchurl, libmusclecard, pcsclite, pkgconfig }: -stdenv.mkDerivation { - name = "muscletool-2.1.1"; - - src = fetchurl { - url = https://alioth.debian.org/frs/download.php/3180/muscletool-2.1.1.tar.bz2; - sha256 = "11d812ijvhsaxwkr05hzxfl0n6ji9hwl5j1kv56f9gv8kyy3b9kw"; - }; - - buildInputs = [ libmusclecard pcsclite pkgconfig ]; - - meta = with stdenv.lib; { - description = "Smart card applications for use with MUSCLE plugins"; - homepage = http://muscleapps.alioth.debian.org/; - license = licenses.bsd3; - maintainers = with maintainers; [viric]; - # XXX: don't build before libmusclecard is fixed - # platforms = with stdenv.lib.platforms; linux; - }; -} diff --git a/pkgs/tools/security/opensc-dnie-wrapper/default.nix b/pkgs/tools/security/opensc-dnie-wrapper/default.nix deleted file mode 100644 index 8003073159a9..000000000000 --- a/pkgs/tools/security/opensc-dnie-wrapper/default.nix +++ /dev/null @@ -1,67 +0,0 @@ -{stdenv, makeWrapper, ed, libopensc_dnie}: - -let - opensc = libopensc_dnie.opensc; -in -stdenv.mkDerivation rec { - name = "${opensc.name}-dnie-wrapper"; - - buildInputs = [ makeWrapper ]; - - phases = [ "installPhase" ]; - - installPhase = '' - mkdir -p $out/etc - cp ${opensc}/etc/opensc.conf $out/etc - chmod +w $out/etc/opensc.conf - - # NOTE: The libopensc-dnie.so driver requires /usr/bin/pinentry available, to sign - - ${ed}/bin/ed $out/etc/opensc.conf << EOF - /card_drivers - a - card_drivers = dnie; - card_driver dnie { - module = ${libopensc_dnie}/lib/libopensc-dnie.so; - } - . - w - q - EOF - - # Disable pkcs15 file caching, otherwise the card does not work - sed -i 's/use_caching = true/use_caching = false/' $out/etc/opensc.conf - - for a in ${opensc}/bin/*; do - makeWrapper $a $out/bin/`basename $a` \ - --set OPENSC_CONF $out/etc/opensc.conf - done - - # Special wrapper for pkcs11-tool, which needs an additional parameter - rm $out/bin/pkcs11-tool - makeWrapper ${opensc}/bin/pkcs11-tool $out/bin/pkcs11-tool \ - --set OPENSC_CONF $out/etc/opensc.conf \ - --add-flags "--module ${opensc}/lib/opensc-pkcs11.so" - - # Add, as bonus, a wrapper for the firefox in the PATH, that loads the - # proper opensc configuration. - cat > $out/bin/firefox-dnie << EOF - #!${stdenv.shell} - export OPENSC_CONF=$out/etc/opensc.conf - exec firefox - EOF - chmod +x $out/bin/firefox-dnie - ''; - - meta = { - description = "Access to the opensc tools and firefox using the Spanish national ID SmartCard"; - longDescription = '' - Opensc needs a special configuration and special drivers to use the SmartCard - the Spanish government provides to the citizens as ID card. - Some wrapper scripts take care for the proper opensc configuration to be used, in order - to access the certificates in the SmartCard through the opensc tools or firefox. - Opensc will require a pcscd daemon running, managing the access to the card reader. - ''; - maintainers = with stdenv.lib.maintainers; [viric]; - }; -} diff --git a/pkgs/tools/security/pamtester/default.nix b/pkgs/tools/security/pamtester/default.nix new file mode 100644 index 000000000000..cdafed534085 --- /dev/null +++ b/pkgs/tools/security/pamtester/default.nix @@ -0,0 +1,20 @@ +{ stdenv, fetchurl, pam }: + +stdenv.mkDerivation rec { + name = "pamtester-0.1.2"; + + src = fetchurl { + url = "mirror://sourceforge/pamtester/${name}.tar.gz"; + sha256 = "1mdj1wj0adcnx354fs17928yn2xfr1hj5mfraq282dagi873sqw3"; + }; + + buildInputs = [ pam ]; + + meta = with stdenv.lib; { + description = "Utility program to test the PAM facility."; + homepage = http://pamtester.sourceforge.net/; + license = licenses.bsd3; + platforms = platforms.linux; + maintainers = with maintainers; [ abbradar ]; + }; +} diff --git a/pkgs/tools/security/pinentry-mac/default.nix b/pkgs/tools/security/pinentry-mac/default.nix new file mode 100644 index 000000000000..faf8c613ea83 --- /dev/null +++ b/pkgs/tools/security/pinentry-mac/default.nix @@ -0,0 +1,26 @@ +{ fetchurl, stdenv }: + +stdenv.mkDerivation rec { + name = "pinentry-mac-0.9.4"; + + src = fetchurl { + url = "https://github.com/GPGTools/pinentry-mac/archive/v0.9.4.tar.gz"; + sha256 = "037ebb010377d3a3879ae2a832cefc4513f5c397d7d887d7b86b4e5d9a628271"; + }; + + postPatch = '' + substituteInPlace ./Makefile --replace "xcodebuild" "/usr/bin/xcodebuild" + ''; + + installPhase = '' + mkdir -p $out/Applications + mv build/Release/pinentry-mac.app $out/Applications + ''; + + meta = { + description = "Pinentry for GPG on Mac"; + license = stdenv.lib.licenses.gpl2Plus; + homepage = "https://github.com/GPGTools/pinentry-mac"; + platforms = stdenv.lib.platforms.darwin; + }; +} |