summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2020-03-27 18:22:52 -0700
committerJohn Wiegley <johnw@newartisans.com>2020-03-27 18:22:52 -0700
commit94922c22b6b337c83b9ce174f6cc9dcc6436feb1 (patch)
tree6ff2ed89148e37931f6e48759ad54d4ca667e8d3
parentab4198a50f7fe476d9d1c7d56fb09669e7839bf5 (diff)
downloadfork-ledger-94922c22b6b337c83b9ce174f6cc9dcc6436feb1.tar.gz
fork-ledger-94922c22b6b337c83b9ce174f6cc9dcc6436feb1.tar.bz2
fork-ledger-94922c22b6b337c83b9ce174f6cc9dcc6436feb1.zip
Update default.nix to match what nixpkgs is using
-rw-r--r--default.nix42
1 files changed, 23 insertions, 19 deletions
diff --git a/default.nix b/default.nix
index ed325223..8fb96e4c 100644
--- a/default.nix
+++ b/default.nix
@@ -1,31 +1,35 @@
-{ stdenv, fetchgit, cmake, boost, gmp, mpfr, libedit, python
-, texinfo, gnused }:
+{ stdenv, fetchFromGitHub, cmake, boost, gmp, mpfr, libedit, python
+, texinfo, gnused, usePython ? true }:
-let
+stdenv.mkDerivation rec {
+ name = "ledger-${version}";
version = "3.1.3";
- rev = "20190331";
-in
-
-stdenv.mkDerivation {
- name = "ledger-${version}-${rev}";
src = ./.;
- buildInputs = [ cmake boost gmp mpfr libedit python texinfo gnused ];
+ buildInputs = [
+ (boost.override { enablePython = usePython; })
+ gmp mpfr libedit python texinfo gnused
+ ];
- enableParallelBuilding = true;
+ nativeBuildInputs = [ cmake ];
- cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" ];
+ enableParallelBuilding = true;
- buildPhase = "make -j$NIX_BUILD_CORES";
- checkPhase = "ctest -j$NIX_BUILD_CORES";
+ cmakeFlags = [
+ "-DCMAKE_INSTALL_LIBDIR=lib"
+ # "-DBUILD_DOCS:BOOL=ON"
+ (stdenv.lib.optionalString usePython "-DUSE_PYTHON=true")
+ ];
- doCheck = true;
+ postBuild = ''
+ make doc
+ '';
- meta = {
- homepage = "http://ledger-cli.org/";
+ meta = with stdenv.lib; {
+ homepage = https://ledger-cli.org/;
description = "A double-entry accounting system with a command-line reporting interface";
- license = stdenv.lib.licenses.bsd3;
+ license = licenses.bsd3;
longDescription = ''
Ledger is a powerful, double-entry accounting system that is accessed
@@ -34,7 +38,7 @@ stdenv.mkDerivation {
their data, there really is no alternative.
'';
- platforms = stdenv.lib.platforms.all;
- maintainers = with stdenv.lib.maintainers; [ the-kenny jwiegley ];
+ platforms = platforms.all;
+ maintainers = with maintainers; [ the-kenny jwiegley ];
};
}