Skip to content

Commit 3ecbec3

Browse files
committed
Simplify nix flake
Signed-off-by: Matthias J. Kannwischer <[email protected]>
1 parent caa3329 commit 3ecbec3

File tree

3 files changed

+10
-22
lines changed

3 files changed

+10
-22
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ SHELL := /bin/bash
2424

2525
all: build
2626

27+
# Target platform for baremetal targets
2728
TARGET_PLATFORM ?=
28-
SOURCES=
2929
ifneq ($(TARGET_PLATFORM),)
3030
include test/mk/platform.mk
3131
endif

flake.nix

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,6 @@
7373
packages.toolchain_ppc64le = util.toolchain_ppc64le;
7474
packages.toolchain_aarch64_be = util.toolchain_aarch64_be;
7575

76-
# Build: Cortex-M55 (AN547) using arm-none-eabi-gcc, platform files from pqmx
77-
packages.m55-an547 = util.m55-an547;
78-
packages.default = config.packages.m55-an547;
79-
8076
devShells.default = util.mkShell {
8177
packages = builtins.attrValues
8278
{
@@ -87,6 +83,9 @@
8783
zig_0_13;
8884
} ++ pkgs.lib.optionals (!pkgs.stdenv.isDarwin) [ config.packages.valgrind_varlat ];
8985
};
86+
87+
# Build: Cortex-M55 (AN547) using arm-none-eabi-gcc, platform files from pqmx
88+
packages.m55-an547 = util.m55-an547;
9089
devShells.arm-embedded = util.mkShell {
9190
packages = builtins.attrValues
9291
{

nix/m55-an547-arm-none-eabi/default.nix

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,9 @@
44
{ stdenvNoCC
55
, fetchFromGitHub
66
, writeText
7-
, ...
87
}:
98

10-
# Builds mldsa-native for Cortex-M55 (AN547) using arm-none-eabi-gcc.
11-
# It fetches the platform support files from slothy-optimizer/pqmx
12-
# instead of using copies in the repository.
13-
14-
stdenvNoCC.mkDerivation rec {
9+
stdenvNoCC.mkDerivation {
1510
pname = "mldsa-native-m55-an547";
1611
version = "unstable-2025-09-17";
1712

@@ -25,25 +20,19 @@ stdenvNoCC.mkDerivation rec {
2520
};
2621

2722
patches = [ ./semihosting.patch ];
28-
29-
buildPhase = ''
30-
runHook preBuild
31-
runHook postBuild
32-
'';
23+
dontBuild = true;
3324

3425
installPhase = ''
35-
runHook preInstall
36-
mkdir -p "$out"/platform/m55-an547/src/platform/
37-
cp -ru envs/m55-an547/src/platform/. "$out"/platform/m55-an547/src/platform/
38-
runHook postInstall
26+
mkdir -p $out/platform/m55-an547/src/platform/
27+
cp -r envs/m55-an547/src/platform/. $out/platform/m55-an547/src/platform/
3928
'';
4029

4130
setupHook = writeText "setup-hook.sh" ''
4231
export M55_AN547_PATH="$1/platform/m55-an547/src/platform/"
4332
'';
4433

4534
meta = {
46-
description = "Build of mldsa-native for Cortex-M55 (AN547) using arm-none-eabi-gcc";
47-
homepage = "https://github.com/slothy-optimizer/pqm4-mx";
35+
description = "Platform files for the Cortex-M55 (AN547)";
36+
homepage = "https://github.com/slothy-optimizer/pqmx";
4837
};
4938
}

0 commit comments

Comments
 (0)