nixpkgs/pkgs/tools/misc/routino/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

41 lines
1.3 KiB
Nix

{ lib, stdenv, fetchurl, fetchpatch, perl, zlib, bzip2 }:
stdenv.mkDerivation rec {
pname = "routino";
version = "3.3.2";
src = fetchurl {
url = "https://routino.org/download/${pname}-${version}.tgz";
sha256 = "1ccx3s99j8syxc1gqkzsaqkmyf44l7h3adildnc5iq2md7bp8wab";
};
patchFlags = [ "-p0" ];
patches = stdenv.lib.optionals stdenv.isDarwin [
(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";
})
];
nativeBuildInputs = [ perl ];
buildInputs = [ zlib bzip2 ];
outputs = [ "out" "doc" ];
CLANG = stdenv.lib.optionalString stdenv.cc.isClang "1";
makeFlags = [ "prefix=$(out)" ];
meta = with lib; {
homepage = "http://www.routino.org/";
description = "OpenStreetMap Routing Software";
license = licenses.agpl3;
maintainers = with maintainers; [ dotlambda ];
platforms = with platforms; linux ++ darwin;
};
}