Skip to main content

Defining your own packages

When building something new

If you are working on something new within Composable that does not have a Nix package yet, you will need to "nixify" your project by writing a package definition in our flake.nix. To do this, you should read the following:

Your package should probably live inside of our monorepo. If this is the case, you should expand our existing flake.nix. However, if this is not the case, and if your package still needs to reference packages that are defined by our monorepo, then you should add our repository as one of your flake's inputs like this:

inputs = {
composable = {
url = "github:ComposableFi/composable";
inputs.nixpkgs.follows = "nixpkgs";

Your package is probably similar to one of ours, so you will most likely be able to adapt the definition of one of our packages. However, if this is not the case, you should look at the trivial builders section in the nixpkgs manual.

If you have any further questions, feel free to ask them in the #nix channel on Slack.

If your packaged service is part of a bigger composition, then here's how to compose services with Arion!