Skip to content

Use only jdk8 when building nix #885

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

Merged
merged 1 commit into from
Jan 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ let
in {
inherit sources;

# match java version used by devs, this should also change the version used by sbt
jre = prev.jdk8.jre;

mantis = final.callPackage ./pkgs/mantis.nix {
inherit (prev.openjdk8_headless) jre;
src = cleanedSrc;
};
};
Expand Down
9 changes: 4 additions & 5 deletions nix/pkgs/mantis.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
, bash
, protobuf
, coreutils
, jdk
, jre
, jdk8
, gawk
, sbt
, impure ? false
Expand All @@ -33,7 +32,7 @@ let

exec ${protobuf}/bin/protoc "$@"
'';
nativeBuildInputs = [ protoc-wrapper jdk makeWrapper ];
nativeBuildInputs = [ protoc-wrapper jdk8 makeWrapper ];

# read version from build.sbt
version = let
Expand All @@ -42,7 +41,7 @@ let
in builtins.elemAt captures 0;

LD_LIBRARY_PATH = lib.makeLibraryPath [ stdenv.cc.cc.lib ];
PATH = lib.makeBinPath [ coreutils jre gawk ];
PATH = lib.makeBinPath [ coreutils jdk8.jre gawk ];

in sbt.mkDerivation {
pname = "mantis";
Expand All @@ -51,7 +50,7 @@ in sbt.mkDerivation {

# This sha represents the change dependencies of mantis.
# Update this sha whenever you change the dependencies
depsSha256 = "sha256-yAaJUJgg5Sdnhr3mX85BquC3X1ygF6If/FOngMUIkPU=";
depsSha256 = "1zsf8yykr8a7p9za4lyw8l1rhqa7ppas049lawp9pn90sj0xkjh5";

# this is the command used to to create the fixed-output-derivation
depsWarmupCommand = "sbt compile --debug -Dnix=true";
Expand Down