Build failure of AwesomeWM package from git

Hello!

I am trying to install the latest git version of AwesomeWM as part of my configuration.nix. The reason is that my configuration from my previous setup used that version, and there are a lot of breaking changes from the most recent stable release, 4.3, which is 4 years old by now.

I have searched extensively online for a solution and found a few that seemed promising

  1. Solution 1
  2. Solution 2

Both of these run into the same problem of a failed installation

error: builder for '/nix/store/rxs26bdhncl6hhc8l600xwifa0v5761j-awesomeGit-4.3.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/lsb2mmf2lx46v7k48x4klfbwbvd5h080-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/cg5ja54zpd4f9mybblkdybyp27xyp8x7-xsession.drv' failed to build
error: 1 dependencies of derivation '/nix/store/wh5kshb4mqda1rqrpqyza2905jf8cw9a-nixos-system-nixbtw-23.05.2613.011567f35433.drv' failed to build

My exact code for this is

{ config, pkgs, lib, ... }: {
  nixpkgs.overlays = [
    (final: prev: {
      awesomeGit = prev.awesome.overrideAttrs (old: rec {
        pname = "awesomeGit";
        src = prev.fetchFromGitHub {
          owner = "awesomeWM";
          repo = "awesome";
          rev = "0e5fc4575ab0adbae75908cb49937d9cf63437ec";
          sha256 = "sha256-ZFjYKyzQiRgg5uHgMLeex6oOKDrXMhp9dxxHEm2xeH4=";
        };
      });
    }

    )
  ];
}
{ config, pkgs, ... }:

{
  services.xserver = {
    enable = true;

    displayManager.defaultSession = "none+awesome";
    windowManager.awesome = {
      enable = true;
      package = pkgs.awesomeGit;
      luaModules = with pkgs.luaPackages; [ luarocks luadbi-mysql ];
    };
  };

  services.picom.enable = true;
}

I can’t make sense of this error, and I have tried looking at the logs with nix log but I am none the wiser… Does anyone have an idea what the problem could be or how I could go about finding out what’s the issue?

This is how I currently build awesome for an open-secret project of mine:

version and src can of course be replaced with any specific commit you like.

Cleaning the patches is necessary for about a year (or more even) now, while the shebang patch is necessary for about 6 months or so.

PS: Your pasted output is missing the actual compilation error, which would be much more helpful to debug your issue. If my proposed solution does not seolve your problem, please make sure to post the relevant section of the error.

1 Like

Thank you very much for you help, NobbZ. I am not sure what the problem was before, but I don’t think the build process ever started, and it panicked before then. I didn’t get any more informative logs than the ones I included in my previous post. But with a few modifications I was able to make it build now and it seems to work correctly.

I include a minimal working module here, in case anyone encounters my same problem.

{ pkgs, ... }:
let
  awesome = pkgs.awesome.overrideAttrs (oa: {
    version = "d36e1324d17efd571cec252374a2ef5f1eeae4fd";
    src = pkgs.fetchFromGitHub {
      owner = "awesomeWM";
      repo = "awesome";
      rev = "d36e1324d17efd571cec252374a2ef5f1eeae4fd";
      hash = "sha256-zCxghNGk/GsSt2+9JK8eXRySn9pHXaFhrRU3OtFrDoA=";
    };

    patches = [ ];

    postPatch = ''
      patchShebangs tests/examples/_postprocess.lua
    '';
  });
in {
  services.xserver = {
    enable = true;
    displayManager = {
      defaultSession = "none+awesome";
      sddm.enable = true;
    };
    windowManager.awesome = {
      enable = true;
      package = awesome;
    };
  };

}
1 Like