Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkgs/development/libraries/libgpg-error/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ in stdenv.mkDerivation (rec {
sed '/BUILD_TIMESTAMP=/s/=.*/=1970-01-01T00:01+0000/' -i ./configure
'' + lib.optionalString (stdenv.hostPlatform.isAarch32 && stdenv.buildPlatform != stdenv.hostPlatform) ''
ln -s lock-obj-pub.arm-unknown-linux-gnueabi.h src/syscfg/lock-obj-pub.linux-gnueabihf.h
ln -s lock-obj-pub.arm-unknown-linux-gnueabi.h src/syscfg/lock-obj-pub.linux-gnueabi.h
'' + lib.optionalString (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isMusl) ''
ln -s lock-obj-pub.x86_64-pc-linux-musl.h src/syscfg/lock-obj-pub.linux-musl.h
'' + lib.optionalString (stdenv.hostPlatform.isAarch32 && stdenv.hostPlatform.isMusl) ''
Expand Down
11 changes: 6 additions & 5 deletions pkgs/development/tools/build-managers/meson/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
let
# See https://mesonbuild.com/Reference-tables.html#cpu-families
cpuFamilies = {
aarch64 = "aarch64";
armv6l = "arm";
armv7l = "arm";
i686 = "x86";
x86_64 = "x86_64";
aarch64 = "aarch64";
armv5tel = "arm";
armv6l = "arm";
armv7l = "arm";
i686 = "x86";
x86_64 = "x86_64";
};
in
python3Packages.buildPythonApplication rec {
Expand Down
11 changes: 10 additions & 1 deletion pkgs/development/tools/misc/openocd/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, libftdi1, libusb1, pkgconfig, hidapi }:
{ stdenv, lib, fetchurl, fetchpatch, libftdi1, libusb1, pkgconfig, hidapi }:

stdenv.mkDerivation rec {
pname = "openocd";
Expand All @@ -9,6 +9,15 @@ stdenv.mkDerivation rec {
sha256 = "1bhn2c85rdz4gf23358kg050xlzh7yxbbwmqp24c0akmh3bff4kk";
};

patches = [
# Fix FTDI channel configuration for SheevaPlug
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=837989
(fetchpatch {
url = "https://salsa.debian.org/electronics-team/openocd/raw/9a94335daa332a37a51920f87afbad4d36fad2d5/debian/patches/fix-sheeva.patch";
sha256 = "01x021fagwvgxdpzk7psap7ryqiya4m4mi4nqr27asbmb3q46g5r";
})
];

nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libftdi1 libusb1 hidapi ];

Expand Down
12 changes: 11 additions & 1 deletion pkgs/development/tools/misc/texinfo/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
, interactive ? false, ncurses, procps
}:

let
crossBuildTools = interactive && stdenv.hostPlatform != stdenv.buildPlatform;
in

with stdenv.lib;

stdenv.mkDerivation {
Expand All @@ -17,7 +21,13 @@ stdenv.mkDerivation {
inherit sha256;
};

patches = optional (version == "6.5") ./perl.patch;
patches = optional (version == "6.5") ./perl.patch
++ optional crossBuildTools ./cross-tools-flags.patch;

# ncurses is required to build `makedoc'
# this feature is introduced by the ./cross-tools-flags.patch
NATIVE_TOOLS_CFLAGS = if crossBuildTools then "-I${getDev buildPackages.ncurses}/include" else null;
NATIVE_TOOLS_LDFLAGS = if crossBuildTools then "-L${getLib buildPackages.ncurses}/lib" else null;

# We need a native compiler to build perl XS extensions
# when cross-compiling.
Expand Down
12 changes: 12 additions & 0 deletions pkgs/development/tools/misc/texinfo/cross-tools-flags.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -ur texinfo-6.5/configure texinfo-6.5-patched/configure
--- texinfo-6.5/configure 2017-09-13 03:50:18.000000000 +0900
+++ texinfo-6.5-patched/configure 2019-12-28 17:39:06.692818866 +0900
@@ -23281,7 +23281,7 @@
# env -i gives this build host configure a clean environment;
# consequently, we have to re-initialize $PATH.
env -i CC="$BUILD_CC" AR="$BUILD_AR" RANLIB="$BUILD_RANLIB" \
- PATH="$PATH" \
+ PATH="$PATH" CFLAGS="$NATIVE_TOOLS_CFLAGS" LDFLAGS="$NATIVE_TOOLS_LDFLAGS" \
tools_only=1 \
${confdir}/configure --build=${build} --host=${build} \
--disable-rpath --disable-nls
2 changes: 1 addition & 1 deletion pkgs/misc/uboot/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ in {
ubootSheevaplug = buildUBoot {
defconfig = "sheevaplug_defconfig";
extraMeta.platforms = ["armv5tel-linux"];
filesToInstall = ["u-boot.bin"];
filesToInstall = ["u-boot.kwb"];
};

ubootSopine = buildUBoot {
Expand Down
9 changes: 6 additions & 3 deletions pkgs/tools/filesystems/mtdutils/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ stdenv.mkDerivation rec {
sha256 = "1lijl89l7hljx8xx70vrz9srd3h41v5gh4b0lvqnlv831yvyh5cd";
};

nativeBuildInputs = [ autoreconfHook cmocka pkgconfig ];
nativeBuildInputs = [ autoreconfHook pkgconfig ] ++ stdenv.lib.optional doCheck cmocka;
buildInputs = [ acl libuuid lzo zlib zstd ];

configureFlags = [ "--enable-unit-tests" "--enable-tests" ];
configureFlags = [
(stdenv.lib.enableFeature doCheck "unit-tests")
(stdenv.lib.enableFeature doCheck "tests")
];
enableParallelBuilding = true;

doCheck = true;
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;

meta = {
description = "Tools for MTD filesystems";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/tools/package-management/nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ common =
propagatedBuildInputs = [ boehmgc ];

# Seems to be required when using std::atomic with 64-bit types
NIX_LDFLAGS = lib.optionalString (stdenv.hostPlatform.system == "armv6l-linux") "-latomic";
NIX_LDFLAGS = lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux" || stdenv.hostPlatform.system == "armv6l-linux") "-latomic";

preConfigure =
# Copy libboost_context so we don't get all of Boost in our closure.
Expand Down