1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-01-22 14:45:27 +00:00
nixpkgs/pkgs/by-name/op/openexrid-unstable/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

56 lines
1.3 KiB
Nix

{ lib, stdenv, fetchFromGitHub, re2, openfx, zlib, ilmbase, libGLU, libGL, openexr }:
stdenv.mkDerivation {
pname = "openexrid-unstable";
version = "2017-09-17";
src = fetchFromGitHub {
owner = "MercenariesEngineering";
repo = "openexrid";
rev = "bec0081548a096f9bcdd1504970c96264b0fc050";
sha256 = "0h4b74lv59p4hhrvrqdmlnchn2i0v5id4kl8xc7j26l9884q0383";
};
outputs = [ "dev" "out" "lib" ];
patches = [ ./openexrid.patch ];
postPatch = ''
substituteInPlace openexrid/makefile \
--replace g++ c++
'';
env.NIX_CFLAGS_COMPILE = ''
-I${ilmbase.dev}/include/OpenEXR
-I${openexr.dev}/include/OpenEXR
-I${openfx.dev}/include/OpenFX
'';
buildInputs = [ re2 openfx zlib ilmbase libGLU libGL openexr ];
enableParallelBuilding = true;
buildPhase = ''
mkdir openexrid/release
PREFIX=$out make -C openexrid install
mkdir $dev;
mkdir $lib;
'';
installPhase = ''
find $out
mv $out/include $dev/
mv $out/lib $lib/
'';
meta = with lib; {
description = "OpenEXR files able to isolate any object of a CG image with a perfect antialiazing";
homepage = "https://github.com/MercenariesEngineering/openexrid";
maintainers = [ maintainers.guibou ];
platforms = platforms.all;
license = licenses.mit;
};
}