Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe provide package set as an envrionment variable #1203

Open
jy14898 opened this issue Nov 9, 2022 · 2 comments
Open

Maybe provide package set as an envrionment variable #1203

jy14898 opened this issue Nov 9, 2022 · 2 comments
Labels

Comments

@jy14898
Copy link
Contributor

jy14898 commented Nov 9, 2022

I've been thinking about how we need to keep quite a few things in sync with the ctl-scaffold template. What if we provided CTL purescript source + spago files in an environment variable

-- ctl-scaffold/packages.dhall
let upstream = env:CTL_PACKAGES
in upstream

where CTL_PACKAGES is a nix generated package.dhall like:

let upstream = /nix/deadbeef-ctl/packages.dhall -- the packages.dhall ctl uses directly, from its source
in upstream
  with cardano-transaction-library = /nix/deadbeef-ctl/spago.dhall

I think it'd make it easier to CTL users to upgrade CTL, they simply change the ctl ref in the flake input. What do we think?

@klntsky
Copy link
Member

klntsky commented Nov 9, 2022

We don't want to make spago dependent on nix to provide the env variable.

It will raise the bar for those who want to use the code without dealing with nix (which is currently possible with just spago).

Nix provides the environment (and builds too, if needed), but to build the bundle we don't want to rely exclusively on it. The users may want to build with spago and whatever bundler they chose (and they do - see this thread) and then provide their own runtime just by starting binaries.

@jy14898
Copy link
Contributor Author

jy14898 commented Nov 9, 2022

That's fair enough, I was thinking nix is necessary to launch the runtime, but yeah they can of course run everything manually.

I don't think this change would stop users from using a different bundler, just that they need to use nix (and buildPursProject)

This could still be an opt-in solution for users, but at that point it doesn't save us (CTL devs) the original pain in the first place of maintaining the template like we currently do. It's not that bad though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants