From 99e825a42c261ae59b8c281b4a6dd9690ad52244 Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Wed, 14 Apr 2010 19:26:50 +0000 Subject: [PATCH] Build MIME database from all available packages svn path=/nixpkgs/trunk/; revision=21076 --- pkgs/build-support/buildenv/builder.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/build-support/buildenv/builder.pl b/pkgs/build-support/buildenv/builder.pl index 856eca7b80be..bb9e45b62ac3 100755 --- a/pkgs/build-support/buildenv/builder.pl +++ b/pkgs/build-support/buildenv/builder.pl @@ -59,6 +59,7 @@ sub createLinks { $srcFile =~ /\/nix-support$/ || $srcFile =~ /\/perllocal.pod$/ || $srcFile =~ /\/info\/dir$/ || + ( $relName2 =~ /^\/share\/mime\// && !( $relName2 =~ /^\/share\/mime\/packages/ ) ) || $srcFile =~ /\/log$/) { # Do nothing. @@ -166,6 +167,11 @@ while (scalar(keys %postponed) > 0) { } } +if (-x "$out/bin/update-mime-database" && -d "$out/share/mime/packages") { + system("$out/bin/update-mime-database -V $out/share/mime") == 0 + or die "Can't update mime-database"; +} + print STDERR "created $symlinks symlinks in user environment\n";