Skip to content

Commit

Permalink
plausible: 2.1.4 -> 2.1.5 (NixOS#382345)
Browse files Browse the repository at this point in the history
  • Loading branch information
xanderio authored Mar 5, 2025
2 parents 248e19d + 106f5e5 commit 0b19dd9
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 32 deletions.
55 changes: 37 additions & 18 deletions pkgs/servers/web-apps/plausible/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
runCommand,
nixosTests,
npm-lockfile-fix,
nix-update-script,
brotli,
tailwindcss_3,
esbuild,
Expand All @@ -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 '
Expand Down Expand Up @@ -74,7 +75,7 @@ let
src
mixEnv
;
hash = "sha256-N6cYlYwNss2FPYcljANJYbXobmLFauZ64F7Sf/+7Ctg=";
hash = "sha256-edQ8byeV0WUaYDYMnmrstC6L2jztidR/JikGZLpX3WE=";
};

mjmlNif = rustPlatform.buildRustPackage {
Expand All @@ -91,19 +92,24 @@ let
};
};

patchedMixFodDeps = runCommand mixFodDeps.name { } ''
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
'';
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
'';

in
beamPackages.mixRelease rec {
Expand All @@ -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 = {
Expand Down
14 changes: 0 additions & 14 deletions pkgs/servers/web-apps/plausible/update.sh

This file was deleted.

0 comments on commit 0b19dd9

Please sign in to comment.