Skip to content

Instantly share code, notes, and snippets.

@monadplus
Last active November 14, 2019 20:58
Show Gist options
  • Save monadplus/14d27f3fa78c336f70c07c50bd711a49 to your computer and use it in GitHub Desktop.
Save monadplus/14d27f3fa78c336f70c07c50bd711a49 to your computer and use it in GitHub Desktop.
haskellFilterSource
{ mkDerivation, base, stdenv, pkgs }:
mkDerivation {
pname = "parconc-playground";
version = "0.1.0.0";
src = pkgs.lib.cleanSourceWith {
src = ./.;
filter = path: type:
let baseName = baseNameOf path; in
!( type == "directory"
&& builtins.elem baseName ([".git" ".cabal-sandbox" "dist"] ++ paths))
&&
!( type == "unknown"
|| baseName == "cabal.sandbox.config"
|| baseName == "result"
|| pkgs.stdenv.lib.hasSuffix ".hi" path
|| pkgs.stdenv.lib.hasSuffix ".o" path);
};
isLibrary = false;
isExecutable = true;
executableHaskellDepends = [ base ];
license = stdenv.lib.licenses.bsd3;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment