buildNimPackage: use depsBuildBuild for nim_builder

This commit is contained in:
Emery Hemingway 2022-05-25 14:37:41 -05:00 committed by ehmry
parent 3f909fb574
commit c4182b8047
2 changed files with 9 additions and 6 deletions

View File

@ -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

View File

@ -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 =