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: distributed via nix support #56

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

dzmitry-lahoda
Copy link

@dzmitry-lahoda dzmitry-lahoda commented Mar 20, 2024

Description

Allow to reference bash scripts as nix package.

Documentation

nix build
nix develop

with flake and commands feature enabled

TODOs

Please ensure all of these TODOs are completed before asking for a review.

  • [?] Ensure the branch is named correctly with the issue number. e.g: feature/new-vpc-endpoints-955 or bug/missing-count-param-434.
  • Update the docs.
  • Keep the changes backward compatible where possible.
  • Run the pre-commit checks successfully.
  • Run the relevant tests successfully.
  • Ensure any 3rd party code adheres with our license policy or delete this line if its not applicable.

@dzmitry-lahoda
Copy link
Author

@brikis98 whom can I tag for review? thank you

@dzmitry-lahoda dzmitry-lahoda changed the title feate: distributed via nix support feat: distributed via nix support Mar 21, 2024
@dzmitry-lahoda
Copy link
Author

@eak12913 sorry for bothering you. do you know if somebody can help me? thank you

@dzmitry-lahoda
Copy link
Author

ping

@denis256
Copy link
Member

Hi,
I think should be added CircleCI steps to check if nix is built

Local builds also seems to fail:

error: flake 'git+file:///projects/gruntwork/bash-commons' does not provide attribute 'packages.x86_64-linux.defaultPackage.x86_64-linux', 'legacyPackages.x86_64-linux.defaultPackage.x86_64-linux' or 'defaultPackage.x86_64-linux'

@dzmitry-lahoda
Copy link
Author

@denis256
may you please run

nix build -L --show-trace --verbose --no-fallback

for me it works.

as for CI, i guess until i am part of repo I cannot modify CI (at least CI will not run my files, but master). so I doubt I can help with CI.

@dzmitry-lahoda
Copy link
Author

ho, it does not run any check from my PR, so sure not even nix build 264a1e7 .

@dzmitry-lahoda
Copy link
Author

image

build works

@denis256
Copy link
Member

denis256 commented May 13, 2024

$ nix --version
nix (Nix) 2.6.0

$ nix build -L --show-trace --verbose --no-fallback
error: unsupported tarball input attribute 'lastModified'

       … while updating the lock file of flake 'git+file:///projects/gruntwork/bash-commons?ref=dzmitry-lahoda-forks%2fmaster&rev=376247b36cc935ff28a6d5c55b9eaa8835ada7ac'

@dzmitry-lahoda
Copy link
Author

@denis256 likely your nix version is tooo old nix (Nix) 2.6.0. Please try 2.17+

flake.nix Outdated Show resolved Hide resolved
@denis256
Copy link
Member

CI part: CircleCI can be used on own repos for free https://circleci.com/pricing/

@dzmitry-lahoda
Copy link
Author

dzmitry-lahoda commented May 20, 2024

@denis256 i did tried C CI, so it requires some commit and run and complex setup, seems overkill. idea of using PRs is also to run via existing CI, do not require me to do complex setup proc of CI setup with commit of my own pipeline...

not sure I can do anything here.

and not sure how it related at all to have CI gate. nix does not needs ci checks as nix is CI.

@denis256
Copy link
Member

Hello,
In the future, how can we ensure that the flake.nix configuration is valid?
I believe the best approach would be to include a NIX build in the existing CircleCI tests. This way, any issues will be detected promptly.

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

Successfully merging this pull request may close these issues.

None yet

2 participants