From 109068c605035f0ff6d72a1d8a01ea28718b9a58 Mon Sep 17 00:00:00 2001 From: Alexander Tsamutali Date: Sun, 5 Feb 2012 21:02:27 +0000 Subject: [PATCH] applications/misc/goldendict: New nixpkg. svn path=/nixpkgs/trunk/; revision=32045 --- pkgs/applications/misc/goldendict/default.nix | 31 +++++++++++++++++++ .../misc/goldendict/goldendict-paths.diff | 10 ++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 43 insertions(+) create mode 100644 pkgs/applications/misc/goldendict/default.nix create mode 100644 pkgs/applications/misc/goldendict/goldendict-paths.diff diff --git a/pkgs/applications/misc/goldendict/default.nix b/pkgs/applications/misc/goldendict/default.nix new file mode 100644 index 000000000000..881f5339bdf8 --- /dev/null +++ b/pkgs/applications/misc/goldendict/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchurl, qt4, libXtst, libvorbis, phonon, hunspell }: +stdenv.mkDerivation rec { + name = "goldendict-1.0.1"; + src = fetchurl { + url = "mirror://sourceforge/goldendict/${name}-src.tar.bz2"; + sha256 = "19p99dd5jgs0k66sy30vck7ymqj6dv1lh6w8xw18zczdll2h9yxk"; + }; + buildInputs = [ qt4 libXtst libvorbis phonon hunspell ]; + unpackPhase = '' + mkdir ${name}-src + cd ${name}-src + tar xf ${src} + ''; + patches = [ ./goldendict-paths.diff ]; + patchFlags = "-p 0"; + configurePhase = '' + qmake + ''; + installPhase = '' + make INSTALL_ROOT="$out" install + rm -rf "$out/share/app-install" + ''; + + meta = { + homepage = http://goldendict.org/; + description = "a feature-rich dictionary lookup program"; + + platforms = stdenv.lib.platforms.linux; + maintainers = [ stdenv.lib.maintainers.astsmtl ]; + }; +} diff --git a/pkgs/applications/misc/goldendict/goldendict-paths.diff b/pkgs/applications/misc/goldendict/goldendict-paths.diff new file mode 100644 index 000000000000..6682911dbe42 --- /dev/null +++ b/pkgs/applications/misc/goldendict/goldendict-paths.diff @@ -0,0 +1,10 @@ +--- goldendict.pro~ 2010-12-27 22:52:21.000000000 +0100 ++++ goldendict.pro 2010-12-27 22:52:21.000000000 +0100 +@@ -63,2 +63,2 @@ +- isEmpty( PREFIX ):PREFIX = /usr/local +- DEFINES += PROGRAM_DATA_DIR=\\\"$$PREFIX/share/apps/goldendict/\\\" ++ isEmpty( PREFIX ):PREFIX = / ++ DEFINES += PROGRAM_DATA_DIR=\\\"$$PREFIX/share/goldendict/\\\" +@@ -66 +66 @@ +- locale.path = $$PREFIX/share/apps/goldendict/locale/ ++ locale.path = $$PREFIX/share/goldendict/locale/ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 59030cddcf3e..7d1e8b96cf27 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6806,6 +6806,8 @@ let fossil = callPackage ../applications/version-management/fossil { }; + goldendict = callPackage ../applications/misc/goldendict { }; + grass = import ../applications/misc/grass { inherit (xlibs) libXmu libXext libXp libX11 libXt libSM libICE libXpm libXaw libXrender;