Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sequeler: init at 0.5.3 #35472

Closed
wants to merge 2 commits into from
Closed

sequeler: init at 0.5.3 #35472

wants to merge 2 commits into from

Conversation

etu
Copy link
Contributor

@etu etu commented Feb 24, 2018

Motivation for this change

It seems like a nice package.

cc @jtojnar maybe?

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@GrahamcOfBorg GrahamcOfBorg added the 6.topic: GNOME GNOME desktop environment and its underlying platform label Feb 24, 2018
@jtojnar
Copy link
Contributor

jtojnar commented Feb 24, 2018

This was my attempt at packaging it few days ago:

--- /dev/null
+++ b/pkgs/applications/misc/sequeler/default.nix
@@ -0,0 +1,55 @@
+{ stdenv
+, fetchFromGitHub
+, cmake
+, ninja
+, pkgconfig
+, vala
+, gettext
+, libxml2
+, gobjectIntrospection
+, wrapGAppsHook
+, gtk3
+, glib
+, granite
+, gnome3
+}:
+
+stdenv.mkDerivation rec {
+  name = "sequeler-${version}";
+  version = "0.5.1";
+
+  src = fetchFromGitHub {
+    owner = "Alecaddd";
+    repo = "sequeler";
+    rev = "v${version}";
+    sha256 = "1gphmd56kib757rwblsx9m2a4qqbm6pm9bjj8mh5xcc9jhws9vrj";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    ninja
+    pkgconfig
+    vala
+    gobjectIntrospection
+    gettext
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    gtk3
+    glib
+    granite
+    gnome3.libgee
+    libxml2 # required by libgda
+    gnome3.libgda
+    gnome3.gtksourceview
+  ];
+
+  meta = with stdenv.lib; {
+    description = "Friendly SQL Client";
+    homepage =  https://github.com/Alecaddd/sequeler;
+    maintainers = with maintainers; [ jtojnar ];
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+  };
+}
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -4606,6 +4606,8 @@
 
   seqdiag = pythonPackages.seqdiag;
 
+  sequeler = callPackage ../applications/misc/sequeler { };
+
   screenfetch = callPackage ../tools/misc/screenfetch { };
 
   sg3_utils = callPackage ../tools/system/sg3_utils { };

@@ -11,16 +17,23 @@ stdenv.mkDerivation rec {
})
];

configureFlags = [
"--enable-gi-system-install=no"
NIX_CFLAGS_COMPILE = stdenv.lib.optionals mysqlSupport [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my packaging, MySQL works for me even without NIX_CFLAGS_COMPILE. My lazy attempt without conditionals:

--- a/pkgs/desktops/gnome-3/misc/libgda/default.nix
+++ b/pkgs/desktops/gnome-3/misc/libgda/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchpatch, pkgconfig, intltool, itstool, libxml2, gtk3, openssl }:
+{ stdenv, fetchurl, fetchpatch, pkgconfig, intltool, itstool, libxml2, gtk3, openssl, postgresql, mysql }:
 
 stdenv.mkDerivation rec {
   inherit (import ./src.nix fetchurl) name src;
@@ -20,7 +20,7 @@
   hardeningDisable = [ "format" ];
 
   nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ intltool itstool libxml2 gtk3 openssl ];
+  buildInputs = [ intltool itstool libxml2 gtk3 openssl postgresql mysql.connector-c ];
 
   meta = with stdenv.lib; {
     description = "Database access library";

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, removed the cflags but it remained as optionals 👍

enableParallelBuilding = true;

hardeningDisable = [ "format" ];

nativeBuildInputs = [ pkgconfig ];
buildInputs = [ intltool itstool libxml2 gtk3 openssl ];
buildInputs = with stdenv.lib; [ intltool itstool libxml2 gtk3 openssl ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, since you are touching this, could you move intltool itstool libxml2 to nativeBuildInputs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved.

sha256 = "0m5zwl9jfdl1dzd1ymlwx7rx5cr9fdx06sbnidaajh33z02zaph0";
};

nativeBuildInputs = [ cmake pkgconfig vala ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ninja is preferred with cmake.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem to enjoy that.

ninja: error: loading 'build.ninja': No such file or directory

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is depends on the order, I think. See my package above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried to put cmake before or after ninja in that list, no difference :/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right. The problem is the manual configurePhase. That should not be needed. Again, see #35472 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, missed that. Seems to build fine without it. Added ninja as well and amended my commit :)

@@ -20701,6 +20701,11 @@ with pkgs;

iterm2 = callPackage ../applications/misc/iterm2 {};

sequeler = callPackage ../applications/misc/sequeler {
libgee = libgee_0_8;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should get rid of this, gnome3.libgee is the current version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@etu
Copy link
Contributor Author

etu commented Feb 24, 2018

@jtojnar Now it actually builds! :)

@etu etu changed the title [WIP] sequeler: init at 0.5.3 sequeler: init at 0.5.3 Feb 24, 2018
@jtojnar
Copy link
Contributor

jtojnar commented Feb 24, 2018

Merged as 3dfe50f. Thanks.

@jtojnar jtojnar closed this Feb 24, 2018
@etu etu deleted the sequeler branch February 24, 2018 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants