Commit 0d81c1d6 authored by Vaibhav Sagar's avatar Vaibhav Sagar

Filter out irrelevant files

parent 733c6d7c
{ packages ? (_: []), systemPackages ? (_: []), pkgs ? import <nixpkgs> {}, rtsopts ? "-M3g -N2" }: { packages ? (_: []), systemPackages ? (_: []), pkgs ? import <nixpkgs> {}, rtsopts ? "-M3g -N2" }:
let let
src = pkgs.lib.cleanSource ./.; cleanSource = name: type: let
baseName = baseNameOf (toString name);
lib = pkgs.lib;
in !(
(type == "directory" &&
( baseName == ".git"
|| baseName == "dist"
|| baseName == ".stack-work"
)) ||
(type == "symlink" && (lib.hasPrefix "result" baseName)) ||
lib.hasSuffix ".hi" baseName ||
lib.hasSuffix ".ipynb" baseName ||
lib.hasSuffix ".nix" baseName ||
lib.hasSuffix ".o" baseName ||
lib.hasSuffix ".sock" baseName ||
lib.hasSuffix ".yaml" baseName
);
src = builtins.filterSource cleanSource ./.;
displays = self: builtins.listToAttrs ( displays = self: builtins.listToAttrs (
map map
(display: { name = display; value = self.callCabal2nix display "${src}/ihaskell-display/${display}" {}; }) (display: { name = display; value = self.callCabal2nix display "${src}/ihaskell-display/${display}" {}; })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment