From df44f88516d608894fcc3ff5231f717ede80266f Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Tue, 10 Nov 2020 11:46:33 +0100 Subject: [PATCH] Track hledger from master --- configurations/hledger.nix | 25 +++++++++++++++++++++++++ profiles/common.nix | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 configurations/hledger.nix diff --git a/configurations/hledger.nix b/configurations/hledger.nix new file mode 100644 index 00000000..2b47ce25 --- /dev/null +++ b/configurations/hledger.nix @@ -0,0 +1,25 @@ +{ pkgs, ... }: +let + hledger-repo = pkgs.fetchFromGitHub { + owner = "simonmichael"; + repo = "hledger"; + rev = "76dd4d83bc114974fe498578971d9100be521d7a"; + sha256 = "109b52adhfsxh2zskjxy63xsw1mhn844ddq09b6llqz21h71wsmx"; + }; +in +{ + nixpkgs.overlays = [ + (self: super: { + haskellPackages = super.haskellPackages.override { + overrides = hself: hsuper: rec { + hledger = hsuper.callCabal2nixWithOptions "hledger" hledger-repo "--subpath hledger" { }; + hledger-lib = hsuper.callCabal2nixWithOptions "hledger-lib" hledger-repo "--subpath hledger-lib" { }; + }; + }; + }) + ]; + + home-manager.users.charlotte = { pkgs, ... }: { + home.packages = [ pkgs.hledger ]; + }; +} diff --git a/profiles/common.nix b/profiles/common.nix index 4190361c..4a1649a6 100644 --- a/profiles/common.nix +++ b/profiles/common.nix @@ -6,6 +6,7 @@ ../configurations/direnv.nix ../configurations/git.nix ../configurations/gnupg.nix + ../configurations/hledger.nix ../configurations/locale.nix ../configurations/mail.nix ../configurations/neovim.nix @@ -25,7 +26,6 @@ home-manager.useGlobalPkgs = true; home-manager.users.charlotte = { pkgs, ... }: { home.packages = with pkgs; [ - hledger htop moreutils ncdu