Unverified Commit 0b19dd9e authored by xanderio's avatar xanderio Committed by GitHub
Browse files

plausible: 2.1.4 -> 2.1.5 (#382345)

parents 248e19dc 106f5e5f
Loading
Loading
Loading
Loading
+37 −18
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
  runCommand,
  nixosTests,
  npm-lockfile-fix,
  nix-update-script,
  brotli,
  tailwindcss_3,
  esbuild,
@@ -16,14 +17,14 @@

let
  pname = "plausible";
  version = "2.1.4";
  version = "2.1.5";
  mixEnv = "ce";

  src = fetchFromGitHub {
    owner = "plausible";
    repo = "analytics";
    rev = "v${version}";
    hash = "sha256-wV2zzRKJM5pQ06pF8vt1ieFqv6s3HvCzNT5Hed29Owk=";
    hash = "sha256-4gwK/AxzhsU0vgvKgIXrOyQLCgZMeZyKjj7PWbUmJ+8=";
    postFetch = ''
      ${lib.getExe npm-lockfile-fix} $out/assets/package-lock.json
      sed -ie '
@@ -74,7 +75,7 @@ let
      src
      mixEnv
      ;
    hash = "sha256-N6cYlYwNss2FPYcljANJYbXobmLFauZ64F7Sf/+7Ctg=";
    hash = "sha256-edQ8byeV0WUaYDYMnmrstC6L2jztidR/JikGZLpX3WE=";
  };

  mjmlNif = rustPlatform.buildRustPackage {
@@ -91,7 +92,12 @@ let
    };
  };

  patchedMixFodDeps = runCommand mixFodDeps.name { } ''
  patchedMixFodDeps =
    runCommand mixFodDeps.name
      {
        inherit (mixFodDeps) hash;
      }
      ''
        mkdir $out
        cp -r --no-preserve=mode ${mixFodDeps}/. $out

@@ -125,8 +131,21 @@ beamPackages.mixRelease rec {
    tests = {
      inherit (nixosTests) plausible;
    };
    updateScript = ./update.sh;
    inherit assets tracker;
    updateScript = nix-update-script {
      extraArgs = [
        "-s"
        "tracker"
        "-s"
        "assets"
        "-s"
        "mjmlNif"
      ];
    };
    inherit
      assets
      tracker
      mjmlNif
      ;
  };

  env = {
+0 −14
Original line number Diff line number Diff line
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix-update jq elixir npm-lockfile-fix nixfmt-rfc-style

set -euxo pipefail

nix-update plausible

version="$(nix-instantiate -A plausible.version --eval --json | jq -r)"
source_url="$(nix-instantiate -A plausible.src.url --eval --json | jq -r)"

nix-update --url "$source_url" --version "$version" plausible.tracker
nix-update --url "$source_url" --version "$version" plausible.assets