aboutsummaryrefslogblamecommitdiff
path: root/default.nix
blob: 5227b47df06d030de89ab71808b9a2a08f56c6f7 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                            








                                            






















                                                                                                          
















                                                                                   








                                                                                     
 


                                                                                                                                
                                 
                   
                                        


                   
                   











                            
   
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;
    };

  fetchedGit = path:
    let
      json = lib.importJSON path;
    in rec {
      version = json.tag;
      name = "${json.meta.name}-${version}";
      src = fetchgit json.git;
    };

  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: fetchedGit ./fetched/ldapvi.json);

  nixos = import ./nixos_tools.nix {};

  pass = nixpkgs.pass.overrideAttrs (oldAttrs:
    fetchedGit ./fetched/pass.json // {
      patches = oldAttrs.patches ++ [ ./patches/pass-fix-pass-init.patch ];
    }
  );

  #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;
    inherit pal;
    inherit duplicity duply;
    inherit pdftk;
    inherit googler;
    inherit jrnl;
    inherit apg;
    inherit newsboat;
    inherit vcsh;
    inherit xmr-stak;
    inherit urlwatch;
    inherit pass;
    #inherit nixos;
  }