Compare commits

...

7 Commits

Author SHA1 Message Date
e439d398b6 flake: patch using the target system instead of the host 2023-01-13 09:05:00 +00:00
0f25cba331 moby kernel: disable config option that would break build 2023-01-13 04:40:34 +00:00
39959e912d cross: fix cross compilation by setting both local AND crossSystem 2023-01-13 04:40:34 +00:00
62e649743d moby: update megous kernel 6.1-20221128-1027 -> 6.1-20221211-1046 2023-01-13 04:40:34 +00:00
b1741a18e1 feeds: include "title" in the output OPML -- when it exists 2023-01-13 04:13:44 +00:00
a829a8e027 persist: fix permission mapping when acl is specified as toplevel attribute 2023-01-13 01:50:08 +00:00
d742ae83bd flake update: nixpkgs-unpatched: 2023-01-09 -> 2023-01-11
```
• Updated input 'nixpkgs-stable':
    'github:NixOS/nixpkgs/8c54d842d9544361aac5f5b212ba04e4089e8efe' (2023-01-08)
  → 'github:NixOS/nixpkgs/6a3f9996408c970b99b8b992b11bb249d1455b62' (2023-01-12)
• Updated input 'nixpkgs-unpatched':
    'github:NixOS/nixpkgs/aa1d74709f5dac623adb4d48fdfb27cc2c92a4d4' (2023-01-09)
  → 'github:NixOS/nixpkgs/6c8644fc37b6e141cbfa6c7dc8d98846c4ff0c2e' (2023-01-11)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/2253120d2a6147e57bafb5c689e086221df8032f' (2023-01-08)
  → 'github:Mic92/sops-nix/32187b33ac6ec9b628dcd08dd941a715e6241dda' (2023-01-12)
```
2023-01-13 00:02:32 +00:00
10 changed files with 61 additions and 21 deletions

20
flake.lock generated
View File

