default.nix (935B)
1 { lib, stdenvNoCC, fetchFromGitHub, conf ? null }: 2 3 stdenvNoCC.mkDerivation rec { 4 pname = "level0"; 5 version = "2021-06-08"; 6 7 src = fetchFromGitHub { 8 owner = "Zverik"; 9 repo = "Level0"; 10 rev = "fa92855bce868bc7f5f8d3c1510985d97db1e3b8"; 11 hash = "sha256-IendoFItO8w9z1HdDh9Z6vLvPrDRFRtYsLhOrIqDezM="; 12 }; 13 14 postPatch = '' 15 substituteInPlace locales/deploy_locales \ 16 --replace-fail "../www" "$out/www" \ 17 --replace-fail "source " "#source " 18 ''; 19 20 configFile = lib.optionalString (conf != null) (builtins.toFile "config.php" conf); 21 preBuild = lib.optionalString (conf != null) "cp ${configFile} www/config.php"; 22 23 installPhase = '' 24 mkdir -p $out 25 cp -r www $out/www 26 (cd locales; ./deploy_locales) 27 ''; 28 29 meta = { 30 description = "Web-based OpenStreetMap Editor"; 31 inherit (src.meta) homepage; 32 license = lib.licenses.wtfpl; 33 maintainers = [ lib.maintainers.sikmir ]; 34 }; 35 }