nur-packages

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

package.nix (1616B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchFromGitHub,
      5   fetchpatch,
      6   cmake,
      7   makeWrapper,
      8   curl,
      9   freetype,
     10   geos,
     11   jsoncpp,
     12   libgeotiff,
     13   libjpeg,
     14   libtiff,
     15   proj,
     16   sqlite,
     17 }:
     18 
     19 stdenv.mkDerivation (finalAttrs: {
     20   pname = "ossim";
     21   version = "2.12.0";
     22 
     23   src = fetchFromGitHub {
     24     owner = "ossimlabs";
     25     repo = "ossim";
     26     tag = "v${finalAttrs.version}";
     27     hash = "sha256-nVQN+XnCYpVQSkgKsolqbR3KtPGTkvpym4cDl7IqjUc=";
     28   };
     29 
     30   patches = [
     31     # Fixed build error gcc version 15.0.1
     32     (fetchpatch {
     33       url = "https://github.com/ossimlabs/ossim/commit/13b9fa9ae54f79a7e7728408de6246e00d38f399.patch";
     34       hash = "sha256-AKzOT+JurB/54gvzn2a5amw+uIupaNxssnEhc8CSfPM=";
     35     })
     36   ];
     37 
     38   postPatch = ''
     39     substituteInPlace CMakeLists.txt \
     40       --replace-fail 'GET_GIT_REVISION()' "" \
     41       --replace-fail 'OSSIM_GIT_REVISION_NUMBER "UNKNOWN"' 'OSSIM_GIT_REVISION_NUMBER "${finalAttrs.version}"'
     42   '';
     43 
     44   nativeBuildInputs = [
     45     cmake
     46     makeWrapper
     47   ];
     48 
     49   buildInputs = [
     50     curl
     51     freetype
     52     geos
     53     jsoncpp
     54     libgeotiff
     55     libjpeg
     56     libtiff
     57     proj
     58     sqlite
     59   ];
     60 
     61   cmakeFlags = [
     62     (lib.cmakeBool "BUILD_OSSIM_TESTS" false)
     63     (lib.cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "3.10")
     64   ];
     65 
     66   postInstall = ''
     67     for binary in $out/bin/ossim-*; do
     68       wrapProgram $binary \
     69         --prefix LD_LIBRARY_PATH ":" $out/lib
     70     done
     71   '';
     72 
     73   meta = {
     74     description = "Open Source Software Image Map library";
     75     homepage = "https://github.com/ossimlabs/ossim";
     76     license = lib.licenses.mit;
     77     maintainers = [ lib.maintainers.sikmir ];
     78     platforms = lib.platforms.unix;
     79   };
     80 })