@@ -60,7 +60,7 @@
}, },
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-5eJxyBRYQCoRt92ZFUOdT237Z0VscuNRd0pktDYWJYE=", "narHash": "sha256-RM4ZprjMlUTMD0huOPQceF0ujXG2xk7LE1fGXfcg71g=",
"path": "nixpatches", "path": "nixpatches",
"type": "path" "type": "path"
}, },
@@ -71,11 +71,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1673163619, "lastModified": 1673527292,
"narHash": "sha256-B33PFBL64ZgTWgMnhFL3jgheAN/DjHPsZ1Ih3z0VE5I=", "narHash": "sha256-903EpRSDCfUvic7Hsiqwy+h7zlMTLAUbCXkEGGriCfM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8c54d842d9544361aac5f5b212ba04e4089e8efe", "rev": "6a3f9996408c970b99b8b992b11bb249d1455b62",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -102,11 +102,11 @@
}, },
"nixpkgs-unpatched": { "nixpkgs-unpatched": {
"locked": { "locked": {
"lastModified": 1673226411, "lastModified": 1673450908,
"narHash": "sha256-b6cGb5Ln7Zy80YO66+cbTyGdjZKtkoqB/iIIhDX9gRA=", "narHash": "sha256-b8em+kwrNtnB7gR8SyVf6WuTyQ+6tHS6dzt9D9wgKF0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "aa1d74709f5dac623adb4d48fdfb27cc2c92a4d4", "rev": "6c8644fc37b6e141cbfa6c7dc8d98846c4ff0c2e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -134,11 +134,11 @@
"nixpkgs-stable": "nixpkgs-stable_2" "nixpkgs-stable": "nixpkgs-stable_2"
}, },
"locked": { "locked": {
"lastModified": 1673147300, "lastModified": 1673481602,
"narHash": "sha256-gR9OEfTzWfL6vG0qkbn1TlBAOlg4LuW8xK/u0V41Ihc=", "narHash": "sha256-P80X38fOM2MtoYdgkyuksGOQPDhIhNJW2W2jMeMIZzE=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "2253120d2a6147e57bafb5c689e086221df8032f", "rev": "32187b33ac6ec9b628dcd08dd941a715e6241dda",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -43,10 +43,12 @@
evalHost = { name, local, target }: evalHost = { name, local, target }:
let let
# XXX: we'd prefer to use `nixosSystem = (nixpkgsCompiledBy local).nixos` # XXX: we'd prefer to use `nixosSystem = (nixpkgsCompiledBy target).nixos`
# but it doesn't propagate config to the underlying pkgs, meaning it doesn't let you use # but it doesn't propagate config to the underlying pkgs, meaning it doesn't let you use
# non-free packages even after setting nixpkgs.allowUnfree. # non-free packages even after setting nixpkgs.allowUnfree.
nixosSystem = import ((nixpkgsCompiledBy local).path + "/nixos/lib/eval-config.nix"); # XXX: patch using the target -- not local -- otherwise the target will
# need to emulate the host in order to rebuild!
nixosSystem = import ((nixpkgsCompiledBy target).path + "/nixos/lib/eval-config.nix");
in in
(nixosSystem { (nixosSystem {
# we use pkgs built for and *by* the target, i.e. emulation, by default. # we use pkgs built for and *by* the target, i.e. emulation, by default.

View File

@@ -1,5 +1,12 @@
{ ... }: { config, ... }:
let
mkCrossFrom = localSystem: pkgs: import pkgs.path {
inherit localSystem;
crossSystem = pkgs.stdenv.hostPlatform.system;
inherit (config.nixpkgs) config overlays;
};
in
{ {
# the configuration of which specific package set `pkgs.cross` refers to happens elsewhere; # the configuration of which specific package set `pkgs.cross` refers to happens elsewhere;
# here we just define them all. # here we just define them all.
@@ -8,8 +15,8 @@
# non-emulated packages build *from* local *for* target. # non-emulated packages build *from* local *for* target.
# for large packages like the linux kernel which are expensive to build under emulation, # for large packages like the linux kernel which are expensive to build under emulation,
# the config can explicitly pull such packages from `pkgs.cross` to do more efficient cross-compilation. # the config can explicitly pull such packages from `pkgs.cross` to do more efficient cross-compilation.
crossFrom."x86_64-linux" = (prev.forceSystem "x86_64-linux" null).appendOverlays next.overlays; crossFrom."x86_64-linux" = mkCrossFrom "x86_64-linux" next;
crossFrom."aarch64-linux" = (prev.forceSystem "aarch64-linux" null).appendOverlays next.overlays; crossFrom."aarch64-linux" = mkCrossFrom "aarch64-linux" next;
}) })
]; ];
} }

View File

@@ -41,6 +41,8 @@ let
); );
} // lib.optionalAttrs (raw.is_podcast or false) { } // lib.optionalAttrs (raw.is_podcast or false) {
format = "podcast"; format = "podcast";
} // lib.optionalAttrs (raw.title or "" != "") {
title = lib.mkDefault raw.title;
}; };
podcasts = [ podcasts = [

View File

@@ -125,6 +125,9 @@ in
# aarch64-unknown-linux-gnu-gcc: error: unrecognized command line option '-mfpu=neon' # aarch64-unknown-linux-gnu-gcc: error: unrecognized command line option '-mfpu=neon'
# make[3]: *** [../scripts/Makefile.build:289: drivers/video/fbdev/sun5i-eink-neon.o] Error 1 # make[3]: *** [../scripts/Makefile.build:289: drivers/video/fbdev/sun5i-eink-neon.o] Error 1
FB_SUN5I_EINK = no; FB_SUN5I_EINK = no;
# used by the pinephone pro, but fails to compile with:
# ../drivers/media/i2c/ov8858.c:1834:27: error: implicit declaration of function 'compat_ptr'
VIDEO_OV8858 = no;
}) })
)) ))
]; ];

View File

