Skip to content

Commit

Permalink
Use only jdk8 when building nix
Browse files Browse the repository at this point in the history
  • Loading branch information
jonringer committed Jan 11, 2021
1 parent ec36746 commit 0f57d0e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 3 additions & 1 deletion nix/default.nix
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
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

0 comments on commit 0f57d0e

Please sign in to comment.