Since OpenSCAD has only limited SVG export capabilities, this implementation exports the image as PNG. Also, because OpenSCAD lacks transparency and anti-aliasing, the background colour is replaced by transparency and the image is then scaled down.
32 lines
657 B
Nix
32 lines
657 B
Nix
{ lib, stdenv, imagemagick, inkscape, jpegoptim, mesa, openscad, oxipng, xvfb-run }:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "nix-gscheits-artwork";
|
|
|
|
src = ./artwork;
|
|
|
|
nativeBuildInputs = [
|
|
imagemagick
|
|
inkscape
|
|
jpegoptim
|
|
openscad
|
|
oxipng
|
|
xvfb-run
|
|
];
|
|
|
|
preBuild = ''
|
|
export LIBGL_DRIVERS_PATH=${mesa.drivers}/lib/dri
|
|
export LD_LIBRARY_PATH=${mesa.drivers}/lib
|
|
'';
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
meta = with lib; {
|
|
description = "Artwork for nix-gscheits";
|
|
license = licenses.cc-by-sa-40;
|
|
maintainers = with maintainers; [ sbruder ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|