nur-packages

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

default.nix (1714B)


      1 { lib, stdenv, fetchFromGitHub, fetchurl, substituteAll, cmake, boost, jre }:
      2 
      3 let
      4   json_src = fetchFromGitHub {
      5     owner = "ArthurSonzogni";
      6     repo = "nlohmann_json_cmake_fetchcontent";
      7     rev = "v3.9.1";
      8     hash = "sha256-5A18zFqbgDc99pqQUPcpwHi89WXb8YVR9VEwO18jH2I=";
      9   };
     10   antlr_src = fetchFromGitHub {
     11     owner = "ArthurSonzogni";
     12     repo = "antlr4";
     13     rev = "remove-pthread";
     14     hash = "sha256-ohhj59+rBZBUvL9exURx4BHgeM+zUUvvcHkdh8hJLw0=";
     15   };
     16   antlr_jar = fetchurl {
     17     url = "http://www.antlr.org/download/antlr-4.11.1-complete.jar";
     18     hash = "sha256-YpdeGStK8mIrcrXwExVT7jy86X923CpBYy3MVeJUc+E=";
     19   };
     20   kgt_src = fetchFromGitHub {
     21     owner = "ArthurSonzogni";
     22     repo = "kgt";
     23     rev = "56c3f46cf286051096d9295118c048219fe0d776";
     24     hash = "sha256-xH0htDZd2UihLn7PHKLjEYETzcBSeJFOMNredTqlCW8=";
     25   };
     26 in
     27 stdenv.mkDerivation rec {
     28   pname = "diagon";
     29   version = "1.1.158";
     30 
     31   src = fetchFromGitHub {
     32     owner = "ArthurSonzogni";
     33     repo = "Diagon";
     34     rev = "v${version}";
     35     hash = "sha256-Qxk3+1T0IPmvB5v3jaqvBnESpss6L8bvoW+R1l5RXdQ=";
     36   };
     37 
     38   patches = [
     39     # Prevent CMake from trying to fetch libraries from GitHub
     40     (substituteAll {
     41       src = ./deps.patch;
     42       inherit antlr_src antlr_jar json_src kgt_src;
     43     })
     44   ];
     45 
     46   nativeBuildInputs = [ cmake jre ];
     47 
     48   buildInputs = [ boost ];
     49 
     50   cmakeFlags = [
     51     (lib.cmakeBool "DIAGON_BUILD_TESTS" true)
     52   ];
     53 
     54   doCheck = true;
     55 
     56   postCheck = ''
     57     ./input_output_test
     58   '';
     59 
     60   meta = with lib; {
     61     description = "Interactive ASCII art diagram generators";
     62     inherit (src.meta) homepage;
     63     license = licenses.mit;
     64     maintainers = [ maintainers.sikmir ];
     65     platforms = platforms.unix;
     66     broken = true;
     67   };
     68 }