Conversation

Jarkko Sakkinen

Edited yesterday
Took a while to get there (aka not slept last night) but now I have the rudimentary infrastructure to build NixOS QCOW2 with docker-compose or podman-compose:

https://codeberg.org/jarkko/linux-tpmdd-nixos

I.e running "podman-compose up --build" results in " output/tpmdd-nixos.qcow2"

Next up how do I extract semantic version from Makefile of the kernel tree instead of presetting version to 5.10?

#linux #kernel #nixos
2
1
0

This is a problem for kernel development:

      src = pkgs.fetchgit {
        url = "https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git";
        sha256 = "sha256-ZoxNKErtJv0U0tGUC6o4ifXrPi6ZbIxMocMA0mgnzsg=";
      };

So I guess I need to rename configuration.nix to configuration.nix.in and replace that with:

     src = pkgs.fetchgit {
        url = "https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git";
        sha256 = "@KERNEL_SHA256@";
      };

Then using nix-prefetch-git https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git and sed I can create the actual configuration.nix.

Unfortunately it seems that lib.fakeSha256 cannot be put into skip/ignore mode :-(

1
0
0

Thomas Woolford 🚌🚲🚶

1
0
0
@twoolie But why what? It already outputs qcow2.
0
0
0
There is somewhat reasonable way to solve this:

src = pkgs.fetchgit (builtins.fromJSON (builtins.readFile ./linux-tpmdd.json));

In the Dockerfile, nix-prefetch-git can then be used to generate that file.
0
0
0