forked from lix-project/lix
docker.nix: Provide boolean for whether to bundle nixpkgs
This commit is contained in:
parent
73fde9eed0
commit
0eb9946e1d
|
@ -2,6 +2,7 @@
|
||||||
, lib ? pkgs.lib
|
, lib ? pkgs.lib
|
||||||
, name ? "nix"
|
, name ? "nix"
|
||||||
, tag ? "latest"
|
, tag ? "latest"
|
||||||
|
, bundleNixpkgs ? true
|
||||||
, channelName ? "nixpkgs"
|
, channelName ? "nixpkgs"
|
||||||
, channelURL ? "https://nixos.org/channels/nixpkgs-unstable"
|
, channelURL ? "https://nixos.org/channels/nixpkgs-unstable"
|
||||||
, extraPkgs ? []
|
, extraPkgs ? []
|
||||||
|
@ -139,10 +140,12 @@ let
|
||||||
baseSystem =
|
baseSystem =
|
||||||
let
|
let
|
||||||
nixpkgs = pkgs.path;
|
nixpkgs = pkgs.path;
|
||||||
channel = pkgs.runCommand "channel-nixos" { } ''
|
channel = pkgs.runCommand "channel-nixos" { inherit bundleNixpkgs; } ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
|
if [ "$bundleNixpkgs" ]; then
|
||||||
ln -s ${nixpkgs} $out/nixpkgs
|
ln -s ${nixpkgs} $out/nixpkgs
|
||||||
echo "[]" > $out/manifest.nix
|
echo "[]" > $out/manifest.nix
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
rootEnv = pkgs.buildPackages.buildEnv {
|
rootEnv = pkgs.buildPackages.buildEnv {
|
||||||
name = "root-profile-env";
|
name = "root-profile-env";
|
||||||
|
|
Loading…
Reference in a new issue