Skip to content

Commit

Permalink
Include sqlite, postgresql, and mysql JDBC drivers by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramblurr committed Oct 30, 2024
1 parent 16c3027 commit 92a1830
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 5 deletions.
18 changes: 14 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [UNRELEASED]

### Added

- Include sqlite, postgresql, and mysql JDBC drivers by default

### Fixed

- The changelog formatting

## v0.2.0 (2024-10-30)

### Added

- Added Docker container image
- Updated datomic-pro to version 1.0.7260
- Switched to Nix's JDK 21 headless package (now that it is sufficiently headless)

### Changed

### Added
- Updated datomic-pro to version 1.0.7260
- Switched to Nix's JDK 21 headless package (now that it is sufficiently headless

- Created this flake with datomic-pro version 1.0.7075
### Added

## v0.1.0 (2024-06-12)

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ Runs a Datomic Transactor. This is the default mode when the container is run wi
* A rw volume of `/config` is required.
* Configure with env vars (see below) or add `/config/transactor.properties` to supply a config to the transactor.
* A rw volume of `/data` is optional (for use in H2 mode).
* Postgresql, MySQL, and sqlite JDBC drivers are included by default.

#### Env vars

Expand Down
20 changes: 19 additions & 1 deletion pkgs/datomic-pro.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
stdenv,
fetchzip,
jdk21_headless,
sqlite-jdbc,
postgresql_jdbc,
mysql_jdbc,
enableSqlite ? true,
# datomic upstream comes with the postgresql jdbc jar, you can override it with the nixpkgs version by setting this true
# in either case *a* postgresql jdbc jar will be included
enablePostgresql ? false,
enableMysql ? true,
...
}:

Expand All @@ -23,7 +31,17 @@ stdenv.mkDerivation (finalAttrs: {
ls -al $src
mkdir -p $out
cp -r $src/* $out
find $out
chmod -R u+w $out/lib
${lib.optionalString enableSqlite ''
cp ${sqlite-jdbc}/share/java/*.jar $out/lib/
''}
${lib.optionalString enableMysql ''
cp ${mysql_jdbc}/share/java/*.jar $out/lib/
''}
${lib.optionalString enablePostgresql ''
rm $out/lib/postgresql*.jar
cp ${postgresql_jdbc}/share/java/*.jar $out/lib/
''}
runHook postInstall
'';
meta = {
Expand Down

0 comments on commit 92a1830

Please sign in to comment.