Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 81bca88c7c69
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5cc74fc94ac0
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Mar 6, 2019

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5cc74fc View commit details
Showing with 3,441 additions and 0 deletions.
  1. +59 −0 pkgs/applications/networking/cluster/jx/default.nix
  2. +3,380 −0 pkgs/applications/networking/cluster/jx/deps.nix
  3. +2 −0 pkgs/top-level/all-packages.nix
59 changes: 59 additions & 0 deletions pkgs/applications/networking/cluster/jx/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{ buildGoPackage, fetchFromGitHub, lib }:

let
removeVendoredPackages = goDeps:
''
echo "Removing any vendored duplicate of direct dependency... "
for dir in $(find $NIX_BUILD_TOP/go/src -type d -name vendor); do
${builtins.concatStringsSep "\n" (map (goDep: ''
if test -d $dir/${goDep.goPackagePath}; then
echo "Removing duplicate directory at $dir/${goDep.goPackagePath}"
rm -rf $dir/${goDep.goPackagePath}
fi
'') goDeps)}
done
echo "Done"
'';
in
buildGoPackage rec {
name = "jx";
version = "1.3.955";

goPackagePath = "github.com/jenkins-x/jx";
subPackages = [ "cmd/jx" ];

src = fetchFromGitHub {
owner = "jenkins-x";
repo = "jx";
rev = "v${version}";
sha256 = "0h4ck1a8rlyg10gaxbnwvlabwjlhdrigrina84x4m2gsqr3lnp9a";
};

# Some of the dependencies have their own checked in vendor directory that
# vendor their dependencies. However, some of those dependencies are also
# directly pulled down through the vgo modules. Removing these dependencies
# as they confuse the go compiler and causes the build to fail.
# Removing all the vendor directories also breaks the build.
preBuild = removeVendoredPackages (import goDeps);

buildFlagsArray = ''
-ldflags=
-X ${goPackagePath}/pkg/version.Version=${version}
-X ${goPackagePath}/pkg/version.Revision=${version}
'';

goDeps = ./deps.nix;

meta = with lib; {
description = "JX is a command line tool for installing and using Jenkins X.";
longDescription = ''
Jenkins X provides automated CI+CD for Kubernetes with Preview
Environments on Pull Requests using Jenkins, Knative Build, Prow,
Skaffold and Helm.
'';
homepage = https://github.com/jenkins-x/jx;
license = licenses.asl20 ;
maintainers = with maintainers; [ kalbasit ];
platforms = platforms.linux ++ platforms.darwin;
};
}
Loading