nur-packages

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

default.nix (1087B)


      1 { lib, stdenv, fetchFromGitHub, cmake, boost, eigen, opencv2, wrapQtAppsHook }:
      2 
      3 stdenv.mkDerivation rec {
      4   pname = "polyvectorization";
      5   version = "0-unstable-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-fail "#define WITH_GUI 1" "//#define WITH_GUI 1"
     19   '';
     20 
     21   nativeBuildInputs = [ cmake wrapQtAppsHook ];
     22 
     23   buildInputs = [ boost eigen opencv2 ];
     24 
     25   env.NIX_CFLAGS_COMPILE = "-fpermissive";
     26 
     27   installPhase = ''
     28     install -Dm755 polyvector_thing -t $out/bin
     29   '';
     30 
     31   meta = with lib; {
     32     description = "Reference implementation of Vectorization of Line Drawings via PolyVector Fields";
     33     inherit (src.meta) homepage;
     34     license = licenses.mit;
     35     maintainers = [ maintainers.sikmir ];
     36     platforms = platforms.linux;
     37     mainProgram = "polyvector_thing";
     38     skip.ci = stdenv.isDarwin;
     39   };
     40 }