tvl-depot/default.nix
William Carroll 9c71c78abc Pull Emacs 27 from @tazjin's depot
Here's what happened:

My `emacs.glinux` derivation relies on gLinux `/usr/bin/emacs`, and Google
recently published version 27, so all corporate machines (i.e. this laptop)
switched from Emacs 26 to Emacs 27 overnight.

However, my Nix derivation was building all of the packages for Emacs 26, so
some packages were compatible while others weren't.

The Elisp package, `emr`, doesn't build for version 27, so I dropped it
altogether.
2020-09-02 14:07:39 +01:00

33 lines
787 B
Nix

{ ... }:
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))