diff options
Diffstat (limited to 'pkgs/development/compilers')
6 files changed, 41 insertions, 69 deletions
diff --git a/pkgs/development/compilers/elm/packages/node-composition.nix b/pkgs/development/compilers/elm/packages/node-composition.nix index c43e7cc7f25c..f6cfb2cd2e45 100644 --- a/pkgs/development/compilers/elm/packages/node-composition.nix +++ b/pkgs/development/compilers/elm/packages/node-composition.nix @@ -6,7 +6,7 @@ let nodeEnv = import ./node-env.nix { - inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile; + inherit (pkgs) lib stdenv python2 utillinux runCommand writeTextFile; inherit nodejs; libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null; }; diff --git a/pkgs/development/compilers/elm/packages/node-env.nix b/pkgs/development/compilers/elm/packages/node-env.nix index e1abf5304935..759fa71c5aab 100644 --- a/pkgs/development/compilers/elm/packages/node-env.nix +++ b/pkgs/development/compilers/elm/packages/node-env.nix @@ -1,6 +1,6 @@ # This file originates from node2nix -{stdenv, nodejs, python2, utillinux, libtool, runCommand, writeTextFile}: +{lib, stdenv, nodejs, python2, utillinux, libtool, runCommand, writeTextFile}: let python = if nodejs ? python then nodejs.python else python2; @@ -38,8 +38,8 @@ let }; includeDependencies = {dependencies}: - stdenv.lib.optionalString (dependencies != []) - (stdenv.lib.concatMapStrings (dependency: + lib.optionalString (dependencies != []) + (lib.concatMapStrings (dependency: '' # Bundle the dependencies of the package mkdir -p node_modules @@ -100,7 +100,7 @@ let cd "$DIR/${packageName}" ${includeDependencies { inherit dependencies; }} cd .. - ${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."} + ${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."} ''; pinpointDependencies = {dependencies, production}: @@ -161,12 +161,12 @@ let '' node ${pinpointDependenciesFromPackageJSON} ${if production then "production" else "development"} - ${stdenv.lib.optionalString (dependencies != []) + ${lib.optionalString (dependencies != []) '' if [ -d node_modules ] then cd node_modules - ${stdenv.lib.concatMapStrings (dependency: pinpointDependenciesOfPackage dependency) dependencies} + ${lib.concatMapStrings (dependency: pinpointDependenciesOfPackage dependency) dependencies} cd .. fi ''} @@ -183,7 +183,7 @@ let cd "${packageName}" ${pinpointDependencies { inherit dependencies production; }} cd .. - ${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."} + ${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."} fi ''; @@ -344,8 +344,8 @@ let cd "${packageName}" runHook preRebuild - ${stdenv.lib.optionalString bypassCache '' - ${stdenv.lib.optionalString reconstructLock '' + ${lib.optionalString bypassCache '' + ${lib.optionalString reconstructLock '' if [ -f package-lock.json ] then echo "WARNING: Reconstruct lock option enabled, but a lock file already exists!" @@ -361,14 +361,14 @@ let node ${addIntegrityFieldsScript} ''} - npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} rebuild + npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${lib.optionalString production "--production"} rebuild if [ "''${dontNpmInstall-}" != "1" ] then # NPM tries to download packages even when they already exist if npm-shrinkwrap is used. rm -f npm-shrinkwrap.json - npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} install + npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${lib.optionalString production "--production"} install fi ''; @@ -396,8 +396,8 @@ let stdenv.mkDerivation ({ name = "node_${name}-${version}"; buildInputs = [ tarWrapper python nodejs ] - ++ stdenv.lib.optional (stdenv.isLinux) utillinux - ++ stdenv.lib.optional (stdenv.isDarwin) libtool + ++ lib.optional (stdenv.isLinux) utillinux + ++ lib.optional (stdenv.isDarwin) libtool ++ buildInputs; inherit nodejs; @@ -470,8 +470,8 @@ let name = "node-dependencies-${name}-${version}"; buildInputs = [ tarWrapper python nodejs ] - ++ stdenv.lib.optional (stdenv.isLinux) utillinux - ++ stdenv.lib.optional (stdenv.isDarwin) libtool + ++ lib.optional (stdenv.isLinux) utillinux + ++ lib.optional (stdenv.isDarwin) libtool ++ buildInputs; inherit dontStrip; # Stripping may fail a build for some package deployments @@ -491,7 +491,7 @@ let # Create fake package.json to make the npm commands work properly cp ${src}/package.json . chmod 644 package.json - ${stdenv.lib.optionalString bypassCache '' + ${lib.optionalString bypassCache '' if [ -f ${src}/package-lock.json ] then cp ${src}/package-lock.json . @@ -500,13 +500,13 @@ let # Go to the parent folder to make sure that all packages are pinpointed cd .. - ${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."} + ${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."} ${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }} # Expose the executables that were installed cd .. - ${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."} + ${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."} mv ${packageName} lib ln -s $out/lib/node_modules/.bin $out/bin @@ -516,7 +516,7 @@ let stdenv.mkDerivation { name = "node-shell-${name}-${version}"; - buildInputs = [ python nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ buildInputs; + buildInputs = [ python nodejs ] ++ lib.optional (stdenv.isLinux) utillinux ++ buildInputs; buildCommand = '' mkdir -p $out/bin cat > $out/bin/shell <<EOF @@ -529,14 +529,14 @@ let # Provide the dependencies in a development shell through the NODE_PATH environment variable inherit nodeDependencies; - shellHook = stdenv.lib.optionalString (dependencies != []) '' + shellHook = lib.optionalString (dependencies != []) '' export NODE_PATH=${nodeDependencies}/lib/node_modules export PATH="${nodeDependencies}/bin:$PATH" ''; }; in { - buildNodeSourceDist = stdenv.lib.makeOverridable buildNodeSourceDist; - buildNodePackage = stdenv.lib.makeOverridable buildNodePackage; - buildNodeShell = stdenv.lib.makeOverridable buildNodeShell; + buildNodeSourceDist = lib.makeOverridable buildNodeSourceDist; + buildNodePackage = lib.makeOverridable buildNodePackage; + buildNodeShell = lib.makeOverridable buildNodeShell; } diff --git a/pkgs/development/compilers/flutter/default.nix b/pkgs/development/compilers/flutter/default.nix index 8572040cb0cd..14f4d93caa03 100644 --- a/pkgs/development/compilers/flutter/default.nix +++ b/pkgs/development/compilers/flutter/default.nix @@ -1,11 +1,10 @@ { callPackage, fetchurl, dart }: - let mkFlutter = opts: callPackage (import ./flutter.nix opts) { }; getPatches = dir: let files = builtins.attrNames (builtins.readDir dir); in map (f: dir + ("/" + f)) files; - version = "1.22.5"; + version = "1.22.4"; channel = "stable"; filename = "flutter_linux_${version}-${channel}.tar.xz"; in @@ -14,11 +13,10 @@ in stable = mkFlutter rec { inherit dart version; pname = "flutter"; - patches = getPatches ./patches; src = fetchurl { url = "https://storage.googleapis.com/flutter_infra/releases/${channel}/linux/${filename}"; - sha256 = "1dv5kczcj9npf7xxlanmpc9ijnxa3ap46521cxn14c0i3y9295ja"; + sha256 = "0qalgav9drqddcj8lfvl9ddf3325n953pvkmgha47lslg9sa88zw"; }; - depsSha256 = "0d7vhk6axgqajy2d9ia9lc6awcnz6cc3n04r7hnh7bx4hb0jv0l1"; + patches = getPatches ./patches; }; } diff --git a/pkgs/development/compilers/flutter/flutter.nix b/pkgs/development/compilers/flutter/flutter.nix index e3fcf77e391c..8cac4a18fbea 100644 --- a/pkgs/development/compilers/flutter/flutter.nix +++ b/pkgs/development/compilers/flutter/flutter.nix @@ -3,7 +3,6 @@ , patches , dart , src -, depsSha256 }: { bash @@ -30,18 +29,13 @@ , nspr , nss , systemd -, callPackage }: let - repository = callPackage ./repository.nix { - inherit src pname version dart depsSha256; - }; drvName = "flutter-${version}"; - flutter = stdenv.mkDerivation { name = "${drvName}-unwrapped"; - buildInputs = [ git repository ]; + buildInputs = [ git ]; inherit src patches; @@ -55,12 +49,13 @@ let export FLUTTER_TOOLS_DIR="$FLUTTER_ROOT/packages/flutter_tools" export SCRIPT_PATH="$FLUTTER_TOOLS_DIR/bin/flutter_tools.dart" - mkdir -p "$out/bin/cache" - export SNAPSHOT_PATH="$out/bin/cache/flutter_tools.snapshot" - export STAMP_PATH="$out/bin/cache/flutter_tools.stamp" + export SNAPSHOT_PATH="$FLUTTER_ROOT/bin/cache/flutter_tools.snapshot" + export STAMP_PATH="$FLUTTER_ROOT/bin/cache/flutter_tools.stamp" export DART_SDK_PATH="${dart}" - export PUB_CACHE="${repository}" + + HOME=../.. # required for pub upgrade --offline, ~/.pub-cache + # path is relative otherwise it's replaced by /build/flutter pushd "$FLUTTER_TOOLS_DIR" ${dart}/bin/pub get --offline @@ -70,6 +65,9 @@ let ${dart}/bin/dart --snapshot="$SNAPSHOT_PATH" --packages="$FLUTTER_TOOLS_DIR/.packages" "$SCRIPT_PATH" echo "$revision" > "$STAMP_PATH" echo -n "${version}" > version + + rm -r bin/cache/{artifacts,dart-sdk,downloads} + rm bin/cache/*.stamp ''; installPhase = '' diff --git a/pkgs/development/compilers/flutter/repository.nix b/pkgs/development/compilers/flutter/repository.nix deleted file mode 100644 index 0f8de0a912f1..000000000000 --- a/pkgs/development/compilers/flutter/repository.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ lib, stdenv, dart, fetchurl, src, pname, version, depsSha256 }: - -stdenv.mkDerivation { - inherit src version; - - pname = "${pname}-deps"; - buildInputs = [ dart ]; - - buildPhase = '' - export PUB_CACHE="$out" - export FLUTTER_ROOT="$(pwd)" - export FLUTTER_TOOLS_DIR="$FLUTTER_ROOT/packages/flutter_tools" - - pushd "$FLUTTER_TOOLS_DIR" - ${dart}/bin/pub get - ''; - - dontInstall = true; - dontFixup = true; - - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - outputHash = depsSha256; -} diff --git a/pkgs/development/compilers/oraclejdk/jdk8-linux.nix b/pkgs/development/compilers/oraclejdk/jdk8-linux.nix index 01d1ee8e980c..206df75b9ebf 100644 --- a/pkgs/development/compilers/oraclejdk/jdk8-linux.nix +++ b/pkgs/development/compilers/oraclejdk/jdk8-linux.nix @@ -1,10 +1,10 @@ import ./jdk-linux-base.nix { productVersion = "8"; - patchVersion = "271"; - sha256.i686-linux = "nC1bRTDj0BPWqClLCfNIqdUn9HywUF8Z/pIV9Kq3LG0="; - sha256.x86_64-linux = "66eSamg7tlxvThxQLOYkNGxCsA+1Ux3ropbyVgtFLHg="; - sha256.armv7l-linux = "YZKX0iUf7yqUBUhlpHtVdYw6DBEu7E/pbfcVfK7HMxM="; - sha256.aarch64-linux = "bFRGnfmYIdXz5b/I8wlA/YiGXhCm/cVoOAU+Hlu4F0I="; + patchVersion = "281"; + sha256.i686-linux = "/yEY5O6MYNyjS5YSGZtgydb8th6jHQLNvI9tNPIh3+0="; + sha256.x86_64-linux = "hejH2nJIx0UPsQVWeniEHQlzWXhQd2wkpSf+sC7z5YY="; + sha256.armv7l-linux = "oXbW8hZxesDqwV79ANB4SdnS71O51ZApKbQhqq4i/EM="; + sha256.aarch64-linux = "oFH3TeIzVsFk6IZcDEHVDVJC7dSbGcwhdUH/WUXSNDM="; jceName = "jce_policy-8.zip"; sha256JCE = "19n5wadargg3v8x76r7ayag6p2xz1bwhrgdzjs9f4i6fvxz9jr4w"; } |