nur-packages

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

default.nix (1338B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchFromGitHub,
      5   cmake,
      6 }:
      7 
      8 let
      9   boost_crc = fetchFromGitHub {
     10     owner = "boostorg";
     11     repo = "crc";
     12     tag = "boost-1.86.0";
     13     hash = "sha256-SzPDNHX9arnnZNWf/RedbSw1UwqTNuZCxVmegXHANgY=";
     14   };
     15   catch2 = fetchFromGitHub {
     16     owner = "catchorg";
     17     repo = "Catch2";
     18     tag = "v3.7.1";
     19     hash = "sha256-Zt53Qtry99RAheeh7V24Csg/aMW25DT/3CN/h+BaeoM=";
     20   };
     21 in
     22 stdenv.mkDerivation (finalAttrs: {
     23   pname = "libgeodesk";
     24   version = "0.1";
     25 
     26   src = fetchFromGitHub {
     27     owner = "clarisma";
     28     repo = "libgeodesk";
     29     tag = "v${finalAttrs.version}";
     30     hash = "sha256-eX10Gkgsqa+RA+PDk+jdsQly3sUg2p3cFev5qXwhlG4=";
     31   };
     32 
     33   postPatch = ''
     34     substituteInPlace CMakeLists.txt \
     35       --replace-fail "GIT_REPOSITORY https://github.com/boostorg/crc.git" "SOURCE_DIR ${boost_crc}" \
     36       --replace-fail "GIT_TAG boost-1.86.0" "" \
     37       --replace-fail "GIT_REPOSITORY https://github.com/catchorg/Catch2.git" "SOURCE_DIR ${catch2}" \
     38       --replace-fail "GIT_TAG v3.7.1" ""
     39   '';
     40 
     41   nativeBuildInputs = [ cmake ];
     42 
     43   meta = {
     44     description = "Fast and storage-efficient spatial database engine for OpenStreetMap data";
     45     homepage = "https://github.com/clarisma/libgeodesk";
     46     license = lib.licenses.lgpl3Only;
     47     maintainers = [ lib.maintainers.sikmir ];
     48     platforms = lib.platforms.unix;
     49   };
     50 })