Skip to content
Snippets Groups Projects
Commit b9e68da8 authored by test_nonet's avatar test_nonet
Browse files

a few improvements -> build is successful

- GCC build was failing with warnings/errors for printf. NixOS disables
  hardening for format and pie for gcc so we do the same.
- gdb is built with Python support. The configure check for Python also
  uses -lncurses so we need that as well. The message is rather
  confusing because it claims not to find Python.
parent 4948ca78
No related branches found
No related tags found
No related merge requests found
/x/
{ lib, stdenv, fetchurl, fetchgit, fetchFromGitHub, espressif-crosstool-ng, autoconf, automake, bison, flex, unzip, help2man, libtool, which, texinfo, file, wget, gnum4, perl }:
{ lib, stdenv, fetchurl, fetchgit, fetchFromGitHub, espressif-crosstool-ng, autoconf, automake, bison, flex, unzip, help2man, libtool, which, texinfo, file, wget, gnum4, perl, ncurses, python3 }:
let
srcs = import ./sources.nix { inherit fetchFromGitHub; };
srcs2 = import ./sources2.nix { inherit fetchurl fetchgit fetchFromGitHub; };
......@@ -9,7 +9,10 @@ in stdenv.mkDerivation {
additionalSources = lib.strings.concatStringsSep "\n"
(lib.attrsets.mapAttrsToList (name: drv: if drv ? outPath then "${name} ${drv.outPath}" else "") srcs2);
nativeBuildInputs = [ espressif-crosstool-ng autoconf automake bison flex unzip help2man libtool which texinfo file wget gnum4 perl ];
buildInputs = [ ncurses python3 ];
nativeBuildInputs = [ espressif-crosstool-ng autoconf automake bison flex unzip help2man libtool which texinfo file wget gnum4 perl python3 ];
hardeningDisable = [ "format" "pie" ];
dontConfigure = true;
dontInstall = true;
......@@ -22,7 +25,7 @@ in stdenv.mkDerivation {
echo "CT_FORBID_DOWNLOAD=y" >>.config
mkdir tarballs
while read name path ; do
printf "%-20s -> %s" $name $path
printf "%-30s -> %s\\n" $name $path
if [ -d $path ] ; then
# ugly but works...
cp -aHT $path tarballs/$name
......@@ -33,6 +36,9 @@ in stdenv.mkDerivation {
fi
done <<<"$additionalSources"
# for debugging, see `ct-ng list-steps`
#export CT_DEBUG_CT_SAVE_STEPS=y
CT_USE_SOURCES_FROM_NIXOS=y \
ct-ng build \
|| ( tail -n 100 build.log ; exit 1 )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment