nix-gscheits/pkgs/artwork/default.nix
Simon Bruder c3feedb74a
pkgs/nix-gscheits.artwork: init
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.
2021-12-28 18:24:35 +01:00

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;
};
}