diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-10-27 10:25:35 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-10-27 10:25:35 +0100 |
commit | 2ee8b30b64a0ee2837c3630a50ec1a74820b7047 (patch) | |
tree | 1f01c77d8e7d7817ca4e4521cd11365772a4a8ed /pkgs/build-support/trivial-builders.nix | |
parent | 3a0db27b9026f7617377df1d4ed86944f0ef09ef (diff) | |
download | nixpkgs-2ee8b30b64a0ee2837c3630a50ec1a74820b7047.tar nixpkgs-2ee8b30b64a0ee2837c3630a50ec1a74820b7047.tar.gz nixpkgs-2ee8b30b64a0ee2837c3630a50ec1a74820b7047.tar.bz2 nixpkgs-2ee8b30b64a0ee2837c3630a50ec1a74820b7047.tar.lz nixpkgs-2ee8b30b64a0ee2837c3630a50ec1a74820b7047.tar.xz nixpkgs-2ee8b30b64a0ee2837c3630a50ec1a74820b7047.tar.zst nixpkgs-2ee8b30b64a0ee2837c3630a50ec1a74820b7047.zip |
stdenv.lib -> lib
Diffstat (limited to 'pkgs/build-support/trivial-builders.nix')
-rw-r--r-- | pkgs/build-support/trivial-builders.nix | 10 |
1 files changed, 5 insertions, 5 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} : |