Skip to content

mebubo/haskell-sources-tags-nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

haskell-sources-tags-nix

Get the sources for all transitive dependencies of a set of haskell packages, and generate a tags file.

Example usage

From a command line

Tags for all dependencies of a cabal project:

nix-build --arg cabalProject ./. --out-link dependencies path/to/haskell-sources-tags-nix/

Or install the package:

nix-env -f cabal-sources-tags.nix -i

and then from a cabal project:

cabal-sources-tags

From nix

Tags for a given set of packages:

let
  config = {
    packageOverrides = pkgs: rec {
      haskellPackages = pkgs.haskell.packages.ghc865.override {
        overrides = haskellPackagesNew: haskellPackagesOld: {
          my-custom-library = haskellPackagesOld.callCabal2nix "my-custom-library" ../my-custom-ibrary {};
        };
      };
    };
  };
  pkgs = import <nixpkgs> { inherit config; };
  haskellPackages = pkgs.haskellPackages;
  packages = hp: (with hp; [ turtle lens my-custom-library ]);

in
  pkgs.callPackage ../haskell-sources-tags-nix/tag-sources.nix {
    inherit pkgs haskellPackages packages;
  }

Vim configuration

set tags+=dependencies/tags

Similar projects

Advantages of this project compared to codex:

  • Simplicity: all the heavy lifting is done by Nix
  • Not limited to downloading sources from Hackage: correct sources are used even if a dependency is modified locally (like my-custom-library in the example above)

Disadvantages compared to codex:

  • Requires Nix

About

Navigate the source code of all your haskell dependencies thanks to Nix and fast-tags

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages