-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
git-credential-keepassxc: fix build on darwin #312508
git-credential-keepassxc: fix build on darwin #312508
Conversation
Result of |
Result of |
@GrahamcOfBorg build git-credential-keepassxc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i believe that using overrideSDK is the preferred method rather than trying to pin to some version.
eg:
ovrdsdk.diff
diff --git a/pkgs/applications/version-management/git-credential-keepassxc/default.nix b/pkgs/applications/version-management/git-credential-keepassxc/default.nix
index 2d3e511fcbfd..b75f025d6141 100644
--- a/pkgs/applications/version-management/git-credential-keepassxc/default.nix
+++ b/pkgs/applications/version-management/git-credential-keepassxc/default.nix
@@ -10,7 +10,11 @@
, withAll ? false
}:
-rustPlatform.buildRustPackage rec {
+let
+ # apply the possibly modified stdenv from all-packages.nix
+ buildRustPackage = rustPlatform.buildRustPackage.override { inherit stdenv; };
+in
+buildRustPackage rec {
pname = "git-credential-keepassxc";
version = "0.14.0";
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 1f6c9407956f..8bf0e4ee4e7e 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -2335,6 +2335,10 @@ with pkgs;
git-credential-1password = callPackage ../applications/version-management/git-credential-1password { };
git-credential-keepassxc = callPackage ../applications/version-management/git-credential-keepassxc {
+ stdenv =
+ if stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "11"
+ then overrideSDK stdenv "11.0"
+ else stdenv;
inherit (darwin.apple_sdk.frameworks) DiskArbitration Foundation;
};
or
ovrdsdk-alt.diff
diff --git a/pkgs/applications/version-management/git-credential-keepassxc/default.nix b/pkgs/applications/version-management/git-credential-keepassxc/default.nix
index 2d3e511fcbfd..1c75d64d39a2 100644
--- a/pkgs/applications/version-management/git-credential-keepassxc/default.nix
+++ b/pkgs/applications/version-management/git-credential-keepassxc/default.nix
@@ -1,5 +1,6 @@
{ lib
, stdenv
+, overrideSDK
, rustPlatform
, fetchFromGitHub
, DiskArbitration
@@ -10,7 +11,14 @@
, withAll ? false
}:
-rustPlatform.buildRustPackage rec {
+let
+ stdenv' =
+ if stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "11"
+ then overrideSDK stdenv "11.0"
+ else stdenv;
+ buildRustPackage = rustPlatform.buildRustPackage.override { stdenv = stdenv'; };
+in
+buildRustPackage rec {
pname = "git-credential-keepassxc";
version = "0.14.0";
@@ -23,7 +31,7 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-c2YucWs0UzyWDKWS5KebT3ps+XvWzlI0+ziJ8JX6oiQ=";
- buildInputs = lib.optionals stdenv.isDarwin [ DiskArbitration Foundation ];
+ buildInputs = lib.optionals stdenv'.isDarwin [ DiskArbitration Foundation ];
buildFeatures = []
++ lib.optional withNotification "notification"
@annaleeleaves , thank you for the feedback, I'll look into it. |
I still prefer nixpkgs/pkgs/os-specific/darwin/apple-sdk-11.0/default.nix Lines 119 to 128 in 27851ed
|
Closing in favor of #312711. |
hmm, i thought that the overrideSDK rewrite #287609 fixed it but from looking at the PR comment it states that rustPlatform still needs some attention. |
Description of changes
Things done
Changed SDK version as per #215782 .
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.