nur-packages

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

package.nix (1193B)


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