summary refs log tree commit diff
path: root/pkgs/development/tools/build-managers/scons/common.nix
blob: 1de2ecbbc8b856a28e6907ed92b80b4396aebfac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ version, sha256 }:

{ stdenv, fetchurl, python3Packages, lib }:

python3Packages.buildPythonApplication rec {
  pname = "scons";
  inherit version;

  src = fetchurl {
    url = "mirror://sourceforge/scons/${pname}-${version}.tar.gz";
    inherit sha256;
  };

  setupHook = ./setup-hook.sh;

  postPatch = lib.optionalString (lib.versionAtLeast version "4.0.0") ''
    substituteInPlace setup.cfg \
      --replace "build/dist" "dist"
  '';

  # The release tarballs don't contain any tests (runtest.py and test/*):
  doCheck = lib.versionOlder version "4.0.0";

  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 = [ maintainers.primeos ];
  };
}