It looks like jqr’s configure script contains a NixOS-incompatible shebang:
#!/bin/bash
which the Nix jqr package should replace with something like
#!${pkgs.bash}/bin/bash
or maybe even
#!/usr/bin/env bash
I’m not familiar with the Nix code that autogenerates R packages, but I’m guessing it fails to make such a replacement. Probably worth bringing up at github.com/NixOS/nixpkgs/issues (unless an issue for it already exists).
I played around with it, trying a shell.nix that contains:
but this doesn’t actually work. The way the r-modules are set up, preConfigure can not be passed in via an override like that. There’s probably another way… hopefully someone more knowledgeable will chime in with a feasible workaround.
I see some similar issues addressed for other packages in r-modules/default.nix, e.g.
For the life of me, I cannot figure out how to use the rPackageOverrides attribute correctly. This shell.nix results in error: attribute 'jqr' missing.
let
rPackageOverrides = p: {
jqr = p.jqr.overrideDerivation (attrs: {
preConfigure = "patchShebangs configure";
});
};
pkgs = import <nixpkgs> {
config = { inherit rPackageOverrides; };
};
rEnv = pkgs.rWrapper.override {
packages = with pkgs.rPackages; [ jqr ];
};
in with pkgs; mkShell {
name = "test-jqr";
version = "1.0.0";
buildInputs = [ rEnv ];
}
I’d recommend adding an issue for the broken jqr package. Maybe an issue for documenting how to use rPackageOverrides correctly too.