package.nix (1146B)
1 { 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 desktopToDarwinBundle, 7 mariadb-connector-c, 8 qt5, 9 }: 10 11 stdenv.mkDerivation (finalAttrs: { 12 pname = "ocelotgui"; 13 version = "2.6.0"; 14 15 __structuredAttrs = true; 16 17 src = fetchFromGitHub { 18 owner = "ocelot-inc"; 19 repo = "ocelotgui"; 20 tag = finalAttrs.version; 21 hash = "sha256-4hlYf5TIlWLpL4FczntCQWB8EGFff1KoCAYcSC4niMI="; 22 }; 23 24 nativeBuildInputs = [ 25 cmake 26 qt5.wrapQtAppsHook 27 ] ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; 28 29 buildInputs = [ mariadb-connector-c ]; 30 31 cmakeFlags = [ 32 (lib.cmakeBool "CMAKE_SKIP_RPATH" true) 33 (lib.cmakeFeature "MYSQL_INCLUDE_DIR" "${mariadb-connector-c.dev}/include/mariadb") 34 (lib.cmakeFeature "QT_VERSION" "5") 35 (lib.cmakeFeature "OCELOT_THIRD_PARTY" "0") 36 ]; 37 38 env.NIX_LDFLAGS = "-L${mariadb-connector-c}/lib/mariadb -lmysqlclient"; 39 40 meta = { 41 description = "GUI client for MySQL or MariaDB"; 42 homepage = "https://github.com/ocelot-inc/ocelotgui"; 43 license = lib.licenses.gpl2; 44 maintainers = [ lib.maintainers.sikmir ]; 45 platforms = lib.platforms.unix; 46 mainProgram = "ocelotgui"; 47 }; 48 })
