nixpkgs/pkgs/tools/misc/routino/default.nix

47 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, fetchpatch, perl, zlib, bzip2 }:
2017-09-24 19:04:04 +00:00
stdenv.mkDerivation rec {
pname = "routino";
2021-01-16 12:54:00 +00:00
version = "3.3.3";
2017-09-24 19:04:04 +00:00
src = fetchurl {
url = "https://routino.org/download/${pname}-${version}.tgz";
2021-01-16 12:54:00 +00:00
sha256 = "1xa7l2bjn832nk6bc7b481nv8hd2gj41jwhg0d2qy10lqdvjpn5b";
2017-09-24 19:04:04 +00:00
};
2020-07-15 22:38:40 +00:00
patchFlags = [ "-p0" ];
2021-01-15 09:19:50 +00:00
patches = lib.optionals stdenv.isDarwin [
2020-07-15 22:38:40 +00:00
(fetchpatch {
url = "https://raw.githubusercontent.com/macports/macports-ports/18fd229516a46e7272003acbe555735b2a902db7/gis/routino/files/patch-Makefile_conf.diff";
sha256 = "1b7hpa4sizansnwwxq1c031nxwdwh71pg08jl9z9apiab8pjsn53";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/macports/macports-ports/18fd229516a46e7272003acbe555735b2a902db7/gis/routino/files/patch-src_Makefile_dylib_extension.diff";
sha256 = "1kigxcfr7977baxdsfvrw6q453cpqlzqakhj7av2agxkcvwyilpv";
})
];
2021-05-07 10:45:29 +00:00
postPatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace Makefile.conf \
--subst-var-by PREFIX $out
'';
2017-09-24 19:04:04 +00:00
nativeBuildInputs = [ perl ];
2017-09-28 17:29:49 +00:00
2017-09-24 19:04:04 +00:00
buildInputs = [ zlib bzip2 ];
2017-09-28 17:29:49 +00:00
outputs = [ "out" "doc" ];
2021-01-15 09:19:50 +00:00
CLANG = lib.optionalString stdenv.cc.isClang "1";
2020-07-15 22:38:40 +00:00
2017-09-28 17:29:49 +00:00
makeFlags = [ "prefix=$(out)" ];
2017-09-24 19:04:04 +00:00
meta = with lib; {
homepage = "http://www.routino.org/";
2017-09-24 19:04:04 +00:00
description = "OpenStreetMap Routing Software";
2021-05-07 10:45:29 +00:00
license = licenses.agpl3Plus;
maintainers = with maintainers; [ dotlambda ];
2020-07-15 22:38:40 +00:00
platforms = with platforms; linux ++ darwin;
2017-09-24 19:04:04 +00:00
};
}