about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEdward Tjörnhammar <ed@cflags.cc>2015-01-25 10:21:42 +0100
committerEdward Tjörnhammar <ed@cflags.cc>2015-01-25 10:21:42 +0100
commit0691a2c915988cc0196a5aa2b1297a41e4eed2c1 (patch)
treed88f072174a8aa85d8d9662544f574d404ad1b8d
parent45a34f65fe143f0e68e74719165d3935ba5731d4 (diff)
parent4f189f04cadd1f7fa3617a573bc8f57e8b3c9955 (diff)
downloadnixlib-0691a2c915988cc0196a5aa2b1297a41e4eed2c1.tar
nixlib-0691a2c915988cc0196a5aa2b1297a41e4eed2c1.tar.gz
nixlib-0691a2c915988cc0196a5aa2b1297a41e4eed2c1.tar.bz2
nixlib-0691a2c915988cc0196a5aa2b1297a41e4eed2c1.tar.lz
nixlib-0691a2c915988cc0196a5aa2b1297a41e4eed2c1.tar.xz
nixlib-0691a2c915988cc0196a5aa2b1297a41e4eed2c1.tar.zst
nixlib-0691a2c915988cc0196a5aa2b1297a41e4eed2c1.zip
Merge pull request #5919 from pjones/feature/pwsafe
New package: pwsafe (Password Safe)
-rw-r--r--lib/maintainers.nix1
-rw-r--r--pkgs/applications/misc/pwsafe/default.nix80
-rw-r--r--pkgs/top-level/all-packages.nix5
3 files changed, 86 insertions, 0 deletions
diff --git a/lib/maintainers.nix b/lib/maintainers.nix
index e3095bdb4971..832191fe9656 100644
--- a/lib/maintainers.nix
+++ b/lib/maintainers.nix
@@ -132,6 +132,7 @@
   phreedom = "Evgeny Egorochkin <phreedom@yandex.ru>";
   pierron = "Nicolas B. Pierron <nixos@nbp.name>";
   piotr = "Piotr Pietraszkiewicz <ppietrasa@gmail.com>";
+  pjones = "Peter Jones <pjones@devalot.com>";
   pkmx = "Chih-Mao Chen <pkmx.tw@gmail.com>";
   plcplc = "Philip Lykke Carlsen <plcplc@gmail.com>";
   prikhi = "Pavan Rikhi <pavan.rikhi@gmail.com>";
diff --git a/pkgs/applications/misc/pwsafe/default.nix b/pkgs/applications/misc/pwsafe/default.nix
new file mode 100644
index 000000000000..a1538c69932e
--- /dev/null
+++ b/pkgs/applications/misc/pwsafe/default.nix
@@ -0,0 +1,80 @@
+{ stdenv, fetchurl, wxGTK, libuuid, xercesc, zip , libXt, libXtst
+, libXi, xextproto, gettext, perl, pkgconfig, libyubikey, ykpers
+}:
+
+stdenv.mkDerivation rec {
+  name = "pwsafe-${version}";
+  version = "0.95";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/passwordsafe/pwsafe-${version}BETA-src.tgz";
+    sha256 = "f0b081bc358fee97fce20f352e360960d2813989023b837102b90ba6ed787d46";
+  };
+
+  makefile = "Makefile.linux";
+  makeFlags = "YBPERS_LIBPATH=${ykpers}/lib";
+
+  buildFlags = "unicoderelease";
+  buildInputs = [ wxGTK libuuid gettext perl zip
+                  xercesc libXt libXtst libXi xextproto
+                  pkgconfig libyubikey ykpers ];
+
+  postPatch = ''
+    # Fix perl scripts used during the build.
+    for f in `find . -type f -name '*.pl'`; do
+      patchShebangs $f
+    done
+
+    # Fix hard coded paths.
+    for f in `grep -Rl /usr/share/ src`; do
+      substituteInPlace $f --replace /usr/share/ $out/share/
+    done
+
+    for f in `grep -Rl /usr/bin/ .`; do
+      substituteInPlace $f --replace /usr/bin/ ""
+    done
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin \
+             $out/share/applications \
+             $out/share/pwsafe/xml \
+             $out/share/icons/hicolor/48x48/apps \
+             $out/share/doc/passwordsafe/help \
+             $out/share/man/man1 \
+             $out/share/locale
+
+    (cd help && make -f Makefile.linux)
+    cp help/help.zip $out/share/doc/passwordsafe/help
+
+    (cd src/ui/wxWidgets/I18N && make mos)
+    cp -dr src/ui/wxWidgets/I18N/mos/* $out/share/locale/
+    # */
+
+    cp README.txt docs/ReleaseNotes.txt docs/ChangeLog.txt \
+      LICENSE install/copyright $out/share/doc/passwordsafe
+
+    cp src/ui/wxWidgets/GCCUnicodeRelease/pwsafe $out/bin/
+    cp install/graphics/pwsafe.png $out/share/icons/hicolor/48x48/apps
+    cp docs/pwsafe.1 $out/share/man/man1
+    cp xml/* $out/share/pwsafe/xml
+    #  */
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Password Safe is a password database utility";
+
+    longDescription = ''
+      Password Safe is a password database utility. Like many other
+      such products, commercial and otherwise, it stores your
+      passwords in an encrypted file, allowing you to remember only
+      one password (the "safe combination"), instead of all the
+      username/password combinations that you use.
+    '';
+
+    homepage = http://passwordsafe.sourceforge.net/;
+    maintainers = with maintainers; [ pjones ];
+    platforms = platforms.linux;
+    license = licenses.artistic2;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index fb92cebb0822..f99189b38173 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1948,6 +1948,11 @@ let
 
   pnmixer = callPackage ../tools/audio/pnmixer { };
 
+  pwsafe = callPackage ../applications/misc/pwsafe {
+    inherit (xlibs) libXt libXtst libXi xextproto;
+    wxGTK = wxGTK30;
+  };
+
   nifskope = callPackage ../tools/graphics/nifskope { };
 
   nilfs-utils = callPackage ../tools/filesystems/nilfs-utils {};