summary refs log tree commit diff
diff options
context:
space:
mode:
authorRyan Lahfa <masterancpp@gmail.com>2023-05-22 18:00:56 +0200
committerGitHub <noreply@github.com>2023-05-22 18:00:56 +0200
commit268367d31be8662318fdf7e98c8b2a82ce87232f (patch)
tree2a29f0b2408e94aa81ca7d09e92787b4d827b5fa
parenteda31d0386fb51a5c02db23e4d1142dcb9057ca8 (diff)
parent98c518221d0a56946cf41e0715a80acc909075e2 (diff)
Merge pull request #233387 from nikstur/mlxbf-bootimages
mlxbf-bootimages: init at 4.0.3-12704
-rw-r--r--pkgs/misc/mlxbf-bootimages/default.nix41
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/misc/mlxbf-bootimages/default.nix b/pkgs/misc/mlxbf-bootimages/default.nix
new file mode 100644
index 0000000000000..a7552c0bb5cb2
--- /dev/null
+++ b/pkgs/misc/mlxbf-bootimages/default.nix
@@ -0,0 +1,41 @@
+{ stdenv
+, lib
+, fetchurl
+, dpkg
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mlxbf-bootimages";
+  version = "4.0.3-12704";
+
+  src = fetchurl {
+    url = let mainVersion = builtins.elemAt (lib.splitString "-" version) 0; in
+      "https://linux.mellanox.com/public/repo/bluefield/${mainVersion}/bootimages/prod/${pname}-signed_${version}_arm64.deb";
+    hash = "sha256-e13XZhxf41240Qu+hh2a9+KIvZCL+8k5JyZrpJCHmI8=";
+  };
+
+  nativeBuildInputs = [
+    dpkg
+  ];
+
+  unpackCmd = "dpkg -x $curSrc src";
+
+  # Only install /lib. /usr only contains the licenses which are also available
+  # in /lib.
+  installPhase = ''
+    find lib -type f -exec install -D {} $out/{} \;
+  '';
+
+  meta = with lib; {
+    description = "BlueField boot images";
+    homepage = "https://github.com/Mellanox/bootimages";
+    # It is unclear if the bootimages themselves are Open Source software. They
+    # never explicitly say they are. They contain Open Source software licensed
+    # under bsd2, bsd2Patent, bsd3. However, it is probably safer to assume
+    # they are unfree. See https://github.com/Mellanox/bootimages/issues/3
+    license = licenses.unfree;
+    platforms = [ "aarch64-linux" ];
+    maintainers = with maintainers; [ nikstur ];
+  };
+}
+
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 3be9e8d0a16f7..1f38640fd8f61 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -26505,6 +26505,8 @@ with pkgs;
     armTrustedFirmwareS905
     ;
 
+  mlxbf-bootimages = callPackage ../misc/mlxbf-bootimages { };
+
   microcodeAmd = callPackage ../os-specific/linux/microcode/amd.nix { };
 
   microcodeIntel = callPackage ../os-specific/linux/microcode/intel.nix { };