ChanServ changed the topic of #nixos-ruby to: Everything about using Nix & Ruby. Logs at https://logs.nix.samueldr.com/nixos-ruby/
zarel has joined #nixos-ruby
pbb has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
pbb has joined #nixos-ruby
ar has left #nixos-ruby [#nixos-ruby]
<{\_\}> j​aen[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):
<{\_\}> j​aen[discord]:
<{\_\}> j​aen[discord]: ```nix
<{\_\}> j​aen[discord]: {
<{\_\}> j​aen[discord]: description = "Test";
<{\_\}> j​aen[discord]:
<{\_\}> j​aen[discord]: inputs = {
<{\_\}> j​aen[discord]: nixpkgs.url = "nixpkgs/nixos-unstable";
<{\_\}> j​aen[discord]: flake-utils = { url = "github:numtide/flake-utils"; inputs.nixpkgs.follows = "nixpkgs"; };
<{\_\}> j​aen[discord]: };
<{\_\}> j​aen[discord]:
<{\_\}> j​aen[discord]: outputs = inputs@{
<{\_\}> j​aen[discord]: self,
<{\_\}> j​aen[discord]: nixpkgs,
<{\_\}> j​aen[discord]: flake-utils,
<{\_\}> j​aen[discord]: }:
<{\_\}> j​aen[discord]: flake-utils.lib.eachSystem [ "x86_64-linux" ]
<{\_\}> j​aen[discord]: (system:
<{\_\}> j​aen[discord]: let
<{\_\}> j​aen[discord]: pkgs = import nixpkgs { inherit system; };
<{\_\}> j​aen[discord]: ruby = pkgs.ruby_2_7;
<{\_\}> j​aen[discord]: test-package = pkgs.bundlerApp{
<{\_\}> j​aen[discord]: inherit ruby;
<{\_\}> j​aen[discord]:
<{\_\}> j​aen[discord]: pname = "test-package";
<{\_\}> j​aen[discord]: gemdir = ./.;
<{\_\}> j​aen[discord]: exes = [ "test-package" ];
<{\_\}> j​aen[discord]: };
<{\_\}> j​aen[discord]: in
<{\_\}> j​aen[discord]: {
<{\_\}> j​aen[discord]: devShell = pkgs.mkShell {
<{\_\}> j​aen[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):
<{\_\}> j​aen[discord]:
<{\_\}> j​aen[discord]: ```nix
<{\_\}> j​aen[discord]: {
<{\_\}> j​aen[discord]: description = "Test package";
<{\_\}> j​aen[discord]:
<{\_\}> j​aen[discord]: inputs = {
<{\_\}> j​aen[discord]: nixpkgs.url = "nixpkgs/nixos-unstable";
<{\_\}> j​aen[discord]: flake-utils = { url = "github:numtide/flake-utils"; inputs.nixpkgs.follows = "nixpkgs"; };
<{\_\}> j​aen[discord]: };
<{\_\}> j​aen[discord]:
<{\_\}> j​aen[discord]: outputs = inputs@{
<{\_\}> j​aen[discord]: self,
<{\_\}> j​aen[discord]: nixpkgs,
<{\_\}> j​aen[discord]: flake-utils,
<{\_\}> j​aen[discord]: }:
<{\_\}> j​aen[discord]: flake-utils.lib.eachSystem [ "x86_64-linux" ]
<{\_\}> j​aen[discord]: (system:
<{\_\}> j​aen[discord]: For anyone looking for this in the future, apparently adding this:
<{\_\}> j​aen[discord]: ```nix
<{\_\}> j​aen[discord]: gemConfig = pkgs.defaultGemConfig // {
<{\_\}> j​aen[discord]: nokogiri = attrs: {
<{\_\}> j​aen[discord]: nativeBuildInputs = [ pkgs.zlib ];
<{\_\}> j​aen[discord]: };
<{\_\}> j​aen[discord]: };
<{\_\}> j​aen[discord]: ```
<{\_\}> j​aen[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).
<simpson> I'm glad that you found a solution!