| 28 Jul 2024 |
Atemu | Use nix repl and then check the value of config.source.dirs | 00:27:19 |
matthewcroughan | It is reading a JSON file from the LineageOS upstream | 00:27:24 |
Atemu | That's the default | 00:27:43 |
matthewcroughan | https://github.com/nix-community/robotnix/blob/master/flavors/lineageos/default.nix#L24-L26 | 00:27:50 |
matthewcroughan | ah okay | 00:27:53 |
Atemu | This is a module system, you can add any source dir you like | 00:27:54 |
Atemu | You either have a typo here or something else is going on | 00:28:08 |
matthewcroughan | nix-repl> robotnixConfigurations.brownstone.config.source.dirs
error:
… while evaluating the attribute 'value'
at /nix/store/9fpv0kjq9a80isa1wkkvrdqsh9dpcn05-source/lib/modules.nix:807:9:
806| in warnDeprecation opt //
807| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
808| inherit (res.defsFinal') highestPrio;
… while evaluating the option `source.dirs':
… while evaluating the attribute 'mergedValue'
at /nix/store/9fpv0kjq9a80isa1wkkvrdqsh9dpcn05-source/lib/modules.nix:842:5:
841| # Type-check the remaining definitions, and merge them. Or throw if no definitions.
842| mergedValue =
| ^
843| if isDefined then
… while evaluating definitions from `/nix/store/0iavq4h1d2mk95fbdrdzashahbqiri9f-source/flavors/lineageos':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: attribute '"device/samsung/hlte"' missing
at /nix/store/0iavq4h1d2mk95fbdrdzashahbqiri9f-source/flavors/lineageos/default.nix:132:43:
131| relpathWithDeps = relpath: [ relpath ] ++ (
132| flatten (map (p: relpathWithDeps p) deviceDirs.${relpath}.deps)
| ^
133| );
| 00:28:32 |
matthewcroughan | I cannot evaluate source.dirs due to it failing earlier | 00:28:57 |
Atemu | Then I'm not sure | 00:29:32 |
Atemu | You'd have to dig into it | 00:29:37 |
@samueldr:matrix.org | In reply to @matthewcroughan:defenestrate.it Is anyone aware that you cannot add new devices to robotnix that aren't supported in upstream due to the logic in flavors/lineageos/default.nix only allowing usage of official lineage devices, without the ability to override this behavior? explain how I'm building LineageOS for an unsupported device then? | 00:30:36 |
matthewcroughan | I am also, an earlier version (11) | 00:30:49 |
@samueldr:matrix.org | [but that might have broken with the changes since] | 00:30:50 |
matthewcroughan | which changes the logic | 00:30:52 |
matthewcroughan | When using androidVersion 12 or 13 things get a bit weirder | 00:31:05 |
@samueldr:matrix.org | androidVersion 11 for my part | 00:31:19 |
matthewcroughan | https://github.com/DoESLiverpool/nixcfgs/blob/master/hosts/admin-phone/default.nix | 00:34:37 |
matthewcroughan | Here's an example of my working build for 11 also | 00:34:43 |
matthewcroughan | My attempt for androidVersion 13 with the current robotnix that fails like above, is here:
{ config, pkgs, ... }:
{
# Enable F-Droid and the F-Droid privileged extension
apps.fdroid.enable = true;
# Disable the LineageOS Updater
source.dirs."packages/apps/Updater".enable = false;
source.dirs."device/samsung/hlte-common".src = pkgs.fetchgit {
rev = "9a1bf8f7b8ca7f6dccc6462b76bf712893bd9d39";
url = "https://github.com/html6405/android_device_samsung_hlte-common.git";
sha256 = "";
};
source.dirs."device/samsung/hlte".src = pkgs.fetchgit {
rev = "1ac57aea5ecfe0ef06f24f931e978151a2307731";
url = "https://github.com/html6405/android_device_samsung_hlte.git";
sha256 = "";
};
source.dirs."kernel/samsung/msm8974".src = pkgs.fetchgit {
rev = "79c36b7a4b30e1216d9b1d071359f3d4a681d0b2";
url = "https://github.com/html6405/android_kernel_samsung_msm8974.git";
sha256 = "";
};
source.dirs."hardware/samsung".src = pkgs.fetchgit {
rev = "05133e22669d90b1b844974b243861a5d8138f51";
url = "https://github.com/html6405/android_hardware_samsung.git";
sha256 = "";
};
device = "hlte";
flavor = "lineageos";
androidVersion = 13;
}
| 00:35:37 |
matthewcroughan | https://github.com/nix-community/robotnix/blob/master/flavors/lineageos/lineage-18.1/device-dirs.json#L2610 | 00:36:22 |
matthewcroughan | hlte occurs in lineage-18.1 | 00:36:27 |
matthewcroughan | It ceases to occur in 19.1.. | 00:36:45 |
matthewcroughan | So that explains that.. | 00:36:52 |
matthewcroughan | I didn't think my other device (admin-phone) would occur in device-dirs.json, let me double check | 00:37:14 |
matthewcroughan | Yeah, it doesn't. This evaluation error doesn't occur there, despite dreamlte being absent from device-dirs.json (since it is officially unsupported) | 00:37:53 |
matthewcroughan | It knows it's device/samsung for some reason just based on the name hlte despite setting androidVersion to 13, I wonder if it's using the wrong json file due to some faulty logic | 00:42:34 |
eyJhb | In reply to @samueldr:matrix.org [but that might have broken with the changes since] I don't think any logic has been changed, not intentionally at least | 07:08:59 |
| loudgolem left the room. | 10:46:46 |
| matthewcroughan changed their display name from matthewcroughan to matthewcroughan - going to nix.camp. | 16:09:41 |