nixpkgs/pkgs/applications/graphics/k3d/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

51 lines
1.5 KiB
Nix

{ lib, stdenv, fetchFromGitHub, fetchpatch, ftgl, glew, asciidoc
, cmake, ninja, libGLU, libGL, zlib, python, expat, libxml2, libsigcxx, libuuid, freetype
, libpng, boost, doxygen, cairomm, pkgconfig, libjpeg, libtiff
, gettext, intltool, perl, gtkmm2, glibmm, gtkglext, libXmu }:
stdenv.mkDerivation rec {
version = "0.8.0.6";
pname = "k3d";
src = fetchFromGitHub {
owner = "K-3D";
repo = "k3d";
rev = "${pname}-${version}";
sha256 = "0vdjjg6h8mxm2n8mvkkg2mvd27jn2xx90hnmx23cbd35mpz9p4aa";
};
patches = [
(fetchpatch { /* glibmm 2.50 fix */
url = "https://github.com/K-3D/k3d/commit/c65889d0652490d88a573e47de7a9324bf27bff2.patch";
sha256 = "162icv1hicr2dirkb9ijacvg9bhz5j30yfwg7b45ijavk8rns62j";
})
];
cmakeFlags = [
"-DK3D_BUILD_DOCS=false"
"-DK3D_BUILD_GUIDE=false"
];
preConfigure = ''
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/build/lib"
'';
nativeBuildInputs = [ cmake ninja gettext intltool doxygen pkgconfig perl asciidoc ];
buildInputs = [
libGLU libGL zlib python expat libxml2 libsigcxx libuuid freetype libpng
boost cairomm libjpeg libtiff
ftgl glew gtkmm2 glibmm gtkglext libXmu
];
#doCheck = false;
NIX_CFLAGS_COMPILE = "-Wno-deprecated-declarations";
meta = with lib; {
description = "A 3D editor with support for procedural editing";
homepage = "http://www.k-3d.org/";
platforms = platforms.linux;
maintainers = [ maintainers.raskin ];
license = licenses.gpl2;
};
}