Skip to content
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

Adding libsecret to cargo to get cargo login to work #190

Merged
merged 3 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/mk-aggregated.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, symlinkJoin, pkgsTargetTarget, bash, curl }:
{ lib, stdenv, symlinkJoin, pkgsTargetTarget, bash, curl, libsecret }:
{ pname, version, date, selectedComponents, availableComponents ? selectedComponents }:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forget to remove this?

let
inherit (lib) optional;
Expand Down
5 changes: 4 additions & 1 deletion lib/mk-component-set.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Define component derivations and special treatments.
{ lib, stdenv, stdenvNoCC, gnutar, autoPatchelfHook, bintools, zlib, gccForLibs
{ lib, stdenv, stdenvNoCC, gnutar, autoPatchelfHook, bintools, zlib, gccForLibs, libsecret
# The path to nixpkgs root.
, path
, toRustTarget, removeNulls
Expand Down Expand Up @@ -139,6 +139,9 @@ let
wrap "$dst" ${path + "/pkgs/build-support/bintools-wrapper/ld-wrapper.sh"} "$unwrapped"
done
fi
''
+ optionalString (stdenv.isLinux && pname == "cargo") ''
patchelf --add-needed ${libsecret}/lib/libsecret-1.so.0 $out/bin/cargo
'';

env = lib.optionalAttrs (pname == "rustc") {
Expand Down
Loading