Building RT in a nix-shell derivation

I managed to build RawTherapee on NixOS 23.11 using a nix-shell derivation.
I just want to share the derivation path:

rawtherapee-dev.nix

with import <nixpkgs> {};
stdenv.mkDerivation {
  name = "rawtherapee-dev";
  buildInputs = [
    cmake
    exiv2
    expat
    fftw
    fftwFloat
    fftwMpi
    fftwQuad
    gcc13
    gdb
    glib
    glibmm
    gtk3
    gtkmm3
    lcms2
    lensfun
    libcanberra-gtk3
    libdatrie
    libepoxy
    libiptcdata
    librsvg
    libselinux
    libsepol
    libthai
    libxkbcommon
    mount
    pcre
    pcre2
    pkg-config
    util-linux
    xorg.libXdmcp
    xorg.libXtst
  ];
  shellHook = ''echo "Good luck for compiling rawtherapee!"'';
}

I have built the follwing commint from branch develop:
72bf27121 - (HEAD -> dev, origin/dev, origin/HEAD) Removed gzip from windows.yml workflow #6864 (Fri, 13 Oct 2023 23:04:33 +0200) <Morgan Hardwood>

Happy Building!

Hello fellow NixOS user! Thanks for sharing. Are you using RT from this shell or do you have an overlay for master or what??

I use the normal pre-build RT from the NixOS package rawtherapee.

To write a bug report I created a debug build within the nix-shell derivation.
But then I called this build via gdb from outside the nix-shell.

I used a nix-shell derivation for the build because I do not intend to build RT regularly. I you want to build RT often, you may want to install the build dependency permanently.

1 Like