You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❯ nix build && ./result/bin/test-rustls
./result/bin/test-rustls: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory
❯ nix build && ldd ./result/bin/test-rustls
linux-vdso.so.1 (0x00007f31329e3000)
libssl.so.3 => not found
libcrypto.so.3 => not found
libgcc_s.so.1 => /nix/store/2d5spnl8j5r4n1s4bj1zmra7mwx0f1n8-xgcc-13.3.0-libgcc/lib/libgcc_s.so.1 (0x00007f31329b8000)
libc.so.6 => /nix/store/wn7v2vhyyyi6clcyn0s9ixvl7d4d87ic-glibc-2.40-36/lib/libc.so.6 (0x00007f3132407000)
/nix/store/wn7v2vhyyyi6clcyn0s9ixvl7d4d87ic-glibc-2.40-36/lib/ld-linux-x86-64.so.2 => /nix/store/wn7v2vhyyyi6clcyn0s9ixvl7d4d87ic-glibc-2.40-36/lib64/ld-linux-x86-64.so.2 (0x00007f31329e5000)
It works if I remove inherit rustc; from app.nix.
It's possible I'm not using crate2nix right. Maybe I need to pass more than rustc to it.
flake.nix
{description="test-rustls";inputs={devenv-root={url="file+file:///dev/null";flake=false;};flake-parts.url="github:hercules-ci/flake-parts";nixpkgs.url="github:cachix/devenv-nixpkgs/rolling";devenv.url="github:cachix/devenv";mk-shell-bin.url="github:rrbutani/nix-mk-shell-bin";fenix.url="github:nix-community/fenix";fenix.inputs={nixpkgs.follows="nixpkgs";};crate2nix={url="github:nix-community/crate2nix";inputs={flake-parts.follows="flake-parts";nixpkgs.follows="nixpkgs";};};};nixConfig={extra-substituters=["https://devenv.cachix.org""https://nix-community.cachix.org"];extra-trusted-public-keys=["devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=""nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="];};outputs=inputs @ {flake-parts,devenv-root,crate2nix,fenix,
...
}:
flake-parts.lib.mkFlake{inheritinputs;}{imports=[inputs.devenv.flakeModule];systems=["x86_64-linux"];perSystem={config,self',inputs',pkgs,system,
...
}: letinherit(fenix.packages.${system}.minimal)rustc;my-crate=import./app.nix{inheritpkgsrustc;};in{# Per-system attributes can be defined here. The self' and inputs'# module parameters provide easy access to attributes of the same# system.packages.default=my-crate;devenv.shells.default=letcrate2nix_pkgs=crate2nix.packages.${system}.default;in{devenv.root=letdevenvRootFileContent=builtins.readFiledevenv-root.outPath;inpkgs.lib.mkIf(devenvRootFileContent!="")devenvRootFileContent;name="my-project";imports=[# This is just like the imports in devenv.nix.# See https://devenv.sh/guides/using-with-flake-parts/#import-a-devenv-module# ./devenv-foo.nix];# https://devenv.sh/reference/options/packages=withpkgs;[crate2nix_pkgsopenssl];languages={c.enable=false;nix.enable=true;nix.lsp.package=pkgs.nixd;rust.enable=true;};};};flake={# The usual flake attributes can be defined here, including system-# agnostic ones like nixosModule and system-enumerating ones, although# those are more easily expressed in perSystem.};};}
It works if I remove
inherit rustc;
from app.nix.It's possible I'm not using crate2nix right. Maybe I need to pass more than
rustc
to it.flake.nix
app.nix
Here's a full repo https://github.com/bbigras/test-rustls
The text was updated successfully, but these errors were encountered: