nur-packages

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

commit f114f6f75e779d0644cc4c09f80af091d9835541
parent ce0d08fb11f5bb7c8cb9a13a0a298ee755ea0271
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date:   Wed, 17 Apr 2024 18:18:57 +0400

Add level0

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/osm/level0/default.nix | 35+++++++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -477,6 +477,7 @@ lib.makeScope newScope ( cykhash = callPackage ./osm/cykhash { }; gcgn-converter = callPackage ./osm/gcgn-converter { }; imposm = callPackage ./osm/imposm { }; + level0 = callPackage ./osm/level0 { }; map-machine = callPackage ./osm/map-machine { }; map-stylizer = callPackage ./osm/map-stylizer { }; maperitive = callPackage ./osm/maperitive { }; diff --git a/pkgs/osm/level0/default.nix b/pkgs/osm/level0/default.nix @@ -0,0 +1,35 @@ +{ lib, stdenvNoCC, fetchFromGitHub, conf ? null }: + +stdenvNoCC.mkDerivation rec { + pname = "level0"; + version = "2021-06-08"; + + src = fetchFromGitHub { + owner = "Zverik"; + repo = "Level0"; + rev = "fa92855bce868bc7f5f8d3c1510985d97db1e3b8"; + hash = "sha256-IendoFItO8w9z1HdDh9Z6vLvPrDRFRtYsLhOrIqDezM="; + }; + + postPatch = '' + substituteInPlace locales/deploy_locales \ + --replace-fail "../www" "$out/www" \ + --replace-fail "source " "#source " + ''; + + configFile = lib.optionalString (conf != null) (builtins.toFile "config.php" conf); + preBuild = lib.optionalString (conf != null) "cp ${configFile} www/config.php"; + + installPhase = '' + mkdir -p $out + cp -r www $out/www + (cd locales; ./deploy_locales) + ''; + + meta = { + description = "Web-based OpenStreetMap Editor"; + inherit (src.meta) homepage; + license = lib.licenses.wtfpl; + maintainers = [ lib.maintainers.sikmir ]; + }; +}