2024-10-12 17:00:50 +00:00
{
buildDotnetModule ,
cargo-about ,
2024-10-03 23:38:37 +00:00
cargo-tauri_1 ,
2024-10-12 17:00:50 +00:00
dotnetCorePackages ,
fetchFromGitHub ,
fetchNpmDeps ,
glib-networking ,
google-fonts ,
lib ,
2024-12-01 22:27:07 +00:00
libsoup_2_4 ,
2024-10-12 17:00:50 +00:00
nodejs ,
npmHooks ,
openssl ,
pkg-config ,
rustPlatform ,
stdenv ,
webkitgtk_4_0 ,
} :
let
pname = " a l c o m " ;
version = " 1 . 8 . 2 " ;
src = fetchFromGitHub {
owner = " v r c - g e t " ;
repo = " v r c - g e t " ;
rev = " r e f s / t a g s / v ${ version } " ;
fetchSubmodules = true ;
hash = " s h a 2 5 6 - j k h j J T b / U 2 d X j / v y a i p + g W o q I O d f F K S E x e D l 0 T 1 1 D E 4 = " ;
} ;
subdir = " v r c - g e t - g u i " ;
google-fonts' = google-fonts . override {
fonts = [
" N o t o S a n s "
" N o t o S a n s J P "
] ;
} ;
dotnetSdk = dotnetCorePackages . sdk_8_0 ;
dotnetRuntime = dotnetCorePackages . runtime_8_0 ;
dotnetBuild = buildDotnetModule {
inherit pname version src ;
dotnet-sdk = dotnetSdk ;
dotnet-runtime = dotnetRuntime ;
projectFile = [
" v r c - g e t - l i t e d b / d o t n e t / v r c - g e t - l i t e d b . c s p r o j "
" v r c - g e t - l i t e d b / d o t n e t / L i t e D B / L i t e D B / L i t e D B . c s p r o j "
] ;
nugetDeps = ./deps.nix ;
} ;
in
rustPlatform . buildRustPackage {
inherit pname version src ;
nativeBuildInputs = [
cargo-about
2024-10-03 23:38:37 +00:00
cargo-tauri_1 . hook
2024-10-12 17:00:50 +00:00
dotnetSdk
nodejs
npmHooks . npmConfigHook
pkg-config
] ;
buildInputs =
[ openssl ]
++ lib . optionals stdenv . hostPlatform . isLinux [
glib-networking
2024-12-01 22:27:07 +00:00
libsoup_2_4
2024-10-12 17:00:50 +00:00
webkitgtk_4_0
]
++ dotnetSdk . packages
++ dotnetBuild . nugetDeps ;
cargoLock = {
lockFile = ./Cargo.lock ;
outputHashes = {
" t a u r i - p l u g i n - s i n g l e - i n s t a n c e - 0 . 0 . 0 " = " s h a 2 5 6 - M f 2 / c n K o t d 7 5 1 Z c S H f i S L N e 2 n x B f o 4 d M B d o C w Q h e 7 y I = " ;
} ;
} ;
buildAndTestSubdir = subdir ;
npmDeps = fetchNpmDeps {
inherit src ;
sourceRoot = " ${ src . name } / ${ subdir } " ;
hash = " s h a 2 5 6 - 4 z o k K L h L g W 2 u 1 G x e T l I A A x J I N S p x H R t Y 5 H X m h i 9 n j 6 c = " ;
} ;
npmRoot = subdir ;
patches = [
./use-local-fonts.patch
] ;
postPatch = ''
install - Dm644 " ${ google-fonts' } / s h a r e / f o n t s / t r u e t y p e / N o t o S a n s [ w d t h , w g h t ] . t t f " $ { subdir } /app/fonts/noto-sans.ttf
install - Dm644 " ${ google-fonts' } / s h a r e / f o n t s / t r u e t y p e / N o t o S a n s J P [ w g h t ] . t t f " $ { subdir } /app/fonts/noto-sans-jp.ttf
'' ;
preConfigure = ''
dotnet restore " v r c - g e t - l i t e d b / d o t n e t / v r c - g e t - l i t e d b . c s p r o j " \
- p:ContinuousIntegrationBuild=true \
- p:Deterministic=true
'' ;
passthru = {
inherit ( dotnetBuild ) fetch-deps ;
} ;
meta = {
description = " E x p e r i m e n t a l G U I a p p l i c a t i o n t o m a n a g e V R C h a t U n i t y P r o j e c t s " ;
homepage = " h t t p s : / / g i t h u b . c o m / v r c - g e t / v r c - g e t " ;
license = lib . licenses . mit ;
maintainers = with lib . maintainers ; [ Scrumplex ] ;
# aarch64-linux: Error failed to build app: Target aarch64-unknown-linux-gnu does not exist. Please run `rustup target list` to see the available targets.
broken = stdenv . hostPlatform . isDarwin || stdenv . hostPlatform . isAarch64 ;
mainProgram = " a l c o m " ;
} ;
}