about summary refs log tree commit diff
path: root/proj/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'proj/default.nix')
-rw-r--r--proj/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/proj/default.nix b/proj/default.nix
new file mode 100644
index 0000000..96b8470
--- /dev/null
+++ b/proj/default.nix
@@ -0,0 +1,35 @@
+# Recipe for building PROJ at specific snapshot
+#
+# SPDX-FileCopyrightText: 2007 Marc Weber
+# SPDX-FileCopyrightText: 2019 Jonathan Ringer
+# SPDX-License-Identifier: MIT
+#
+# SPDX-FileCopyrightText: 2023 Nguyễn Gia Phong
+# SPDX-License-Identifier: AGPL-3.0-or-later
+
+{ lib, stdenv, version, fetchFromGitHub, commit, hash
+, autoreconfHook, binRenameHook, pkg-config, sqlite }:
+
+stdenv.mkDerivation rec {
+  name = "proj";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "OSGeo";
+    repo = "PROJ";
+    rev = commit;
+    inherit hash;
+  };
+
+  nativeBuildInputs = [ autoreconfHook binRenameHook pkg-config ];
+  buildInputs = [ sqlite ];
+  enableParallelBuilding = true;
+  outputs = [ "out" "dev" ];
+
+  meta = with lib; {
+    description = "Cartographic Projections Library";
+    homepage = "https://proj.org";
+    license = licenses.mit;
+    platforms = platforms.all;
+  };
+}