From 5d423c3ac081651d4c8fc57667b08dd0b47eee80 Mon Sep 17 00:00:00 2001 From: Emily Trau Date: Tue, 25 Apr 2023 19:10:49 +1000 Subject: [PATCH] minimal-bootstrap: add source attribution --- .../linux/minimal-bootstrap/mes/default.nix | 8 ++++++- .../stage0-posix/mescc-tools-extra/build.kaem | 18 +++++++++++++++ .../stage0-posix/mescc-tools/build.kaem | 20 ++++++++++++++++ .../stage0-posix/stage0-posix-x86.nix | 23 +++++++++++++++++++ .../tinycc/bootstrappable.nix | 9 ++++++++ .../minimal-bootstrap/tinycc/default.nix | 6 +++++ 6 files changed, 83 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/minimal-bootstrap/mes/default.nix b/pkgs/os-specific/linux/minimal-bootstrap/mes/default.nix index 50433c40e7d7..02d069b1ece9 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/mes/default.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/mes/default.nix @@ -1,3 +1,10 @@ +# Build steps adapted from https://github.com/fosslinux/live-bootstrap/blob/1bc4296091c51f53a5598050c8956d16e945b0f5/sysa/mes-0.24.2/mes-0.24.2.kaem +# +# SPDX-FileCopyrightText: 2020-2022 Andrius Štikonas +# SPDX-FileCopyrightText: 2020-2022 fosslinux +# +# SPDX-License-Identifier: GPL-3.0-or-later + { runCommand , fetchurl , fetchtarball @@ -20,7 +27,6 @@ let sha256 = "065ksalfllbdrzl12dz9d9dcxrv97wqxblslngsc6kajvnvlyvpk"; }) + "/nyacc-${nyaccVersion}"; in -# Adapted from https://github.com/fosslinux/live-bootstrap/blob/1bc4296091c51f53a5598050c8956d16e945b0f5/sysa/mes-0.24.2/mes-0.24.2.kaem (runCommand "mes-${version}" {} '' # Unpack source ungz --file ${src} --output mes.tar diff --git a/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools-extra/build.kaem b/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools-extra/build.kaem index 12471bd0519e..e50fc1c68474 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools-extra/build.kaem +++ b/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools-extra/build.kaem @@ -1,5 +1,23 @@ # This is a modified version of mescc-tools-extra/mescc-tools-extra.kaem # https://github.com/oriansj/mescc-tools-extra/blob/ec53af69d6d2119b47b369cd0ec37ac806e7ad60/mescc-tools-extra.kaem +# - Paths to build inputs have been changed for nix +# - Added additional step to create $out directory + +## Copyright (C) 2017 Jeremiah Orians +## This file is part of mescc-tools. +## +## mescc-tools is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## mescc-tools is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with mescc-tools. If not, see . alias CC="${mescc-tools}/bin/M2-Mesoplanet --operating-system ${OPERATING_SYSTEM} --architecture ${ARCH} -f" cd ${src}/mescc-tools-extra diff --git a/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools/build.kaem b/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools/build.kaem index e0b597570509..3a7ae25fbd82 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools/build.kaem +++ b/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools/build.kaem @@ -1,5 +1,25 @@ # This is a modified version of stage0-posix/x86/mescc-tools-full-kaem.kaem # https://github.com/oriansj/stage0-posix-x86/blob/56e6b8df3e95f4bc04f8b420a4cd8c82c70b9efa/mescc-tools-full-kaem.kaem +# - Paths to build inputs have been changed for nix + +# Mes --- Maxwell Equations of Software +# Copyright © 2017,2019 Jan Nieuwenhuizen +# Copyright © 2017,2019 Jeremiah Orians +# +# This file is part of Mes. +# +# Mes is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. +# +# Mes is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Mes. If not, see . ${mkdir} -p ${out}/bin ${cp} ${M2} ${out}/bin/M2 diff --git a/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/stage0-posix-x86.nix b/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/stage0-posix-x86.nix index e1a123e56d59..917518958f41 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/stage0-posix-x86.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/stage0-posix-x86.nix @@ -1,5 +1,28 @@ # This is a translation of stage0-posix/stage0-posix/x86/mescc-tools-mini-kaem.kaem to nix # https://github.com/oriansj/stage0-posix-x86/blob/56e6b8df3e95f4bc04f8b420a4cd8c82c70b9efa/mescc-tools-mini-kaem.kaem +# +# We have access to mini-kaem at this point but it doesn't support substituting +# environment variables. Without variables there's no way of passing in store inputs, +# or the $out path, other than as command line arguments directly + +# Mes --- Maxwell Equations of Software +# Copyright © 2017,2019 Jan Nieuwenhuizen +# Copyright © 2017,2019 Jeremiah Orians +# +# This file is part of Mes. +# +# Mes is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. +# +# Mes is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Mes. If not, see . # Warning all binaries prior to the use of blood-elf will not be readable by # Objdump, you may need to use ndism or gdb to view the assembly in the binary. diff --git a/pkgs/os-specific/linux/minimal-bootstrap/tinycc/bootstrappable.nix b/pkgs/os-specific/linux/minimal-bootstrap/tinycc/bootstrappable.nix index 0884656dc00f..0b495430913e 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/tinycc/bootstrappable.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/tinycc/bootstrappable.nix @@ -1,6 +1,12 @@ # Bootstrappable TCC is a fork from mainline TCC development # that can be compiled by MesCC +# Build steps adapted from https://github.com/fosslinux/live-bootstrap/blob/1bc4296091c51f53a5598050c8956d16e945b0f5/sysa/tcc-0.9.26/tcc-0.9.26.kaem +# +# SPDX-FileCopyrightText: 2021-22 fosslinux +# +# SPDX-License-Identifier: GPL-3.0-or-later + { lib , runCommand , fetchtarball @@ -78,6 +84,9 @@ let ''${out}/bin/tcc -ar cr ''${out}/lib/libgetopt.a ''${TMPDIR}/getopt.o ''; + # Bootstrap stage build flags obtained from + # https://gitlab.com/janneke/tinycc/-/blob/80114c4da6b17fbaabb399cc29f427e368309bc8/boot.sh + boot0-tcc = buildTinyccN { pname = "boot0-tcc"; inherit src version; diff --git a/pkgs/os-specific/linux/minimal-bootstrap/tinycc/default.nix b/pkgs/os-specific/linux/minimal-bootstrap/tinycc/default.nix index 961f259189cc..3930e4758434 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/tinycc/default.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/tinycc/default.nix @@ -1,3 +1,9 @@ +# Build steps adapted from https://github.com/fosslinux/live-bootstrap/blob/1bc4296091c51f53a5598050c8956d16e945b0f5/sysa/tcc-0.9.27/tcc-0.9.27.kaem +# +# SPDX-FileCopyrightText: 2021-22 fosslinux +# +# SPDX-License-Identifier: GPL-3.0-or-later + { lib , runCommand , fetchtarball