Hi !
I鈥檓 trying to write a derivation for DecSync - it鈥檚 a plugin to evolution-data-server
which enables a calendar/contacts/etc sync.
I managed to get all the dependencies resolved and the project builds - but I have some trouble figuring out how to install it - would appreciate any input here
Here鈥檚 my current almost-working derivation:
with import <nixpkgs> {};
stdenv.mkDerivation rec {
name = "evolution-decsync";
version = "1.0.1";
src = fetchFromGitHub {
owner = "39aldo39";
repo = "Evolution-DecSync";
rev = "v1.0.1";
sha256 = "0cq5cvc9ywcbwrhj5nm9azjmjwc8hxfbw3r7bjqkjd0bwfnxk3g6";
fetchSubmodules = true;
};
buildInputs = [ libgee json-glib gnome3.evolution-data-server gnome3.evolution gtk3 webkitgtk glib libsecret libsoup];
nativeBuildInputs = [ meson ninja vala pkg-config ];
configurePhase = "meson build --prefix=$out";
buildPhase = "ninja -C build";
installPhase = "ninja -C build install";
}
Running build fails on install:
$ nix-build default.nix
[..]
PermissionError: [Errno 13] Permission denied: '/nix/store/fl6wrf5h4awkprk7ibbvkfan51fp77rd-evolution-data-server-3.30.5/lib/evolution-data-server/addressbook-backends/libebookbackenddecsync.so'
Installing src/backends/addressbook/libebookbackenddecsync.so to /nix/store/fl6wrf5h4awkprk7ibbvkfan51fp77rd-evolution-data-server-3.30.5/lib/evolution-data-server/addressbook-backends
FAILED: meson-install
/nix/store/0mz0dr57n65fdrzlxjm8sjl7acjf9kzh-meson-0.49.1/bin/meson install --no-rebuild
ninja: build stopped: subcommand failed.
builder for '/nix/store/4cnrb00cil678axn323szd2nzik6gk3k-evolution-decsync.drv' failed with exit code 1
error: build of '/nix/store/4cnrb00cil678axn323szd2nzik6gk3k-evolution-decsync.drv' failed
My understanding is that DecSync installer tries to detect already existing installation of evolution-data-server and put the compiled libraries there and this results in permission denied error.
What would be the NixOS way do approaching this ? Changing the derivation for evolution-data-server to know about this optional plugin ? If so - could you give me a hint on how to do that ? If not - what would be the best course of action here ?
Thanks so much !