@@ -16,6 +16,10 @@ let
type = types.enum [ "text" "image" "podcast" ]; type = types.enum [ "text" "image" "podcast" ];
default = "text"; default = "text";
}; };
title = mkOption {
type = types.nullOr types.str;
default = null;
};
url = mkOption { url = mkOption {
type = types.str; type = types.str;
description = '' description = ''

View File

@@ -12,8 +12,24 @@ rec {
# transform a list of feeds into an attrs mapping cat => [ feed0 feed1 ... ] # transform a list of feeds into an attrs mapping cat => [ feed0 feed1 ... ]
partitionByCat = feeds: builtins.groupBy (f: f.cat) feeds; partitionByCat = feeds: builtins.groupBy (f: f.cat) feeds;
xmlTag = tag: close: attrs:
let
fmt-attrs = builtins.concatStringsSep
" "
(lib.mapAttrsToList (name: value: ''${lib.escapeXML name}="${lib.escapeXML value}"'') attrs);
fmt-close = if close then "/" else "";
in
''<${tag} ${fmt-attrs} ${fmt-close}>'';
# represents a single RSS feed. # represents a single RSS feed.
opmlTerminal = feed: ''<outline xmlUrl="${feed.url}" type="rss"/>''; opmlTerminal = feed: xmlTag "outline" true (
{
xmlUrl = feed.url;
type = "rss";
} // lib.optionalAttrs (feed.title != null) {
title = feed.title;
}
);
# a list of RSS feeds. # a list of RSS feeds.
opmlTerminals = feeds: lib.concatStringsSep "\n" (builtins.map opmlTerminal feeds); opmlTerminals = feeds: lib.concatStringsSep "\n" (builtins.map opmlTerminal feeds);
# one node which packages some flat grouping of terminals. # one node which packages some flat grouping of terminals.

View File

@@ -103,7 +103,7 @@ let
(orig: lib.recursiveUpdate (orig: lib.recursiveUpdate
(builtins.removeAttrs orig ["user" "group" "mode" ]) (builtins.removeAttrs orig ["user" "group" "mode" ])
{ {
acl = sane-lib.filterByName ["user" "group" "mode"] (orig.acl or {}); acl = sane-lib.filterByName ["user" "group" "mode"] orig;
} }
) )
to; to;

View File

@@ -16,7 +16,7 @@
# kiwix-tools: init at 3.4.0 # kiwix-tools: init at 3.4.0
(fetchpatch { (fetchpatch {
url = "https://github.com/NixOS/nixpkgs/pull/206254.diff"; url = "https://github.com/NixOS/nixpkgs/pull/206254.diff";
sha256 = "sha256-Z4V9mOv4HYg3kDnWoYcxz3ch03I/1USrLjzlq4X9YqI="; sha256 = "sha256-Cendm7a23qj/YRBj5qVM8jhl9oTpztaDEkXcSG4dJys=";
}) })
./2022-12-19-i2p-aarch64.patch ./2022-12-19-i2p-aarch64.patch

View File

@@ -5,7 +5,7 @@ with lib;
let let
base = "6.1.0"; base = "6.1.0";
# set to empty if not a release candidate # set to empty if not a release candidate
rc = "-rc7"; rc = "-rc8";
in buildLinux (args // rec { in buildLinux (args // rec {
version = base + rc; version = base + rc;
@@ -16,9 +16,15 @@ in buildLinux (args // rec {
extraMeta.branch = versions.majorMinor version; extraMeta.branch = versions.majorMinor version;
src = fetchFromGitHub { src = fetchFromGitHub {
# HOW TO UPDATE:
# - `git fetch` from megous' github.
# - there should be some new tag, like `orange-pi-6.1-blah`. use that.
# - megi publishes release notes as the most recent commit on any stable branch, so just `git log`.
# - orange-pi is listed as the "main integration branch".
# - specific branches like `pp` (pinephone) are dev branches, and probably less stable.
owner = "megous"; owner = "megous";
repo = "linux"; repo = "linux";
rev = "orange-pi-6.1-20221128-1027"; rev = "orange-pi-6.1-20221211-1046";
hash = "sha256-kEujs4v5rPHPYy4YLyEWHa1Bu0sxoXLgSvmOH9QPWos="; hash = "sha256-TgFXH8bHWHs26rlf7a/zNO9zubFazC8Ie6J1gj4gLgw=";
}; };
} // (args.argsOverride or { })) } // (args.argsOverride or { }))