-
Notifications
You must be signed in to change notification settings - Fork 2
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
Noted the difference of Nixpkgs fetching in flake world. #50
Conversation
3a5ecf9
to
8be4108
Compare
I think our current |
I just found a paragraph in the Nix Wiki that explains how @dukc can you add a link to it from the paragraph you added in this PR? |
One more undocumented feature that we have for classic Nix users is our overlay. It can be used like this: # Run this from the `dlang.nix` repo root:
➤ nix repl
Welcome to Nix 2.16.2. Type :? for help.
nix-repl> pkgs = import <nixpkgs> { overlays = [ (import ./.).outputs.overlays.default ]; }
nix-repl> pkgs.dmd
pkgs.dmd pkgs.dmd-2_105_2 pkgs.dmd-binary-2_086_1
pkgs.dmd-2_092_1 pkgs.dmd-binary-2_079_1 pkgs.dmd-binary-2_087_1
pkgs.dmd-2_096_1 pkgs.dmd-binary-2_080_1 pkgs.dmd-binary-2_088_1
pkgs.dmd-2_098_1 pkgs.dmd-binary-2_081_2 pkgs.dmd-binary-2_089_1
pkgs.dmd-2_100_2 pkgs.dmd-binary-2_082_1 pkgs.dmd-binary-2_090_1
pkgs.dmd-2_102_2 pkgs.dmd-binary-2_083_1 pkgs.dmd-binary-2_098_0
pkgs.dmd-2_103_1 pkgs.dmd-binary-2_084_1 pkgs.dmd-bootstrap
pkgs.dmd-2_104_2 pkgs.dmd-binary-2_085_1 Edit: here's a complete .nix file: let
dlang-nix = builtins.fetchGit {
url = "https://github.com/PetarKirov/dlang.nix";
rev = "75a2de549014bb1219957a10da778e7b2df967e8";
};
pkgs = import <nixpkgs> {
overlays = [ (import dlang-nix).overlays.default ];
};
in
pkgs.mkShell {
packages = with pkgs; [
dmd-2_104_2
dub
];
} But of course, users should beware that in most certainty they won't be able to benefit from our binary cache and they should be prepared for a long build. E.g. 40+ mins on macOS M1. |
Thanks for your Pull Request! Below you will find a summary of the cachix status of each package, for each supported platform.
|
@PetarKirov Done, except I took the liberty to add it some way up instead. Otherwise unchanged from the version you reviewed so toggled auto-merge on. |
That would be nice to have, but I don't feel it's anything critical to have. I might or might not implement it at some point.
Wow! That's a worthy add I need to do at some point. In fact I think it satisfies the need to use an own nixpkgs instance, except maybe for the fact it imports both the flake-pinned nixpkgs and users nixpkgs, even though only the latter is used for building the compilers themselves. |
Ping @PetarKirov . I'm learning flakes all the time but my mindset is still a bit in the pre-flake world and this is one thing that could have surprised me as an user.
Full story: I have flakes installed and I already use them when I simply want to do a build, but it felt too much to figure out at once how I can override the bootstrap compiler with the new-generation nix commands so I did that with good old
nix-build -E
instead - and ended wondering "oh wait, where iscallPackage
? It's called for me but I'm not passing<nixpkgs>
todefault.nix
!".