nixpkgs/pkgs/applications/kde/angelfish.nix
Alyssa Ross 9ece636074 plasma5Packages.angelfish: fetchCargoTarball -> fetchCargoVendor
Cargo 1.84.0 seems to have changed the output format of cargo vendor
again, once again invalidating fetchCargoTarball FOD hashes.  It's
time to fix this once and for all, switching across the board to
fetchCargoVendor, which is not dependent on cargo vendor's output
format.

Taking a cargoSha256 parameter isn't a good idea, because it will
produce a silently broken FOD if we change the hashing scheme, like
we're doing here.  Overlays should provide a full cargoDeps object,
which wouldn't have that problem, because the overlay would be
responsible for the whole FOD.
2025-01-26 16:46:32 +01:00

81 lines
1.5 KiB
Nix

{
lib,
mkDerivation,
cargo,
cmake,
corrosion,
extra-cmake-modules,
fetchpatch2,
futuresql,
kconfig,
kcoreaddons,
kdbusaddons,
ki18n,
kirigami-addons,
kirigami2,
knotifications,
kpurpose,
kwindowsystem,
qcoro,
qtfeedback,
qtquickcontrols2,
qqc2-desktop-style,
qtwebengine,
rustPlatform,
rustc,
srcs,
}:
mkDerivation rec {
pname = "angelfish";
patches = [
(fetchpatch2 {
name = "fix-build-with-corrosion-0.5.patch";
url = "https://invent.kde.org/network/angelfish/-/commit/b04928e3b62a11b647622b81fb67b7c0db656ac8.patch";
hash = "sha256-9rpkMKQKrvGJFIQDwSIeeZyk4/vd348r660mBOKzM2E=";
})
];
cargoDeps = rustPlatform.fetchCargoVendor {
# include version in the name so we invalidate the FOD
name = "${pname}-${srcs.angelfish.version}";
inherit (srcs.angelfish) src;
hash = "sha256-M3CtP7eWqOxMvnak6K3QvB/diu4jAfMmlsa6ySFIHCU=";
};
nativeBuildInputs = [
cmake
corrosion
extra-cmake-modules
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = [
futuresql
kconfig
kcoreaddons
kdbusaddons
ki18n
kirigami-addons
kirigami2
knotifications
kpurpose
kwindowsystem
qcoro
qtfeedback
qtquickcontrols2
qqc2-desktop-style
qtwebengine
];
meta = with lib; {
description = "Web browser for Plasma Mobile";
homepage = "https://invent.kde.org/plasma-mobile/angelfish";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ dotlambda ];
};
}