Filter the sources of development projects
This commit is contained in:
parent
c1f98cdac1
commit
299caca4aa
5 changed files with 9 additions and 4 deletions
|
@ -18,7 +18,7 @@ in
|
|||
composerEnv.buildPackage {
|
||||
inherit packages devPackages noDev;
|
||||
name = "svanderburg-composer2nix";
|
||||
src = ./.;
|
||||
src = composerEnv.filterSrc ./.;
|
||||
executable = true;
|
||||
symlinkDependencies = false;
|
||||
meta = {
|
||||
|
|
|
@ -67,7 +67,7 @@ class Package extends NixASTNode
|
|||
{
|
||||
return new NixFunInvocation(new NixExpression("composerEnv.buildPackage"), array(
|
||||
"name" => $this->composerConfig->packageName,
|
||||
"src" => new NixFile("./."),
|
||||
"src" => new NixFunInvocation(new NixExpression("composerEnv.filterSrc"), new NixFile("./.")),
|
||||
"executable" => $this->executable,
|
||||
"packages" => new NixInherit(),
|
||||
"devPackages" => new NixInherit(),
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
|
||||
let
|
||||
inherit (phpPackages) composer;
|
||||
|
||||
filterSrc = src:
|
||||
builtins.filterSource (path: type: type != "directory" || (baseNameOf path != ".git" && baseNameOf path != ".git" && baseNameOf path != ".svn")) src;
|
||||
|
||||
buildZipPackage = { name, src }:
|
||||
stdenv.mkDerivation {
|
||||
inherit name src;
|
||||
|
@ -233,6 +237,7 @@ let
|
|||
} // extraArgs);
|
||||
in
|
||||
{
|
||||
inherit filterSrc;
|
||||
composer = lib.makeOverridable composer;
|
||||
buildZipPackage = lib.makeOverridable buildZipPackage;
|
||||
buildPackage = lib.makeOverridable buildPackage;
|
||||
|
|
|
@ -377,7 +377,7 @@ in
|
|||
composerEnv.buildPackage {
|
||||
inherit packages devPackages noDev;
|
||||
name = "dependencies";
|
||||
src = ./.;
|
||||
src = composerEnv.filterSrc ./.;
|
||||
executable = false;
|
||||
symlinkDependencies = false;
|
||||
meta = {};
|
||||
|
|
|
@ -348,7 +348,7 @@ in
|
|||
composerEnv.buildPackage {
|
||||
inherit packages devPackages noDev;
|
||||
name = "phpunit-phpunit";
|
||||
src = ./.;
|
||||
src = composerEnv.filterSrc ./.;
|
||||
executable = true;
|
||||
symlinkDependencies = false;
|
||||
meta = {};
|
||||
|
|
Loading…
Reference in a new issue