NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.3k stars 13.54k forks source link

Update request: circleci-cli #69047

Closed matthew-piziak closed 4 years ago

matthew-piziak commented 4 years ago

The circleci-cli package appears to be quite out of date. I could use some help in updating it.

Here is the version in nixpkgs:

{ stdenv, fetchFromGitHub, buildGoPackage }:

let
  owner = "CircleCI-Public";
  pname = "circleci-cli";
  version = "0.1.2569";
in
buildGoPackage {
  name = "${pname}-${version}";
  inherit version;

  src =  fetchFromGitHub {
    inherit owner;
    repo = pname;
    rev = "v${version}";
    sha256 = "0ixiqx8rmia02r44zbhw149p5x9r9cv1fsnlhl8p2x5zd2bdr18x";
  };

  goPackagePath = "github.com/${owner}/${pname}";

  meta = with stdenv.lib; {
    # Box blurb edited from the AUR package circleci-cli
    description = ''
      Command to enable you to reproduce the CircleCI environment locally and
      run jobs as if they were running on the hosted CirleCI application.
    '';
    maintainers = with maintainers; [ synthetica ];
    platforms = platforms.unix;
    license = licenses.mit;
    homepage = https://circleci.com/;
  };
}

Here is my attempt at updating it:

{ config, pkgs, ... }:
let
  circleci-cli = pkgs.circleci-cli.overrideAttrs (attrs: rec {
    version = "0.1.5879";
    owner = "CircleCI-Public";
    pname = "circleci-cli";
    src = pkgs.fetchFromGitHub {
      inherit owner;
      repo = pname;
      rev = "v${version}";
      sha256 = "1471g56apaw0c5dpa0jrr7hvzh3kbwfr3yr0m4mz2dlf27d481ac";
    };
  });
in { environment.systemPackages = [ circleci-cli ]; }

And here is the error message I get when I try to build:

unpacking channels...
building Nix...
building the system configuration...
these derivations will be built:
  /nix/store/hlb29w2y08sqk21iqv3d1pl29wky29i5-circleci-cli-0.1.2569.drv
  /nix/store/55xys0984n6qrcffc314rcpqjdmxns2h-system-path.drv
  /nix/store/2xhn1d7azjdwbnzw28fmqxhb3n062chr-dbus-1.drv
  /nix/store/60d9hvfyaa8lwcpq1l7ggc6z80hdqfby-unit-dbus.service.drv
  /nix/store/2zwl1zywjihidbv1vizrbnf45hp3b6xq-user-units.drv
  /nix/store/fq8j4ryfa1w9kzdjl8k4gk3m396chqf8-system-crontab.drv
  /nix/store/4aj8n8mvisr4xryn2xz9qj1ga0cn33f0-crontabs.drv
  /nix/store/lxwyaxzhxmqw2zdypfvqca3h6lw59pp4-xsession.drv
  /nix/store/vh18r5cj5fy5m4z6g7l3k2l9qsqjgqjj-xsession-wrapper.drv
  /nix/store/vyyzwfwganrbqn28kqhqh5b6g35s4gi8-desktops.drv
  /nix/store/s9gi68x4az45fqszpnjg3lgqpcphijg2-lightdm.conf.drv
  /nix/store/9hh66gr2ljb1jhghrgcgwab4csijgy60-unit-systemd-fsck-.service.drv
  /nix/store/rzby583sz98spziizga78s9pr1kr9w5z-unit-accounts-daemon.service.drv
  /nix/store/ssh469fjidgxqcxp8xbhw0m785vchxpg-unit-dbus.service.drv
  /nix/store/y19c8yhs3ghrvs7ax63llc00ljg600d1-unit-polkit.service.drv
  /nix/store/xhayv9lfhqbxnw4f9mwsp5rcgbnrgz6p-system-units.drv
  /nix/store/22smbhkl7ms7ffvl4skpxvqfm0v30p6d-etc.drv
  /nix/store/nv59riq620sgyhb52z485lpg6qzhjwwi-nixos-system-pan-19.09beta258.4d3136c3a5a.drv
building '/nix/store/hlb29w2y08sqk21iqv3d1pl29wky29i5-circleci-cli-0.1.2569.drv'...
unpacking sources
unpacking source archive /nix/store/qx4295ak1qmdpymd1gvm98mwqy2vn2ln-source
source root is source
patching sources
configuring
building
go/src/github.com/CircleCI-Public/circleci-cli/api/api.go:15:2: cannot find package "github.com/Masterminds/semver" in any of:
        /nix/store/1hxrvv033q37sgqdqml19x6hjnllq5dh-go-1.12.9/share/go/src/github.com/Masterminds/semver (from $GOROOT)
        /build/go/src/github.com/Masterminds/semver (from $GOPATH)
go/src/github.com/CircleCI-Public/circleci-cli/update/update.go:11:2: cannot find package "github.com/blang/semver" in any of:
        /nix/store/1hxrvv033q37sgqdqml19x6hjnllq5dh-go-1.12.9/share/go/src/github.com/blang/semver (from $GOROOT)
        /build/go/src/github.com/blang/semver (from $GOPATH)
