nixpkgs/pkgs/development/libraries/iso-codes/default.nix

28 lines
749 B
Nix
Raw Normal View History

{lib, stdenv, fetchurl, gettext, python3}:
stdenv.mkDerivation rec {
pname = "iso-codes";
2020-05-21 20:52:11 +01:00
version = "4.5.0";
2017-03-14 01:29:03 +00:00
src = fetchurl {
2019-08-31 00:57:29 +01:00
url = "https://salsa.debian.org/iso-codes-team/iso-codes/-/archive/${pname}-${version}/${pname}-${pname}-${version}.tar.bz2";
2020-05-21 20:52:11 +01:00
sha256 = "17nnyx07q8vbyqsxbvp4m5s2nrc4fxl3dvgbgmkqww2wl4x1fv9y";
};
2019-05-07 01:58:25 +01:00
patchPhase = ''
for i in `find . -name \*.py`
do
2017-03-14 01:29:03 +00:00
sed -i -e "s|#!/usr/bin/env python|#!${python3}/bin/python|" $i
done
'';
2019-05-07 01:58:25 +01:00
nativeBuildInputs = [ gettext python3 ];
meta = with lib; {
homepage = "https://salsa.debian.org/iso-codes-team/iso-codes";
description = "Various ISO codes packaged as XML files";
license = licenses.lgpl21;
2017-03-14 01:29:03 +00:00
platforms = platforms.all;
};
}