nixpkgs/pkgs/by-name/ml/mlxbf-bootimages/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

41 lines
1.1 KiB
Nix

{ stdenv
, lib
, fetchurl
, dpkg
}:
stdenv.mkDerivation rec {
pname = "mlxbf-bootimages";
version = "4.8.0-13249";
src = fetchurl {
url = "https://linux.mellanox.com/public/repo/bluefield/${version}/bootimages/prod/${pname}-signed_${version}_arm64.deb";
hash = "sha256-VwbngA2UpHtvhCmL21qrebVSNG6/4PbkhnVAmERpek0=";
};
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 thillux ];
};
}