Skip to content

Commit

Permalink
buildGoPackage: support installAllDeps flag
Browse files Browse the repository at this point in the history
  • Loading branch information
snyh committed May 2, 2017
1 parent 8ff5f9c commit 09761cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkgs/desktops/dde/go-kingpin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ buildGoPackage rec {
sha256 = "1llh2m1awbp71n5fqxgkiwvw2q0wqnxrbzpkivybpmbsdvp0k4mn";
};

installAllDeps = true;

goDeps = ./go-kingpin.deps.nix;
}
5 changes: 4 additions & 1 deletion pkgs/desktops/dde/go.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
# Disabled flag
, disabled ? false

# Include depends package flag
, installAllDeps ? false

# Go import path of the package
, goPackagePath

Expand Down Expand Up @@ -170,7 +173,7 @@ go.stdenv.mkDerivation (
mkdir -p $out
pushd "$NIX_BUILD_TOP/go"
while read f; do
echo "$f" | grep -q '^./\(src\|pkg/[^/]*\)/${goPackagePath}' || continue
echo "$f" | grep -q '^./\(src\|pkg/[^/]*\)/${if installAllDeps then "" else goPackagePath}' || continue
mkdir -p "$(dirname "$out/share/go/$f")"
cp "$NIX_BUILD_TOP/go/$f" "$out/share/go/$f"
done < <(find . -type f)
Expand Down

0 comments on commit 09761cd

Please sign in to comment.