summary refs log tree commit diff
path: root/pkgs/applications/video/mplayerplug-in/builder.sh
blob: d9b895dead24f5c7b744210257e3fa0f4cc1aa77 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
. $stdenv/setup

# The Firefox pkgconfig files are buggy; they are called firefox-*.pc,
# but they refer to mozilla-*.pc.  Also, mplayerplug-in requires
# mozilla-*.pc.
mkdir pkgconfig
for i in $firefox/lib/pkgconfig/*.pc; do
    ln -s $i pkgconfig/$(echo $(basename $i) | sed s/firefox/mozilla/)
done
PKG_CONFIG_PATH=$NIX_BUILD_TOP/pkgconfig:$PKG_CONFIG_PATH

firefoxIncl=$(echo $firefox/include/firefox-*)
export NIX_CFLAGS_COMPILE="-I$firefoxIncl $NIX_CFLAGS_COMPILE"

dontMakeInstall=1

postInstall=postInstall
postInstall() {
    mkdir -p $out/lib/mozilla/plugins
    cp -p mplayerplug-in.so mplayerplug-in.xpt $out/lib/mozilla/plugins
}

genericBuild