about summary refs log tree commit diff
path: root/pkgs/development/libraries/pc-ble-driver
diff options
context:
space:
mode:
authorTheodore Ni <3806110+tjni@users.noreply.github.com>2022-09-29 14:24:18 -0700
committerGitHub <noreply@github.com>2022-09-29 23:24:18 +0200
commit3955ba389c1156ed862f78cfba77f47c7e2c44d1 (patch)
treef35ba3f387c1623fb48ba2a99a941a506b200db9 /pkgs/development/libraries/pc-ble-driver
parentab5003daa583007b06da0443bd3256ced6ac6f8c (diff)
pc-ble-driver: fix build on aarch64-darwin, little cleanups (#192565)
Diffstat (limited to 'pkgs/development/libraries/pc-ble-driver')
-rw-r--r--pkgs/development/libraries/pc-ble-driver/default.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/development/libraries/pc-ble-driver/default.nix b/pkgs/development/libraries/pc-ble-driver/default.nix
index ae139639c7323..7a7b8475d7c46 100644
--- a/pkgs/development/libraries/pc-ble-driver/default.nix
+++ b/pkgs/development/libraries/pc-ble-driver/default.nix
@@ -10,21 +10,28 @@ stdenv.mkDerivation rec {
 
   src = fetchFromGitHub {
     owner = "NordicSemiconductor";
-    repo = "pc-ble-driver";
+    repo = pname;
     rev = "v${version}";
-    sha256 = "1609x17sbfi668jfwyvnfk9z29w6cgzvgv67xcpvpx5jv0czpcdj";
+    hash = "sha256-srH7Gdiy9Lsv68fst/9jhifx03R2e+4kMia6pU/oCZg=";
   };
 
   patches = [
+    (fetchpatch {
+      name = "support-arm.patch";
+      url = "https://github.com/NordicSemiconductor/pc-ble-driver/commit/76a6b31dba7a13ceae40587494cbfa01a29192f4.patch";
+      hash = "sha256-bvK1BXjdlhIXV8R4PiCGaq8oSLzgjMmTgAwssm8N2sk=";
+    })
      # Fix build with GCC 11
     (fetchpatch {
       url = "https://github.com/NordicSemiconductor/pc-ble-driver/commit/37258e65bdbcd0b4369ae448faf650dd181816ec.patch";
-      sha256 = "sha256-gOdzIW8YJQC+PE4FJd644I1+I7CMcBY8wpF6g02eI5g=";
+      hash = "sha256-gOdzIW8YJQC+PE4FJd644I1+I7CMcBY8wpF6g02eI5g=";
     })
   ];
 
   cmakeFlags = [
     "-DNRF_BLE_DRIVER_VERSION=${version}"
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    "-DARCH=arm64"
   ];
 
   nativeBuildInputs = [ cmake git ];