aboutsummaryrefslogblamecommitdiff
path: root/default.nix
blob: d8280272a0a5499b2040de76118c3a134dc36720 (plain) (tree)


































                                                                                                          
















                                                                                   





                                                        


                                                                                                                                
                                 
                   
                                        


                   
                   
   
with import <nixpkgs> {};
let
  nixpkgs = import <nixpkgs> {};
  fetchedGithub = path:
    let
      json = lib.importJSON path;
    in rec {
      version = json.tag;
      name = "${json.meta.name}-${version}";
      src = fetchFromGitHub json.github;
    };

  ledger = (nixpkgs.ledger.override { boost = boost166; }).overrideAttrs (oldAttrs:
    fetchedGithub ./fetched/ledger.json // {
      postInstall = "";
    }
  );

  taskwarrior = nixpkgs.taskwarrior.overrideAttrs (oldAttrs: rec {
    postInstall = ''${oldAttrs.postInstall}
      mkdir -p "$out/share/vim/vimfiles/ftdetect"
      mkdir -p "$out/share/vim/vimfiles/syntax"
      ln -s "../../../../share/doc/task/scripts/vim/ftdetect/task.vim" "$out/share/vim/vimfiles/ftdetect/"
      ln -s "../../../../share/doc/task/scripts/vim/syntax/taskrc.vim" "$out/share/vim/vimfiles/syntax/"
      ln -s "../../../../share/doc/task/scripts/vim/syntax/taskdata.vim" "$out/share/vim/vimfiles/syntax/"
      ln -s "../../../../share/doc/task/scripts/vim/syntax/taskedit.vim" "$out/share/vim/vimfiles/syntax/"
    '';
  });

  vit = (nixpkgs.vit.override { inherit taskwarrior; }).overrideAttrs (oldAttrs:
    fetchedGithub ./fetched/vit.json // {
      buildInputs = oldAttrs.buildInputs ++ [perlPackages.TryTiny perlPackages.TextCharWidth];
    }
  );

  weboob = pythonPackages.weboob.overrideAttrs (oldAttrs: rec {
    postInstall = ''${oldAttrs.postInstall or ""}
      mkdir -p $out/share/bash-completion/completions/
      cp tools/weboob_bash_completion $out/share/bash-completion/completions/weboob
    '';
  });

  slrn = nixpkgs.slrn.overrideAttrs (oldAttrs: rec {
    version = "1.0.3a";
    name = "slrn-${version}";
    src = fetchurl {
      url = "http://www.jedsoft.org/releases/slrn/slrn-${version}.tar.bz2";
      sha256 = "1b1d9iikr60w0vq86y9a0l4gjl0jxhdznlrdp3r405i097as9a1v";
    };
    configureFlags = oldAttrs.configureFlags ++ [ "--with-slrnpull" ];
  });

  ldapvi = nixpkgs.ldapvi.overrideAttrs (oldAttrs: rec {
    name = "ldapvi-${version}";
    version = "f1d42ba-master";
    src = fetchgit (lib.importJSON ./ldapvi.json);
  });

  #weechat = callPackage nixpkgs.weechat { guileSupport = false; luaSupport = false; rubySupport = false; tclSupport = false; };
in
  {
    inherit nix-prefetch-scripts;
    inherit ledger;
    inherit taskwarrior vit timewarrior;
    inherit weboob;
    inherit slrn;
    inherit sc-im;
    inherit ldapvi;
  }