-
Notifications
You must be signed in to change notification settings - Fork 27
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
Support builds without network access #273
Comments
I'm not the project author, but I'm sure such contribution would be considered unless it breaks existing workflow. I personally think that the ability of separate fetching and building is good. As an example, I use this sometimes in the Gentoo build system, when I need to build something big without an internet connection, I fetch sources first, when I have a connection, and then I can build the stuff without. Having said that, I still don't understand your proposition. I mean, when I do |
When building pack itself c: Currently the Makefile fetches |
So are you talking about Are you talking only about those two cases, or potentially about some more commands, like |
Just micropack for now, I am in the process of getting idris2 set up so I can learn how to use it c: |
If this is only about building and installing the pack application under nix, I suggest to not use micropack but write something similar to our installation script. This will make it straight forward to separate fetching all necessary libraries (plus Idris itself) from building the whole thing. |
The installation script looks easy to replicate in nix. I will see how far I can go with just that. My main worry is that My knowledge comes from Rust, where rustup can either be installed to the system and fetch the tool chain (compiler, formatter, etc) to |
This is an old issue, but I can offer a couple of different pieces of input. First, Pack is now packaged in Second, if you want to develop Pack itself using a nix shell rather than installing its dependencies by hand, you may find something you want to borrow from the following let
pkgs = import <nixpkgs> {};
packageset = import (pkgs.fetchgit {
url = "https://github.com/mattpolzin/nix-idris2-packages";
# snag a newer revision probably if you're copying this in the future:
rev = "14194b349a7d4e720803d6b8700d6e5f38e88a9a";
hash = "sha256-OEWtim0UNVN3HwxmCVyHbe0SCD+dA+JMlJKd+bX569E=";
}) {};
inherit (packageset) idris2 idris2Lsp buildIdris';
pack = buildIdris' {
ipkgName = "pack";
src = ./.;
};
in pkgs.mkShell {
inputsFrom = [ pack ];
packages = [ idris2 idris2Lsp ];
} |
Issue
I am trying to package
idris2-pack
fornix
so I can easily accessidris2-pack
from NixOS.nix
does not allow network accesses during the build process; you need a fetch step, where all dependencies are fetched, then a build step.Solution
Do not access the network during builds by having a fetch script that clones
idris2
andidris2-pack-db
, then the build only accesses them and does not need to fetch them.Alternatives considered
pack
(Using the os's idris2 compiler)Conclusion
This seems like a nice project for me to start learning idris, would you be open to such contributions?
The text was updated successfully, but these errors were encountered: