nixpkgs/pkgs/by-name/iv/ivsc-firmware/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

47 lines
1.2 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
}:
stdenv.mkDerivation {
pname = "ivsc-firmware";
version = "unstable-2024-06-14";
src = fetchFromGitHub {
owner = "intel";
repo = "ivsc-firmware";
rev = "74a01d1208a352ed85d76f959c68200af4ead918";
hash = "sha256-kHYfeftMtoOsOtVN6+XoDMDHP7uTEztbvjQLpCnKCh0=";
};
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/lib/firmware/vsc
cp --no-preserve=mode --recursive ./firmware/* $out/lib/firmware/vsc/
install -D ./LICENSE $out/share/doc
mkdir -p $out/lib/firmware/vsc/soc_a1_prod
# According to Intel's documentation for prod platform the a1_prod postfix is need it (https://github.com/intel/ivsc-firmware)
# This fixes ipu6 webcams
for file in $out/lib/firmware/vsc/*.bin; do
ln -sf "$file" "$out/lib/firmware/vsc/soc_a1_prod/$(basename "$file" .bin)_a1_prod.bin"
done
runHook postInstall
'';
meta = with lib; {
description = "Firmware binaries for the Intel Vision Sensing Controller";
homepage = "https://github.com/intel/ivsc-firmware";
license = licenses.issl;
sourceProvenance = with sourceTypes; [
binaryFirmware
];
maintainers = [ ];
platforms = [ "x86_64-linux" ];
};
}