nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

default.nix (1124B)


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