{ stdenvNoCC, database, sqlite, schemaspy, sqlite-jdbc, writeText, }: stdenvNoCC.mkDerivation { name = "docs"; src = database; nativeBuildInputs = [ sqlite schemaspy sqlite-jdbc ]; buildPhase = let sqliteProperties = writeText "sqlite.properties" '' description=SQLite driver=org.sqlite.JDBC driverPath=${sqlite-jdbc}/share/java/sqlite-jdbc-3.25.2.jar connectionSpec=jdbc:sqlite: ''; schemaspyProperties = writeText "schemaspy.properties" '' schemaspy.cat="%" schemaspy.t=sqlite schemaspy.sso=true schemaspy.db=jadb.sqlite schemaspy.o=docs schemaspy.s=schema.sql ''; in '' runHook preBuild sqlite3 jadb.sqlite ".schema" > schema.sql cp "${schemaspyProperties}" ./schemaspy.properties schemaspy -t "${sqliteProperties}" runHook postBuild ''; installPhase = '' runHook preInstall cp -r docs "$out" runHook postInstall ''; }