Compare commits

..

2 commits

3 changed files with 145 additions and 25 deletions

48
flake.lock generated
View file

@ -105,11 +105,11 @@
]
},
"locked": {
"lastModified": 1705169127,
"narHash": "sha256-j9OEtNxOIPWZWjbECVMkI1TO17SzlpHMm0LnVWKOR/g=",
"lastModified": 1705408632,
"narHash": "sha256-/AhkReVocTli5BLWA5WXxUlGYXn3Agi/uzX76TNrsbo=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "f2942f3385f1b35cc8a1abb03a45e29c9cb4d3c8",
"rev": "37d6eeceee464adc03585404eebd68765b3c8615",
"type": "github"
},
"original": {
@ -125,11 +125,11 @@
]
},
"locked": {
"lastModified": 1704980875,
"narHash": "sha256-IPZmMjk5f4TBbEpzUFBc3OC1W6OwDNEXk2w/0uVXX1o=",
"lastModified": 1705273357,
"narHash": "sha256-JAlkxgJbWh7+auiT0rJL3IUXXtkULRqygfxQA6mvLgc=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "5f0ab0eedc6ede69beb8f45561ffefa54edc6e65",
"rev": "924d91e1e4c802fd8e60279a022dbae5acb36f2d",
"type": "github"
},
"original": {
@ -147,11 +147,11 @@
]
},
"locked": {
"lastModified": 1704665257,
"narHash": "sha256-Cycz00I26e8QZ9sZtCz0uIz6Cad5ld3zM7N2I+5beqI=",
"lastModified": 1705231543,
"narHash": "sha256-W8j0A5n2WOpCgdFRqMqwd9adNORcN1r/DpjRVxiFkAw=",
"owner": "Jovian-Experiments",
"repo": "Jovian-NixOS",
"rev": "8951673c6c216ddd6bac3db3e88e3f2281b3511a",
"rev": "ab807f9740c533070e8b68b0d86034d4a293b5f1",
"type": "github"
},
"original": {
@ -220,11 +220,11 @@
]
},
"locked": {
"lastModified": 1704596958,
"narHash": "sha256-BK3Ohsz7m8X6qVKFxDtr8KVcHipfr5hYE9PDIJevHbQ=",
"lastModified": 1705282324,
"narHash": "sha256-LnURMA7yCM5t7et9O2+2YfGQh0FKAfE5GyahNDDzJVM=",
"owner": "Mic92",
"repo": "nix-index-database",
"rev": "f46800ac5a6e9f892fe36e50821c5d85794ecc62",
"rev": "49aaeecf41ae0a0944e2c627cb515bcde428a1d1",
"type": "github"
},
"original": {
@ -240,11 +240,11 @@
]
},
"locked": {
"lastModified": 1704596958,
"narHash": "sha256-BK3Ohsz7m8X6qVKFxDtr8KVcHipfr5hYE9PDIJevHbQ=",
"lastModified": 1705282324,
"narHash": "sha256-LnURMA7yCM5t7et9O2+2YfGQh0FKAfE5GyahNDDzJVM=",
"owner": "Mic92",
"repo": "nix-index-database",
"rev": "f46800ac5a6e9f892fe36e50821c5d85794ecc62",
"rev": "49aaeecf41ae0a0944e2c627cb515bcde428a1d1",
"type": "github"
},
"original": {
@ -271,11 +271,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1704874635,
"narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=",
"lastModified": 1705331948,
"narHash": "sha256-qjQXfvrAT1/RKDFAMdl8Hw3m4tLVvMCc8fMqzJv0pP4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356",
"rev": "b8dd8be3c790215716e7c12b247f45ca525867e2",
"type": "github"
},
"original": {
@ -286,11 +286,11 @@
},
"nixpkgs-unstable-raw": {
"locked": {
"lastModified": 1704722960,
"narHash": "sha256-mKGJ3sPsT6//s+Knglai5YflJUF2DGj7Ai6Ynopz0kI=",
"lastModified": 1705316053,
"narHash": "sha256-J2Ey5mPFT8gdfL2XC0JTZvKaBw/b2pnyudEXFvl+dQM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "317484b1ead87b9c1b8ac5261a8d2dd748a0492d",
"rev": "c3e128f3c0ecc1fb04aef9f72b3dcc2f6cecf370",
"type": "github"
},
"original": {
@ -379,11 +379,11 @@
]
},
"locked": {
"lastModified": 1705281787,
"narHash": "sha256-q1peRaGxQb05mzfSyB7D9PhVL8dK3YoVSGUKfKvXxoU=",
"lastModified": 1705368072,
"narHash": "sha256-e7Gn7daakWvEj/hQTw628zMGhAMH88thrmhmoB6RV6o=",
"owner": "nix-community",
"repo": "nix-vscode-extensions",
"rev": "2357e0e02e954ad5b3a85bae108fc4c8804e0d26",
"rev": "37b8bbc1717211338c446b7b926276bf8db234ac",
"type": "github"
},
"original": {

View file

@ -72,7 +72,10 @@
nixpkgs-unstable-patched = nixpkgs.legacyPackages.x86_64-linux.applyPatches {
name = "patched-nixpkgs-unstable";
src = nixpkgs-unstable-raw;
patches = [ ./nixpkgs-patches/pr280779.patch ];
patches = [
./nixpkgs-patches/pr280779.patch
./nixpkgs-patches/pr281207.patch
];
};
# https://discourse.nixos.org/t/proper-way-of-applying-patch-to-system-managed-via-flake/21073/26
nixpkgs-unstable = (import "${nixpkgs-unstable-patched}/flake.nix").outputs { self = inputs.self; };

View file

@ -0,0 +1,117 @@
From 1f3bcdf27686e9d2c43a53cf3ba7cd0ee7978ff5 Mon Sep 17 00:00:00 2001
From: TomaSajt <62384384+TomaSajt@users.noreply.github.com>
Date: Tue, 16 Jan 2024 00:58:48 +0100
Subject: [PATCH] mysql-workbench: fix build, small refactor
---
.../misc/mysql-workbench/default.nix | 28 ++++++++++++-------
.../misc/mysql-workbench/fix-xml2.patch | 25 +++++++++++++++++
2 files changed, 43 insertions(+), 10 deletions(-)
create mode 100644 pkgs/applications/misc/mysql-workbench/fix-xml2.patch
diff --git a/pkgs/applications/misc/mysql-workbench/default.nix b/pkgs/applications/misc/mysql-workbench/default.nix
index ff9fb7c6b2cbe2..6b5933b3ebd0fd 100644
--- a/pkgs/applications/misc/mysql-workbench/default.nix
+++ b/pkgs/applications/misc/mysql-workbench/default.nix
@@ -1,4 +1,5 @@
-{ lib, stdenv
+{ lib
+, stdenv
, fetchurl
, substituteAll
, cmake
@@ -44,13 +45,14 @@
let
inherit (python3.pkgs) paramiko pycairo pyodbc;
-in stdenv.mkDerivation rec {
+in
+stdenv.mkDerivation (finalAttrs: {
pname = "mysql-workbench";
version = "8.0.34";
src = fetchurl {
- url = "https://cdn.mysql.com//Downloads/MySQLGUITools/mysql-workbench-community-${version}-src.tar.gz";
- sha256 = "sha256-ub/D6HRtXOvX+lai71t1UjMmMzBsz5ljCrJCuf9aq7U=";
+ url = "https://cdn.mysql.com/Downloads/MySQLGUITools/mysql-workbench-community-${finalAttrs.version}-src.tar.gz";
+ hash = "sha256-ub/D6HRtXOvX+lai71t1UjMmMzBsz5ljCrJCuf9aq7U=";
};
patches = [
@@ -75,6 +77,9 @@ in stdenv.mkDerivation rec {
src = ./fix-swig-build.patch;
cairoDev = "${cairo.dev}";
})
+
+ # a newer libxml2 version has changed some interfaces
+ ./fix-xml2.patch
];
# 1. have it look for 4.12.0 instead of 4.11.1
@@ -138,6 +143,10 @@ in stdenv.mkDerivation rec {
patchShebangs tools/get_wb_version.sh
'';
+ # GCC 13: error: 'int64_t' in namespace 'std' does not name a type
+ # when updating the version make sure this is still needed
+ env.CXXFLAGS = "-include cstdint";
+
env.NIX_CFLAGS_COMPILE = toString ([
# error: 'OGRErr OGRSpatialReference::importFromWkt(char**)' is deprecated
"-Wno-error=deprecated-declarations"
@@ -183,7 +192,7 @@ in stdenv.mkDerivation rec {
done
'';
- meta = with lib; {
+ meta = {
description = "Visual MySQL database modeling, administration and querying tool";
longDescription = ''
MySQL Workbench is a modeling tool that allows you to design
@@ -191,11 +200,10 @@ in stdenv.mkDerivation rec {
and query development modules where you can manage MySQL server instances
and execute SQL queries.
'';
-
homepage = "http://wb.mysql.com/";
- license = licenses.gpl2;
- maintainers = [ ];
- platforms = platforms.linux;
+ license = lib.licenses.gpl2Only;
mainProgram = "mysql-workbench";
+ maintainers = with lib.maintainers; [ tomasajt ];
+ platforms = lib.platforms.linux;
};
-}
+})
diff --git a/pkgs/applications/misc/mysql-workbench/fix-xml2.patch b/pkgs/applications/misc/mysql-workbench/fix-xml2.patch
new file mode 100644
index 00000000000000..857c3f9add4cae
--- /dev/null
+++ b/pkgs/applications/misc/mysql-workbench/fix-xml2.patch
@@ -0,0 +1,25 @@
+diff --git a/library/grt/src/grt.h b/library/grt/src/grt.h
+index 47bfd63..59e664b 100644
+--- a/library/grt/src/grt.h
++++ b/library/grt/src/grt.h
+@@ -35,6 +35,7 @@
+ #include <stdexcept>
+ #include <boost/function.hpp>
+ #include <libxml/xmlmemory.h>
++#include <libxml/tree.h>
+ #include "base/threading.h"
+ #include <string>
+ #include <gmodule.h>
+diff --git a/library/grt/src/unserializer.cpp b/library/grt/src/unserializer.cpp
+index 6dda76d..a6f6a3c 100644
+--- a/library/grt/src/unserializer.cpp
++++ b/library/grt/src/unserializer.cpp
+@@ -401,7 +401,7 @@ ValueRef internal::Unserializer::unserialize_xmldata(const char *data, size_t si
+ xmlDocPtr doc = xmlReadMemory(data, (int)size, NULL, NULL, XML_PARSE_NOENT);
+
+ if (!doc) {
+- xmlErrorPtr error = xmlGetLastError();
++ const xmlError* error = xmlGetLastError();
+
+ if (error)
+ throw std::runtime_error(base::strfmt("Could not parse XML data. Line %d, %s", error->line, error->message));