test-timeline/flake.nix

47 lines
1.3 KiB
Nix
Raw Normal View History

2022-04-24 09:24:02 +00:00
{
description = "tree_ru";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
antea.url = "git+https://source.fetsorn.website/fetsorn/antea";
csvs.url = "git+https://source.fetsorn.website/fetsorn/csvs?ref=main";
};
outputs = inputs@{ nixpkgs, ... }:
let
eachSystem = systems: f:
let
op = attrs: system:
let
ret = f system;
op = attrs: key:
let
appendSystem = key: system: ret: { system = ret.key; };
in attrs // {
key = (attrs.key or { })
// (appendSystem key system ret);
};
in builtins.foldl' op attrs (builtins.attrNames ret);
in builtins.foldl' op { } systems;
defaultSystems = [
"aarch64-linux"
"aarch64-darwin"
"i686-linux"
"x86_64-darwin"
"x86_64-linux"
];
in eachSystem defaultSystems (system:
let pkgs = import nixpkgs { inherit system; };
in {
devShell = pkgs.mkShell {
buildInputs = [
inputs.antea.packages.system.timeline-backend-local
inputs.csvs.packages.system.csvs-sh
pkgs.git-lfs
];
shellHook = ''
export LC_ALL=ru_RU.utf-8
'';
};
});
}