about summary refs log blame commit diff
path: root/default.nix
blob: bb8c557cdc81fa2af6fc8da64250a755dcf97def (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
        

   









                                           
                                     
                                                     
        








                                                      
                                 
                                 
    




                                                            
{ ... }:

let
  inherit (builtins) fetchGit readDir path;
  inherit (pkgs.lib) filterAttrs mapAttrs;
  inherit (pkgs.lib.strings) hasPrefix;

  briefcasePath = path {
    path = ./.;
    name = "briefcase";
  };

  depot = import (fetchGit {
    url = "https://cl.tvl.fyi/depot";
    rev = "2f7b688389058b454ee12adc4b6b47740298f53b";
  }) {};

  pkgs = import (fetchGit {
    url = "https://github.com/NixOS/nixpkgs-channels";
    ref = "nixos-20.03";
    rev = "afa9ca61924f05aacfe495a7ad0fd84709d236cc";
  }) {};

  briefcase = import briefcasePath {};

  readTree = depot.nix.readTree {
    inherit depot pkgs briefcase;
  };
in mapAttrs
  (name: _: readTree (./. + "/${name}"))
  (filterAttrs
    (name: type: type == "directory" && !hasPrefix "." name)
    (readDir briefcasePath))