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

add: buildRocPackage lib output to nix flake #7391

Merged
merged 12 commits into from
Jan 9, 2025

Conversation

nxy7
Copy link
Contributor

@nxy7 nxy7 commented Dec 19, 2024

This PR adds buildRocPackage function as output of flake lib which allows packaging Roc apps using Nix.
Here's how usage of buildRocPackage looks like from remote flake.
Probably it can be improved, but it was sufficient to package roc-start and should be okay starting point.

Screenshot of roc-start packaged using buildRocPackage
image

@nxy7 nxy7 marked this pull request as ready for review December 19, 2024 23:55
nix/buildRocPackage.nix Outdated Show resolved Hide resolved
@@ -0,0 +1,41 @@
{ pkgs, roc-cli, name, entryPoint, src, outputHash, linker ? "", ... }:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right now this depends on passed in roc-cli. I think it's fine until roc is in nixpkgs, then we could just use roc-cli from pkgs.

Anton-4
Anton-4 previously approved these changes Dec 31, 2024
Copy link
Collaborator

@Anton-4 Anton-4 left a comment

Choose a reason for hiding this comment

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

Thanks @nxy7 :)

@lukewilliamboswell
Copy link
Collaborator

@Anton-4 -- I also update the flake and resolved the nix deprecation warnings.

@Anton-4 Anton-4 self-assigned this Jan 8, 2025
@Anton-4
Copy link
Collaborator

Anton-4 commented Jan 8, 2025

resolved the nix deprecation warnings.

Were these shown on your machine only?

@Anton-4
Copy link
Collaborator

Anton-4 commented Jan 8, 2025

I upgraded my nix version to nix 2.25.3 and I'm not seeing any warnings on nix develop, nix build, nix-build or nix-shell 🤔
@lukewilliamboswell I'll wait on your reply before merging

@lukewilliamboswell lukewilliamboswell merged commit 158691f into roc-lang:main Jan 9, 2025
18 of 19 checks passed
flake.nix Show resolved Hide resolved
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.

3 participants