nur-packages

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

package.nix (881B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchFromGitHub,
      5   cmake,
      6   gtest,
      7 }:
      8 
      9 stdenv.mkDerivation (finalAttrs: {
     10   pname = "geo-utils-cpp";
     11   version = "1.2.2";
     12 
     13   __structuredAttrs = true;
     14 
     15   src = fetchFromGitHub {
     16     owner = "gistrec";
     17     repo = "geo-utils-cpp";
     18     tag = "v${finalAttrs.version}";
     19     hash = "sha256-rB/VYcPNlthClue2W/L8FdV8QN6MM/260XLRILLzrhs=";
     20   };
     21 
     22   postPatch = ''
     23     substituteInPlace cmake/geo-utils-cpp.pc.in \
     24       --replace-fail 'includedir=''${prefix}/@CMAKE_INSTALL_INCLUDEDIR@' "includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@" \
     25   '';
     26 
     27   nativeBuildInputs = [ cmake ];
     28 
     29   buildInputs = [ gtest ];
     30 
     31   meta = {
     32     description = "Tiny header-only C++17 library for lat/lng geometry";
     33     homepage = "https://github.com/gistrec/geo-utils-cpp";
     34     license = lib.licenses.asl20;
     35     maintainers = [ lib.maintainers.sikmir ];
     36     platforms = lib.platforms.unix;
     37   };
     38 })