summary refs log tree commit diff
path: root/pkgs/applications/editors/emacs-modes/bbdb
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2011-07-07 21:04:56 +0000
committerPeter Simons <simons@cryp.to>2011-07-07 21:04:56 +0000
commitea4daca60d1196231780ba3dda471519e9f08615 (patch)
treebb942d49742ddae2303b9b89410c95d5d8b902c3 /pkgs/applications/editors/emacs-modes/bbdb
parent5422838e567c4076db935afd6e8fa00c8d46f3b3 (diff)
downloadnixlib-ea4daca60d1196231780ba3dda471519e9f08615.tar
nixlib-ea4daca60d1196231780ba3dda471519e9f08615.tar.gz
nixlib-ea4daca60d1196231780ba3dda471519e9f08615.tar.bz2
nixlib-ea4daca60d1196231780ba3dda471519e9f08615.tar.lz
nixlib-ea4daca60d1196231780ba3dda471519e9f08615.tar.xz
nixlib-ea4daca60d1196231780ba3dda471519e9f08615.tar.zst
nixlib-ea4daca60d1196231780ba3dda471519e9f08615.zip
pkgs/applications/editors/emacs-modes/bbdb: replace custom build script with standard builder
Also added most of optional contributions shipped in the release tarball to the
installation.

svn path=/nixpkgs/trunk/; revision=27646
Diffstat (limited to 'pkgs/applications/editors/emacs-modes/bbdb')
-rw-r--r--pkgs/applications/editors/emacs-modes/bbdb/builder.sh12
-rw-r--r--pkgs/applications/editors/emacs-modes/bbdb/default.nix15
2 files changed, 14 insertions, 13 deletions
diff --git a/pkgs/applications/editors/emacs-modes/bbdb/builder.sh b/pkgs/applications/editors/emacs-modes/bbdb/builder.sh
deleted file mode 100644
index b860adbb745f..000000000000
--- a/pkgs/applications/editors/emacs-modes/bbdb/builder.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-source "$stdenv/setup" || exit 1
-
-unpackPhase &&							\
-cd bbdb-*.* && patchPhase &&					\
-./configure --prefix="$out"					\
-            --with-package-dir="$out/share/emacs/site-lisp" &&	\
-make && make install-pkg &&					\
-mkdir -p "$out/info" &&						\
-make -C texinfo install-pkg &&					\
-mv "$out/share/emacs/site-lisp/lisp/bbdb/"*			\
-   "$out/share/emacs/site-lisp" &&				\
-rm -rf "$out/share/emacs/site-lisp/lisp"
diff --git a/pkgs/applications/editors/emacs-modes/bbdb/default.nix b/pkgs/applications/editors/emacs-modes/bbdb/default.nix
index 51474a197174..52afebc6297b 100644
--- a/pkgs/applications/editors/emacs-modes/bbdb/default.nix
+++ b/pkgs/applications/editors/emacs-modes/bbdb/default.nix
@@ -11,7 +11,20 @@ stdenv.mkDerivation {
   patches = [ ./install-infodir.patch ];
 
   buildInputs = [emacs texinfo ctags];
-  builder = ./builder.sh;
+  configureFlags = "--with-package-dir=$$out/share/emacs/site-lisp";
+  preInstall = "ensureDir $out/info";
+  installTargets = "install-pkg texinfo";
+  postInstall = ''
+    mv  $out/info $out/share/
+    mv "$out/share/emacs/site-lisp/lisp/bbdb/"* $out/share/emacs/site-lisp/
+    mv $out/share/emacs/site-lisp/etc/bbdb $out/share/
+    rm -rf $out/share/emacs/site-lisp/{lisp,etc}
+    mv bits $out/share/bbdb/
+    # Make optional modules from bbdb available for import, but symlink
+    # them into the site-lisp directory to make it obvious that they are
+    # not a genuine part of the distribution.
+    ln -s "$out/share/bbdb/bits/"*.el $out/share/emacs/site-lisp/
+  '';
 
   meta = {
     description = "The Insidious Big Brother Database (BBDB), a contact management utility for Emacs";