default.nix (1171B)
1 { 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 boost, 7 eigen, 8 opencv, 9 wrapQtAppsHook, 10 }: 11 12 stdenv.mkDerivation { 13 pname = "polyvectorization"; 14 version = "0-unstable-2019-08-23"; 15 16 src = fetchFromGitHub { 17 owner = "bmpix"; 18 repo = "PolyVectorization"; 19 rev = "bceb8e2a08cca29cef1df074eb1a1f6450cc163f"; 20 hash = "sha256-WI6EXoflj3vrxTPN+RyiTgst8JR9JV9yz7+3PHBAAjU="; 21 }; 22 23 patches = [ ./with-gui.patch ]; 24 25 postPatch = '' 26 substituteInPlace src/main.cpp \ 27 --replace-fail "#define WITH_GUI 1" "//#define WITH_GUI 1" 28 ''; 29 30 nativeBuildInputs = [ 31 cmake 32 wrapQtAppsHook 33 ]; 34 35 buildInputs = [ 36 boost 37 eigen 38 opencv 39 ]; 40 41 env.NIX_CFLAGS_COMPILE = "-fpermissive"; 42 43 installPhase = '' 44 install -Dm755 polyvector_thing -t $out/bin 45 ''; 46 47 meta = { 48 description = "Reference implementation of Vectorization of Line Drawings via PolyVector Fields"; 49 homepage = "https://github.com/bmpix/PolyVectorization"; 50 license = lib.licenses.mit; 51 maintainers = [ lib.maintainers.sikmir ]; 52 platforms = lib.platforms.linux; 53 mainProgram = "polyvector_thing"; 54 skip.ci = stdenv.isDarwin; 55 broken = true; 56 }; 57 }