diff --git a/crate2nix/default.nix b/crate2nix/default.nix index c51b7411..5a850653 100644 --- a/crate2nix/default.nix +++ b/crate2nix/default.nix @@ -13,6 +13,7 @@ , defaultCrateOverrides ? pkgs.defaultCrateOverrides , nix ? pkgs.nix , cargo ? pkgs.cargo +, libsecret ? pkgs.libsecret , callPackage ? pkgs.callPackage , nix-prefetch-git ? pkgs.nix-prefetch-git # Seperate arguements that are NOT filled by callPackage. @@ -26,7 +27,7 @@ let baseName = builtins.baseNameOf (builtins.toString name); in !(baseName == "templates" && type == "directory"); - crate2nix = cargoNix.rootCrate.build.override { + crate2nix = (cargoNix.rootCrate.build.override { testCrateFlags = [ "--skip nix_integration_tests" ]; @@ -46,7 +47,11 @@ let buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; }; }; - }; + }).overrideAttrs (attrs: { + postInstall = lib.optionalString stdenv.isLinux '' + patchelf --add-needed ${libsecret}/lib/libsecret-1.so.0 $out/bin/crate2nix + ''; + }); set_templates = if release then "" else "--set TEMPLATES_DIR ${./templates}"; in symlinkJoin {