akkoma-frontends: use finalAttrs pattern
Also replace remaining uses of with lib;
This commit is contained in:
parent
664c5ad690
commit
18331b2439
@ -6,7 +6,7 @@
|
|||||||
, python3, pkg-config, libsass
|
, python3, pkg-config, libsass
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "admin-fe";
|
pname = "admin-fe";
|
||||||
version = "unstable-2024-04-27";
|
version = "unstable-2024-04-27";
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
offlineCache = fetchYarnDeps {
|
offlineCache = fetchYarnDeps {
|
||||||
yarnLock = src + "/yarn.lock";
|
yarnLock = finalAttrs.src + "/yarn.lock";
|
||||||
hash = "sha256-acF+YuWXlMZMipD5+XJS+K9vVFRz3wB2fZqc3Hd0Bjc=";
|
hash = "sha256-acF+YuWXlMZMipD5+XJS+K9vVFRz3wB2fZqc3Hd0Bjc=";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
export HOME="$(mktemp -d)"
|
export HOME="$(mktemp -d)"
|
||||||
|
|
||||||
yarn config --offline set yarn-offline-mirror ${lib.escapeShellArg offlineCache}
|
yarn config --offline set yarn-offline-mirror ${lib.escapeShellArg finalAttrs.offlineCache}
|
||||||
fixup-yarn-lock yarn.lock
|
fixup-yarn-lock yarn.lock
|
||||||
substituteInPlace yarn.lock \
|
substituteInPlace yarn.lock \
|
||||||
--replace-fail '"git://github.com/adobe-webplatform/eve.git#eef80ed"' '"https://github.com/adobe-webplatform/eve.git#eef80ed"'
|
--replace-fail '"git://github.com/adobe-webplatform/eve.git#eef80ed"' '"https://github.com/adobe-webplatform/eve.git#eef80ed"'
|
||||||
@ -73,10 +73,10 @@ stdenv.mkDerivation rec {
|
|||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = {
|
||||||
description = "Admin interface for Akkoma";
|
description = "Admin interface for Akkoma";
|
||||||
homepage = "https://akkoma.dev/AkkomaGang/akkoma-fe/";
|
homepage = "https://akkoma.dev/AkkomaGang/akkoma-fe/";
|
||||||
license = licenses.agpl3Only;
|
license = lib.licenses.agpl3Only;
|
||||||
maintainers = with maintainers; [ mvs ];
|
maintainers = with lib.maintainers; [ mvs ];
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
, jpegoptim, oxipng, nodePackages
|
, jpegoptim, oxipng, nodePackages
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "akkoma-fe";
|
pname = "akkoma-fe";
|
||||||
version = "3.11.0";
|
version = "3.11.0";
|
||||||
|
|
||||||
@ -13,12 +13,12 @@ stdenv.mkDerivation rec {
|
|||||||
domain = "akkoma.dev";
|
domain = "akkoma.dev";
|
||||||
owner = "AkkomaGang";
|
owner = "AkkomaGang";
|
||||||
repo = "akkoma-fe";
|
repo = "akkoma-fe";
|
||||||
rev = "v${version}";
|
rev = "v${finalAttrs.version}";
|
||||||
hash = "sha256-Z7psmIyOo8Rvwcip90JgxLhZ5SkkGB94QInEgm8UOjQ=";
|
hash = "sha256-Z7psmIyOo8Rvwcip90JgxLhZ5SkkGB94QInEgm8UOjQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
offlineCache = fetchYarnDeps {
|
offlineCache = fetchYarnDeps {
|
||||||
yarnLock = src + "/yarn.lock";
|
yarnLock = finalAttrs.src + "/yarn.lock";
|
||||||
hash = "sha256-Uet3zdjLdI4qpiuU4CtW2WwWGcFaOhotLLKfnsAUqho=";
|
hash = "sha256-Uet3zdjLdI4qpiuU4CtW2WwWGcFaOhotLLKfnsAUqho=";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# Build scripts assume to be used within a Git repository checkout
|
# Build scripts assume to be used within a Git repository checkout
|
||||||
sed -E -i '/^let commitHash =/,/;$/clet commitHash = "${builtins.substring 0 7 src.rev}";' \
|
sed -E -i '/^let commitHash =/,/;$/clet commitHash = "${builtins.substring 0 7 finalAttrs.src.rev}";' \
|
||||||
build/webpack.prod.conf.js
|
build/webpack.prod.conf.js
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
export HOME="$(mktemp -d)"
|
export HOME="$(mktemp -d)"
|
||||||
|
|
||||||
yarn config --offline set yarn-offline-mirror ${lib.escapeShellArg offlineCache}
|
yarn config --offline set yarn-offline-mirror ${lib.escapeShellArg finalAttrs.offlineCache}
|
||||||
fixup-yarn-lock yarn.lock
|
fixup-yarn-lock yarn.lock
|
||||||
|
|
||||||
yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive
|
yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive
|
||||||
@ -73,10 +73,10 @@ stdenv.mkDerivation rec {
|
|||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = {
|
||||||
description = "Frontend for Akkoma";
|
description = "Frontend for Akkoma";
|
||||||
homepage = "https://akkoma.dev/AkkomaGang/akkoma-fe/";
|
homepage = "https://akkoma.dev/AkkomaGang/akkoma-fe/";
|
||||||
license = licenses.agpl3Only;
|
license = lib.licenses.agpl3Only;
|
||||||
maintainers = with maintainers; [ mvs ];
|
maintainers = with lib.maintainers; [ mvs ];
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user