Commit 60aaaa5a authored by TheRealGramdalf's avatar TheRealGramdalf
Browse files

dashy-ui: use remarshal instead of yq-go

parent 75b6bd62
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@
  prefetch-yarn-deps,
  nodejs_20,
  nodejs-slim_20,
  yq-go,
  remarshal_0_17,
  settings ? { },
}:
stdenv.mkDerivation (finalAttrs: {
@@ -30,11 +30,11 @@ stdenv.mkDerivation (finalAttrs: {
  # - Despite JSON being valid YAML (and the JSON passing the config validator),
  # there seem to be some issues with JSON in the final build - potentially due to
  # the way the client parses things
  # - Instead, we use `yq-go` to convert it to yaml
  # - Instead, we use `remarshal` to convert it to yaml
  # Config validation needs to happen after yarnConfigHook, since it's what sets the yarn offline cache
  preBuild = lib.optional (settings != { }) ''
    echo "Writing settings override..."
    yq --output-format yml '${builtins.toFile "conf.json" ''${builtins.toJSON settings}''}' > user-data/conf.yml
    json2yaml '${builtins.toFile "conf.json" (builtins.toJSON settings)}' user-data/conf.yml
    yarn validate-config --offline
  '';
  installPhase = ''
@@ -59,8 +59,8 @@ stdenv.mkDerivation (finalAttrs: {
    })
    yarnBuildHook
    nodejs_20
    # For yaml parsing
    yq-go
    # For yaml conversion
    remarshal_0_17
  ];
  doDist = false;
  meta = {