Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
129 lines
2.6 KiB
Nix
129 lines
2.6 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
fetchFromGitLab,
|
|
nix-update-script,
|
|
cargo,
|
|
meson,
|
|
ninja,
|
|
rustPlatform,
|
|
rustc,
|
|
pkg-config,
|
|
glib,
|
|
grass-sass,
|
|
gtk4,
|
|
gtksourceview5,
|
|
lcms2,
|
|
libadwaita,
|
|
gst_all_1,
|
|
desktop-file-utils,
|
|
appstream-glib,
|
|
openssl,
|
|
pipewire,
|
|
libshumate,
|
|
wrapGAppsHook4,
|
|
sqlite,
|
|
xdg-desktop-portal,
|
|
libseccomp,
|
|
glycin-loaders,
|
|
libwebp,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "fractal";
|
|
version = "12.1";
|
|
|
|
src = fetchFromGitLab {
|
|
domain = "gitlab.gnome.org";
|
|
owner = "World";
|
|
repo = "fractal";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-xeB6N4ljXGzysy5RnDRK1wPiIRUSDcl+5BIdp6NO5ZA=";
|
|
};
|
|
|
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
|
inherit (finalAttrs) src;
|
|
hash = "sha256-CHduzW++BYzasFv/x0Q1T7EaTlo1EqYY2gxQJv+ek0A=";
|
|
};
|
|
|
|
patches = [
|
|
# Disable debug symbols in release builds
|
|
# The debug symbols are stripped afterwards anyways, and building with them requires extra memory
|
|
./disable-debug.patch
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace src/meson.build --replace-fail \
|
|
"'src' / rust_target / meson.project_name()" \
|
|
"'src' / '${stdenv.hostPlatform.rust.cargoShortTarget}' / rust_target / meson.project_name()"
|
|
'';
|
|
|
|
# Dirty approach to add patches after cargoSetupPostUnpackHook
|
|
# We should eventually use a cargo vendor patch hook instead
|
|
preConfigure = ''
|
|
pushd ../$(stripHash $cargoDeps)/glycin-2.*
|
|
patch -p3 < ${glycin-loaders.passthru.glycinPathsPatch}
|
|
popd
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
glib
|
|
grass-sass
|
|
gtk4
|
|
meson
|
|
ninja
|
|
pkg-config
|
|
rustPlatform.bindgenHook
|
|
rustPlatform.cargoSetupHook
|
|
cargo
|
|
rustc
|
|
desktop-file-utils
|
|
appstream-glib
|
|
wrapGAppsHook4
|
|
];
|
|
|
|
buildInputs = [
|
|
glib
|
|
gtk4
|
|
gtksourceview5
|
|
lcms2
|
|
libadwaita
|
|
openssl
|
|
pipewire
|
|
libshumate
|
|
sqlite
|
|
xdg-desktop-portal
|
|
libseccomp
|
|
libwebp
|
|
]
|
|
++ (with gst_all_1; [
|
|
gstreamer
|
|
gst-plugins-base
|
|
gst-plugins-bad
|
|
gst-plugins-good
|
|
gst-plugins-rs
|
|
]);
|
|
|
|
preFixup = ''
|
|
gappsWrapperArgs+=(
|
|
--prefix XDG_DATA_DIRS : "${glycin-loaders}/share"
|
|
)
|
|
'';
|
|
|
|
env.CARGO_BUILD_TARGET = stdenv.hostPlatform.rust.rustcTargetSpec;
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = {
|
|
description = "Matrix group messaging app";
|
|
homepage = "https://gitlab.gnome.org/World/fractal";
|
|
changelog = "https://gitlab.gnome.org/World/fractal/-/releases/${finalAttrs.version}";
|
|
license = lib.licenses.gpl3Plus;
|
|
teams = [ lib.teams.gnome ];
|
|
platforms = lib.platforms.linux;
|
|
mainProgram = "fractal";
|
|
};
|
|
})
|