diff --git a/overlays/cross.nix b/overlays/cross.nix index fd4917351..8200766f2 100644 --- a/overlays/cross.nix +++ b/overlays/cross.nix @@ -152,6 +152,10 @@ in with final; { # binutils = binutils-unwrapped; # }; + # envelope = prev.envelope.override { + # cargo = crossCargo; + # }; + # 2025/07/27: upstreaming is unblocked # emacs = prev.emacs.override { # nativeComp = false; # will be renamed to `withNativeCompilation` in future @@ -159,10 +163,6 @@ in with final; { # # # }; - envelope = prev.envelope.override { - cargo = crossCargo; #< fixes openssl not being able to find its library - }; - # 2025/07/27: upstreaming is unblocked # firejail = prev.firejail.overrideAttrs (upstream: { # # firejail executes its build outputs to produce the default filter list. diff --git a/pkgs/by-name/envelope/package.nix b/pkgs/by-name/envelope/package.nix index 9a2bf7605..45c279aa7 100644 --- a/pkgs/by-name/envelope/package.nix +++ b/pkgs/by-name/envelope/package.nix @@ -9,9 +9,11 @@ libsoup_3, meson, ninja, + nix-update-script, openssl, pkg-config, python3, + rust, rustPlatform, rustc, stdenv, @@ -19,20 +21,21 @@ wrapGAppsHook4, }: -stdenv.mkDerivation { +stdenv.mkDerivation (finalAttrs: { pname = "envelope"; - version = "0.1.0-unstable-2024-09-13"; + version = "0.1.0-unstable-2025-05-17"; src = fetchFromGitLab { domain = "gitlab.gnome.org"; owner = "felinira"; repo = "envelope"; - rev = "11ce86da13793787a25e48ca23322b33fcf8bf34"; # last commit before libadwaita 1.6 - hash = "sha256-EX309RhisBx27TscMsibEvqCSCUSukTgf4Xs1Vws4YY="; + rev = "e2a8a56aa9b68d82486b99790b86322715d2a6db"; + hash = "sha256-osVShCaKKoGhxWCjaYcMkOji8e0oETgDaDpCAfHauwQ="; }; - cargoDeps = rustPlatform.importCargoLock { - lockFile = ./Cargo.lock; + cargoDeps = rustPlatform.fetchCargoVendor { + inherit (finalAttrs) pname version src; + hash = "sha256-8pK8cw9nYJmmybYRL+PUCK8FvUUPbyFp7oYYF461KPc="; }; nativeBuildInputs = [ @@ -58,10 +61,21 @@ stdenv.mkDerivation { postPatch = '' patchShebangs --build build-aux/meson-cargo-manifest.py - # versions prior to c3f5ed4f (2024-10-13) didn't embed Cargo.lock - cp ${./Cargo.lock} Cargo.lock + + substituteInPlace src/meson.build \ + --replace-fail \ + "'src' / rust_target / meson.project_name()" \ + "'src' / '${stdenv.hostPlatform.rust.cargoShortTarget}' / rust_target / meson.project_name()" ''; + env."CC_${stdenv.buildPlatform.rust.rustcTarget}" = rust.envVars.ccForBuild; #< fixes cross build of sql-macros proc-macro + env.CARGO_BUILD_TARGET = stdenv.hostPlatform.rust.rustcTargetSpec; + env.OPENSSL_NO_VENDOR = true; #< speculative, to use the nixos openssl + env.RUSTC_BOOTSTRAP = 1; #< fixes 'error[E0554]: `#![feature]` may not be used on the stable release channel' + # env.LIBSQLITE3_SYS_USE_PKG_CONFIG = 1; #< TODO: use nixos libsqlite instead of pre-packaged one + + passthru.updateScript = nix-update-script { }; + meta = with lib; { description = "a mobile-first email client for the GNOME ecosystem"; homepage = "https://gitlab.gnome.org/felinira/envelope/"; @@ -70,4 +84,4 @@ stdenv.mkDerivation { platforms = platforms.linux; mainProgram = "envelope"; }; -} +})