2020-03-01 23:16:07 +01:00
|
|
|
{ ... }:
|
2020-01-23 17:30:39 +01:00
|
|
|
|
|
|
|
let
|
2020-08-28 19:14:22 +02:00
|
|
|
inherit (builtins) fetchGit readDir path;
|
|
|
|
inherit (pkgs.lib) filterAttrs mapAttrs;
|
|
|
|
inherit (pkgs.lib.strings) hasPrefix;
|
|
|
|
|
|
|
|
briefcasePath = path {
|
|
|
|
path = ./.;
|
|
|
|
name = "briefcase";
|
|
|
|
};
|
|
|
|
|
|
|
|
depot = import (fetchGit {
|
2020-07-02 15:39:08 +02:00
|
|
|
url = "https://cl.tvl.fyi/depot";
|
|
|
|
rev = "a2e86152401c7c531801c79347c3f15e1806aabc";
|
|
|
|
}) {};
|
2020-08-28 19:14:22 +02:00
|
|
|
|
|
|
|
pkgs = import (fetchGit {
|
|
|
|
url = "https://github.com/NixOS/nixpkgs-channels";
|
|
|
|
ref = "nixos-20.03";
|
|
|
|
rev = "afa9ca61924f05aacfe495a7ad0fd84709d236cc";
|
|
|
|
}) {};
|
|
|
|
|
|
|
|
briefcase = import briefcasePath {};
|
|
|
|
|
2020-07-06 15:22:34 +02:00
|
|
|
readTree = depot.nix.readTree {
|
2020-08-28 19:14:22 +02:00
|
|
|
inherit depot pkgs briefcase;
|
2020-01-23 17:30:39 +01:00
|
|
|
};
|
2020-08-28 19:14:22 +02:00
|
|
|
in mapAttrs
|
|
|
|
(name: _: readTree (./. + "/${name}"))
|
|
|
|
(filterAttrs
|
|
|
|
(name: type: type == "directory" && !hasPrefix "." name)
|
|
|
|
(readDir briefcasePath))
|