chore(3p): update NixOS channels to 2021-08-30

This lets us benefit from the recent OpenSSL security-related
update [1]. Since nixos-unstable is still stuck, we temporarily
use nixos-unstable-small as our unstable channel.

Fixes necessary:

* //users/sterni/nix/char:
  Someone has decided to drop writers.writeC upstream [2],
  so we reimplement it ad-hoc using runCommandCC

[1]: https://www.openssl.org/news/secadv/20210824.txt
[2]: 982f46985e

Change-Id: Id84756e2e370296b7a27e1a3f1744f58f8fe3c47
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3463
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
This commit is contained in:
sterni 2021-08-30 17:26:06 +02:00
parent d67b9e3192
commit 83c8716afd
2 changed files with 17 additions and 12 deletions

View file

@ -78,13 +78,18 @@ in {
# originally I generated a nix file containing a list of
# characters, but infinisil uses a better way which I adapt
# which is using builtins.readFile instead of import.
__generateAllChars = pkgs.writers.writeC "generate-all-chars" {} ''
#include <stdio.h>
__generateAllChars = pkgs.runCommandCC "generate-all-chars" {
source = ''
#include <stdio.h>
int main(void) {
for(int i = 1; i <= 0xff; i++) {
putchar(i);
int main(void) {
for(int i = 1; i <= 0xff; i++) {
putchar(i);
}
}
}
'';
passAsFile = [ "source" ];
} ''
$CC -o "$out" -x c "$sourcePath"
'';
}