From e24be19c7531d4d7647fc4444eb8408838b42481 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Mon, 20 May 2024 14:21:00 +0200 Subject: [PATCH] Add tinyows --- flake.nix | 1 + pkgs/tinyows/default.nix | 49 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 pkgs/tinyows/default.nix diff --git a/flake.nix b/flake.nix index 77ab4d5..5e97c2c 100644 --- a/flake.nix +++ b/flake.nix @@ -276,6 +276,7 @@ headscale-ui = pkgs.callPackage ./pkgs/headscale-ui { }; incus-ui = pkgs.callPackage ./pkgs/incus-ui { }; openfga = pkgs.callPackage ./pkgs/openfga { }; + tinyows = pkgs.callPackage ./pkgs/tinyows { }; zed = pkgs.callPackage ./pkgs/zed { }; }; diff --git a/pkgs/tinyows/default.nix b/pkgs/tinyows/default.nix new file mode 100644 index 0000000..52131ec --- /dev/null +++ b/pkgs/tinyows/default.nix @@ -0,0 +1,49 @@ +{ + lib, + stdenv, + fetchFromGitHub, + autoreconfHook, + flex, + fcgi, + libxml2, + postgresql, +}: + +stdenv.mkDerivation rec { + pname = "tinyows"; + version = "1.2.0"; + + src = fetchFromGitHub { + owner = "MapServer"; + repo = "tinyows"; + rev = "v${version}"; + hash = "sha256-6s+zKR2rLb1f9NaS9i6Gky2sOD1NdBzNe1GTP20+RTE="; + }; + + buildInputs = [ + fcgi + libxml2 + (postgresql.withPackages (ps: with ps; [ postgis ])) + ]; + + nativeBuildInputs = [ + autoreconfHook + flex + ]; + + installPhase = '' + runHook preInstall + make install + install -D -m 0755 tinyows $out/bin/tinyows + runHook postInstall + ''; + + meta = with lib; { + description = "Source code of the TinyOWS project. Please submit pull requests to the 'main' branch"; + homepage = "https://github.com/MapServer/tinyows"; + changelog = "https://github.com/MapServer/tinyows/blob/${src.rev}/NEWS"; + license = licenses.mit; + mainProgram = "tinyows"; + platforms = platforms.all; + }; +}