feat: introduce treefmt and fmt all
This commit is contained in:
parent
80250b0179
commit
27c6c4f9fa
237 changed files with 5440 additions and 5214 deletions
|
@ -1,26 +1,34 @@
|
|||
{versionsPath}: let
|
||||
{ versionsPath }:
|
||||
let
|
||||
channelVersions = import versionsPath;
|
||||
mkChannelSource = name: let
|
||||
channelVersion = builtins.getAttr name channelVersions;
|
||||
in
|
||||
mkChannelSource =
|
||||
name:
|
||||
let
|
||||
channelVersion = builtins.getAttr name channelVersions;
|
||||
in
|
||||
builtins.fetchGit {
|
||||
# Descriptive name to make the store path easier to identify
|
||||
inherit name;
|
||||
inherit (channelVersion) url ref rev;
|
||||
};
|
||||
nixPath = builtins.concatStringsSep ":" (builtins.map
|
||||
(elemName: let
|
||||
elem = builtins.getAttr elemName channelVersions;
|
||||
elemPath = mkChannelSource elemName;
|
||||
suffix =
|
||||
if builtins.hasAttr "suffix" elem
|
||||
then elem.suffix
|
||||
else "";
|
||||
in
|
||||
builtins.concatStringsSep "=" [elemName elemPath] + suffix)
|
||||
(builtins.attrNames channelVersions));
|
||||
pkgs = import (mkChannelSource "nixpkgs") {};
|
||||
in {
|
||||
nixPath = builtins.concatStringsSep ":" (
|
||||
builtins.map (
|
||||
elemName:
|
||||
let
|
||||
elem = builtins.getAttr elemName channelVersions;
|
||||
elemPath = mkChannelSource elemName;
|
||||
suffix = if builtins.hasAttr "suffix" elem then elem.suffix else "";
|
||||
in
|
||||
builtins.concatStringsSep "=" [
|
||||
elemName
|
||||
elemPath
|
||||
]
|
||||
+ suffix
|
||||
) (builtins.attrNames channelVersions)
|
||||
);
|
||||
pkgs = import (mkChannelSource "nixpkgs") { };
|
||||
in
|
||||
{
|
||||
inherit nixPath;
|
||||
channelSources = pkgs.writeText "channels.rc" ''
|
||||
export NIX_PATH=${nixPath}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue