Compare commits

...

27 Commits

Author SHA1 Message Date
Colin 790adeee5f cross compilation: build `webp-pixbuf-loader` without emulation 2023-02-21 00:05:37 +00:00
Colin 72c6f34043 cross: compile appstream, colord without emulation 2023-02-20 20:24:37 +00:00
Colin 6108c12631 pins: disable failing python310Packages.ipython tests 2023-02-20 20:23:32 +00:00
Colin ba93870b51 pins: disable failing python310Packages.pytest-xdist tests 2023-02-19 21:42:27 +00:00
Colin a871d4eb3d WIP: reduce emulated cross pkgset; aborted x86-x86 cross compilation 2023-02-18 11:58:04 +00:00
Colin 567b20ddde moby: ship the full recommended guiApps again 2023-02-18 11:57:16 +00:00
Colin 556cb1a2d0 phosh: disable konsole. it drags in a large closure, especially qt stuff which doesn't cross compile well 2023-02-18 11:57:16 +00:00
Colin f40427245f cross packages: full moby build can cross compile (except konsole is untested) 2023-02-18 11:57:16 +00:00
Colin ce1ba59413 programs: split the guiApps category into slightly smaller bits 2023-02-18 11:57:16 +00:00
Colin 691a6ef045 moby: ship some of the base apps 2023-02-18 11:57:16 +00:00
Colin 2fc99d8b5a cross packages: cross compile more stuff 2023-02-18 11:57:16 +00:00
Colin 80de7248ed gpodder: fix `makeWrapper` to be a nativeBuildInput 2023-02-18 11:57:16 +00:00
Colin 2fd16348e1 phosh-mobile-settings: cross compile 2023-02-18 11:57:16 +00:00
Colin fcc1cb20d5 cross packages: cross compile more gnome packages 2023-02-18 11:57:16 +00:00
Colin 10be547077 working moby cross compilation 2023-02-18 11:57:16 +00:00
Colin db1c5d16b5 cross packages: get more things to build and further reduce the emulated closure 2023-02-18 11:57:16 +00:00
Colin a52f3d723a cross packages: get more things to build and further reduce the emulated closure 2023-02-18 11:57:16 +00:00
Colin 5a09f7a89d cross packages: reduce the emulated package set 2023-02-18 11:57:16 +00:00
Colin f979dff5aa phosh: disable gvfs service 2023-02-18 11:57:16 +00:00
Colin fd015f61b7 phosh: enable fewer gnome services/packages 2023-02-18 11:57:16 +00:00
Colin 7e5d86f931 programs: re-enable cdrtools, fwupd; disable duplicity/backblaze 2023-02-18 11:57:16 +00:00
Colin b920b4713c tune emulated package set (e.g. only emulate one of gvfs' deps; not the WHOLE thing 2023-02-18 11:57:16 +00:00
Colin 7e58e39a5f WIP: moby: partially working cross compilation for phosh w/o apps (webkitgtk build OOMs) 2023-02-18 11:57:16 +00:00
Colin 98de5043cf moby: get working cross compilation for the base image (i.e. no GUI) 2023-02-18 11:57:16 +00:00
Colin cda319b07a WIP: moby-cross: is cross-by-default instead of opt-in 2023-02-18 11:57:16 +00:00
Colin 0a0640cc43 gjs, libadwaita, libsecret: skip flakey check phase 2023-02-18 11:57:16 +00:00
Colin 035c4d65f8 mesa: downgrade from 22.3.4 -> 22.3.2 to address a memory leak 2023-02-18 11:57:14 +00:00
13 changed files with 1219 additions and 81 deletions

View File

@ -67,7 +67,9 @@
(nixosSystem {
# we use pkgs built for and *by* the target, i.e. emulation, by default.
# cross compilation only happens on explicit access to `pkgs.cross`
system = target;
# system = target;
# localSystem = local;
# crossSystem = target;
modules = [
(import ./hosts/instantiate.nix { localSystem = local; hostName = name; })
self.nixosModules.default
@ -78,6 +80,9 @@
self.overlays.passthru
self.overlays.pins
];
# nixpkgs.crossSystem = target;
nixpkgs.hostPlatform = target;
nixpkgs.buildPlatform = local;
}
];
});

View File

