about summary refs log tree commit diff
path: root/nixpkgs/pkgs/kde/gear/kdepim-addons/default.nix
blob: 9861da5879cd015d6eb23d9eabf78274020a2c2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
  mkKdeDerivation,
  sources,
  rustPlatform,
  cargo,
  rustc,
  corrosion,
  discount,
  alpaka,
  # provided as callPackage input to enable easier overrides through overlays
  cargoHash ? "sha256-MMCDfCtGDJ+yrfdpZEMxlSh7yWU6de/Pggw7Op7VxQI=",
}:
mkKdeDerivation rec {
  pname = "kdepim-addons";

  inherit (sources.${pname}) version;

  cargoRoot = "plugins/webengineurlinterceptor/adblock";

  cargoDeps = rustPlatform.fetchCargoTarball {
    # include version in the name so we invalidate the FOD
    name = "${pname}-${version}";
    src = sources.${pname};
    sourceRoot = "${pname}-${version}/${cargoRoot}";
    hash = cargoHash;
  };

  extraNativeBuildInputs = [
    rustPlatform.cargoSetupHook
    cargo
    rustc
  ];

  extraBuildInputs = [corrosion discount alpaka];
}