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

feat: Introduce Flake for development and builds #2121

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shymega
Copy link
Contributor

@shymega shymega commented Sep 11, 2024

This PR introduces a Nix flake, allowing for InfiniTime to be built as a Flake, including a FHS development environment.

It's derived from #1850 and
icewind1991/infinitime-builder@c57c57f.

We also introduce flake-compat, allowing for non-Flake Nix mahcines to use the project as-is, both for building (default.nix), and development (shell.nix).

Additionally, we introduce .envrc, meaning that with direnv, the Nix Flake is activated automatically.

Fixes #1850.

@shymega
Copy link
Contributor Author

shymega commented Sep 11, 2024

I'm keeping this as a draft for now, because I want to check with the
InfiniTime maintainers, that I'm using the correct nRF SDK, and GCC toolchain.

I also wanted to ask if the .envrc is acceptable as well.

Thanks.

@shymega
Copy link
Contributor Author

shymega commented Sep 11, 2024

We also need to document the Flake, and possibly add CI.

I can add the CI workflows to a new PR if needed. However, I'm not sure how
documentation works in this project.

Copy link

github-actions bot commented Sep 11, 2024

Build size and comparison to main:

Section Size Difference
text 374592B -16B
data 948B 0B
bss 63504B 0B

@shymega shymega force-pushed the shymega-feat/nix-flake branch 2 times, most recently from 46daf79 to a9a3679 Compare September 14, 2024 13:27
@shymega shymega force-pushed the shymega-feat/nix-flake branch 8 times, most recently from 7606e37 to c613bc7 Compare October 13, 2024 15:14
@shymega shymega force-pushed the shymega-feat/nix-flake branch from c613bc7 to cb12758 Compare November 13, 2024 21:16
shymega added a commit to shymega/InfiniSim that referenced this pull request Nov 13, 2024
This PR introduces a Nix flake, allowing for InfiniSim to be built as a
Flake, including a FHS development environment.

We also introduce `flake-compat`, allowing for non-Flake Nix mahcines to
use the project as-is, both for building (`default.nix`), and
development (`shell.nix`).

Additionally, we introduce `.envrc`, meaning that with `direnv`, the Nix
Flake is activated automatically.

It should be noted that we require
InfiniTimeOrg/InfiniTime#2121 to be merged
into mainline before this PR will work. It will currently fail - this is
expected at this stage. A lockfile needs to be generated after the above
PR is merged - this PR here should NOT be merged until that is
completed.

Signed-off-by: Dom Rodriguez <[email protected]>
@shymega shymega marked this pull request as ready for review November 13, 2024 21:17
@shymega
Copy link
Contributor Author

shymega commented Nov 13, 2024

This PR is now ready for review. It is currently blocking InfiniTimeOrg/InfiniSim#148, but once this PR merged, the [InfiniSim] one will be ready to be merged too

@shymega shymega force-pushed the shymega-feat/nix-flake branch from cb12758 to f521883 Compare November 13, 2024 21:19
@NeroBurner NeroBurner added the maintenance Background work label Nov 14, 2024
shymega added a commit to shymega/InfiniTime that referenced this pull request Nov 14, 2024
shymega added a commit to shymega/InfiniTime that referenced this pull request Nov 14, 2024
shymega added a commit to shymega/InfiniTime that referenced this pull request Nov 14, 2024
shymega added a commit to shymega/InfiniTime that referenced this pull request Nov 15, 2024
shymega added a commit to shymega/InfiniTime that referenced this pull request Nov 15, 2024
shymega added a commit to shymega/InfiniTime that referenced this pull request Nov 15, 2024
shymega added a commit to shymega/InfiniTime that referenced this pull request Nov 15, 2024
JF002 pushed a commit that referenced this pull request Nov 17, 2024
This PR introduces a Nix flake, allowing for InfiniTime to be built as a
Flake, including a FHS development environment.

It's derived from InfiniTimeOrg#1850 and
icewind1991/infinitime-builder@c57c57f.

We also introduce `flake-compat`, allowing for non-Flake Nix mahcines to
use the project as-is, both for building (`default.nix`), and
development (`shell.nix`).

Additionally, we introduce `.envrc`, meaning that with `direnv`, the Nix
Flake is activated automatically.

Fixes InfiniTimeOrg#1850.

Signed-off-by: Dom Rodriguez <[email protected]>
@shymega shymega force-pushed the shymega-feat/nix-flake branch from f521883 to 7f792f1 Compare November 17, 2024 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Background work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants