diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-01-11 23:37:02 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-01-11 23:41:30 +0000 |
commit | 6c557e3f1c28cf87e9fba232811d6875dd1399c1 (patch) | |
tree | 035a071d5d8980df6de0fa42e2ef8fc0cce7055e /nixpkgs/pkgs/applications/version-management/gitlab/gitlab-shell | |
parent | da7500bc026e937ac7fce7b50f67a0e1765737a7 (diff) | |
parent | e4134747f5666bcab8680aff67fa3b63384f9a0f (diff) | |
download | nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.gz nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.bz2 nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.lz nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.xz nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.zst nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.zip |
Merge commit 'e4134747f5666bcab8680aff67fa3b63384f9a0f'
Diffstat (limited to 'nixpkgs/pkgs/applications/version-management/gitlab/gitlab-shell')
3 files changed, 756 insertions, 71 deletions
diff --git a/nixpkgs/pkgs/applications/version-management/gitlab/gitlab-shell/default.nix b/nixpkgs/pkgs/applications/version-management/gitlab/gitlab-shell/default.nix index cd4784b36c8e..53dd1bb7ffb0 100644 --- a/nixpkgs/pkgs/applications/version-management/gitlab/gitlab-shell/default.nix +++ b/nixpkgs/pkgs/applications/version-management/gitlab/gitlab-shell/default.nix @@ -1,47 +1,32 @@ -{ stdenv, ruby, bundler, fetchFromGitLab, go }: - -stdenv.mkDerivation rec { - version = "9.3.0"; - pname = "gitlab-shell"; +{ stdenv, fetchFromGitLab, buildGoPackage, ruby }: +buildGoPackage rec { + pname = "gitlab-shell-go"; + version = "10.3.0"; src = fetchFromGitLab { owner = "gitlab-org"; repo = "gitlab-shell"; rev = "v${version}"; - sha256 = "1r000h4sgplx7giqvqs5iy0zh3drf6qa1iiq0mxlk3h9fshs1348"; + sha256 = "0kxbw2n5kabh0876xqn1dcjbxyrp82ms566rw065nqrb32g8c2hk"; }; - buildInputs = [ ruby bundler go ]; + buildInputs = [ ruby ]; patches = [ ./remove-hardcoded-locations.patch ]; - installPhase = '' - export GOCACHE="$TMPDIR/go-cache" - - ruby bin/compile - mkdir -p $out/ - cp -R . $out/ - - # Nothing to install ATM for non-development but keeping the - # install command anyway in case that changes in the future: - export HOME=$(pwd) - bundle install -j4 --verbose --local --deployment --without development test - ''; + goPackagePath = "gitlab.com/gitlab-org/gitlab-shell"; + goDeps = ./deps.nix; - # gitlab-shell will try to read its config relative to the source - # code by default which doesn't work in nixos because it's a - # read-only filesystem - postPatch = '' - substituteInPlace lib/gitlab_config.rb --replace \ - "File.join(ROOT_PATH, 'config.yml')" \ - "'/run/gitlab/shell-config.yml'" + postInstall = '' + cp -r "$NIX_BUILD_TOP/go/src/$goPackagePath"/bin/* $bin/bin + cp -r "$NIX_BUILD_TOP/go/src/$goPackagePath"/{support,VERSION} $bin/ ''; meta = with stdenv.lib; { description = "SSH access and repository management app for GitLab"; homepage = http://www.gitlab.com/; - platforms = platforms.unix; - maintainers = with maintainers; [ fpletz globin ]; + platforms = platforms.linux; + maintainers = with maintainers; [ fpletz globin talyz ]; license = licenses.mit; }; } diff --git a/nixpkgs/pkgs/applications/version-management/gitlab/gitlab-shell/deps.nix b/nixpkgs/pkgs/applications/version-management/gitlab/gitlab-shell/deps.nix new file mode 100644 index 000000000000..b4105f18c102 --- /dev/null +++ b/nixpkgs/pkgs/applications/version-management/gitlab/gitlab-shell/deps.nix @@ -0,0 +1,714 @@ +# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix) +[ + { + goPackagePath = "bou.ke/monkey"; + fetch = { + type = "git"; + url = "https://github.com/bouk/monkey"; + rev = "v1.0.1"; + sha256 = "050y07pwx5zk7fchp0lhf35w417sml7lxkkzly8f932fy25rydz5"; + }; + } + { + goPackagePath = "cloud.google.com/go"; + fetch = { + type = "git"; + url = "https://code.googlesource.com/gocloud"; + rev = "v0.26.0"; + sha256 = "149v3ci17g6wd2pm18mzcncq5qpl9hwdjnz3rlbn5rfidyn46la1"; + }; + } + { + goPackagePath = "github.com/BurntSushi/toml"; + fetch = { + type = "git"; + url = "https://github.com/BurntSushi/toml"; + rev = "v0.3.1"; + sha256 = "1fjdwwfzyzllgiwydknf1pwjvy49qxfsczqx5gz3y0izs7as99j6"; + }; + } + { + goPackagePath = "github.com/alecthomas/template"; + fetch = { + type = "git"; + url = "https://github.com/alecthomas/template"; + rev = "a0175ee3bccc"; + sha256 = "0qjgvvh26vk1cyfq9fadyhfgdj36f1iapbmr5xp6zqipldz8ffxj"; + }; + } + { + goPackagePath = "github.com/alecthomas/units"; + fetch = { + type = "git"; + url = "https://github.com/alecthomas/units"; + rev = "2efee857e7cf"; + sha256 = "1j65b91qb9sbrml9cpabfrcf07wmgzzghrl7809hjjhrmbzri5bl"; + }; + } + { + goPackagePath = "github.com/beorn7/perks"; + fetch = { + type = "git"; + url = "https://github.com/beorn7/perks"; + rev = "v1.0.0"; + sha256 = "1i1nz1f6g55xi2y3aiaz5kqfgvknarbfl4f0sx4nyyb4s7xb1z9x"; + }; + } + { + goPackagePath = "github.com/certifi/gocertifi"; + fetch = { + type = "git"; + url = "https://github.com/certifi/gocertifi"; + rev = "ee1a9a0726d2"; + sha256 = "08l6lqaw83pva6fa0aafmhmy1mhb145av21772zfh3ij809a37i4"; + }; + } + { + goPackagePath = "github.com/client9/misspell"; + fetch = { + type = "git"; + url = "https://github.com/client9/misspell"; + rev = "v0.3.4"; + sha256 = "1vwf33wsc4la25zk9nylpbp9px3svlmldkm0bha4hp56jws4q9cs"; + }; + } + { + goPackagePath = "github.com/cloudflare/tableflip"; + fetch = { + type = "git"; + url = "https://github.com/cloudflare/tableflip"; + rev = "8392f1641731"; + sha256 = "0by5hk8s0bhhl3kiw658p5g53zvc61k4q2wxnh1w64p5ghd1rfn8"; + }; + } + { + goPackagePath = "github.com/codahale/hdrhistogram"; + fetch = { + type = "git"; + url = "https://github.com/codahale/hdrhistogram"; + rev = "3a0bb77429bd"; + sha256 = "1zampgfjbxy192cbwdi7g86l1idxaam96d834wncnpfdwgh5kl57"; + }; + } + { + goPackagePath = "github.com/davecgh/go-spew"; + fetch = { + type = "git"; + url = "https://github.com/davecgh/go-spew"; + rev = "v1.1.1"; + sha256 = "0hka6hmyvp701adzag2g26cxdj47g21x6jz4sc6jjz1mn59d474y"; + }; + } + { + goPackagePath = "github.com/fsnotify/fsnotify"; + fetch = { + type = "git"; + url = "https://github.com/fsnotify/fsnotify"; + rev = "v1.4.7"; + sha256 = "07va9crci0ijlivbb7q57d2rz9h27zgn2fsm60spjsqpdbvyrx4g"; + }; + } + { + goPackagePath = "github.com/getsentry/raven-go"; + fetch = { + type = "git"; + url = "https://github.com/getsentry/raven-go"; + rev = "v0.1.2"; + sha256 = "1dl80kar4lzdcfl3w6jssi1ld6bv0rmx6sp6bz6rzysfr9ilm02z"; + }; + } + { + goPackagePath = "github.com/go-kit/kit"; + fetch = { + type = "git"; + url = "https://github.com/go-kit/kit"; + rev = "v0.8.0"; + sha256 = "1rcywbc2pvab06qyf8pc2rdfjv7r6kxdv2v4wnpqnjhz225wqvc0"; + }; + } + { + goPackagePath = "github.com/go-logfmt/logfmt"; + fetch = { + type = "git"; + url = "https://github.com/go-logfmt/logfmt"; + rev = "v0.3.0"; + sha256 = "1gkgh3k5w1xwb2qbjq52p6azq3h1c1rr6pfwjlwj1zrijpzn2xb9"; + }; + } + { + goPackagePath = "github.com/go-stack/stack"; + fetch = { + type = "git"; + url = "https://github.com/go-stack/stack"; + rev = "v1.8.0"; + sha256 = "0wk25751ryyvxclyp8jdk5c3ar0cmfr8lrjb66qbg4808x66b96v"; + }; + } + { + goPackagePath = "github.com/gogo/protobuf"; + fetch = { + type = "git"; + url = "https://github.com/gogo/protobuf"; + rev = "v1.1.1"; + sha256 = "1525pq7r6h3s8dncvq8gxi893p2nq8dxpzvq0nfl5b4p6mq0v1c2"; + }; + } + { + goPackagePath = "github.com/golang/glog"; + fetch = { + type = "git"; + url = "https://github.com/golang/glog"; + rev = "23def4e6c14b"; + sha256 = "0jb2834rw5sykfr937fxi8hxi2zy80sj2bdn9b3jb4b26ksqng30"; + }; + } + { + goPackagePath = "github.com/golang/lint"; + fetch = { + type = "git"; + url = "https://github.com/golang/lint"; + rev = "06c8688daad7"; + sha256 = "0xi94dwvz50a66bq1hp9fyqkym5mcpdxdb1hrfvicldgjf37lc47"; + }; + } + { + goPackagePath = "github.com/golang/mock"; + fetch = { + type = "git"; + url = "https://github.com/golang/mock"; + rev = "v1.1.1"; + sha256 = "0ap8wb6pdl6ccmdb43advjll2ly4sz26wsc3axw0hbrjrybybzgy"; + }; + } + { + goPackagePath = "github.com/golang/protobuf"; + fetch = { + type = "git"; + url = "https://github.com/golang/protobuf"; + rev = "v1.3.2"; + sha256 = "1k1wb4zr0qbwgpvz9q5ws9zhlal8hq7dmq62pwxxriksayl6hzym"; + }; + } + { + goPackagePath = "github.com/google/go-cmp"; + fetch = { + type = "git"; + url = "https://github.com/google/go-cmp"; + rev = "v0.2.0"; + sha256 = "1fbv0x27k9sn8svafc0hjwsnckk864lv4yi7bvzrxvmd3d5hskds"; + }; + } + { + goPackagePath = "github.com/google/uuid"; + fetch = { + type = "git"; + url = "https://github.com/google/uuid"; + rev = "v1.1.1"; + sha256 = "0hfxcf9frkb57k6q0rdkrmnfs78ms21r1qfk9fhlqga2yh5xg8zb"; + }; + } + { + goPackagePath = "github.com/grpc-ecosystem/go-grpc-middleware"; + fetch = { + type = "git"; + url = "https://github.com/grpc-ecosystem/go-grpc-middleware"; + rev = "v1.0.0"; + sha256 = "0lwgxih021xfhfb1xb9la5f98bpgpaiz63sbllx77qwwl2rmhrsp"; + }; + } + { + goPackagePath = "github.com/grpc-ecosystem/go-grpc-prometheus"; + fetch = { + type = "git"; + url = "https://github.com/grpc-ecosystem/go-grpc-prometheus"; + rev = "v1.2.0"; + sha256 = "1lzk54h7np32b3acidg1ggbn8ppbnns0m71gcg9d1qkkdh8zrijl"; + }; + } + { + goPackagePath = "github.com/hpcloud/tail"; + fetch = { + type = "git"; + url = "https://github.com/hpcloud/tail"; + rev = "v1.0.0"; + sha256 = "1njpzc0pi1acg5zx9y6vj9xi6ksbsc5d387rd6904hy6rh2m6kn0"; + }; + } + { + goPackagePath = "github.com/json-iterator/go"; + fetch = { + type = "git"; + url = "https://github.com/json-iterator/go"; + rev = "v1.1.6"; + sha256 = "08caswxvdn7nvaqyj5kyny6ghpygandlbw9vxdj7l5vkp7q0s43r"; + }; + } + { + goPackagePath = "github.com/julienschmidt/httprouter"; + fetch = { + type = "git"; + url = "https://github.com/julienschmidt/httprouter"; + rev = "v1.2.0"; + sha256 = "1k8bylc9s4vpvf5xhqh9h246dl1snxrzzz0614zz88cdh8yzs666"; + }; + } + { + goPackagePath = "github.com/kelseyhightower/envconfig"; + fetch = { + type = "git"; + url = "https://github.com/kelseyhightower/envconfig"; + rev = "v1.3.0"; + sha256 = "1zcq480ig7wbg4378qcfxznp2gzqmk7x6rbxizflvg9v2f376vrw"; + }; + } + { + goPackagePath = "github.com/kisielk/gotool"; + fetch = { + type = "git"; + url = "https://github.com/kisielk/gotool"; + rev = "v1.0.0"; + sha256 = "14af2pa0ssyp8bp2mvdw184s5wcysk6akil3wzxmr05wwy951iwn"; + }; + } + { + goPackagePath = "github.com/konsorten/go-windows-terminal-sequences"; + fetch = { + type = "git"; + url = "https://github.com/konsorten/go-windows-terminal-sequences"; + rev = "v1.0.1"; + sha256 = "1lchgf27n276vma6iyxa0v1xds68n2g8lih5lavqnx5x6q5pw2ip"; + }; + } + { + goPackagePath = "github.com/kr/logfmt"; + fetch = { + type = "git"; + url = "https://github.com/kr/logfmt"; + rev = "b84e30acd515"; + sha256 = "02ldzxgznrfdzvghfraslhgp19la1fczcbzh7wm2zdc6lmpd1qq9"; + }; + } + { + goPackagePath = "github.com/libgit2/git2go"; + fetch = { + type = "git"; + url = "https://github.com/libgit2/git2go"; + rev = "ecaeb7a21d47"; + sha256 = "14r7ryff93r49g94f6kg66xc0y6rwb31lj22s3qmzmlgywk0pgvr"; + }; + } + { + goPackagePath = "github.com/lightstep/lightstep-tracer-go"; + fetch = { + type = "git"; + url = "https://github.com/lightstep/lightstep-tracer-go"; + rev = "v0.15.6"; + sha256 = "10n5r66g44s6rnz5kf86s4a3p1g55kc1kxqhnk7bx7mlayndgpmb"; + }; + } + { + goPackagePath = "github.com/mattn/go-shellwords"; + fetch = { + type = "git"; + url = "https://github.com/mattn/go-shellwords"; + rev = "2444a32a19f4"; + sha256 = "08zcgr1az1n8zaxzwdd205j86hczgyc52nxfnw5avpw7rrkf7v0d"; + }; + } + { + goPackagePath = "github.com/matttproud/golang_protobuf_extensions"; + fetch = { + type = "git"; + url = "https://github.com/matttproud/golang_protobuf_extensions"; + rev = "v1.0.1"; + sha256 = "1d0c1isd2lk9pnfq2nk0aih356j30k3h1gi2w0ixsivi5csl7jya"; + }; + } + { + goPackagePath = "github.com/modern-go/concurrent"; + fetch = { + type = "git"; + url = "https://github.com/modern-go/concurrent"; + rev = "bacd9c7ef1dd"; + sha256 = "0s0fxccsyb8icjmiym5k7prcqx36hvgdwl588y0491gi18k5i4zs"; + }; + } + { + goPackagePath = "github.com/modern-go/reflect2"; + fetch = { + type = "git"; + url = "https://github.com/modern-go/reflect2"; + rev = "v1.0.1"; + sha256 = "06a3sablw53n1dqqbr2f53jyksbxdmmk8axaas4yvnhyfi55k4lf"; + }; + } + { + goPackagePath = "github.com/mwitkow/go-conntrack"; + fetch = { + type = "git"; + url = "https://github.com/mwitkow/go-conntrack"; + rev = "cc309e4a2223"; + sha256 = "0nbrnpk7bkmqg9mzwsxlm0y8m7s9qd9phr1q30qlx2qmdmz7c1mf"; + }; + } + { + goPackagePath = "github.com/onsi/ginkgo"; + fetch = { + type = "git"; + url = "https://github.com/onsi/ginkgo"; + rev = "v1.7.0"; + sha256 = "14wgpdrvpc35rdz3859bz53sc1g4vpr1fysy15wy3ff9gmqs14yg"; + }; + } + { + goPackagePath = "github.com/onsi/gomega"; + fetch = { + type = "git"; + url = "https://github.com/onsi/gomega"; + rev = "v1.4.3"; + sha256 = "1c8rqg5i2hz3snmq7s41yar1zjnzilb0fyiyhkg83v97afcfx79v"; + }; + } + { + goPackagePath = "github.com/opentracing/opentracing-go"; + fetch = { + type = "git"; + url = "https://github.com/opentracing/opentracing-go"; + rev = "v1.0.2"; + sha256 = "0i0ghg94dg8lk05mw5n23983wq04yjvkjmdkc9z5y1f3508938h9"; + }; + } + { + goPackagePath = "github.com/otiai10/copy"; + fetch = { + type = "git"; + url = "https://github.com/otiai10/copy"; + rev = "v1.0.1"; + sha256 = "0xmy0kfcx48q10s040579pcjswfaxlwhv7a2z07z9r92fdrgw03k"; + }; + } + { + goPackagePath = "github.com/otiai10/mint"; + fetch = { + type = "git"; + url = "https://github.com/otiai10/mint"; + rev = "v1.2.3"; + sha256 = "00slgv9mw2m22ix5prz2a98ji6kpzr0ap6bqs568rfdmk6hm5f0k"; + }; + } + { + goPackagePath = "github.com/philhofer/fwd"; + fetch = { + type = "git"; + url = "https://github.com/philhofer/fwd"; + rev = "v1.0.0"; + sha256 = "1pg84khadh79v42y8sjsdgfb54vw2kzv7hpapxkifgj0yvcp30g2"; + }; + } + { + goPackagePath = "github.com/pkg/errors"; + fetch = { + type = "git"; + url = "https://github.com/pkg/errors"; + rev = "v0.8.0"; + sha256 = "001i6n71ghp2l6kdl3qq1v2vmghcz3kicv9a5wgcihrzigm75pp5"; + }; + } + { + goPackagePath = "github.com/pmezard/go-difflib"; + fetch = { + type = "git"; + url = "https://github.com/pmezard/go-difflib"; + rev = "v1.0.0"; + sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw"; + }; + } + { + goPackagePath = "github.com/prometheus/client_golang"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_golang"; + rev = "v1.0.0"; + sha256 = "1f03ndyi3jq7zdxinnvzimz3s4z2374r6dikkc8i42xzb6d1bli6"; + }; + } + { + goPackagePath = "github.com/prometheus/client_model"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_model"; + rev = "fd36f4220a90"; + sha256 = "1bs5d72k361llflgl94c22n0w53j30rsfh84smgk8mbjbcmjsaa5"; + }; + } + { + goPackagePath = "github.com/prometheus/common"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/common"; + rev = "v0.4.1"; + sha256 = "0sf4sjdckblz1hqdfvripk3zyp8xq89w7q75kbsyg4c078af896s"; + }; + } + { + goPackagePath = "github.com/prometheus/procfs"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/procfs"; + rev = "v0.0.2"; + sha256 = "0s7pvs7fgnfpmym3cd0k219av321h9sf3yvdlnn3qy0ps280lg7k"; + }; + } + { + goPackagePath = "github.com/sirupsen/logrus"; + fetch = { + type = "git"; + url = "https://github.com/sirupsen/logrus"; + rev = "v1.2.0"; + sha256 = "0r6334x2bls8ddznvzaldx4g88msjjns4mlks95rqrrg7h0ijigg"; + }; + } + { + goPackagePath = "github.com/stretchr/objx"; + fetch = { + type = "git"; + url = "https://github.com/stretchr/objx"; + rev = "v0.1.1"; + sha256 = "0iph0qmpyqg4kwv8jsx6a56a7hhqq8swrazv40ycxk9rzr0s8yls"; + }; + } + { + goPackagePath = "github.com/stretchr/testify"; + fetch = { + type = "git"; + url = "https://github.com/stretchr/testify"; + rev = "v1.3.0"; + sha256 = "0wjchp2c8xbgcbbq32w3kvblk6q6yn533g78nxl6iskq6y95lxsy"; + }; + } + { + goPackagePath = "github.com/tinylib/msgp"; + fetch = { + type = "git"; + url = "https://github.com/tinylib/msgp"; + rev = "v1.1.0"; + sha256 = "08ha23sn14071ywrgxlyj7r523vzdwx1i83dcp1mqa830glgqaff"; + }; + } + { + goPackagePath = "github.com/uber-go/atomic"; + fetch = { + type = "git"; + url = "https://github.com/uber-go/atomic"; + rev = "v1.3.2"; + sha256 = "11pzvjys5ddjjgrv94pgk9pnip9yyb54z7idf33zk7p7xylpnsv6"; + }; + } + { + goPackagePath = "github.com/uber/jaeger-client-go"; + fetch = { + type = "git"; + url = "https://github.com/uber/jaeger-client-go"; + rev = "v2.15.0"; + sha256 = "0ki23m9zrf3vxp839fnp9ckr4m28y6mpad8g5s5lr5k8jkl0sfwj"; + }; + } + { + goPackagePath = "github.com/uber/jaeger-lib"; + fetch = { + type = "git"; + url = "https://github.com/uber/jaeger-lib"; + rev = "v1.5.0"; + sha256 = "113fwpn80ylx970w8h7nfqnhh18dpx1jadbk7rbr8k68q4di4y0q"; + }; + } + { + goPackagePath = "gitlab.com/gitlab-org/gitaly"; + fetch = { + type = "git"; + url = "https://gitlab.com/gitlab-org/gitaly.git"; + rev = "v1.68.0"; + sha256 = "06w2qx9r7wxhpk6a3icqa0l6hr7x2j2k11kni1ksdx1m1100myjb"; + }; + } + { + goPackagePath = "gitlab.com/gitlab-org/labkit"; + fetch = { + type = "git"; + url = "https://gitlab.com/gitlab-org/labkit.git"; + rev = "0c3fc7cdd57c"; + sha256 = "0fpn37v7dhhdgd63v4mq9cna9wdzrsfams13qmjmps3xpdw2wr9i"; + }; + } + { + goPackagePath = "go.uber.org/atomic"; + fetch = { + type = "git"; + url = "https://github.com/uber-go/atomic"; + rev = "v1.3.2"; + sha256 = "11pzvjys5ddjjgrv94pgk9pnip9yyb54z7idf33zk7p7xylpnsv6"; + }; + } + { + goPackagePath = "golang.org/x/crypto"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/crypto"; + rev = "20be4c3c3ed5"; + sha256 = "1ph7y8v30hc95h1dwr7vrhg1nzs47a261qin6zg8mhf12g5k2lxb"; + }; + } + { + goPackagePath = "golang.org/x/lint"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/lint"; + rev = "d0100b6bd8b3"; + sha256 = "0b0amr9x4ji66iv9ayfx7zrfx52k1m5g66qfcxkgj80qrb1y2yn7"; + }; + } + { + goPackagePath = "golang.org/x/net"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/net"; + rev = "d28f0bde5980"; + sha256 = "18xj31h70m7xxb7gc86n9i21w6d7djbjz67zfaljm4jqskz6hxkf"; + }; + } + { + goPackagePath = "golang.org/x/oauth2"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/oauth2"; + rev = "d2e6202438be"; + sha256 = "0wbn75fd10485nb93bm4kqldqifdim5xqy4v7r5sdvimvf3fyhn7"; + }; + } + { + goPackagePath = "golang.org/x/sync"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/sync"; + rev = "112230192c58"; + sha256 = "05i2k43j2d0llq768hg5pf3hb2yhfzp9la1w5wp0rsnnzblr0lfn"; + }; + } + { + goPackagePath = "golang.org/x/sys"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/sys"; + rev = "953cdadca894"; + sha256 = "0gkha4whk8xkcv3isigbs250akag99isxnd3v9xmy0kl3g88hxy1"; + }; + } + { + goPackagePath = "golang.org/x/text"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/text"; + rev = "v0.3.0"; + sha256 = "0r6x6zjzhr8ksqlpiwm5gdd7s209kwk5p4lw54xjvz10cs3qlq19"; + }; + } + { + goPackagePath = "golang.org/x/tools"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/tools"; + rev = "2c0ae7006135"; + sha256 = "1lsi2ssxajclj3bciz2a41v1vjv768ja3v6wnbyhxy8xphwkp4fk"; + }; + } + { + goPackagePath = "google.golang.org/appengine"; + fetch = { + type = "git"; + url = "https://github.com/golang/appengine"; + rev = "v1.1.0"; + sha256 = "1pz202zszg8f35dk5pfhwgcdi3r6dx1l4yk6x6ly7nb4j45zi96x"; + }; + } + { + goPackagePath = "google.golang.org/genproto"; + fetch = { + type = "git"; + url = "https://github.com/google/go-genproto"; + rev = "bd91e49a0898"; + sha256 = "1f5q04h03q6fksbfkhz13ai5849rkkb8xrmmi7cxs4lzsi6ixkg8"; + }; + } + { + goPackagePath = "google.golang.org/grpc"; + fetch = { + type = "git"; + url = "https://github.com/grpc/grpc-go"; + rev = "v1.24.0"; + sha256 = "0h8mwv74vzcfb7p4ai247x094skxca71vjp4wpj2wzmri0x9p4v6"; + }; + } + { + goPackagePath = "gopkg.in/DataDog/dd-trace-go.v1"; + fetch = { + type = "git"; + url = "https://gopkg.in/DataDog/dd-trace-go.v1"; + rev = "v1.7.0"; + sha256 = "0j45skiiayfsaw8id4g20k51zfr0raj47a03q2icka5xrh3qj6yq"; + }; + } + { + goPackagePath = "gopkg.in/alecthomas/kingpin.v2"; + fetch = { + type = "git"; + url = "https://gopkg.in/alecthomas/kingpin.v2"; + rev = "v2.2.6"; + sha256 = "0mndnv3hdngr3bxp7yxfd47cas4prv98sqw534mx7vp38gd88n5r"; + }; + } + { + goPackagePath = "gopkg.in/check.v1"; + fetch = { + type = "git"; + url = "https://gopkg.in/check.v1"; + rev = "20d25e280405"; + sha256 = "0k1m83ji9l1a7ng8a7v40psbymxasmssbrrhpdv2wl4rhs0nc3np"; + }; + } + { + goPackagePath = "gopkg.in/fsnotify.v1"; + fetch = { + type = "git"; + url = "https://gopkg.in/fsnotify.v1"; + rev = "v1.4.7"; + sha256 = "07va9crci0ijlivbb7q57d2rz9h27zgn2fsm60spjsqpdbvyrx4g"; + }; + } + { + goPackagePath = "gopkg.in/tomb.v1"; + fetch = { + type = "git"; + url = "https://gopkg.in/tomb.v1"; + rev = "dd632973f1e7"; + sha256 = "1lqmq1ag7s4b3gc3ddvr792c5xb5k6sfn0cchr3i2s7f1c231zjv"; + }; + } + { + goPackagePath = "gopkg.in/yaml.v2"; + fetch = { + type = "git"; + url = "https://gopkg.in/yaml.v2"; + rev = "v2.2.2"; + sha256 = "01wj12jzsdqlnidpyjssmj0r4yavlqy7dwrg7adqd8dicjc4ncsa"; + }; + } + { + goPackagePath = "honnef.co/go/tools"; + fetch = { + type = "git"; + url = "https://github.com/dominikh/go-tools"; + rev = "ea95bdfd59fc"; + sha256 = "1763nw7pwpzkvzfnm63dgzcgbq9hwmq5l1nffchnhh77vgkaq4ic"; + }; + } +] diff --git a/nixpkgs/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations.patch b/nixpkgs/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations.patch index d8337ebb9ea4..ee00070df2d7 100644 --- a/nixpkgs/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations.patch +++ b/nixpkgs/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations.patch @@ -1,16 +1,16 @@ -diff --git a/go/internal/config/config.go b/go/internal/config/config.go -index f951fe6..b422fe3 100644 ---- a/go/internal/config/config.go -+++ b/go/internal/config/config.go +diff --git a/internal/config/config.go b/internal/config/config.go +index 2231851..c869930 100644 +--- a/internal/config/config.go ++++ b/internal/config/config.go @@ -3,7 +3,6 @@ package config import ( "io/ioutil" "net/url" - "os" "path" - "strings" + "path/filepath" -@@ -30,16 +29,13 @@ type Config struct { +@@ -38,16 +37,13 @@ type Config struct { } func New() (*Config, error) { @@ -28,44 +28,30 @@ index f951fe6..b422fe3 100644 + return newFromFile("/run/gitlab/shell-config.yml") } - func (c *Config) FeatureEnabled(featureName string) bool { -diff --git a/lib/gitlab_keys.rb b/lib/gitlab_keys.rb -index 0600a18..c46f2d7 100644 ---- a/lib/gitlab_keys.rb -+++ b/lib/gitlab_keys.rb -@@ -10,7 +10,7 @@ class GitlabKeys # rubocop:disable Metrics/ClassLength - attr_accessor :auth_file, :key - - def self.command(whatever) -- "#{ROOT_PATH}/bin/gitlab-shell #{whatever}" -+ "/run/current-system/sw/bin/gitlab-shell #{whatever}" - end + func newFromFile(filename string) (*Config, error) { +diff --git a/internal/keyline/key_line.go b/internal/keyline/key_line.go +index c29a320..c44b701 100644 +--- a/internal/keyline/key_line.go ++++ b/internal/keyline/key_line.go +@@ -36,7 +36,7 @@ func NewPrincipalKeyLine(keyId string, principal string, rootDir string) (*KeyLi + } - def self.command_key(key_id) -diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb -index 2cb76a8..f59ad5e 100644 ---- a/lib/gitlab_shell.rb -+++ b/lib/gitlab_shell.rb -@@ -190,7 +190,8 @@ class GitlabShell # rubocop:disable Metrics/ClassLength + func (k *KeyLine) ToString() string { +- command := fmt.Sprintf("%s %s-%s", path.Join(k.RootDir, executable.BinDir, executable.GitlabShell), k.Prefix, k.Id) ++ command := fmt.Sprintf("%s %s-%s", path.Join("/run/current-system/sw/bin", executable.GitlabShell), k.Prefix, k.Id) - args = [executable, gitaly_address, json_args] - # We use 'chdir: ROOT_PATH' to let the next executable know where config.yml is. -- Kernel.exec(env, *args, unsetenv_others: true, chdir: ROOT_PATH) -+ # Except we don't, because we're already in the right directory on nixos! -+ Kernel.exec(env, *args, unsetenv_others: true) + return fmt.Sprintf(`command="%s",%s %s`, command, SshOptions, k.Value) + } +diff --git a/support/gitlab_config.rb b/support/gitlab_config.rb +index 52ac5ee..d96baa3 100644 +--- a/support/gitlab_config.rb ++++ b/support/gitlab_config.rb +@@ -7,7 +7,7 @@ class GitlabConfig + attr_reader :config + + def initialize +- @config = YAML.load_file(File.join(ROOT_PATH, 'config.yml')) ++ @config = YAML.load_file('/run/gitlab/shell-config.yml') end - def api -diff --git a/go/internal/command/fallback/fallback.go b/go/internal/command/fallback/fallback.go -index 2cb76a8..f59ad5e 100644 ---- a/go/internal/command/fallback/fallback.go -+++ b/go/internal/command/fallback/fallback.go -@@ -21,7 +21,7 @@ - ) - - func (c *Command) Execute() error { -- rubyCmd := filepath.Join(c.RootDir, "bin", RubyProgram) -+ rubyCmd := filepath.Join("/run/current-system/sw/bin", RubyProgram) - - // Ensure rubyArgs[0] is the full path to gitlab-shell-ruby - rubyArgs := append([]string{rubyCmd}, c.Args[1:]...) + def auth_file |