push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
{
lib,
stdenv,
fetchFromGitHub,
pkgsBuildHost,
versionCheckHook,
}:
# Changing the variables CPPFLAGS and BUILD_CONFIG_NAME can be done by
# overriding the same-named attributes. See ./presets.nix for examples.
stdenv.mkDerivation (finalAttrs: {
pname = "mkspiffs";
version = "0.2.3";
src = fetchFromGitHub {
owner = "igrr";
repo = "mkspiffs";
tag = finalAttrs.version;
fetchSubmodules = true;
hash = "sha256-oa6Lmo2yb66IjtEKkZyJBgM/p7rdvmrKfgNd2rAM/Lk=";
};
# 1) Fix build for Darwin
# 2) Fix cross
# 3) Do not run test as part of the buildPhase - the checkPhase will run it as `make test`
postPatch = ''
substituteInPlace Makefile \
--replace-fail "-arch i386 -arch x86_64" "" \
--replace-fail "strip" "${pkgsBuildHost.binutils.targetPrefix}strip" \
--replace-fail "dist: test" ""
'';
strictDeps = true;
buildFlags = [ "dist" ];
makeFlags = [
"VERSION=${finalAttrs.version}"
"SPIFFS_VERSION=unknown"
];
installPhase = ''
install -Dm755 -t $out/bin mkspiffs
'';
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
meta = {
description = "Tool to build and unpack SPIFFS images";
license = lib.licenses.mit;
homepage = "https://github.com/igrr/mkspiffs";
maintainers = [ lib.maintainers.haslersn ];
platforms = lib.platforms.all;
mainProgram = "mkspiffs";
};
})

View File

@@ -0,0 +1,23 @@
{ lib, mkspiffs }:
# We provide the same presets as the upstream
lib.mapAttrs
(
name:
{ CPPFLAGS }:
mkspiffs.overrideAttrs {
inherit CPPFLAGS;
BUILD_CONFIG_NAME = "-${name}";
}
)
{
arduino-esp8266.CPPFLAGS = [
"-DSPIFFS_USE_MAGIC_LENGTH=0"
"-DSPIFFS_ALIGNED_OBJECT_INDEX_TABLES=1"
];
arduino-esp32.CPPFLAGS = [ "-DSPIFFS_OBJ_META_LEN=4" ];
esp-idf.CPPFLAGS = [ "-DSPIFFS_OBJ_META_LEN=4" ];
}