• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

sol/tinc: A dependency manager for Haskell

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

sol/tinc

开源软件地址(OpenSource Url):

https://github.com/sol/tinc

开源编程语言(OpenSource Language):

Haskell 58.1%

开源软件介绍(OpenSource Introduction):

tinc: A dependency manager for Haskell

tinc installs dependencies for a project that you work on into a sandbox. While doing so it caches installed packages (in ~/.tinc/cache). When a package with the same transitive dependencies is already in the cache, it reuses that cached package instead of building it again.

tinc uses an exact algorithm for determining reusability. This guarantees 100% cache reuse. A package with the same transitive dependencies is never built twice.

tinc does not take any cached packages into account when resolving dependencies. Running

$ tinc

gives you the exact same result as

$ cabal sandbox delete
$ cabal sandbox init
$ cabal install --only-dependencies --enable-tests

tinc is idempotent. It's safe to run tinc multiple times. Running tinc after changing the .cabal-file of a project or after running cabal update results in a new updated sandbox.

If tinc fails / terminates for some reason, it does not modify anything (neither the cache nor any existing sandboxes). Interrupting a running tinc build is always safe.

Optionally use Nix for package caching

By default, tinc maintains its own package cache under ~/.tinc/cache.

However, it can optionally use nixpkgs for package caching. If tinc is installed somewhere under /nix, this is the default.

To change the default, you can set the environment variable TINC_USE_NIX to either yes or no, specifically:

export TINC_USE_NIX=yes  # use nix, even if not installed under /nix
export TINC_USE_NIX=no   # do not use nix, even if installed under /nix

If you want to install tinc with nix-env you can do so by running

nix-env -i -f default.nix

inside this repository.

Enabling plug-ins

tinc comes with a number of useful plug-ins. To enable them symlink plugins to ~/.tinc/plugins:

mkdir -p ~/.tinc/ && ln -s `pwd`/plugins/ ~/.tinc/

Additional dependencies and dependencies from GitHub

You can specify additional dependencies in a file named tinc.yaml. These dependencies may be from a variety of sources:

dependencies:
  # additional dependency from Hackage
  - foo

  # override version constraint in package.yaml
  - foo == 0.1.0

  # dependency from GitHub
  - name: foo
    github: owner/repo
    ref: master
    subdir: some-dir # optional subdirectory

  # dependency from arbitrary Git repositories
  - name: foo
    git: http://...
    ref: master

  # local dependency (will use cabal sdist)
  - name: foo
    path: ../foo/

(Note: The accepted syntax for dependencies is the same as what is accepted in package.yaml.)

Dependencies from tinc.yaml will be added to your sandbox or can override existing dependencies from package.yaml.

You can also use tinc.yaml without any package.yaml file (or .cabal file) to create a sandbox with dependencies.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
willbasky/Awesome-list-of-Haskell-mentors: An amazing list of Haskell developers ...发布时间:2022-06-24
下一篇:
fpco/applied-haskell发布时间:2022-06-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap