automake and stuff
This commit is contained in:
parent
b2b92d6c5f
commit
fe0035e40f
20
automake/automake.nix
Normal file
20
automake/automake.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{stdenv, fetchurl, perl, autoconf269}: stdenv.mkDerivation rec {
|
||||
pname = "automake";
|
||||
version = "1.11.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/automake/automake-${version}.tar.gz";
|
||||
hash = "sha256-U9vxlFQBxD9M4ZwZcbrs2/i8MuDzf6P0n+e2mS0NIDA=";
|
||||
};
|
||||
|
||||
patches = [ ./fix-perl-5.26.patch ];
|
||||
|
||||
builder = ./builder.sh;
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
# Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the
|
||||
# "fixed" path in generated files!
|
||||
dontPatchShebangs = true;
|
||||
|
||||
buildInputs = [ perl autoconf269 ];
|
||||
}
|
||||
48
automake/builder.sh
Normal file
48
automake/builder.sh
Normal file
@ -0,0 +1,48 @@
|
||||
source $stdenv/setup
|
||||
|
||||
# Wrap the given `aclocal' program, appending extra `-I' flags
|
||||
# corresponding to the directories listed in $ACLOCAL_PATH. (Note
|
||||
# that `wrapProgram' can't be used for that purpose since it can only
|
||||
# prepend flags, not append them.)
|
||||
wrapAclocal() {
|
||||
local program="$1"
|
||||
local wrapped="$(dirname $program)/.$(basename $program)-wrapped"
|
||||
|
||||
mv "$program" "$wrapped"
|
||||
cat > "$program"<<EOF
|
||||
#! $SHELL -e
|
||||
|
||||
unset extraFlagsArray
|
||||
declare -a extraFlagsArray
|
||||
|
||||
oldIFS=\$IFS
|
||||
IFS=:
|
||||
echo "Wrapping! \$ACLOCAL_PATH"
|
||||
for dir in \$ACLOCAL_PATH; do
|
||||
if test -n "\$dir" -a -d "\$dir"; then
|
||||
extraFlagsArray=("\${extraFlagsArray[@]}" "-I" "\$dir")
|
||||
fi
|
||||
done
|
||||
IFS=\$oldIFS
|
||||
|
||||
exec "$wrapped" "\$@" "\${extraFlagsArray[@]}"
|
||||
EOF
|
||||
chmod +x "$program"
|
||||
}
|
||||
|
||||
postInstall() {
|
||||
# Create a wrapper around `aclocal' that converts every element in
|
||||
# `ACLOCAL_PATH' into a `-I dir' option. This way `aclocal'
|
||||
# becomes modular; M4 macros do not need to be stored in a single
|
||||
# global directory, while callers of `aclocal' do not need to pass
|
||||
# `-I' options explicitly.
|
||||
|
||||
for prog in $out/bin/aclocal*; do
|
||||
wrapAclocal "$prog"
|
||||
done
|
||||
|
||||
ln -s aclocal-1.11 $out/share/aclocal
|
||||
ln -s automake-1.11 $out/share/automake
|
||||
}
|
||||
|
||||
genericBuild
|
||||
10
automake/fix-perl-5.26.patch
Normal file
10
automake/fix-perl-5.26.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- automake-1.11.2/automake.in
|
||||
+++ automake-1.11.2/automake.in
|
||||
@@ -4156,7 +4156,7 @@ sub substitute_ac_subst_variables_worker($)
|
||||
sub substitute_ac_subst_variables ($)
|
||||
{
|
||||
my ($text) = @_;
|
||||
- $text =~ s/\${([^ \t=:+{}]+)}/&substitute_ac_subst_variables_worker ($1)/ge;
|
||||
+ $text =~ s/\$\{([^ \t=:+{}]+)}/&substitute_ac_subst_variables_worker ($1)/ge;
|
||||
return $text;
|
||||
}
|
||||
5
automake/setup-hook.sh
Normal file
5
automake/setup-hook.sh
Normal file
@ -0,0 +1,5 @@
|
||||
addAclocals () {
|
||||
addToSearchPathWithCustomDelimiter : ACLOCAL_PATH $1/share/aclocal-1.11
|
||||
}
|
||||
|
||||
addEnvHooks "$hostOffset" addAclocals
|
||||
24
libxml2.nix
Normal file
24
libxml2.nix
Normal file
@ -0,0 +1,24 @@
|
||||
{stdenv, fetchFromGitLab, autoreconfHook, libtool}: stdenv.mkDerivation rec {
|
||||
pname = "libxml2";
|
||||
version = "2.7.6";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.gnome.org";
|
||||
owner = "GNOME";
|
||||
repo = pname;
|
||||
rev = "v" + version;
|
||||
hash = "sha256-5+IWJMbqqcCPJKfDOHdRGv62XbUPOTjp9ZhsqbbHTeg=";
|
||||
};
|
||||
|
||||
#buildInputs = [autoconf269 automake];
|
||||
buildInputs = [autoreconfHook];
|
||||
patchPhase = ''
|
||||
export ACLOCAL_PATH=${libtool}/share/aclocal:$ACLOCAL_PATH
|
||||
export CFLAGS="-Wno-incompatible-pointer-types"
|
||||
'';
|
||||
|
||||
/*configurePhase = ''
|
||||
autoreconf
|
||||
./configure
|
||||
'';*/
|
||||
}
|
||||
24
libxslt.nix
Normal file
24
libxslt.nix
Normal file
@ -0,0 +1,24 @@
|
||||
{stdenv, fetchFromGitLab, autoreconfHook, libtool, libxml2, breakpointHook}: stdenv.mkDerivation rec {
|
||||
pname = "libxslt";
|
||||
version = "1.1.26";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.gnome.org";
|
||||
owner = "GNOME";
|
||||
repo = pname;
|
||||
rev = "v" + version;
|
||||
hash = "sha256-PaKgvQQotmCbpGiWhm9TtSAGGN8wJQNmRvEmtro/pqQ=";
|
||||
};
|
||||
|
||||
#buildInputs = [autoconf269 automake];
|
||||
buildInputs = [autoreconfHook libxml2 breakpointHook];
|
||||
patchPhase = ''
|
||||
export ACLOCAL_PATH=${libtool}/share/aclocal:$ACLOCAL_PATH
|
||||
'';
|
||||
#export CFLAGS="-Wno-incompatible-pointer-types"
|
||||
|
||||
/*configurePhase = ''
|
||||
autoreconf
|
||||
./configure
|
||||
'';*/
|
||||
}
|
||||
11
lxml.nix
11
lxml.nix
@ -1,16 +1,17 @@
|
||||
{stdenv, fetchPypi, buildPythonPackage, setuptools, argparse }: buildPythonPackage rec {
|
||||
pname = "Jinja2";
|
||||
version = "2.5.2";
|
||||
{stdenv, fetchPypi, buildPythonPackage, setuptools, libxml2 }: buildPythonPackage rec {
|
||||
pname = "lxml";
|
||||
version = "2.2.6";
|
||||
format = "setuptools";
|
||||
#pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
extension = "tar.gz";
|
||||
hash = "sha256-GQQPAbOp2MY+TVeTb3hxCQgZm2k3CrRKD3QH3YkfAZs=";
|
||||
hash = "sha256-f9NuSlY2DNXXMZ41ewSpDixrg26iIMiPlFHDAK4zzF4=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [setuptools argparse];
|
||||
propagatedBuildInputs = [setuptools];
|
||||
buildInputs = [libxml2];
|
||||
|
||||
#dependencies = [importlib];
|
||||
}
|
||||
|
||||
18
overlay.nix
18
overlay.nix
@ -1,24 +1,18 @@
|
||||
nixpkgsPath: { pkgs, oldPkgs }:
|
||||
let
|
||||
bommels = pkgs.lib.makeScope pkgs.newScope (self: rec {
|
||||
# python26 = pkgs.callPackage ./python26/default.nix {
|
||||
# self = python26;
|
||||
# xlibsWrapper = pkgs.xlibsWrapper;
|
||||
# };
|
||||
automake = pkgs.callPackage ./automake/automake.nix {};
|
||||
autoreconfHook = pkgs.autoreconfHook269.override {
|
||||
automake = automake;
|
||||
};
|
||||
libxml2 = pkgs.callPackage ./libxml2.nix { inherit autoreconfHook; };
|
||||
libxslt = pkgs.callPackage ./libxslt.nix { inherit autoreconfHook libxml2; };
|
||||
|
||||
#setuptools = self.callPackage ./setuptools.nix { inherit pythonPackages; };
|
||||
#wrapPython = pkgs.callPackage ./python26/wrap-python.nix { python = python26; };
|
||||
#mkPythonDerivation = pkgs.callPackage ./python26/mk-python-derivation.nix { inherit setuptools wrapPython; python = python26; };
|
||||
#bootstrapped-pip = pkgs.callPackage ./python26/bootstrapped-pip.nix { python = python26; };
|
||||
#buildPythonPackage = pkgs.callPackage ./python26/build-python-package.nix { inherit bootstrapped-pip mkPythonDerivation; python = python26; };
|
||||
|
||||
#pip = pkgs.callPackage ./pip.nix { inherit python26 buildPythonPackage; };
|
||||
pythonInterpreters = self.callPackage ./python-interpreters.nix { inherit nixpkgsPath; };
|
||||
inherit (pythonInterpreters) python26;
|
||||
python26Packages = python26.pkgs;
|
||||
pythonPackages = python26Packages;
|
||||
|
||||
#importlib = self.callPackage ./importlib.nix {};
|
||||
some-package = pkgs.callPackage ./some-package.nix { inherit pythonPackages; };
|
||||
});
|
||||
in
|
||||
|
||||
@ -49,5 +49,6 @@ rec {
|
||||
|
||||
bommels = {
|
||||
jinja2 = callPackage ./jinja2.nix { };
|
||||
lxml = callPackage ./lxml.nix { };
|
||||
};
|
||||
}
|
||||
|
||||
2
result
2
result
@ -1 +1 @@
|
||||
/nix/store/sdpslgfqlmmbjaz93m7w9c5c01fs8wxn-python2.6-Jinja2-2.5.2
|
||||
/nix/store/3mdywqnsfmphw8jg4x8jk4cp7zi2pg5n-libxslt-1.1.26
|
||||
@ -1,8 +1,3 @@
|
||||
{stdenv, path }: stdenv.mkDerivation {
|
||||
pname = "abc";
|
||||
version = "0.1.0";
|
||||
#src = ./some-package.nix;
|
||||
builder = ''
|
||||
'';
|
||||
PATH_TEST=path;
|
||||
{python26Packages }: python26Packages.buildPythonPackage {
|
||||
pname = "something";
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user