@hackage / gargoyle

Automatically spin up and spin down local daemons

Latest0.1.2.2

About

Metadata

  • Last updated , by alexfmpe
  • License BSD-3-Clause
  • Categories Systems Programming
  • Maintained by: maintainer@obsidian.systems

  • Lottery factor: 4

Links

Installation

Tested Compilers

  1. 9.12.2
  2. 9.10.1
  3. 9.8.2
  4. 9.0.2
  5. 8.10.7
  6. 8.8.4
  7. 8.6.5

Readme

gargoyle

Haskell Hackage Github CI BSD3 License

Gargoyle is a framework for managing daemons from Haskell. Currently, the only requirement is that the daemon be able to communicate over a Unix domain socket. See gargoyle-postgresql for an example that uses gargoyle to manage postgresql.

To use Gargoyle the client must:

  • Define a value of the 'Gargoyle' type which specifies how to administer the daemon.
  • Create an executable whose main is gargoyleMain. The name of this executable should match the executable name specified in the _gargoyle_exec field of the Gargoyle.
  • The client will run their code with withGargoyle to gain access to the daemon.

Importing into Haskell package set

haskellPackages.override {
  overrides = self: super:
    let gargoylePkgs = import ./path/to/gargoyle-repo { haskellPackages = self; };
    in gargoylePkgs // {
      # .. your overrides
    };
}

By default gargoyle-postgresql-nix will use the postgresql of the pkgs used by your haskellPackages. To override this, pass postgresql by changing the above line to look more like

gargoylePkgs = import ./path/to/gargoyle-repo { haskellPackages = self; postgresql = myCustomVersion; }

Hacking

Do something like this:

nix-shell -A gargoyle-postgresql.env --run 'cd gargoyle-postgresql && cabal new-repl'