nixpkgs/pkgs/by-name/ip/ipu6-camera-bins/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

60 lines
1.2 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, autoPatchelfHook
, expat
, zlib
}:
stdenv.mkDerivation (finalAttrs: rec {
pname = "ipu6-camera-bins";
version = "unstable-2024-09-27";
src = fetchFromGitHub {
repo = "ipu6-camera-bins";
owner = "intel";
rev = "98ca6f2a54d20f171628055938619972514f7a07";
hash = "sha256-DAjAzHMqX41mrfQVpDUJLw4Zjb9pz6Uy3TJjTGIkd6o=";
};
nativeBuildInputs = [
autoPatchelfHook
(lib.getLib stdenv.cc.cc)
expat
zlib
];
installPhase = ''
runHook preInstall
mkdir -p $out
cp --no-preserve=mode --recursive \
lib \
include \
$out/
# There is no LICENSE file in the src
# install -m 0644 -D LICENSE $out/share/doc/LICENSE
runHook postInstall
'';
postFixup = ''
for pcfile in $out/lib/pkgconfig/*.pc; do
substituteInPlace $pcfile \
--replace 'prefix=/usr' "prefix=$out"
done
'';
meta = with lib; {
description = "IPU firmware and proprietary image processing libraries";
homepage = "https://github.com/intel/ipu6-camera-bins";
license = licenses.issl;
sourceProvenance = with sourceTypes; [
binaryFirmware
];
maintainers = [ ];
platforms = [ "x86_64-linux" ];
};
})