From b0ff9c067c30635c61db04b0ccba708d9568ea05 Mon Sep 17 00:00:00 2001 From: maggesi Date: Tue, 10 Nov 2009 11:02:45 +0000 Subject: [PATCH] Add package ledger git-svn-id: https://svn.nixos.org/repos/nix/nixpkgs/trunk@18316 70bd8c7a-acb8-0310-9f0d-9cc1c95dcdbb --- pkgs/applications/office/ledger/default.nix | 46 +++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 2 files changed, 50 insertions(+) create mode 100644 pkgs/applications/office/ledger/default.nix diff --git a/pkgs/applications/office/ledger/default.nix b/pkgs/applications/office/ledger/default.nix new file mode 100644 index 000000000..c6c2fd4d1 --- /dev/null +++ b/pkgs/applications/office/ledger/default.nix @@ -0,0 +1,46 @@ +# TODO: fix a problem with patchelf(?) + +{stdenv, fetchurl, emacs, gmp, pcre}: + +let + + pname = "ledger"; + version = "2.6.1"; + name = "${pname}-${version}"; + +in + +stdenv.mkDerivation { + inherit name; + + src = fetchurl { + url = "mirror://sourceforge/${pname}/${name}.tar.gz"; + sha256 = "96830d77d3aa6bf6c5778f5dd52169f9b5203fb7daad0e12831abeb35b14f27a"; + }; + + buildInputs = [ emacs gmp pcre ]; + + # Something goes wrong with pathelf... + # this is a small workaround: adds a small shell script for + # setting LD_LIBRARY_PATH + postInstall = '' + cd $out/bin + mv ledger ledger.bin + echo "#!/bin/sh" > ledger + echo "LD_LIBRARY_PATH=$out/lib $out/bin/ledger.bin "'"$@"' >> ledger + chmod +x ledger + ''; + + meta = { + description = + "A double-entry accounting system with a command-line reporting interface"; + longDescription = '' + Ledger is a powerful, double-entry accounting system that is accessed + from the UNIX command-line. This may put off some users, as there is + no flashy UI, but for those who want unparalleled reporting access to + their data, there really is no alternative. + ''; + homepage = http://wiki.github.com/jwiegley/ledger; + license = "BSD"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 828acee4f..0f4467ba3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7240,6 +7240,10 @@ let inherit fetchurl stdenv; }; + ledger = import ../applications/office/ledger { + inherit stdenv fetchurl emacs gmp pcre; + }; + links2 = (builderDefsPackage ../applications/networking/browsers/links2) { inherit fetchurl stdenv bzip2 zlib libjpeg libpng libtiff gpm openssl SDL SDL_image SDL_net pkgconfig; -- 2.11.4.GIT