public: true date: 2016-11-01T00:00:00Z draft: true tags: software title: 'pkg: robust, flexible package management' url: /2016/11/01/pkg/


declarative configuration with phased shell scripts. the input and output of each stage is hashed and linked to a merkle dag that can be used to verify the inputs and outputs of a given installation process. the build environment is intentionally quite spartan. various tools may be made available to the build environment through configuration flags.

[pkg.env]
name = "dotman"
configure = '''
  export TARGET=$HOME
'''
install = '''
  src=${out}/src/${host}/${repository}
  git clone git@${host}:${repository} ${src}
  if [ ! -z ${revision} ]; then
    cd ${out}/src/${host}/${repository}
    git checkout ${revision}
  fi
  if [ ! -z ${link} ]; then
    ln -s ${src} ${link}
  fi
'''
[pkg.env.tools]
git = true
[pkg]
name = "dotfiles"
environment = "dotman"
[dependences.mona-theme]
host = "github.com"
repository = "austinhartzheim/mona"
link = ".themes/mona"
[dependencies.solarized-xresources]
host = "github.com"
repository = "solarized/xresources"
link = ".colors/solarized"
[dependencies.assets]
host = "gitlab.com"
repository = "xr09/rainbow.sh"