@ -14,6 +14,8 @@
sane.gui.sway.enable = true;
sane.programs.guiApps.suggestedPrograms = [ "desktopGuiApps" ];
boot.loader.efi.canTouchEfiVariables = false;
sane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
@ -47,7 +49,7 @@
};
programs.steam = {
enable = true;
# enable = true;
# not sure if needed: stole this whole snippet from the wiki
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server

View File

@ -15,6 +15,8 @@
boot.loader.efi.canTouchEfiVariables = false;
sane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
sane.programs.guiApps.suggestedPrograms = [ "desktopGuiApps" ];
sops.secrets.colin-passwd = {
sopsFile = ../../../secrets/lappy.yaml;
neededForUsers = true;

View File

@ -114,7 +114,7 @@ in
# - phone rotation sensor is off by 90 degrees
# - ambient light sensor causes screen brightness to be shakey
# - phosh greeter may not appear after wake from sleep
boot.kernelPackages = pkgs.cross.linuxPackagesFor pkgs.cross.linux-megous;
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux-megous;
boot.kernelPatches = [
(patchDefconfig (kernelConfig //

File diff suppressed because it is too large Load Diff

View File

@ -4,11 +4,23 @@ let
inherit (builtins) attrNames concatLists;
inherit (lib) mapAttrs mapAttrsToList mkDefault mkMerge optional;
flattenedPkgs = pkgs // (with pkgs; {
# XXX can't `inherit` a nested attr, so we move them to the toplevel
"cacert.unbundled" = pkgs.cacert.unbundled;
"gnome.cheese" = gnome.cheese;
"gnome.dconf-editor" = gnome.dconf-editor;
"gnome.file-roller" = gnome.file-roller;
"gnome.gnome-disk-utility" = gnome.gnome-disk-utility;
"gnome.gnome-maps" = gnome.gnome-maps;
"gnome.nautilus" = gnome.nautilus;
"gnome.gnome-system-monitor" = gnome.gnome-system-monitor;
"gnome.gnome-terminal" = gnome.gnome-terminal;
"gnome.gnome-weather" = gnome.gnome-weather;
"libsForQt5.plasmatube" = libsForQt5.plasmatube;
});
sysadminPkgs = {
inherit (pkgs // {
# XXX can't `inherit` a nested attr, so we move them to the toplevel
"cacert.unbundled" = pkgs.cacert.unbundled;
})
inherit (flattenedPkgs)
btrfs-progs
"cacert.unbundled" # some services require unbundled /etc/ssl/certs
cryptsetup
@ -50,12 +62,16 @@ let
;
};
# TODO: split these into smaller groups.
# - iphone utils (libimobiledevice, ifuse) only wanted on desko, maybe lappy
# - transcoders (ffmpeg, imagemagick) only wanted on desko/lappy
consolePkgs = {
inherit (pkgs)
backblaze-b2
aerc # email client
# backblaze-b2 # TODO: put into the same package set as duplicity
cdrtools
dmidecode
duplicity
# duplicity # TODO: enable as part of some smaller package set
efivar
flashrom
fwupd
@ -99,41 +115,22 @@ let
visidata
w3m
wireguard-tools
xdg-utils # for xdg-open
# youtube-dl
yt-dlp
;
};
guiPkgs = {
inherit (pkgs // (with pkgs; {
# XXX can't `inherit` a nested attr, so we move them to the toplevel
# TODO: could use some "flatten attrs" helper instead
"gnome.cheese" = gnome.cheese;
"gnome.dconf-editor" = gnome.dconf-editor;
"gnome.file-roller" = gnome.file-roller;
"gnome.gnome-disk-utility" = gnome.gnome-disk-utility;
"gnome.gnome-maps" = gnome.gnome-maps;
"gnome.nautilus" = gnome.nautilus;
"gnome.gnome-system-monitor" = gnome.gnome-system-monitor;
"gnome.gnome-terminal" = gnome.gnome-terminal;
"gnome.gnome-weather" = gnome.gnome-weather;
"libsForQt5.plasmatube" = libsForQt5.plasmatube;
}))
aerc # email client
audacity
inherit (flattenedPkgs)
celluloid # mpv frontend
chromium
clinfo
dino
electrum
element-desktop
emote
evince # works on phosh
# { pkg = fluffychat-moby; dir = [ ".local/share/chat.fluffy.fluffychat" ]; } # TODO: ship normal fluffychat on non-moby?
foliate # e-book reader
font-manager
# foliate # e-book reader
# XXX by default fractal stores its state in ~/.local/share/<UUID>.
# after logging in, manually change ~/.local/share/keyrings/... to point it to some predictable subdir.
@ -141,14 +138,11 @@ let
# { pkg = fractal-latest; private = [ ".local/share/fractal" ]; }
# { pkg = fractal-next; private = [ ".local/share/fractal" ]; }
gajim # XMPP client
gimp # broken on phosh
"gnome.cheese"
# "gnome.cheese"
"gnome.dconf-editor"
gnome-feeds # RSS reader (with claimed mobile support)
"gnome.file-roller"
"gnome.gnome-disk-utility"
"gnome.gnome-maps" # works on phosh
# "gnome.gnome-maps" # works on phosh
"gnome.nautilus"
# gnome-podcasts
"gnome.gnome-system-monitor"
@ -156,21 +150,15 @@ let
"gnome.gnome-weather"
gpodder-configured
gthumb
inkscape
kdenlive
kid3 # audio tagging
krita
libreoffice-fresh # XXX colin: maybe don't want this on mobile
lollypop
# lollypop
mpv
networkmanagerapplet
newsflash
# newsflash
nheko
obsidian
pavucontrol
# picard # music tagging
playerctl
"libsForQt5.plasmatube" # Youtube player
# "libsForQt5.plasmatube" # Youtube player
soundconverter
# sublime music persists any downloaded albums here.
# it doesn't obey a conventional ~/Music/{Artist}/{Album}/{Track} notation, so no symlinking
@ -178,15 +166,33 @@ let
# possible to pass config as a CLI arg (sublime-music -c config.json)
# { pkg = sublime-music; dir = [ ".local/share/sublime-music" ]; }
sublime-music-mobile
tdesktop # broken on phosh
tokodon
# tdesktop # broken on phosh
# tokodon
vlc
# pleroma client (Electron). input is broken on phosh. TODO(2023/02/02): fix electron19 input (insecure)
# whalebird
xdg-utils # for xdg-open
xterm # broken on phosh
;
};
desktopGuiPkgs = {
inherit (flattenedPkgs)
audacity
chromium
dino
electrum
element-desktop
font-manager
gajim # XMPP client
gimp # broken on phosh
"gnome.gnome-disk-utility"
inkscape
kdenlive
kid3 # audio tagging
krita
libreoffice-fresh # XXX colin: maybe don't want this on mobile
obsidian
;
};
x86GuiPkgs = {
inherit (pkgs)
discord
@ -221,6 +227,7 @@ in
(declarePkgs sysadminPkgs)
(declarePkgs consolePkgs)
(declarePkgs guiPkgs)
(declarePkgs desktopGuiPkgs)
(declarePkgs x86GuiPkgs)
{
# link the various package sets into their own meta packages
@ -237,6 +244,10 @@ in
suggestedPrograms = (attrNames guiPkgs)
++ optional (pkgs.system == "x86_64-linux") "x86GuiApps";
};
desktopGuiApps = {
package = null;
suggestedPrograms = attrNames desktopGuiPkgs;
};
x86GuiApps = {
package = null;
suggestedPrograms = attrNames x86GuiPkgs;

View File

@ -15,13 +15,13 @@
networking.hostName = hostName;
nixpkgs.overlays = [
(next: prev: {
# for local != target we by default just emulate the target while building.
# provide a `pkgs.cross.<pkg>` alias that consumers can use instead of `pkgs.<foo>`
# to explicitly opt into non-emulated cross compilation for any specific package.
# this is most beneficial for large packages with few pre-requisites -- like Linux.
cross = prev.crossFrom."${localSystem}";
})
];
# nixpkgs.overlays = [
# (next: prev: {
# # for local != target we by default just emulate the target while building.
# # provide a `pkgs.cross.<pkg>` alias that consumers can use instead of `pkgs.<foo>`
# # to explicitly opt into non-emulated cross compilation for any specific package.
# # this is most beneficial for large packages with few pre-requisites -- like Linux.
# cross = prev.crossFrom."${localSystem}";
# })
# ];
}

View File

@ -29,7 +29,7 @@ in
# TODO: see about removing gnome-bluetooth if the in-built gnome-settings bluetooth manager can work
"gnome.gnome-bluetooth"
"phosh-mobile-settings"
"plasma5Packages.konsole" # more reliable terminal
# "plasma5Packages.konsole" # more reliable terminal
];
};
}
@ -63,6 +63,28 @@ in
};
};
# phosh enables `services.gnome.{core-os-services, core-shell}`
# and this in turn enables some default apps we don't really care about.
# see <nixos/modules/services/x11/desktop-managers/gnome.nix>
environment.gnome.excludePackages = with pkgs; [
# gnome.gnome-menus # unused outside gnome classic, but probably harmless
gnome-tour
];
services.dleyna-renderer.enable = false;
services.dleyna-server.enable = false;
services.gnome.gnome-browser-connector.enable = false;
services.gnome.gnome-initial-setup.enable = false;
services.gnome.gnome-online-accounts.enable = false;
services.gnome.gnome-remote-desktop.enable = false;
services.gnome.gnome-user-share.enable = false;
services.gnome.rygel.enable = false;
# gnome doesn't use mkDefault for these -- unclear why not
services.gnome.evolution-data-server.enable = mkForce false;
services.gnome.gnome-online-miners.enable = mkForce false;
# TODO: re-enable this once we can cross-compile gvfs
services.gvfs.enable = mkForce false;
# XXX: phosh enables networkmanager by default; can probably disable these lines
networking.useDHCP = false;
networking.networkmanager.enable = true;
@ -85,6 +107,7 @@ in
};
programs.dconf.packages = [
# org.kde.konsole.desktop
(pkgs.writeTextFile {
name = "dconf-phosh-settings";
destination = "/etc/dconf/db/site.d/00_phosh_settings";
@ -97,7 +120,7 @@ in
sleep-inactive-battery-timeout=5400
[sm/puri/phosh]
favorites=['gpodder.desktop', 'nheko.desktop', 'sublime-music.desktop', 'firefox.desktop', 'org.kde.konsole.desktop']
favorites=['gpodder.desktop', 'nheko.desktop', 'sublime-music.desktop', 'firefox.desktop', 'org.gnome.Terminal.desktop']
'';
})
];

