-
Notifications
You must be signed in to change notification settings - Fork 26
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
Allow insecure openssl version #89
Comments
I have exactly the same question |
You can use an older version of nixpkgs-ruby which refers to an older version of nixpkgs where openssl 1.1 isn't deprecated/removed yet. For instance:
If you really want to use nixpkgs-ruby with an EOL version of Ruby against a new version of nixpkgs, then you'd need to repackage OpenSSL 1.1 or Ruby needs to be patched to be compatible with OpenSSL 3. I tried in the past, but it was too much effort for me to have an EOL version work with a modern OpenSSL. |
Just wanted to mention as well, if you're using devenv.sh, you can use the permittedInsecurePackages:
- openssl-1.1.1w |
Hi there, I'm using
|
Ah right, nixpkgs-ruby must then also follow nixpkgs of devenv:
|
I cannot get that to work as expected, my only source of success has been to run: |
Using devenv in a flake, I was able to get this to work on an up-to-date version of nixpkgs by overriding the vulnerabilities associated with flake.nix{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
devenv.url = "github:cachix/devenv";
nixpkgs-ruby.url = "github:bobvanderlinden/nixpkgs-ruby";
};
nixConfig = {
extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
extra-substituters = "https://devenv.cachix.org";
};
outputs = { self, nixpkgs, devenv, nixpkgs-ruby, ... } @ inputs:
let
pkgs = import nixpkgs { system = "aarch64-darwin"; };
in
{
devShell.aarch64-darwin = devenv.lib.mkShell {
inherit inputs pkgs;
modules = [
({ pkgs, config, system, ... }:
let
openssl_1_1_insecure = pkgs.openssl_1_1.overrideAttrs (
finalAttrs: previousAttrs: {
meta = previousAttrs.meta // { knownVulnerabilities = [ ]; };
}
);
ruby = nixpkgs-ruby.lib.packageFromRubyVersionFile {
system = "aarch64-darwin";
file = ./.ruby-version;
};
ruby_insecure = ruby.override {
openssl = openssl_1_1_insecure;
};
in
{
languages.ruby = {
enable = true;
package = ruby_insecure;
};
})
];
};
};
} .ruby-version
|
this is a bit simpler and also works: pkgs = import nixpkgs {
inherit system;
config.permittedInsecurePackages = ["openssl-1.1.1w"];
overlays = [
(final: prev: {
ruby_2_6_3 = nixpkgs-ruby.packages.${system}."ruby-2.6.3".override {
openssl = prev.openssl_1_1;
};
})
];
}; the issue is that |
Hello,
I am trying out your devshell with ruby 2.7 and am getting this error:
Since I'm not running NixOS and don't want to expect every developer to either modify their home folder or run with env variables, is there a way to modify the flake to allow the insecure openssl package? I am using the default template.
The text was updated successfully, but these errors were encountered: