Trouble installing rofi plugin (rofi-calc)

I am trying to install rofi plugin called rofi-calc. I cloned the repository and created shell.nix file:

with import <nixos> {};

mkShell {
  buildInputs = [
      gnumake
      autoreconfHook
      pkg-config
      rofi
      cairo
  ];
}

I have followed installation from source instructions:

$ autoreconf -i
$ mkdir build
$ cd build/
$ ../configure
$ make
$ make install

However, I got stuck in the final step (make install). The complete log from the command:

make[1]: Entering directory '/home/julius/applications/rofi-calc/build'
make[1]: Nothing to be done for 'install-exec-am'.
 /nix/store/k8lhqzpaaymshchz8ky3z4653h4kln9d-coreutils-8.31/bin/mkdir -p '/nix/store/c6qr0hdhcgpi1l6ai4gjscq3xb4yd8kj-rofi-unwrapped-1.5.4/lib/rofi//'
/nix/store/k8lhqzpaaymshchz8ky3z4653h4kln9d-coreutils-8.31/bin/mkdir: cannot create directory ‘/nix/store/c6qr0hdhcgpi1l6ai4gjscq3xb4yd8kj-rofi-unwrapped-1.5.4/lib/rofi//’: Read-only file system
make[1]: *** [Makefile:422: install-pluginLTLIBRARIES] Error 1
make[1]: Leaving directory '/home/julius/applications/rofi-calc/build'
make: *** [Makefile:759: install-am] Error 2

I am new to NixOS and haven’t fully wrapped my head around the Nix-way of installing software. Perhaps I need to create an overlay for rofi or a separate derivation for rofi-calc?

Any help would be appreciated.

1 Like

I think the issue comes from rofi-calc trying to install into rofi’s derivation:

This conflicts with Nix’s atomic property. Some patching of that is probably requires. rofi-calc should have its own derivation.

Thanks for explaining! I haven’t really written any package derivations before. Could you point me in the general direction?