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

sqlint: init at 0.1.4 #24631

Closed
wants to merge 2 commits into from
Closed

sqlint: init at 0.1.4 #24631

wants to merge 2 commits into from

Conversation

michalrus
Copy link
Member

Motivation for this change

sqlint is useful (esp. with flycheck in Emacs)

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
    • Linux
  • 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.

But I need help. Currently, building pg_query-0.9.2 fails, because it’s a native extension and needs a native library… How to provide one in gemset.nix?

@Mic92
Copy link
Member

Mic92 commented Apr 4, 2017

you need to add an override to pkgs/development/ruby-modules/gem-config/default.nix for pg_query

@@ -129,6 +129,12 @@ in
];
};

pg_query = attrs: {
postPatch = ''
ln -s ${libpg_query}/lib ${libpg_query.name}
Copy link
Member Author

Choose a reason for hiding this comment

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

This doesn’t work… And is pretty awful, but take a look at https://github.com/lfittl/pg_query/blob/master/ext/pg_query/extconf.rb#L8-L11

What do, @Mic92? :-(

Copy link
Member

@Mic92 Mic92 Apr 7, 2017

Choose a reason for hiding this comment

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

the gem version in your project does not match the version on github: https://github.com/lfittl/pg_query/blob/v0.9.2/ext/pg_query/extconf.rb

It uses a different version of libpg_query. And also expects the header.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, OK! I’ll look at this over the weekend.

What would we do, though, if we had two projects with each depending on a different version of pg_query? We could depend only on one version of libpg_query in this override, right? What then?

Copy link
Member

Choose a reason for hiding this comment

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

How is this usually handled? @cstrahan

@ocharles
Copy link
Contributor

@michalrus are you still working on this? I see it stalled earlier, could you help push it forward if you still need this work to be merged?

@michalrus
Copy link
Member Author

michalrus commented Nov 20, 2017

@ocharles I’d love to have this util in my PATH, but I think I’m not the best person to grasp how to build (seemingly) non-trivial Ruby packages. 😿

If anyone knows how, please, help!

@ocharles
Copy link
Contributor

Ok, I think it might be best to move this discussion to an issue, and perhaps trying to rally the troops via the mailing list.

@ryantm ryantm mentioned this pull request Jun 16, 2018
8 tasks
@xeji
Copy link
Contributor

xeji commented Jul 11, 2018

superseded by #41901

@xeji xeji closed this Jul 11, 2018
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