Skip to content

Commit

Permalink
waf: fix cross-compiling by not overriding python in all-packages.nix (
Browse files Browse the repository at this point in the history
…NixOS#141821)

Co-authored-by: Sandro <[email protected]>
  • Loading branch information
Artturin and SuperSandro2000 authored Oct 16, 2021
1 parent 1ee326f commit 2736cee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions pkgs/development/tools/build-managers/waf/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitLab, python, ensureNewerSourcesForZipFilesHook
{ lib, stdenv, fetchFromGitLab, python3, ensureNewerSourcesForZipFilesHook
# optional list of extra waf tools, e.g. `[ "doxygen" "pytest" ]`
, withTools ? null
}:
Expand All @@ -17,7 +17,10 @@ stdenv.mkDerivation rec {
sha256 = "sha256-WGGyhvQdFYmC0NOA5VVqCRMF1fvfPcTI42x1nHvz0W0=";
};

buildInputs = [ python ensureNewerSourcesForZipFilesHook ];
nativeBuildInputs = [ python3 ensureNewerSourcesForZipFilesHook ];

# waf bin has #!/usr/bin/env python
buildInputs = [ python3 ];

configurePhase = ''
python waf-light configure
Expand All @@ -29,6 +32,8 @@ stdenv.mkDerivation rec {
install -D waf $out/bin/waf
'';

strictDeps = true;

meta = with lib; {
description = "Meta build system";
homepage = "https://waf.io";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10561,7 +10561,7 @@ with pkgs;

volumeicon = callPackage ../tools/audio/volumeicon { };

waf = callPackage ../development/tools/build-managers/waf { python = python3; };
waf = callPackage ../development/tools/build-managers/waf { };
wafHook = callPackage ../development/tools/build-managers/wafHook { };

wagyu = callPackage ../tools/misc/wagyu {
Expand Down

0 comments on commit 2736cee

Please sign in to comment.