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

Nixify the build #55

Merged
merged 11 commits into from
Mar 30, 2019
Merged

Nixify the build #55

merged 11 commits into from
Mar 30, 2019

Conversation

arianvp
Copy link
Member

@arianvp arianvp commented Mar 27, 2019

Fixes #41, fixes #4 and fixes #30

Currently uses whatever k8s version nixpkgs packages, but in my experience it is kept rather up to date.

We might want to make an ./update-nixpkgs.sh script that quickly updates to the latests nixpkgs-unstable whenever we want to bump it

they don't build because they require network access
Adds a Makefile that calls convert.py and runs tests

By typing `nix-build` you can run all the tests and
get a ./result symlink containing all the generated dhall files

unanswered questions:

* How to deed back the dhall files into the github repo?
* Maybe we dont want to? Maybe we just want to serve it as an artifact
on hydra? thoughts?

Todos:
* Adjust docs on building and how to use nix-shell now for interactive
stuff
@arianvp arianvp added the wip label Mar 27, 2019
@arianvp arianvp requested a review from f-f March 27, 2019 13:33
Copy link
Member

@f-f f-f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing 👏 💯 🎉

release.nix Outdated Show resolved Hide resolved
@f-f
Copy link
Member

f-f commented Mar 27, 2019

@arianvp +1 on the ./update-nixpkgs.sh. Can we actually pin to a precise Kube version? Should we care?

@arianvp
Copy link
Member Author

arianvp commented Mar 27, 2019

Well it is pinned to a specific Nixpkgs version, which also pins to a specific k8s version. I guess that is good enough (for now). The actual dhall-kubernetes.nix file is parameterised over the Kubernetes pkgs, so we could use this to later easily build types for multiple k8s versions if that is something people want. However we'll have to think about how we distribute the Dhall files to the user then. I'm still not sure if putting them directly GitHub repo is the best approach here but I don't have any other good ideas

@f-f
Copy link
Member

f-f commented Mar 28, 2019

@arianvp I think GitHub is pretty great, because you can pin to specific commits (and I hope everyone does, since we'll have some good amount of breaking changes with #46) or tags (we don't do releases, but we'll start. I think it's a good idea to have a release just before we merge the Haskell rewrite).

If there's demand for building types for multiple k8s versions, then we have several possibilities while staying on GitHub: several folders, or several branches, etc

Also generate README in build step
Problem was that the nix-build still was secretly getting
./types ./defualt and README.md into its source closure, leading to
impurity. That is fixed now.

Also updated the docs on how to generate stuff.
@arianvp
Copy link
Member Author

arianvp commented Mar 29, 2019

Issues should be addressed, and there's now a single script ./generate.sh that will both generate types and default and will generate README.md

@arianvp
Copy link
Member Author

arianvp commented Mar 29, 2019

I added an option to automatically update nixpkgs now @f-f I think that is all and this is ready to merge!

@arianvp arianvp removed the wip label Mar 29, 2019
@f-f
Copy link
Member

f-f commented Mar 29, 2019

@arianvp wonderful! This looks great 🙂
I'll let you to merge it so you can write a commit message for the squashed commits

@arianvp arianvp merged commit 8d295ec into master Mar 30, 2019
@arianvp arianvp deleted the nixify branch March 30, 2019 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants