Help with Oracle 19c database derivation

Hello,

I might need Oracle database for a project and I notice that it is not available in Nix.
I’ve started the scaffolding of a derivation, and while I succeeded to get rid of the first glitches, I’m now blocked at:

$ NIXPKGS_ALLOW_UNFREE=1 nix build .#oracle --impure
warning: Git tree '/home/devlin/Code/NixOS/nixpkgs' is dirty
error: builder for '/nix/store/mbiikrj3093fdsysq02kc0wl2yxhhlmh-oracle-19c.drv' failed with exit code 1;
       last 10 log lines:
       > source root is .
       > setting SOURCE_DATE_EPOCH to timestamp 1555572405 of file ./install/.img.bin
       > unpackPhase completed in 52 seconds
       > patching sources
       > configuring
       > building
       > no Makefile or custom buildPhase, doing nothing
       > installing
       >
       > ERROR: Unable to run the setup script as user (). Run the setup script from a location where the Oracle Database software image is owned by user ().
       For full logs, run 'nix log /nix/store/mbiikrj3093fdsysq02kc0wl2yxhhlmh-oracle-19c.drv'.
$

Find the PR at oracle: init at 19c by drupol · Pull Request #238996 · NixOS/nixpkgs · GitHub

Feel free to try fix it and propose suggestions !

Thanks in advance.

You will need to look into the setup script contents.

Just for the record, I’m replying to myself here to help other people.

Today I published an “Oracle Database” flake I have been working on since a couple of months, very sporadically, here and there.

Find the thread here: Packaging Oracle Database 23c