WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Guix on Tiny Core import Guix Packages to Mountable TCE extensions  (Read 545 times)

Offline flavien

  • WikiUser
  • *
  • Posts: 25
All is in the title.
Since we're able to run GUIX on tiny core (with the noembed bootcode, see "Request guix" topic ), we should be able to use GUIX as a "TGZ" extensions generator for tiny linux. (Without any guix dependency!)

Guix on Tiny Core import Guix Packages to Mountable ("guix/*.TGZ") TCE extensions : Draft Steps Theory.

get dependencies :
Code: [Select]
export DEPS = $(guix refresh --list-dependent $PKG_NAME)or something like that (see https://www.gnu.org/software/guix/manual/fr/html_node/Invoquer-guix-refresh.html#Invoquer-guix-refresh)


get package avalaible version to get the complete tgz file name
Code: [Select]
export $VER = $(...something with guix?...)
export FILE_NAME = guix/$PKG_NAME-$VER.tgz

Generate $FILE_NAME.dep file (with each line in "guix/$PKG_NAME-$VER.tgz" format)

For each dependency,, recursively build TGZ, but with forced $VER number

Then extract single item in a new /tmp/tgz-gen/$PKG_NAME-$VER folder
Code: [Select]
mkdir -p /tmp/tgz-gen/$PKG_NAME-$VER
guix archive --export %I_DONT_KNOW_BUT_IT_NEED_TO_BE_THE_GOOD_VERSION% | guix archive -x /tmp/tgz-gen/$PKG_NAME-$VER
or something like that (see https://www.gnu.org/software/guix/manual/en/guix.html#Invoking-guix-archive)

Then
Code: [Select]
cd /tmp/tgz-gen/$PKG_NAME-$VEROptionnaly ask for creating a new tce.installed/guix/$PKG_NAME-$VER.sh tce install script
with vi or nano or other. (Or wget it from an optional repository)

mksquashfs the /tce/optional/guix/$PKG_NAME-$VER.tgz after removing doc and optimizing binaries (see core book)
generate the the /tce/optional/guix/$PKG_NAME-$VER.tgz.list
generate the the /tce/optional/guix/$PKG_NAME-$VER.tgz.md5.txt

That's all folks.

We should theorically be able to produce a complete guix based distribution (but with tiny core's kernel and bootstrap). Now we need a proof of concept.
I'm not an advanced TC user, and i'm not an advanced Guix user too. Any help ? :)