plausible: 2.1.4 -> 2.1.5 (#382345)

This commit is contained in:
xanderio
2025-03-05 11:20:57 +01:00
committed by GitHub
2 changed files with 36 additions and 31 deletions

View File

@@ -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,19 +92,24 @@ let
};
};
patchedMixFodDeps = runCommand mixFodDeps.name { } ''
mkdir $out
cp -r --no-preserve=mode ${mixFodDeps}/. $out
patchedMixFodDeps =
runCommand mixFodDeps.name
{
inherit (mixFodDeps) hash;
}
''
mkdir $out
cp -r --no-preserve=mode ${mixFodDeps}/. $out
mkdir -p $out/mjml/priv/native
for lib in ${mjmlNif}/lib/*
do
# normalies suffix to .so, otherswise build would fail on darwin
file=''${lib##*/}
base=''${file%.*}
ln -s "$lib" $out/mjml/priv/native/$base.so
done
'';
mkdir -p $out/mjml/priv/native
for lib in ${mjmlNif}/lib/*
do
# normalies suffix to .so, otherswise build would fail on darwin
file=''${lib##*/}
base=''${file%.*}
ln -s "$lib" $out/mjml/priv/native/$base.so
done
'';
in
beamPackages.mixRelease rec {
@@ -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 = {

View File

@@ -1,14 +0,0 @@
#!/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