]> git.immae.eu Git - perso/Immae/Config/Nix.git/blame - default.nix
Initial commit
[perso/Immae/Config/Nix.git] / default.nix
CommitLineData
177da38b
IB
1with import <nixpkgs> {};
2let
3 nixpkgs = import <nixpkgs> {};
4 fetchedGithub = path:
5 let
6 json = lib.importJSON path;
7 in rec {
8 version = json.tag;
9 name = "${json.meta.name}-${version}";
10 src = fetchFromGitHub json.github;
11 };
12
13 ledger = (nixpkgs.ledger.override { boost = boost166; }).overrideAttrs (oldAttrs:
14 fetchedGithub ./fetched/ledger.json // {
15 postInstall = "";
16 }
17 );
18
19 taskwarrior = nixpkgs.taskwarrior.overrideAttrs (oldAttrs: rec {
20 postInstall = ''${oldAttrs.postInstall}
21 mkdir -p "$out/share/vim/vimfiles/ftdetect"
22 mkdir -p "$out/share/vim/vimfiles/syntax"
23 ln -s "../../../../share/doc/task/scripts/vim/ftdetect/task.vim" "$out/share/vim/vimfiles/ftdetect/"
24 ln -s "../../../../share/doc/task/scripts/vim/syntax/taskrc.vim" "$out/share/vim/vimfiles/syntax/"
25 ln -s "../../../../share/doc/task/scripts/vim/syntax/taskdata.vim" "$out/share/vim/vimfiles/syntax/"
26 ln -s "../../../../share/doc/task/scripts/vim/syntax/taskedit.vim" "$out/share/vim/vimfiles/syntax/"
27 '';
28 });
29
30 vit = (nixpkgs.vit.override { inherit taskwarrior; }).overrideAttrs (oldAttrs:
31 fetchedGithub ./fetched/vit.json // {
32 buildInputs = oldAttrs.buildInputs ++ [perlPackages.TryTiny perlPackages.TextCharWidth];
33 }
34 );
35
36 #weechat = callPackage nixpkgs.weechat { guileSupport = false; luaSupport = false; rubySupport = false; tclSupport = false; };
37in
38 {
39 inherit ledger;
40 inherit taskwarrior vit;
41 }