nixpkgs/pkgs/by-name/eq/equicord/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
1.3 KiB
Nix
Raw Normal View History

2024-10-19 19:25:10 +00:00
{
fetchFromGitHub,
git,
lib,
nodejs,
pnpm_9,
stdenv,
buildWebExtension ? false,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "equicord";
version = "1.10.4"; # from package.json
src = fetchFromGitHub {
owner = "Equicord";
repo = "Equicord";
rev = "440b68ea82b6fd44bf5ec70b759a0207ee9f4ca7";
hash = "sha256-9GIw8g2HZ6/5Lb4gtDyuBqZWi5YK5Uz0lo+u+LrIZwI=";
};
pnpmDeps = pnpm_9.fetchDeps {
inherit (finalAttrs) pname version src;
hash = "sha256-kGLF6uIr0xxlB5LaSqKiBKESbmWN7PzDErrCmiT6vXA=";
};
nativeBuildInputs = [
git
nodejs
pnpm_9.configHook
];
env = {
EQUICORD_REMOTE = "${finalAttrs.src.owner}/${finalAttrs.src.repo}";
EQUICORD_HASH = "${finalAttrs.src.rev}";
};
buildPhase = ''
runHook preBuild
pnpm run ${if buildWebExtension then "buildWeb" else "build"} \
-- --standalone --disable-updater
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp -r dist/${lib.optionalString buildWebExtension "chromium-unpacked/"} $out
runHook postInstall
'';
meta = {
description = "The other cutest Discord client mod";
homepage = "https://github.com/Equicord/Equicord";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.linux;
maintainers = [
lib.maintainers.NotAShelf
];
};
})