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

nix config for easier start #1290

Open
przemek-pokrywka opened this issue Oct 4, 2022 · 0 comments
Open

nix config for easier start #1290

przemek-pokrywka opened this issue Oct 4, 2022 · 0 comments

Comments

@przemek-pokrywka
Copy link

Hey :) For anybody who'd like to start toying with the examples without going through the process of setting things up, I've prepared the following nix config (to be put into shell.nix file at the top of the repository):

{ java ? "openjdk8" }:

let
  jdk = pkgs.${java};

  config = {
    packageOverrides = p: rec {
      sbt = p.sbt.overrideAttrs (
        old: rec {
          patchPhase = ''
            echo -java-home ${jdk} >> conf/sbtopts
          '';
        }
      );
    };
  };

  nixpkgs = builtins.fetchTarball {
    name   = "nixos-21.05";
    url    = "https://github.com/NixOS/nixpkgs/archive/refs/tags/21.05.tar.gz";
    sha256 = "1ckzhh24mgz6jd1xhfgx0i9mijk6xjqxwsshnvq789xsavrmsc36";
  };

  pkgs = import nixpkgs { inherit config; };
in
  pkgs.mkShell {
    buildInputs = [
      pkgs.yarn
      pkgs.terraform
      jdk
      pkgs.sbt
    ];
  }
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

1 participant