Hi,
I am trying to make package for Croatian mapproxy cache, currently I can install and run package, but cache is tying to write in install location and its unable to. Write location can be changed but I couldn’t find a way to point to location outside nix store. Is there a way to do it?
default.nix I made with help of nix-init and chatGPT:
{ lib
, stdenv
, fetchFromGitHub
, makeWrapper
}:
stdenv.mkDerivation rec {
pname = "mapproxy-hr";
version = "unstable-2023-06-12";
src = fetchFromGitHub {
owner = "osm-hr";
repo = "mapproxy-hr";
rev = "8800e4ad2da7f6473eb8cf96460698206aa67e0d";
hash = "sha256-xl0/VMDaNBvASBgBfqS44MHi0kod8EdS27X5YdxDybg=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/bin
cp -r * $out/bin/
substituteInPlace $out/bin/runme.sh --replace "mapproxy.yaml" "$out/bin/mapproxy.yaml"
'';
postFixup = ''
makeWrapper $out/bin/runme.sh $out/bin/mapproxy-hr
'';
meta = with lib; {
description = "Caching mapproxy za Hrvatsku (za brži geoportal.dgu.hr WMS";
homepage = "https://github.com/osm-hr/mapproxy-hr";
license = licenses.unfree; # FIXME: nix-init did not found a license
maintainers = with maintainers; [ ];
mainProgram = "mapproxy-hr";
platforms = platforms.all;
};
}