forked from mirrors/nixpkgs
61b7cab481
Since 03eaa48
added perl.withPackages, there is a canonical way to
create a perl interpreter from a list of libraries, for use in script
shebangs or generic build inputs. This method is declarative (what we
are doing is clear), produces short shebangs[1] and needs not to wrap
existing scripts.
Unfortunately there are a few exceptions that I've found:
1. Scripts that are calling perl with the -T switch. This makes perl
ignore PERL5LIB, which is what perl.withPackages is using to inform
the interpreter of the library paths.
2. Perl packages that depends on libraries in their own path. This
is not possible because perl.withPackages works at build time. The
workaround is to add `-I $out/${perl.libPrefix}` to the shebang.
In all other cases I propose to switch to perl.withPackages.
[1]: https://lwn.net/Articles/779997/
19 lines
524 B
Nix
19 lines
524 B
Nix
{lib, stdenv, fetchurl, perl, librsvg}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "icon-naming-utils-0.8.90";
|
|
|
|
src = fetchurl {
|
|
url = "http://tango.freedesktop.org/releases/${name}.tar.gz";
|
|
sha256 = "071fj2jm5kydlz02ic5sylhmw6h2p3cgrm3gwdfabinqkqcv4jh4";
|
|
};
|
|
|
|
buildInputs = [ librsvg (perl.withPackages (p: [ p.XMLSimple ])) ];
|
|
|
|
meta = with lib; {
|
|
homepage = "http://tango.freedesktop.org/Standard_Icon_Naming_Specification";
|
|
platforms = with platforms; linux ++ darwin;
|
|
license = licenses.gpl2;
|
|
};
|
|
}
|