From 2ee8b30b64a0ee2837c3630a50ec1a74820b7047 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 27 Oct 2014 10:25:35 +0100 Subject: [PATCH] stdenv.lib -> lib --- pkgs/build-support/trivial-builders.nix | 10 +++++----- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix index c08a6c3a265..78e671e8d22 100644 --- a/pkgs/build-support/trivial-builders.nix +++ b/pkgs/build-support/trivial-builders.nix @@ -1,4 +1,4 @@ -{ stdenv, lndir }: +{ lib, stdenv, lndir }: rec { @@ -30,7 +30,7 @@ rec { (test -n "$executable" && chmod +x "$n") || true ''; - + # Shorthands for `writeTextFile'. writeText = name: text: writeTextFile {inherit name text;}; writeTextDir = name: text: writeTextFile {inherit name text; destination = "/${name}";}; @@ -55,9 +55,9 @@ rec { ('' mkdir -p $out/nix-support cp ${script} $out/nix-support/setup-hook - '' + stdenv.lib.optionalString (deps != []) '' + '' + lib.optionalString (deps != []) '' echo ${toString deps} > $out/nix-support/propagated-native-build-inputs - '' + stdenv.lib.optionalString (substitutions != {}) '' + '' + lib.optionalString (substitutions != {}) '' substituteAll ${script} $out/nix-support/setup-hook ''); @@ -80,7 +80,7 @@ rec { # Quickly create a set of symlinks to derivations. # entries is a list of attribute sets like { name = "name" ; path = "/nix/store/..."; } linkFarm = name: entries: runCommand name {} ("mkdir -p $out; cd $out; \n" + - (stdenv.lib.concatMapStrings (x: "ln -s '${x.path}' '${x.name}';\n") entries)); + (lib.concatMapStrings (x: "ln -s '${x.path}' '${x.name}';\n") entries)); # Require file requireFile = {name, sha256, url ? null, message ? null} : diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a6b6f034c63..37237470c9b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -85,7 +85,7 @@ let # Helper functions that are exported through `pkgs'. helperFunctions = stdenvAdapters // - (import ../build-support/trivial-builders.nix { inherit (pkgs) stdenv; inherit (pkgs.xorg) lndir; }); + (import ../build-support/trivial-builders.nix { inherit lib; inherit (pkgs) stdenv; inherit (pkgs.xorg) lndir; }); stdenvAdapters = import ../stdenv/adapters.nix pkgs;