test-timeline/flake.nix

47 lines
1.4 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";
2022-04-27 20:01:21 +00:00
csvs-ui.url = "git+https://source.fetsorn.website/fetsorn/csvs-ui?ref=main";
csvs-sh.url = "git+https://source.fetsorn.website/fetsorn/csvs-sh?ref=main";
2022-04-24 09:24:02 +00:00
};
outputs = inputs@{ nixpkgs, ... }:
let
eachSystem = systems: f:
let
op = attrs: system:
let
ret = f system;
op = attrs: key:
let
2022-04-27 20:01:21 +00:00
appendSystem = key: system: ret: { ${system} = ret.${key}; };
2022-04-24 09:24:02 +00:00
in attrs // {
2022-04-27 20:01:21 +00:00
${key} = (attrs.${key} or { })
2022-04-24 09:24:02 +00:00
// (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 = [
2022-04-27 20:01:21 +00:00
inputs.csvs-ui.packages.${system}.csvs-ui-backend-local
inputs.csvs-sh.packages.${system}.csvs-sh
2022-04-24 09:24:02 +00:00
pkgs.git-lfs
];
shellHook = ''
export LC_ALL=ru_RU.utf-8
'';
};
});
}