From c87ef760276b630a2467ef489c4ce00a738d4c57 Mon Sep 17 00:00:00 2001 From: Matthew O'Gorman Date: Wed, 6 Jan 2016 03:50:49 -0500 Subject: [PATCH] build-fhs-userenv: added the option meta to be passed down to the final derivation. --- pkgs/build-support/build-fhs-userenv/default.nix | 3 ++- pkgs/top-level/all-packages.nix | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/build-fhs-userenv/default.nix b/pkgs/build-support/build-fhs-userenv/default.nix index 54ce3e768975..5db0d98b79a8 100644 --- a/pkgs/build-support/build-fhs-userenv/default.nix +++ b/pkgs/build-support/build-fhs-userenv/default.nix @@ -1,5 +1,5 @@ { runCommand, lib, writeText, writeScriptBin, stdenv, bash, ruby } : -{ env, runScript ? "${bash}/bin/bash", extraBindMounts ? [], extraInstallCommands ? "" } : +{ env, runScript ? "${bash}/bin/bash", extraBindMounts ? [], extraInstallCommands ? "", importMeta ? {} } : let name = env.pname; @@ -26,6 +26,7 @@ let ''; in runCommand name { + meta = importMeta; passthru.env = runCommand "${name}-shell-env" { shellHook = '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 992719704608..b6f85d1adf78 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -279,10 +279,11 @@ let }; buildFHSUserEnv = args: userFHSEnv { - env = buildFHSEnv (removeAttrs args [ "runScript" "extraBindMounts" "extraInstallCommands" ]); + env = buildFHSEnv (removeAttrs args [ "runScript" "extraBindMounts" "extraInstallCommands" "meta" ]); runScript = args.runScript or "bash"; extraBindMounts = args.extraBindMounts or []; extraInstallCommands = args.extraInstallCommands or ""; + importMeta = args.meta or {}; }; buildMaven = callPackage ../build-support/build-maven.nix {};