From c4182b8047a24630c9ef7dddf09bfb40ec2149cd Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Wed, 25 May 2022 14:37:41 -0500 Subject: [PATCH] buildNimPackage: use depsBuildBuild for nim_builder --- .../nim-packages/build-nim-package/default.nix | 9 +++++---- pkgs/top-level/nim-packages.nix | 6 ++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/development/nim-packages/build-nim-package/default.nix b/pkgs/development/nim-packages/build-nim-package/default.nix index d32a9543cf20..46d898cc1d22 100644 --- a/pkgs/development/nim-packages/build-nim-package/default.nix +++ b/pkgs/development/nim-packages/build-nim-package/default.nix @@ -1,12 +1,13 @@ { lib, stdenv, nim, nim_builder }: -{ strictDeps ? true, nativeBuildInputs ? [ ], configurePhase ? null -, buildPhase ? null, checkPhase ? null, installPhase ? null, meta ? { }, ... -}@attrs: +{ strictDeps ? true, depsBuildBuild ? [ ], nativeBuildInputs ? [ ] +, configurePhase ? null, buildPhase ? null, checkPhase ? null +, installPhase ? null, meta ? { }, ... }@attrs: stdenv.mkDerivation (attrs // { inherit strictDeps; - nativeBuildInputs = [ nim nim_builder ] ++ nativeBuildInputs; + depsBuildBuild = [ nim_builder ] ++ depsBuildBuild; + nativeBuildInputs = [ nim ] ++ nativeBuildInputs; configurePhase = if isNull configurePhase then '' runHook preConfigure diff --git a/pkgs/top-level/nim-packages.nix b/pkgs/top-level/nim-packages.nix index e808ebef8540..a666177a92f1 100644 --- a/pkgs/top-level/nim-packages.nix +++ b/pkgs/top-level/nim-packages.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, stdenv, newScope, nim, fetchFromGitHub }: +{ lib, pkgs, stdenv, newScope, nim, fetchFromGitHub, buildPackages }: lib.makeScope newScope (self: let callPackage = self.callPackage; @@ -6,7 +6,9 @@ lib.makeScope newScope (self: inherit nim; nim_builder = callPackage ../development/nim-packages/nim_builder { }; buildNimPackage = - callPackage ../development/nim-packages/build-nim-package { }; + callPackage ../development/nim-packages/build-nim-package { + inherit (buildPackages.buildPackages.nimPackages) nim_builder; + }; fetchNimble = callPackage ../development/nim-packages/fetch-nimble { }; astpatternmatching =