go/src/github.com/CircleCI-Public/circleci-cli/cmd/tests.go:8:2: cannot find package "github.com/bmatcuk/doublestar" in any of:
        /nix/store/1hxrvv033q37sgqdqml19x6hjnllq5dh-go-1.12.9/share/go/src/github.com/bmatcuk/doublestar (from $GOROOT)
        /build/go/src/github.com/bmatcuk/doublestar (from $GOPATH)
go/src/github.com/CircleCI-Public/circleci-cli/cmd/check.go:11:2: cannot find package "github.com/briandowns/spinner" in any of:
        /nix/store/1hxrvv033q37sgqdqml19x6hjnllq5dh-go-1.12.9/share/go/src/github.com/briandowns/spinner (from $GOROOT)
        /build/go/src/github.com/briandowns/spinner (from $GOPATH)
go/src/github.com/CircleCI-Public/circleci-cli/api/api.go:16:2: cannot find package "github.com/go-yaml/yaml" in any of:
        /nix/store/1hxrvv033q37sgqdqml19x6hjnllq5dh-go-1.12.9/share/go/src/github.com/go-yaml/yaml (from $GOROOT)
        /build/go/src/github.com/go-yaml/yaml (from $GOPATH)
go/src/github.com/CircleCI-Public/circleci-cli/data/data.go:5:2: cannot find package "github.com/gobuffalo/packr/v2" in any of:
        /nix/store/1hxrvv033q37sgqdqml19x6hjnllq5dh-go-1.12.9/share/go/src/github.com/gobuffalo/packr/v2 (from $GOROOT)
        /build/go/src/github.com/gobuffalo/packr/v2 (from $GOPATH)
go/src/github.com/CircleCI-Public/circleci-cli/prompt/prompt.go:6:2: cannot find package "github.com/manifoldco/promptui" in any of:
        /nix/store/1hxrvv033q37sgqdqml19x6hjnllq5dh-go-1.12.9/share/go/src/github.com/manifoldco/promptui (from $GOROOT)
        /build/go/src/github.com/manifoldco/promptui (from $GOPATH)
go/src/github.com/CircleCI-Public/circleci-cli/filetree/filetree.go:12:2: cannot find package "github.com/mitchellh/mapstructure" in any of:
        /nix/store/1hxrvv033q37sgqdqml19x6hjnllq5dh-go-1.12.9/share/go/src/github.com/mitchellh/mapstructure (from $GOROOT)
        /build/go/src/github.com/mitchellh/mapstructure (from $GOPATH)
go/src/github.com/CircleCI-Public/circleci-cli/client/client.go:16:2: cannot find package "github.com/pkg/errors" in any of:
        /nix/store/1hxrvv033q37sgqdqml19x6hjnllq5dh-go-1.12.9/share/go/src/github.com/pkg/errors (from $GOROOT)
        /build/go/src/github.com/pkg/errors (from $GOPATH)
go/src/github.com/CircleCI-Public/circleci-cli/update/update.go:13:2: cannot find package "github.com/rhysd/go-github-selfupdate/selfupdate" in any of:
        /nix/store/1hxrvv033q37sgqdqml19x6hjnllq5dh-go-1.12.9/share/go/src/github.com/rhysd/go-github-selfupdate/selfupdate (from $GOROOT)
        /build/go/src/github.com/rhysd/go-github-selfupdate/selfupdate (from $GOPATH)
go/src/github.com/CircleCI-Public/circleci-cli/md_docs/md_docs.go:13:2: cannot find package "github.com/spf13/cobra" in any of:
        /nix/store/1hxrvv033q37sgqdqml19x6hjnllq5dh-go-1.12.9/share/go/src/github.com/spf13/cobra (from $GOROOT)
        /build/go/src/github.com/spf13/cobra (from $GOPATH)
go/src/github.com/CircleCI-Public/circleci-cli/cmd/build.go:17:2: cannot find package "github.com/spf13/pflag" in any of:
        /nix/store/1hxrvv033q37sgqdqml19x6hjnllq5dh-go-1.12.9/share/go/src/github.com/spf13/pflag (from $GOROOT)
        /build/go/src/github.com/spf13/pflag (from $GOPATH)
go/src/github.com/CircleCI-Public/circleci-cli/settings/settings.go:13:2: cannot find package "gopkg.in/yaml.v2" in any of:
        /nix/store/1hxrvv033q37sgqdqml19x6hjnllq5dh-go-1.12.9/share/go/src/gopkg.in/yaml.v2 (from $GOROOT)
        /build/go/src/gopkg.in/yaml.v2 (from $GOPATH)
builder for '/nix/store/hlb29w2y08sqk21iqv3d1pl29wky29i5-circleci-cli-0.1.2569.drv' failed with exit code 1
cannot build derivation '/nix/store/55xys0984n6qrcffc314rcpqjdmxns2h-system-path.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/nv59riq620sgyhb52z485lpg6qzhjwwi-nixos-system-pan-19.09beta258.4d3136c3a5a.drv': 1 dependencies couldn't be built
error: build of '/nix/store/nv59riq620sgyhb52z485lpg6qzhjwwi-nixos-system-pan-19.09beta258.4d3136c3a5a.drv' failed

Any advice?

infinisil commented 4 years ago

Relaying what I said on IRC:

matthew-piziak commented 4 years ago

Thank you so much, @Infinisil!