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

Build dependencies #14

Open
tomberek opened this issue Aug 15, 2019 · 2 comments
Open

Build dependencies #14

tomberek opened this issue Aug 15, 2019 · 2 comments

Comments

@tomberek
Copy link

Found BuildHost, but I'm not sure how complete that is. My use case is deploying to AWS (working on a minimal example) with a team on both OSX and Linux. So probably want to do all building on the target, so I use a known ami to start the process, rather than a local build of the image. I'm not sure how much can be delegated to the build host.

@andrewchambers
Copy link
Owner

andrewchambers commented Aug 15, 2019

I have never tried cross deploying as I developed this with Linux exclusively.

I don't have any OSX machines so can't help you too much. This plugin uses nixos-rebuild directly, which may not be supported from OSX.

@Nekroze
Copy link
Contributor

Nekroze commented Mar 25, 2020

While i cannot confirm yet if this works on OSX (I am Linux but my colleagues are OSX but we are all isolated WFH for the pandemic) however as I understand nix's cross compiling capabilities you should be able to build locally on osx and still deploy to a linux machine. The obvious issue is how to get nixos-rebuild on a mac. I have been using this in a shell.nix to create a package like nixpkgs does and add it to the buildInputs in my shell.

with <nixpkgs>;

let
    nixos-rebuild = let
      fallback = import <nixpkgs/nixos/modules/installer/tools/nix-fallback-paths.nix>;
    in substituteAll {
      name = "nixos-rebuild";
      dir = "bin";
      isExecutable = true;
      src = <nixpkgs/nixos/modules/installer/tools/nixos-rebuild.sh>;
      nix = nix.out;
      nix_x86_64_linux = fallback.x86_64-linux;
      nix_i686_linux = fallback.i686-linux;
      path = makeBinPath [ jq ];
    };
in mkDerivation {
  buildInputs = [nixos-rebuild];
}

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

No branches or pull requests

3 participants