Skip to content

Move to Python 3#2

Open
CrumblyLiquid wants to merge 1 commit into
coredevices:masterfrom
CrumblyLiquid:master
Open

Move to Python 3#2
CrumblyLiquid wants to merge 1 commit into
coredevices:masterfrom
CrumblyLiquid:master

Conversation

@CrumblyLiquid
Copy link
Copy Markdown

@CrumblyLiquid CrumblyLiquid commented Apr 8, 2026

Removes the Python 2 dependency in favor of Python 3!
And the changes themselves are pretty small too :)

It seems to build fine with my NixOS flake and it runs the default pebble watchface without issues. Hopefully there aren't any silent breakages.

Details

The original NixOS derivation can be found here

My modified NixOS derivation:

{
  lib, stdenv, fetchFromGitHub, gnumake,
  python3, pkg-config, zlib, glib,
  pixman, dtc,
}:
let
  libraries = [
    zlib
    glib
    pixman
    dtc
    stdenv.cc.cc.lib
  ];

  rpath = lib.makeLibraryPath libraries;
in
stdenv.mkDerivation {
  pname = "qemu-pebble";
  version = "157f3fd";

  src = fetchFromGitHub {
    owner = "CrumblyLiquid";
    repo = "qemu";
    rev = "157f3fd8ceb0d885ed14980d403d73cd5ed8ff42";
    hash = "sha256-gHocmkQkiGOWedr/ufCjpcXJDk/LFylPP6XoNyy6wQw=";
  };

  nativeBuildInputs = [
    gnumake
    python3
    pkg-config
  ]
  ++ libraries;

  LD_LIBRARY_PATH = rpath;

  enableParallelBuilding = true;

  configureFlags = [
    "--disable-werror"
    "--enable-debug"
    "--target-list=arm-softmmu"
    "--extra-cflags=-DSTM32_UART_NO_BAUD_DELAY"
  ];

  postFixup = ''
    patchelf --set-rpath "${rpath}" $out/bin/qemu-system-arm
  '';

  postInstall = ''
    ln -s $out/bin/qemu-system-arm $out/bin/qemu-pebble
  '';
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant