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

Adding nix configurations and setup #11508

Closed
wants to merge 6 commits into from
Closed

Adding nix configurations and setup #11508

wants to merge 6 commits into from

Conversation

smickovskid
Copy link
Contributor

No description provided.

Copy link
Contributor

github-actions bot commented Dec 7, 2023

I see that you haven't updated any CHANGELOG files. Would it make sense to do so?

@cl-sonarqube-production
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@@ -0,0 +1,92 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally, a repo should only contain one flake.nix file. Meaning repo === flake.

There is some support for nested flakes (multiple in a repo) but the full support is lacking in some areas, and its not really necessary for our use cases.

The only reason why we had multiple flakes in the original chainlink-dev repo is to represent projects as flakes as we expect projects to live in separate repos (e.g., EVM, Solana, Startknet, etc.).

We can also have a monorepo of projects, where this monorepo would also be a single flake that is a registry of N projects with M components.

Copy link
Contributor

Choose a reason for hiding this comment

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

This repo already has a Nix flake so if we keep this work in this repo (I'd prefer we move it to chainlink-evm repo), we'd need to add chainlink-dev configuration to the main flake.nix and remove this one.

};

# define chainlink-dev flake as a input
chainlink-dev.url = "git+ssh://[email protected]/smartcontractkit/chainlink-project-nix-poc?ref=main&dir=chainlink-dev"; # this could also be a project URL
Copy link
Contributor

Choose a reason for hiding this comment

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

This import should point to a renamed repo github.com/smartcontractkit/chainlink-dev once the PoC is stabilised - @willyrgf do we have a ticket to track this?


# define chainlink-dev flake as a input
chainlink-dev.url = "git+ssh://[email protected]/smartcontractkit/chainlink-project-nix-poc?ref=main&dir=chainlink-dev"; # this could also be a project URL
chainlink.url = "git+ssh://[email protected]/smartcontractkit/chainlink-project-nix-poc?ref=main&dir=chainlink";
Copy link
Contributor

Choose a reason for hiding this comment

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

This is actually the work we will need to move to this core repo flake.nix, as here we build the chainlink core node as Nix package and the core repo should expose that - @willyrgf do we have a ticket to track this? cc @andrevmatos

kubernetes-helm

# NOTE: cannot import all packages through chainlink-dev
# nested relative path import of chainlink breaks nix (cannot dynamically calculate absoluate path)
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, looks to be a build loop. To fix see the comment above on moving the build of the chainlink core node as Nix package to this repo, from chainlink-dev repo. cc @willyrgf

];
};

apps.integration-tests_run-smoke = {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think Nix apps (concept to define executable packages) is only required for packages that have $out/bin/${bin-name} bin-name different than the package name, so Nix doesn't know what to execute with nix run and this kind of declaration is required.

afaik if there is a bin with the same name as the package name this declaration is not required. cc @willyrgf we could remove some boilerplate

Copy link
Contributor

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Feb 11, 2024
@github-actions github-actions bot closed this Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants