mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-16 09:54:52 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
38 lines
1.4 KiB
Nix
38 lines
1.4 KiB
Nix
{ lib, stdenv, fetchurl, fetchpatch, gettext, perlPackages, buildPackages }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "intltool";
|
|
version = "0.51.0";
|
|
|
|
src = fetchurl {
|
|
url = "https://launchpad.net/intltool/trunk/${version}/+download/${pname}-${version}.tar.gz";
|
|
sha256 = "1karx4sb7bnm2j67q0q74hspkfn6lqprpy5r99vkn5bb36a4viv7";
|
|
};
|
|
|
|
# fix "unescaped left brace" errors when using intltool in some cases
|
|
patches = [(fetchpatch {
|
|
name = "perl5.26-regex-fixes.patch";
|
|
urls = [
|
|
"https://sources.debian.org/data/main/i/intltool/0.51.0-5/debian/patches/perl5.26-regex-fixes.patch"
|
|
"https://src.fedoraproject.org/rpms/intltool/raw/d8d2ef29fb122a42a6b6678eb1ec97ae56902af2/f/intltool-perl5.26-regex-fixes.patch"
|
|
];
|
|
sha256 = "12q2140867r5d0dysly72khi7b0mm2gd7nlm1k81iyg7fxgnyz45";
|
|
})];
|
|
|
|
nativeBuildInputs = with perlPackages; [ perl XMLParser ];
|
|
propagatedBuildInputs = [ gettext ] ++ (with perlPackages; [ perl XMLParser ]);
|
|
|
|
postInstall = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
|
for f in $out/bin/*; do
|
|
substituteInPlace $f --replace "${buildPackages.perl}" "${perlPackages.perl}"
|
|
done
|
|
'';
|
|
meta = with lib; {
|
|
description = "Translation helper tool";
|
|
homepage = "https://launchpad.net/intltool/";
|
|
license = licenses.gpl2Plus;
|
|
maintainers = with maintainers; [ raskin ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|