diff --git a/pkgs/development/compilers/adobe-flex-sdk/default.nix b/pkgs/development/compilers/adobe-flex-sdk/default.nix deleted file mode 100644 index 1512ef396558..000000000000 --- a/pkgs/development/compilers/adobe-flex-sdk/default.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ stdenv, fetchurl, unzip }: - -stdenv.mkDerivation rec { - name = "adobe-flex-sdk-4.0.0.14159"; - - src = fetchurl { - # This is the open source distribution - url = http://fpdownload.adobe.com/pub/flex/sdk/builds/flex4/flex_sdk_4.0.0.14159_mpl.zip; - sha256 = "1x12sji6g42bm1h7jndkda5vpah6vnkpc13qwq0c4xvbsh8757v5"; - }; - - phases = "installPhase"; - - buildInputs = [ unzip ]; - - # Why do shell scripts have \r\n ?? - # moving to /opt because jdk has lib/xercesImpl.jar as well - installPhase = '' - unzip ${src} - t=$out/opt/flex-sdk - mkdir -p $t $out/bin - mv * $t - rm $t/bin/*.exe $t/bin/*.bat - sed 's/ $//' -i $t/bin/* - for i in $t/bin/*; do - b="$(basename "$i")"; - cat > "$out/bin/$b" << EOF - #!/bin/sh - exec $t/bin/$b "\$@" - EOF - chmod +x $out/bin/$b $t/bin/$b - done - ''; - - meta = { - description = "Flex SDK for Adobe Flash / ActionScript"; - homepage = "https://www.adobe.com/products/flex.html"; - license = stdenv.lib.licenses.mpl11; - platforms = stdenv.lib.platforms.unix; - }; -} diff --git a/pkgs/development/compilers/apache-flex-sdk/default.nix b/pkgs/development/compilers/apache-flex-sdk/default.nix new file mode 100644 index 000000000000..e8759ec073b3 --- /dev/null +++ b/pkgs/development/compilers/apache-flex-sdk/default.nix @@ -0,0 +1,56 @@ +{ stdenv, fetchurl, makeWrapper, jre }: + +let + playerglobal_ver = "27.0"; + playerglobal = fetchurl { + url = "https://fpdownload.macromedia.com/get/flashplayer/updaters/27/playerglobal27_0.swc"; + sha256 = "0qw2bgls8qsmp80j8vpd4c7s0c8anlrk0ac8z42w89bajcdbwk2f"; + }; +in stdenv.mkDerivation rec { + name = "apache-flex-sdk-${version}"; + version = "4.16.1"; + + src = fetchurl { + url = "https://www.apache.org/dist/flex/${version}/binaries/${name}-bin.tar.gz"; + sha256 = "13iq16dqvgcpb0p35x66hzxsq5pkbr2lbwr766nnqiryinnagz8p"; + }; + + nativeBuildInputs = [ makeWrapper ]; + + buildInputs = [ jre ]; + + buildPhase = ":"; + + postPatch = '' + shopt -s extglob + for i in bin/!(aasdoc|acompc|amxmlc); do + substituteInPlace $i --replace "java " "${jre}/bin/java " + done + ''; + + installPhase = '' + t=$out/opt/apache-flex-sdk + mkdir -p $t $out/bin + mv * $t + rm $t/bin/*.bat + ln -s $t/bin/* $out/bin/ + + for i in $out/bin/!(aasdoc|acompc|amxmlc); do + wrapProgram $i \ + --set FLEX_HOME $t \ + --set PLAYERGLOBAL_HOME $t/frameworks/libs/player/ + done + + mkdir -p $t/frameworks/libs/player/${playerglobal_ver}/ + cp ${playerglobal} $t/frameworks/libs/player/${playerglobal_ver}/playerglobal.swc + ''; + + fixupPhase = ":"; + + meta = with stdenv.lib; { + description = "Flex SDK for Adobe Flash / ActionScript"; + homepage = "https://flex.apache.org/"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ dywedir ]; + }; +} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 458250acce64..f310fd156c33 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -37,6 +37,7 @@ mapAliases (rec { QmidiNet = qmidinet; # added 2016-05-22 accounts-qt = libsForQt5.accounts-qt; # added 2015-12-19 adobeReader = adobe-reader; # added 2013-11-04 + adobe_flex_sdk = apache-flex-sdk; # added 2018-06-01 ag = silver-searcher; # added 2018-04-25 aircrackng = aircrack-ng; # added 2016-01-14 ammonite-repl = ammonite; # added 2017-05-02 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 872266a7a7c9..893bdb31d68f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6119,7 +6119,7 @@ with pkgs; elmPackages = recurseIntoAttrs (callPackage ../development/compilers/elm { }); - adobe_flex_sdk = callPackage ../development/compilers/adobe-flex-sdk { }; + apache-flex-sdk = callPackage ../development/compilers/apache-flex-sdk { }; fpc = callPackage ../development/compilers/fpc { };