1{ stdenv, fetchurl, unzip }:
2
3stdenv.mkDerivation rec {
4 name = "adobe-flex-sdk-4.0.0.14159-mpl";
5
6 src = fetchurl {
7 # This is the open source distribution
8 url = http://fpdownload.adobe.com/pub/flex/sdk/builds/flex4/flex_sdk_4.0.0.14159_mpl.zip;
9 sha256 = "1x12sji6g42bm1h7jndkda5vpah6vnkpc13qwq0c4xvbsh8757v5";
10 };
11
12 phases = "installPhase";
13
14 buildInputs = [ unzip ];
15
16 # Why do shell scripts have \r\n ??
17 # moving to /opt because jdk has lib/xercesImpl.jar as well
18 installPhase = ''
19 unzip ${src}
20 t=$out/opt/flex-sdk
21 mkdir -p $t $out/bin
22 mv * $t
23 rm $t/bin/*.exe $t/bin/*.bat
24 sed 's/
25$//' -i $t/bin/*
26 for i in $t/bin/*; do
27 b="$(basename "$i")";
28 cat > "$out/bin/$b" << EOF
29 #!/bin/sh
30 exec $t/bin/$b "\$@"
31 EOF
32 chmod +x $out/bin/$b $t/bin/$b
33 done
34 '';
35
36 meta = {
37 description = "Flex SDK for Adobe Flash / ActionScript";
38 homepage = "http://www.adobe.com/products/flex.html";
39 license = stdenv.lib.licenses.mpl11;
40 platforms = stdenv.lib.platforms.unix;
41 };
42}