10:51
zarel has joined #nixos-ruby
11:03
pbb has joined #nixos-ruby
18:56
ar has left #nixos-ruby [#nixos-ruby]
21:19
<
{\_\} >
jaen[discord]: So I'm trying to make a docker image with a simple utility and I'm failing on compiling nokogiri, this is a stripped down example of what I'm doing (`test-package` is a very simple gem with a single binary requiring nokogiri; the bundix gemset was generated with `bundle install && bundix -l`, where nokogiri build didn't fail):
21:19
<
{\_\} >
jaen[discord]:
21:19
<
{\_\} >
jaen[discord]: ```nix
21:19
<
{\_\} >
jaen[discord]: {
21:19
<
{\_\} >
jaen[discord]: description = "Test";
21:19
<
{\_\} >
jaen[discord]:
21:19
<
{\_\} >
jaen[discord]: inputs = {
21:19
<
{\_\} >
jaen[discord]: nixpkgs.url = "nixpkgs/nixos-unstable";
21:19
<
{\_\} >
jaen[discord]: flake-utils = { url = "github:numtide/flake-utils"; inputs.nixpkgs.follows = "nixpkgs"; };
21:19
<
{\_\} >
jaen[discord]: };
21:19
<
{\_\} >
jaen[discord]:
21:19
<
{\_\} >
jaen[discord]: outputs = inputs@{
21:19
<
{\_\} >
jaen[discord]: self,
21:19
<
{\_\} >
jaen[discord]: nixpkgs,
21:19
<
{\_\} >
jaen[discord]: flake-utils,
21:19
<
{\_\} >
jaen[discord]: }:
21:19
<
{\_\} >
jaen[discord]: flake-utils.lib.eachSystem [ "x86_64-linux" ]
21:19
<
{\_\} >
jaen[discord]: (system:
21:19
<
{\_\} >
jaen[discord]: let
21:19
<
{\_\} >
jaen[discord]: pkgs = import nixpkgs { inherit system; };
21:19
<
{\_\} >
jaen[discord]: ruby = pkgs.ruby_2_7;
21:19
<
{\_\} >
jaen[discord]: test-package = pkgs.bundlerApp{
21:19
<
{\_\} >
jaen[discord]: inherit ruby;
21:19
<
{\_\} >
jaen[discord]:
21:19
<
{\_\} >
jaen[discord]: pname = "test-package";
21:19
<
{\_\} >
jaen[discord]: gemdir = ./.;
21:19
<
{\_\} >
jaen[discord]: exes = [ "test-package" ];
21:20
<
{\_\} >
jaen[discord]: };
21:20
<
{\_\} >
jaen[discord]: in
21:20
<
{\_\} >
jaen[discord]: {
21:20
<
{\_\} >
jaen[discord]: devShell = pkgs.mkShell {
21:20
<
{\_\} >
jaen[discord]: So I'm trying to make a docker image with a simple utility and I'm failing on compiling nokogiri, this is a stripped down example of what I'm doing (`test-package` is a very simple gem with a single binary requiring nokogiri; the bundix gemset was generated with `bundle install && bundix -l`, where nokogiri build didn't fail):
21:20
<
{\_\} >
jaen[discord]:
21:20
<
{\_\} >
jaen[discord]: ```nix
21:20
<
{\_\} >
jaen[discord]: {
21:20
<
{\_\} >
jaen[discord]: description = "Test package";
21:20
<
{\_\} >
jaen[discord]:
21:20
<
{\_\} >
jaen[discord]: inputs = {
21:20
<
{\_\} >
jaen[discord]: nixpkgs.url = "nixpkgs/nixos-unstable";
21:20
<
{\_\} >
jaen[discord]: flake-utils = { url = "github:numtide/flake-utils"; inputs.nixpkgs.follows = "nixpkgs"; };
21:20
<
{\_\} >
jaen[discord]: };
21:20
<
{\_\} >
jaen[discord]:
21:20
<
{\_\} >
jaen[discord]: outputs = inputs@{
21:20
<
{\_\} >
jaen[discord]: self,
21:20
<
{\_\} >
jaen[discord]: nixpkgs,
21:20
<
{\_\} >
jaen[discord]: flake-utils,
21:20
<
{\_\} >
jaen[discord]: }:
21:20
<
{\_\} >
jaen[discord]: flake-utils.lib.eachSystem [ "x86_64-linux" ]
21:20
<
{\_\} >
jaen[discord]: (system:
22:31
<
{\_\} >
jaen[discord]: For anyone looking for this in the future, apparently adding this:
22:31
<
{\_\} >
jaen[discord]: ```nix
22:31
<
{\_\} >
jaen[discord]: gemConfig = pkgs.defaultGemConfig // {
22:31
<
{\_\} >
jaen[discord]: nokogiri = attrs: {
22:31
<
{\_\} >
jaen[discord]: nativeBuildInputs = [ pkgs.zlib ];
22:31
<
{\_\} >
jaen[discord]: };
22:31
<
{\_\} >
jaen[discord]: };
22:31
<
{\_\} >
jaen[discord]: ```
22:31
<
{\_\} >
jaen[discord]: to the `bundlerApp` call solves the issue. Not quite sure why it is required, but at least it works (and nets me a different issue, oh well).
22:32
<
simpson >
I'm glad that you found a solution!