nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

default.nix (1001B)


      1 { lib, stdenv, mkDerivation, fetchFromGitHub, cmake, boost165, eigen, opencv2 }:
      2 
      3 mkDerivation rec {
      4   pname = "polyvectorization";
      5   version = "2019-08-23";
      6 
      7   src = fetchFromGitHub {
      8     owner = "bmpix";
      9     repo = "PolyVectorization";
     10     rev = "bceb8e2a08cca29cef1df074eb1a1f6450cc163f";
     11     hash = "sha256-WI6EXoflj3vrxTPN+RyiTgst8JR9JV9yz7+3PHBAAjU=";
     12   };
     13 
     14   patches = [ ./with-gui.patch ];
     15 
     16   postPatch = ''
     17     substituteInPlace src/main.cpp \
     18       --replace "#define WITH_GUI 1" "//#define WITH_GUI 1"
     19   '';
     20 
     21   nativeBuildInputs = [ cmake ];
     22 
     23   buildInputs = [ boost165 eigen opencv2 ];
     24 
     25   NIX_CFLAGS_COMPILE = "-fpermissive";
     26 
     27   installPhase = "install -Dm755 polyvector_thing -t $out/bin";
     28 
     29   meta = with lib; {
     30     description = "Reference implementation of Vectorization of Line Drawings via PolyVector Fields";
     31     inherit (src.meta) homepage;
     32     license = licenses.mit;
     33     maintainers = [ maintainers.sikmir ];
     34     platforms = platforms.linux;
     35     skip.ci = stdenv.isDarwin;
     36   };
     37 }