Skip to content

Instantly share code, notes, and snippets.

@emmanueldenloye
Created October 13, 2020 21:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emmanueldenloye/f65192e5c49e8ade0355cd4fcc7fae6c to your computer and use it in GitHub Desktop.
Save emmanueldenloye/f65192e5c49e8ade0355cd4fcc7fae6c to your computer and use it in GitHub Desktop.
hsOnly = super: component: pkg: pkg.overrideAttrs ({ src, ... }: {
src = pkgs.lib.cleanSourceWith {
filter = (name: type: type == "directory" || (!(pkgs.lib.hasSuffix ".hi" name) && !(pkgs.lib.hasSuffix ".o" name)));
src = pkgs.lib.cleanSource src;
};
disallowedReferences = [ super.tezos-bake-monitor-lib ];
postInstall = if component != null then ''
${pkgs.removeReferencesTo}/bin/remove-references-to -t ${super.tezos-bake-monitor-lib} $out/${component}
'' else "" ;
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment