From 8092ca8312c543f24df7b7485a932cfd0fdba05e Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 4 Feb 2019 00:45:10 +0100 Subject: [PATCH] nix1: fix `perl-bindings` build Nix 1.11 builds perl-bindings by default, `nix1.perl-bindings` fails with the following error: ``` building no Makefile, doing nothing installing install flags: install make: *** No rule to make target 'install'. Stop. ``` This is probably due to #47316. Previously the `perl-bindings` were referenced to `nix1` instead of the `perl-bindings` function as Nix 1.11 built those during its build process. --- pkgs/tools/package-management/nix/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index d86dfa31619..76d11a03fc4 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -13,7 +13,7 @@ let sh = busybox-sandbox-shell; - common = { name, suffix ? "", src, fromGit ? false }: + common = { name, suffix ? "", src, includesPerl ? false, fromGit ? false }: let nix = stdenv.mkDerivation rec { inherit name src; version = lib.getVersion name; @@ -113,7 +113,7 @@ let passthru = { inherit fromGit; - perl-bindings = stdenv.mkDerivation { + perl-bindings = if includesPerl then nix else stdenv.mkDerivation { name = "nix-perl-${version}"; inherit src; @@ -150,6 +150,9 @@ in rec { url = "http://nixos.org/releases/nix/${name}/${name}.tar.xz"; sha256 = "0ca5782fc37d62238d13a620a7b4bff6a200bab1bd63003709249a776162357c"; }; + + # Nix1 has the perl bindings by default, so no need to build the manually. + includesPerl = true; }; nixStable = common rec {