summary refs log tree commit diff
path: root/pkgs/development/tools/build-managers
diff options
context:
space:
mode:
authorAnderson Torres <torres.anderson.85@protonmail.com>2023-10-28 19:51:27 -0300
committerAnderson Torres <torres.anderson.85@protonmail.com>2023-11-03 09:02:50 -0300
commit46ea3e557a4d8f38943013dbb3edeaddbf460eea (patch)
tree342e0e2c675661d60164bbffcf86bbbfadf0bd62 /pkgs/development/tools/build-managers
parente8041600e61e95fb533260faed0f3cf43a9c2daf (diff)
downloadnixpkgs-46ea3e557a4d8f38943013dbb3edeaddbf460eea.tar
nixpkgs-46ea3e557a4d8f38943013dbb3edeaddbf460eea.tar.gz
nixpkgs-46ea3e557a4d8f38943013dbb3edeaddbf460eea.tar.bz2
nixpkgs-46ea3e557a4d8f38943013dbb3edeaddbf460eea.tar.lz
nixpkgs-46ea3e557a4d8f38943013dbb3edeaddbf460eea.tar.xz
nixpkgs-46ea3e557a4d8f38943013dbb3edeaddbf460eea.tar.zst
nixpkgs-46ea3e557a4d8f38943013dbb3edeaddbf460eea.zip
scons_4_5_2: detach from sconsPackages
Diffstat (limited to 'pkgs/development/tools/build-managers')
-rw-r--r--pkgs/development/tools/build-managers/scons/4.5.2.nix54
-rw-r--r--pkgs/development/tools/build-managers/scons/default.nix4
2 files changed, 54 insertions, 4 deletions
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/default.nix b/pkgs/development/tools/build-managers/scons/default.nix
index 1c4f225f3e7..4829b97d668 100644
--- a/pkgs/development/tools/build-managers/scons/default.nix
+++ b/pkgs/development/tools/build-managers/scons/default.nix
@@ -5,8 +5,4 @@ let
     python = python3;
   };
 in {
-  scons_latest = mkScons {
-    version = "4.5.2";
-    sha256 = "sha256-ziaqyV01CnmkGSGWsL6sPLJPTMq84BI+so0zcPV28HI=";
-  };
 }