It is possible to build smos using Stack, but this method is mainly available for development purposes. In practice we recommend using Nix for installing Smos.
Clone the repository:
git clone https://github.com/NorfairKing/smos
Decide whether you want to build the
smos-serverexecutable. If you just want to use
smos-queryand the other command-line executables, the answer will be "no". In that case, you can remove the
stripe-clientline from the
stack.yamlfile and continue to the next step.
If you do want to build
smos-server, then you need to generate the
If you have nix installed, you can run this command and skip the rest of this step:
Get the stripe OpenAPI spec. The
smos/nix/overlay.nixfile specifies the version of
stripe-specto use. You will need the
openapi/spec3.yamlfile from that repository.
Get the openapi3 client code generator:
stack install openapi3-code-generator --stack-yaml setup-stack.yaml
stripe-clientlibrary using this command:
~/.local/bin/openapi3-code-generator-exe --specification /path/to/openapi/spec3.yaml --configuration stripe-client-gen.yaml
stack install autoexporter
Install Smos with the default configuration:
stack install smos
You probably want to also install related tools:
stack install smos-query stack install smos-archive stack install smos-single stack install smos-sync-client
/home/user/src/smos/stripe-client/: getDirectoryContents:openDirStream: does not exist (No such file or directory)
If you see the above error, you probably skipped the "Generate the stripe client" steps above. This happens because we generate the stripe client based on the openapi3 spec for Stripe's api. This generated code is not committed to the repository.
You may get an error about
autoreconf not being available if
autoconf is not installed.
Make sure that you have
autoreconf on your path.
Do not install
stack or any other haskell packages using pacman.
This is unlikely to build at all and will most likely cause in bugs if it does.
stack by following the documentation on this page