overlayed: init at 0.5.0 (#340991)

This commit is contained in:
Peder Bergebakken Sundt 2024-09-19 23:28:19 +02:00 committed by GitHub
commit 4b19e6b087
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5542 additions and 0 deletions

5432
pkgs/by-name/ov/overlayed/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,70 @@
{
rustPlatform,
lib,
callPackage,
pkg-config,
openssl,
libsoup,
webkitgtk,
fetchFromGitHub,
libayatana-appindicator,
}:
rustPlatform.buildRustPackage rec {
pname = "overlayed";
version = "0.5.0";
src = fetchFromGitHub {
owner = "overlayeddev";
repo = "overlayed";
rev = "refs/tags/v${version}";
hash = "sha256-yS1u7pp7SfmqzoH0QOAH060uo3nFb/N9VIng0T21tVw=";
};
sourceRoot = "${src.name}/apps/desktop/src-tauri";
webui = callPackage ./webui.nix {
inherit meta src version;
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
openssl
webkitgtk
libsoup
];
env = {
OPENSSL_NO_VENDOR = 1;
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"tauri-plugin-window-state-0.1.1" = "sha256-2cdO+5YAP7MOK0/YKclQemK4N9ci2JX3AfmMaeauwNI=";
"tauri-nspanel-0.0.0" = "sha256-tQHY0OX37b4dqhs89phYIzw7JzEPmMJo5e/jlyzxdMg=";
"tauri-plugin-single-instance-0.0.0" = "sha256-S1nsT/Dr0aIJdiPnW1FGamCth7CDMNAp4v34tpWqjHg=";
};
};
postPatch = ''
substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \
--replace-fail "libayatana-appindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1"
substituteInPlace ./tauri.conf.json \
--replace-fail '"distDir": "../dist",' '"distDir": "${webui}",' \
--replace-fail '"beforeBuildCommand": "pnpm build"' '"beforeBuildCommand": ""'
'';
meta = {
description = "Modern discord voice chat overlay";
homepage = "https://github.com/overlayeddev/overlayed";
changelog = "https://github.com/overlayeddev/overlayed/releases/tag/v${version}";
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ bot-wxt1221 ];
license = lib.licenses.agpl3Plus;
mainProgram = "overlayed";
};
}

View File

@ -0,0 +1,40 @@
{
src,
meta,
version,
stdenv,
nodejs,
pnpm,
}:
stdenv.mkDerivation (finalAttrs: {
inherit version src meta;
pname = "overlayed-webui";
pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs) src pname version;
hash = "sha256-FBJrVXTgKh8Op7TiZjA/i2LY2OOIKmqGR+GwGUecqVI=";
};
nativeBuildInputs = [
nodejs
pnpm.configHook
];
buildPhase = ''
runHook preBuild
cd apps/desktop
node --max_old_space_size=1024000 ./node_modules/vite/bin/vite.js build
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp -r dist $out
runHook postInstall
'';
})