View File

@ -0,0 +1,22 @@
diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix
index 56fa74e5c0c..3573bb0af49 100644
--- a/pkgs/development/libraries/mesa/default.nix
+++ b/pkgs/development/libraries/mesa/default.nix
@@ -88,7 +88,7 @@
let
# Release calendar: https://www.mesa3d.org/release-calendar.html
# Release frequency: https://www.mesa3d.org/releasing.html#schedule
- version = "22.3.4";
+ version = "22.3.2";
branch = lib.versions.major version;
withLibdrm = lib.meta.availableOn stdenv.hostPlatform libdrm;
@@ -120,7 +120,7 @@ self = stdenv.mkDerivation {
"ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz"
"ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz"
];
- sha256 = "37a1ddaf03f41919ee3c89c97cff41e87de96e00e9d3247959cc8279d8294593";
+ sha256 = "c15df758a8795f53e57f2a228eb4593c22b16dffd9b38f83901f76cd9533140b";
};
# TODO:

View File

@ -2,16 +2,15 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1673163619,
"narHash": "sha256-B33PFBL64ZgTWgMnhFL3jgheAN/DjHPsZ1Ih3z0VE5I=",
"lastModified": 1675123384,
"narHash": "sha256-RpU+kboEWlIYwbRMGIPBIcztH63CvmqWN1B8GpJogd4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8c54d842d9544361aac5f5b212ba04e4089e8efe",
"rev": "e0fa1ece2f3929726c9b98c539ad14b63ae8e4fd",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-22.11",
"type": "indirect"
}
},

