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

dbeaver: inits at 4.3.2 #33633

Merged
merged 2 commits into from Jan 10, 2018
Merged

dbeaver: inits at 4.3.2 #33633

merged 2 commits into from Jan 10, 2018

Conversation

samueldr
Copy link
Member

@samueldr samueldr commented Jan 8, 2018

Motivation for this change

Adds dbeaver-ce to nixpkgs.

Details to be checked

The attribute name chosen is dbeaver, even though dbeaver comes in two variations, CE and EE. I didn't know whether I should have picked dbeaverCE even though EE isn't packaged (yet?). I personally am not going to package EE, as I am not using it.

The build process uses a "built" release, just like eclipse does. In fact, this is pretty much copied from eclipse's build process, since dbeaver is built on the tooling eclipse is made from.

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.

@samueldr
Copy link
Member Author

samueldr commented Jan 9, 2018

changes since initial push

  • Removes an assert that came from eclipse derivation.
  • Fixes interpreter in a more portable way.
  • Uses facilities provided by nix instead of untarring manually.

homepage = https://dbeaver.jkiss.org;
description = "Universal SQL Client for developers, SQL programmers, database administrators and analysts. Supports all popular databases: MySQL, PostgreSQL, MariaDB, SQLite, etc";
license = licenses.asl20;
platforms = platforms.linux;
Copy link
Member

Choose a reason for hiding this comment

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

This is probably too permissive right now since you stated earlier that it only works on x86_64-linux.

{ stdenv, fetchurl, makeDesktopItem, makeWrapper
, fontconfig, freetype, glib, gtk2
, jdk, libX11, libXrender, libXtst, zlib
, ... }:
Copy link
Member

Choose a reason for hiding this comment

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

you don't need the ellipsis with pkgs.


meta = with stdenv.lib; {
homepage = https://dbeaver.jkiss.org;
description = "Universal SQL Client for developers, SQL programmers, database administrators and analysts. Supports all popular databases: MySQL, PostgreSQL, MariaDB, SQLite, etc";
Copy link
Member

Choose a reason for hiding this comment

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

personal taste: I prefer to wrap those long lines.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's right for longDescription, but description must be short and fit on one line.

};

buildInputs = [
makeWrapper fontconfig freetype glib gtk2
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't makeWrapper be a nativeBuildInput ?

@samueldr
Copy link
Member Author

samueldr commented Jan 9, 2018

Changes requested have been made.

];

src =
if stdenv.system == "x86_64-linux" then
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a leftover before setting meta.platforms, or is there a specific reason for adding that?

Copy link
Member Author

Choose a reason for hiding this comment

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

As explained before, this was heavily based off of eclipse's derivation, which makes use of this construct, instead of setting a more specific meta.platforms. It's been removed, since it probably is redundant.

@andir
Copy link
Member

andir commented Jan 10, 2018

@GrahamcOfBorg build dbeaver

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Failure for system: aarch64-linux

Package ‘dbeaver-ce-4.3.2’ in /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/pkgs/applications/misc/dbeaver/default.nix:62 is not supported on ‘aarch64-linux’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Failure for system: x86_64-darwin

Package ‘dbeaver-ce-4.3.2’ in /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/pkgs/applications/misc/dbeaver/default.nix:62 is not supported on ‘x86_64-darwin’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Success for system: x86_64-linux

glibPreFixupPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/1ldjrhmffasm6zxpkzy4pylyy1jq8daf-dbeaver-ce-4.3.2
shrinking /nix/store/1ldjrhmffasm6zxpkzy4pylyy1jq8daf-dbeaver-ce-4.3.2/dbeaver/dbeaver
shrinking /nix/store/1ldjrhmffasm6zxpkzy4pylyy1jq8daf-dbeaver-ce-4.3.2/dbeaver/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.551.v20171108-1834/eclipse_1630.so
strip is /nix/store/wxn5gn8amxm1w0ikcx4gbs8a17wvss4j-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/1ldjrhmffasm6zxpkzy4pylyy1jq8daf-dbeaver-ce-4.3.2/bin 
patching script interpreter paths in /nix/store/1ldjrhmffasm6zxpkzy4pylyy1jq8daf-dbeaver-ce-4.3.2
checking for references to /tmp/nix-build-dbeaver-ce-4.3.2.drv-0 in /nix/store/1ldjrhmffasm6zxpkzy4pylyy1jq8daf-dbeaver-ce-4.3.2...
/nix/store/1ldjrhmffasm6zxpkzy4pylyy1jq8daf-dbeaver-ce-4.3.2

@andir andir merged commit 32f6c9a into NixOS:master Jan 10, 2018
@andir
Copy link
Member

andir commented Jan 10, 2018

Thank you for the contribution @samueldr ! 👍

@samueldr samueldr deleted the feature/dbeaver branch March 18, 2018 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants