color correction – How can I create a LUT on Linux with free and open source software?

I use Linux for everything media production. I shoot RAW and process images with Darktable.

Now that I’ve started making videos too (4K ProRes), I need to apply a LUT to them in post. This requires importing a .cube file into Kdenlive. I know how to do that, but I don’t know how to create a LUT.

Can I import a frame of video into Darktable, adjust the colors, and export a .cube file to import into Kdenlive to apply to the video?

Or are there other programs that will create a LUT on Linux? Can GIMP do it?

What Linux program can be used to create LUTs?