diff --git a/pkgs/development/tools/build-managers/scons/env.patch b/pkgs/by-name/sc/scons/env.patch similarity index 100% rename from pkgs/development/tools/build-managers/scons/env.patch rename to pkgs/by-name/sc/scons/env.patch diff --git a/pkgs/by-name/sc/scons/no-man-pages.patch b/pkgs/by-name/sc/scons/no-man-pages.patch new file mode 100644 index 0000000000000..4dd459b8261e8 --- /dev/null +++ b/pkgs/by-name/sc/scons/no-man-pages.patch @@ -0,0 +1,14 @@ +--- a/setup.cfg ++++ b/setup.cfg +@@ -67,11 +67,6 @@ console_scripts = + SCons.Tool.docbook = *.* + + +-[options.data_files] +-. = scons.1 +- scons-time.1 +- sconsign.1 +- + [sdist] + dist_dir=build/dist + diff --git a/pkgs/development/tools/build-managers/scons/3.1.2.nix b/pkgs/by-name/sc/scons/package.nix similarity index 68% rename from pkgs/development/tools/build-managers/scons/3.1.2.nix rename to pkgs/by-name/sc/scons/package.nix index a9d55f59ee0de..8ebc736097b0c 100644 --- a/pkgs/development/tools/build-managers/scons/3.1.2.nix +++ b/pkgs/by-name/sc/scons/package.nix @@ -1,34 +1,32 @@ -{ lib, fetchFromGitHub, python3 }: - -let +{ lib, fetchFromGitHub, python3Packages }: +python3Packages.buildPythonApplication rec { pname = "scons"; - version = "3.1.2"; + version = "4.7.0"; + src = fetchFromGitHub { owner = "Scons"; repo = "scons"; rev = version; - hash = "sha256-C3U4N7+9vplzoJoevQe5Zeuz0TDmB6/miMwBJLzA3WA="; + hash = "sha256-7VzGuz9CAUF6MRCEpj5z1FkZD19/Ic+YBukYQocvkr0="; }; -in -python3.pkgs.buildPythonApplication { - inherit pname version src; - outputs = [ "out" "man" ]; + pyproject = true; - preConfigure = '' - python bootstrap.py - cd build/scons - ''; + patches = [ + ./env.patch + ./no-man-pages.patch + ]; - setupHook = ./setup-hook.sh; + build-system = [ + python3Packages.setuptools + ]; - doCheck = true; + setupHook = ./setup-hook.sh; passthru = { # expose the used python version so tools using this (and extensing scos # with other python modules) can use the exact same python version. - inherit python3; - python = python3; + inherit (python3Packages) python; }; meta = { @@ -45,4 +43,3 @@ python3.pkgs.buildPythonApplication { maintainers = with lib.maintainers; [ AndersonTorres ]; }; } -# TODO: patch to get rid of distutils and other deprecations diff --git a/pkgs/development/tools/build-managers/scons/setup-hook.sh b/pkgs/by-name/sc/scons/setup-hook.sh similarity index 100% rename from pkgs/development/tools/build-managers/scons/setup-hook.sh rename to pkgs/by-name/sc/scons/setup-hook.sh diff --git a/pkgs/development/libraries/openvino/default.nix b/pkgs/development/libraries/openvino/default.nix index 8ae90599585f0..a1f30277151b2 100644 --- a/pkgs/development/libraries/openvino/default.nix +++ b/pkgs/development/libraries/openvino/default.nix @@ -38,7 +38,7 @@ let stdenv = gcc12Stdenv; # prevent scons from leaking in the default python version - scons' = scons.override { python3 = python3Packages.python; }; + scons' = scons.override { inherit python3Packages; }; tbbbind_version = "2_5"; tbbbind = fetchurl { diff --git a/pkgs/development/tools/build-managers/scons/4.1.0.nix b/pkgs/development/tools/build-managers/scons/4.1.0.nix deleted file mode 100644 index 13357dfb99a95..0000000000000 --- a/pkgs/development/tools/build-managers/scons/4.1.0.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ lib, fetchFromGitHub, python3 }: - -let - pname = "scons"; - version = "4.1.0"; - src = fetchFromGitHub { - owner = "Scons"; - repo = "scons"; - rev = version; - hash = "sha256-ldus/9ghqAMB7A+NrHiCQm7saCdIpqzufGCLxWRhYKU="; - }; -in -python3.pkgs.buildPythonApplication { - inherit pname version src; - - outputs = [ "out" "man" ]; - - postPatch = '' - substituteInPlace setup.cfg \ - --replace "build/dist" "dist" - ''; - - preConfigure = '' - python scripts/scons.py - ''; - - postInstall = '' - mkdir -pv "$man/share/man/man1" - mv -v "$out/"*.1 "$man/share/man/man1/" - ''; - - setupHook = ./setup-hook.sh; - - # The release tarballs don't contain any tests (runtest.py and test/*): - doCheck = false; - - passthru = { - # expose the used python version so tools using this (and extensing scos - # with other python modules) can use the exact same python version. - inherit python3; - python = python3; - }; - - meta = { - description = "Improved, cross-platform substitute for Make"; - longDescription = '' - SCons is an Open Source software construction tool. Think of SCons as an - improved, cross-platform substitute for the classic Make utility with - integrated functionality similar to autoconf/automake and compiler caches - such as ccache. In short, SCons is an easier, more reliable and faster way - to build software. - ''; - homepage = "https://scons.org/"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ AndersonTorres ]; - }; -} diff --git a/pkgs/development/tools/build-managers/scons/4.5.2.nix b/pkgs/development/tools/build-managers/scons/4.5.2.nix deleted file mode 100644 index 6b5720c86ee62..0000000000000 --- a/pkgs/development/tools/build-managers/scons/4.5.2.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ lib, fetchFromGitHub, python3 }: - -let - pname = "scons"; - version = "4.5.2"; - src = fetchFromGitHub { - owner = "Scons"; - repo = "scons"; - rev = version; - hash = "sha256-vxJsz24jDsPcttwPXq9+ztc/N7W4Gkydgykk/FLgZLo="; - }; -in -python3.pkgs.buildPythonApplication { - inherit pname version src; - - outputs = [ "out" "man" ]; - - patches = [ - ./env.patch - ]; - - postPatch = '' - substituteInPlace setup.cfg \ - --replace "build/dist" "dist" \ - --replace "build/doc/man/" "" - ''; - - preConfigure = '' - python scripts/scons.py - ''; - - postInstall = '' - mkdir -p "$man/share/man/man1" - mv "$out/"*.1 "$man/share/man/man1/" - ''; - - setupHook = ./setup-hook.sh; - - # The release tarballs don't contain any tests (runtest.py and test/*): - doCheck = false; - - passthru = { - # expose the used python version so tools using this (and extensing scos - # with other python modules) can use the exact same python version. - inherit python3; - python = python3; - }; - - meta = { - description = "Improved, cross-platform substitute for Make"; - longDescription = '' - SCons is an Open Source software construction tool. Think of SCons as an - improved, cross-platform substitute for the classic Make utility with - integrated functionality similar to autoconf/automake and compiler caches - such as ccache. In short, SCons is an easier, more reliable and faster way - to build software. - ''; - homepage = "https://scons.org/"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ AndersonTorres ]; - }; -} diff --git a/pkgs/os-specific/linux/ffado/default.nix b/pkgs/os-specific/linux/ffado/default.nix index 47112a26c203a..3c13b96040590 100644 --- a/pkgs/os-specific/linux/ffado/default.nix +++ b/pkgs/os-specific/linux/ffado/default.nix @@ -63,7 +63,7 @@ mkDerivation rec { nativeBuildInputs = [ desktop-file-utils - (scons.override { python3 = python311; }) + (scons.override { python3Packages = python311.pkgs; }) pkg-config which python diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8aab4a83c80c0..e7707873239bc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19309,11 +19309,6 @@ with pkgs; sca2d = callPackage ../development/tools/sca2d { }; - scons = scons_4_5_2; - scons_3_1_2 = callPackage ../development/tools/build-managers/scons/3.1.2.nix { }; - scons_4_1_0 = callPackage ../development/tools/build-managers/scons/4.1.0.nix { }; - scons_4_5_2 = callPackage ../development/tools/build-managers/scons/4.5.2.nix { }; - mill = callPackage ../development/tools/build-managers/mill { }; sbt = callPackage ../development/tools/build-managers/sbt { };