1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-02 18:42:15 +00:00
nixpkgs/pkgs/development/tools/build-managers/scons/common.nix
Matthew Bauer 1ba9fd335d scons: add setup hook
The scons build system is python-based and has a binary named scons. Unlike CMake, it cannot generate makefiles so we end up having to override the build, install, and check phases. I have added the setupHook to the scons package so that integration requires no unique steps - just putting scons in nativeBuildInputs should be enough. sconsFlags controls the flags specifically passed to scons while buildFlags, installFlags, and checkFlags should still be usable. Some packages use different names for the prefix flag. In those cases you will have to set "prefixKey" to something like "PREFIX=" as there are multiple names for the "prefix" used in scons.
2018-11-13 19:13:50 -06:00

35 lines
1 KiB
Nix

{ version, sha256 }:
{ stdenv, fetchurl, python2Packages }:
let name = "scons";
in python2Packages.buildPythonApplication {
name = "${name}-${version}";
src = fetchurl {
url = "mirror://sourceforge/scons/${name}-${version}.tar.gz";
inherit sha256;
};
# Fix a regression in 3.0.0 (causes build errors for some packages)
patches = stdenv.lib.optional (version == "3.0.0") ./print-statements.patch;
setupHook = ./setup-hook.sh;
meta = with stdenv.lib; {
homepage = http://scons.org/;
description = "An improved, cross-platform substitute for Make";
license = licenses.mit;
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.
'';
platforms = platforms.all;
maintainers = [ maintainers.primeos ];
};
}