Skip to content

Commit

Permalink
ci: update sjsonnet for benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
CertainLach committed Apr 7, 2024
1 parent 0e1ae58 commit 028ff73
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 22 deletions.
16 changes: 8 additions & 8 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
inherit go-jsonnet sjsonnet jsonnet;
jrsonnetVariants = [
{
drv = jrsonnet.overrideAttrs {forBenchmarks = true;};
drv = jrsonnet.override {forBenchmarks = true;};
name = "";
}
];
Expand All @@ -73,7 +73,7 @@
quick = true;
jrsonnetVariants = [
{
drv = jrsonnet.overrideAttrs {forBenchmarks = true;};
drv = jrsonnet.override {forBenchmarks = true;};
name = "";
}
];
Expand All @@ -82,15 +82,15 @@
inherit go-jsonnet sjsonnet jsonnet;
jrsonnetVariants = [
{
drv = jrsonnet.overrideAttrs {forBenchmarks = true;};
drv = jrsonnet.override {forBenchmarks = true;};
name = "current";
}
{
drv = jrsonnet-nightly.overrideAttrs {forBenchmarks = true;};
drv = jrsonnet-nightly.override {forBenchmarks = true;};
name = "current-nightly";
}
{
drv = jrsonnet-release.overrideAttrs {forBenchmarks = true;};
drv = jrsonnet-release.override {forBenchmarks = true;};
name = "release";
}
];
Expand All @@ -100,15 +100,15 @@
quick = true;
jrsonnetVariants = [
{
drv = jrsonnet;
drv = jrsonnet.override {forBenchmarks = true;};
name = "current";
}
{
drv = jrsonnet-nightly;
drv = jrsonnet-nightly.override {forBenchmarks = true;};
name = "current-nightly";
}
{
drv = jrsonnet-release;
drv = jrsonnet-release.override {forBenchmarks = true;};
name = "release";
}
];
Expand Down
9 changes: 6 additions & 3 deletions nix/jsonnet.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{ stdenv, lib, jekyll, fetchFromGitHub, makeWrapper }:

{
stdenv,
fetchFromGitHub,
makeWrapper,
}:
stdenv.mkDerivation rec {
pname = "jsonnet";
version = "0.20.0";
Expand All @@ -15,7 +18,7 @@ stdenv.mkDerivation rec {
"jsonnet"
];

nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [makeWrapper];

installPhase = ''
mkdir -p $out/bin
Expand Down
21 changes: 10 additions & 11 deletions nix/sjsonnet.nix
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
# This derivation uses released sjsonnet binary, which most users will use

# However, recommended way of using sjsonnet - is using a client-server model,
# for which there is no released binaries: https://github.com/databricks/sjsonnet/issues/51

# TODO: Somehow build client-server version of sjsonnet, and use it in benchmarks

{ stdenv, lib, fetchurl, jdk20, makeWrapper }:

{
stdenv,
fetchurl,
jdk20,
makeWrapper,
}:
stdenv.mkDerivation rec {
pname = "sjsonnet";
version = "0.4.6";
version = "0.4.9";

src = fetchurl {
url =
"https://github.com/databricks/${pname}/releases/download/${version}/${pname}-${version}.jar";
hash = "sha256-ivVKMf7W9iLF/KSXYEl6iJeNGEP5jxw2uqPF7pz6rBU=";
url = "https://github.com/databricks/${pname}/releases/download/${version}/${pname}-${version}.jar";
hash = "sha256-2W5qhe+MFsHQFlbPr7RQO4mx9qRjdfpI1z4qQGcVnYM=";
};

unpackPhase = "true";
buildInputs =
[ jdk20 makeWrapper ];
buildInputs = [jdk20 makeWrapper];

installPhase = ''
mkdir -p $out/bin $out/lib
Expand Down

0 comments on commit 028ff73

Please sign in to comment.