summary refs log tree commit diff
path: root/pkgs/development/tools/build-managers/scons
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/build-managers/scons')
-rw-r--r--pkgs/development/tools/build-managers/scons/3.1.2.nix38
-rw-r--r--pkgs/development/tools/build-managers/scons/4.1.0.nix50
-rw-r--r--pkgs/development/tools/build-managers/scons/4.5.2.nix54
-rw-r--r--pkgs/development/tools/build-managers/scons/common.nix62
-rw-r--r--pkgs/development/tools/build-managers/scons/default.nix20
-rw-r--r--pkgs/development/tools/build-managers/scons/setup-hook.sh22
6 files changed, 154 insertions, 92 deletions
diff --git a/pkgs/development/tools/build-managers/scons/3.1.2.nix b/pkgs/development/tools/build-managers/scons/3.1.2.nix
new file mode 100644
index 00000000000..097a8ffd519
--- /dev/null
+++ b/pkgs/development/tools/build-managers/scons/3.1.2.nix
@@ -0,0 +1,38 @@
+{ lib, fetchurl, python3 }:
+
+let
+  pname = "scons";
+  version = "3.1.2";
+  src = fetchurl {
+    url = "mirror://sourceforge/scons/scons-${version}.tar.gz";
+    hash = "sha256-eAHz9i9lRSjict94C+EMDpM36JdlC2Ldzunzn94T+Ps=";
+  };
+in
+python3.pkgs.buildPythonApplication {
+  inherit pname version src;
+
+  setupHook = ./setup-hook.sh;
+
+  doCheck = true;
+
+  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 = "An 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.1.0.nix b/pkgs/development/tools/build-managers/scons/4.1.0.nix
new file mode 100644
index 00000000000..65499280c2c
--- /dev/null
+++ b/pkgs/development/tools/build-managers/scons/4.1.0.nix
@@ -0,0 +1,50 @@
+{ lib, fetchurl, python3 }:
+
+let
+  pname = "scons";
+  version = "4.1.0";
+  src = fetchurl {
+    url = "mirror://sourceforge/scons/scons-${version}.tar.gz";
+    hash = "sha256-ctKNdi4hJnh/Fz49WeCJI5+LL06e8xFNV/ELEgaYXYU=";
+  };
+in
+python3.pkgs.buildPythonApplication {
+  inherit pname version src;
+
+  postPatch = ''
+    substituteInPlace setup.cfg \
+      --replace "build/dist" "dist" \
+      --replace "build/doc/man/" ""
+  '';
+
+  postInstall = ''
+    mkdir -p "$out/share/man/man1"
+    mv "$out/"*.1 "$out/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 = "An 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
new file mode 100644
index 00000000000..61d1719642e
--- /dev/null
+++ b/pkgs/development/tools/build-managers/scons/4.5.2.nix
@@ -0,0 +1,54 @@
+{ lib, fetchurl, python3 }:
+
+let
+  pname = "scons";
+  version = "4.5.2";
+  src = fetchurl {
+    url = "mirror://sourceforge/project/scons/scons/${version}/SCons-${version}.tar.gz";
+    hash = "sha256-ziaqyV01CnmkGSGWsL6sPLJPTMq84BI+so0zcPV28HI=";
+  };
+in
+python3.pkgs.buildPythonApplication {
+  inherit pname version src;
+
+  patches = [
+    ./env.patch
+  ];
+
+  postPatch = ''
+    substituteInPlace setup.cfg \
+      --replace "build/dist" "dist" \
+      --replace "build/doc/man/" ""
+  '';
+
+  postInstall = ''
+    mkdir -p "$out/share/man/man1"
+    mv "$out/"*.1 "$out/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 = "An 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/common.nix b/pkgs/development/tools/build-managers/scons/common.nix
deleted file mode 100644
index 5b0aff8072c..00000000000
--- a/pkgs/development/tools/build-managers/scons/common.nix
+++ /dev/null
@@ -1,62 +0,0 @@
-{ version, sha256 }:
-
-{ fetchurl, python, lib }:
-
-python.pkgs.buildPythonApplication rec {
-  pname = "scons";
-  inherit version;
-
-  src = fetchurl {
-    url =
-      if lib.versionAtLeast version "4.3.0" then
-        "mirror://sourceforge/project/scons/scons/${version}/SCons-${version}.tar.gz"
-      else
-        "mirror://sourceforge/scons/scons-${version}.tar.gz";
-    inherit sha256;
-  };
-
-  setupHook = ./setup-hook.sh;
-
-  patches = lib.optionals (lib.versionAtLeast version "4.3.0") [
-    ./env.patch
-  ];
-
-  postPatch = lib.optionalString (lib.versionAtLeast version "4.0.0") ''
-    substituteInPlace setup.cfg \
-      --replace "build/dist" "dist"
-  '' + lib.optionalString (lib.versionAtLeast version "4.1.0") ''
-    substituteInPlace setup.cfg \
-      --replace "build/doc/man/" ""
-  '';
-
-  # The release tarballs don't contain any tests (runtest.py and test/*):
-  doCheck = lib.versionOlder version "4.0.0";
-
-  postInstall = lib.optionalString (lib.versionAtLeast version "4.1.0") ''
-    mkdir -p "$out/share/man/man1"
-    mv "$out/"*.1 "$out/share/man/man1/"
-  '';
-
-  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 python;
-  };
-
-  meta = with lib; {
-    description = "An 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/";
-    changelog = "https://raw.githubusercontent.com/SConsProject/scons/rel_${version}/src/CHANGES.txt";
-    license = licenses.mit;
-    platforms = platforms.all;
-    maintainers = [ ];
-  };
-}
diff --git a/pkgs/development/tools/build-managers/scons/default.nix b/pkgs/development/tools/build-managers/scons/default.nix
deleted file mode 100644
index f338d346a70..00000000000
--- a/pkgs/development/tools/build-managers/scons/default.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ callPackage, python2, python3 }:
-
-let
-  mkScons = args: callPackage (import ./common.nix args) {
-    python = python3;
-  };
-in {
-  scons_3_1_2 = (mkScons {
-    version = "3.1.2";
-    sha256 = "1yzq2gg9zwz9rvfn42v5jzl3g4qf1khhny6zfbi2hib55zvg60bq";
-  });
-  scons_4_1_0 = mkScons {
-    version = "4.1.0";
-    sha256 = "11axk03142ziax6i3wwy9qpqp7r3i7h5jg9y2xzph9i15rv8vlkj";
-  };
-  scons_latest = mkScons {
-    version = "4.5.2";
-    sha256 = "sha256-ziaqyV01CnmkGSGWsL6sPLJPTMq84BI+so0zcPV28HI=";
-  };
-}
diff --git a/pkgs/development/tools/build-managers/scons/setup-hook.sh b/pkgs/development/tools/build-managers/scons/setup-hook.sh
index 67358ee843d..bfd8f3cc07b 100644
--- a/pkgs/development/tools/build-managers/scons/setup-hook.sh
+++ b/pkgs/development/tools/build-managers/scons/setup-hook.sh
@@ -1,3 +1,5 @@
+# shellcheck shell=bash disable=SC2206
+
 sconsBuildPhase() {
     runHook preBuild
 
@@ -15,7 +17,7 @@ sconsBuildPhase() {
       $buildFlags ${buildFlagsArray[@]}
     )
 
-    echoCmd 'build flags' "${flagsArray[@]}"
+    echoCmd 'scons build flags' "${flagsArray[@]}"
     scons "${flagsArray[@]}"
 
     runHook postBuild
@@ -39,7 +41,7 @@ sconsInstallPhase() {
         ${installTargets:-install}
     )
 
-    echoCmd 'install flags' "${flagsArray[@]}"
+    echoCmd 'scons install flags' "${flagsArray[@]}"
     scons "${flagsArray[@]}"
 
     runHook postInstall
@@ -50,9 +52,9 @@ sconsCheckPhase() {
 
     if [ -z "${checkTarget:-}" ]; then
         if scons -n check >/dev/null 2>&1; then
-            checkTarget=check
+            checkTarget="check"
         elif scons -n test >/dev/null 2>&1; then
-            checkTarget=test
+            checkTarget="test"
         fi
     fi
 
@@ -65,21 +67,21 @@ sconsCheckPhase() {
             ${checkFlagsArray[@]}
         )
 
-        echoCmd 'check flags' "${flagsArray[@]}"
+        echoCmd 'scons check flags' "${flagsArray[@]}"
         scons "${flagsArray[@]}"
     fi
 
     runHook postCheck
 }
 
-if [ -z "${buildPhase-}" ]; then
+if [ -z "${dontUseSconsBuild-}" ] && [ -z "${buildPhase-}" ]; then
     buildPhase=sconsBuildPhase
 fi
 
-if [ -z "${dontUseSconsInstall-}" -a -z "${installPhase-}" ]; then
-    installPhase=sconsInstallPhase
+if [ -z "${dontUseSconsCheck-}" ] && [ -z "${checkPhase-}" ]; then
+    checkPhase=sconsCheckPhase
 fi
 
-if [ -z "${checkPhase-}" ]; then
-    checkPhase=sconsCheckPhase
+if [ -z "${dontUseSconsInstall-}" ] && [ -z "${installPhase-}" ]; then
+    installPhase=sconsInstallPhase
 fi