View File

@ -21,8 +21,20 @@
# hash = "sha256-PnPzvJymafa+zjkauQW0LzFsJC7S+7D9JRszTE3in+w=";
# })
# (fetchpatch {
# # stdenv: fix cc for pseudo-crosscompilation
# # closed because it breaks pkgsStatic (as of 2023/02/12)
# url = "https://github.com/NixOS/nixpkgs/pull/196497.diff";
# hash = "sha256-eTwEbVULYjmOW7zUFcTUqvBZqUFjHTKFhvmU2m3XQeo=";
# })
./2022-12-19-i2p-aarch64.patch
# fix for CMA memory leak in mesa: <https://gitlab.freedesktop.org/mesa/mesa/-/issues/8198>
# only necessary on aarch64.
# it's a revert of nixpkgs commit dcf630c172df2a9ecaa47c77f868211e61ae8e52
./2023-01-30-mesa-cma-leak.patch
# # kaiteki: init at 2022-09-03
# vendorHash changes too frequently (might not be reproducible).
# using local package defn until stabilized

View File

@ -4,9 +4,97 @@
# - if it's broken by that upstream builder, then pin it: somebody will come along and fix the package.
# - otherwise, search github issues/PRs for knowledge of it before pinning.
# - if nobody's said anything about it yet, probably want to root cause it or hold off on updating.
#
# note that these pins apply to *all* platforms:
# - natively compiled packages
# - cross compiled packages
# - qemu-emulated packages
(next: prev: {
# XXX: when invoked outside our flake (e.g. via NIX_PATH) there is no `next.stable`,
# so just forward the unstable packages.
inherit (next.stable or prev)
;
ell = prev.ell.overrideAttrs (_upstream: {
# 2023/02/11
# fixes "TEST FAILED in get_random_return_callback at unit/test-dbus-message-fds.c:278: !l_dbus_message_get_error(message, ((void *)0), ((void *)0))"
# unclear *why* this test fails.
doCheck = false;
});
gjs = prev.gjs.overrideAttrs (_upstream: {
# 2023/01/30: one test times out. probably flakey test that only got built because i patched mesa.
doCheck = false;
});
gssdp = prev.gssdp.overrideAttrs (_upstream: {
# 2023/02/11
# fixes "ERROR:../tests/test-regression.c:429:test_ggo_7: assertion failed (error == NULL): Failed to set multicast interfaceProtocol not available (gssdp-error, 1)"
doCheck = false;
});
json-glib = prev.json-glib.overrideAttrs (_upstream: {
# 2023/02/11
# fixes: "15/15 json-glib:docs / doc-check TIMEOUT 30.52s killed by signal 15 SIGTERM"
doCheck = false;
});
lapack-reference = prev.lapack-reference.overrideAttrs (_upstream: {
# 2023/02/11: test timeouts
# > The following tests FAILED:
# > 93 - LAPACK-xlintstz_ztest_in (Timeout)
# > 98 - LAPACK-xeigtstz_svd_in (Timeout)
# > 99 - LAPACK-xeigtstz_zec_in (Timeout)
doCheck = false;
});
libadwaita = prev.libadwaita.overrideAttrs (_upstream: {
# 2023/01/30: one test times out. probably flakey test that only got built because i patched mesa.
doCheck = false;
});
libsecret = prev.libsecret.overrideAttrs (_upstream: {
# 2023/01/30: one test times out. probably flakey test that only got built because i patched mesa.
doCheck = false;
});
libuv = prev.libuv.overrideAttrs (_upstream: {
# 2023/02/11
# 2 tests fail:
# - not ok 261 - tcp_bind6_error_addrinuse
# - not ok 267 - tcp_bind_error_addrinuse_listen
doCheck = false;
});
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
(py-next: py-prev: {
ipython = py-prev.ipython.overridePythonAttrs (upstream: {
# > FAILED IPython/core/tests/test_debugger.py::test_xmode_skip - pexpect.exceptions.TIMEOUT: Timeout exceeded.
# > FAILED IPython/core/tests/test_debugger.py::test_decorator_skip - pexpect.exceptions.TIMEOUT: Timeout exceeded.
# > FAILED IPython/core/tests/test_debugger.py::test_decorator_skip_disabled - pexpect.exceptions.TIMEOUT: Timeout exceeded.
# > FAILED IPython/core/tests/test_debugger.py::test_decorator_skip_with_breakpoint - pexpect.exceptions.TIMEOUT: Timeout exceeded.
# > FAILED IPython/core/tests/test_debugger.py::test_where_erase_value - pexpect.exceptions.TIMEOUT: Timeout exceeded.
# > FAILED IPython/terminal/tests/test_debug_magic.py::test_debug_magic_passes_through_generators - pexpect.exceptions.TIMEOUT: Timeout exceeded.
# > FAILED IPython/terminal/tests/test_embed.py::test_nest_embed - pexpect.exceptions.TIMEOUT: Timeout exceeded.
disabledTestPaths = upstream.disabledTestPaths or [] ++ [
"IPython/core/tests/test_debugger.py"
"IPython/terminal/tests/test_debug_magic.py"
"IPython/terminal/tests/test_embed.py"
];
});
pytest-xdist = py-prev.pytest-xdist.overridePythonAttrs (upstream: {
# 2023/02/19
# 4 tests fail:
# - FAILED: testing/test_remote.py::TestWorkInteractor::* - execnet.gateway_base.TimeoutError: no item after 10.0 seconds
# doCheck = false;
disabledTestPaths = upstream.disabledTestPaths or [] ++ [
"testing/test_remote.py"
];
# disabledTests = upstream.disabledTests or [] ++ [
# "test_basic_collect_and_runtests"
# "test_remote_collect_fail"
# "test_remote_collect_skip"
# "test_runtests_all"
# ];
});
})
];
strp = prev.srtp.overrideAttrs (_upstream: {
# 2023/02/11
# roc_driver test times out after 30s
doCheck = false;
});
})

View File

@ -13,7 +13,7 @@ in
(symlinkJoin {
name = "gpodder-configured";
paths = [ gpodder remove-extra ];
buildInputs = [ makeWrapper ];
nativeBuildInputs = [ makeWrapper ];
# gpodder keeps all its feeds in a sqlite3 database.
# we can configure the feeds externally by wrapping gpodder and just instructing it to import