Adapt nix configs for Vagrant needs

* Remove postgres, docker, k8s, and DO requirements
 * Add ruby
This commit is contained in:
Paul Hinze 2021-11-12 13:37:39 -06:00
parent 072ae3a467
commit a5f0064a86
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0
6 changed files with 57 additions and 23 deletions

5
.envrc Normal file
View File

@ -0,0 +1,5 @@
# If we are a computer with nix-shell available, then use that to setup
# the build environment with exactly what we need.
if has nix-shell; then
use nix
fi

1
.gitignore vendored
View File

@ -28,6 +28,7 @@ pkg/*
test/tmp/
/exec
.ruby-bundle
vendor/bundle
# Documentation
_site/*

43
flake.lock generated Normal file
View File

@ -0,0 +1,43 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1634851050,
"narHash": "sha256-N83GlSGPJJdcqhUxSCS/WwW5pksYf3VP1M13cDRTSVA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c91f3de5adaf1de973b797ef7485e441a65b8935",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1636678824,
"narHash": "sha256-NDB9CenPn5z2xbmG/X+Mg6Jd8iUEf7dfprQfXxSD6X8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "bf346b557b76ffce74167f37752656dede5957f3",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View File

@ -1,7 +1,9 @@
final: prev: {
final: prev: rec {
# This is the pinned protoc version we have for this project.
protobufPin = prev.protobuf3_15;
ruby = final.ruby_2_7;
devShell = final.callPackage ./vagrant.nix { };
go-protobuf = prev.callPackage ./go-protobuf.nix { };

View File

@ -3,8 +3,6 @@
, autoconf
, autogen
, automake
, docker-compose
, doctl
, go
, go-bindata
, go-changelog
@ -13,17 +11,15 @@
, go-protobuf-json
, go-tools
, grpcurl
, kubectl
, libpng
, libtool
, minikube
, mkShell
, nasm
, nodejs-16_x
, pkg-config
, postgresql_12
, protobufPin
, protoc-gen-doc
, ruby
, zlib
}:
@ -31,13 +27,12 @@ mkShell rec {
name = "vagrant";
packages = [
docker-compose
go
go-bindata
grpcurl
nodejs-16_x
postgresql_12
protoc-gen-doc
ruby
# Custom packages, added to overlay
protobufPin
@ -47,10 +42,6 @@ mkShell rec {
go-mockery
go-changelog
# For testing
doctl
kubectl
# Needed for website/
autoconf
autogen
@ -60,9 +51,6 @@ mkShell rec {
nasm
pkg-config
zlib
] ++ lib.optionals stdenv.isLinux [
# On Linux we use minikube as the primary k8s testing platform
minikube
];
# workaround for npm/gulp dep compilation
@ -70,12 +58,4 @@ mkShell rec {
shellHook = ''
LD=$CC
'';
# Extra env vars
PGHOST = "localhost";
PGPORT = "5432";
PGDATABASE = "noop";
PGUSER = "postgres";
PGPASSWORD = "postgres";
DATABASE_URL = "postgresql://${PGUSER}:${PGPASSWORD}@${PGHOST}:${PGPORT}/${PGDATABASE}?sslmode=disable";
}

View File

@ -38,6 +38,9 @@ Gem::Specification.new do |s|
s.add_dependency "winrm-elevated", ">= 1.2.1", "< 2.0"
s.add_dependency "winrm-fs", ">= 1.3.4", "< 2.0"
# Needed for go generate to use grpc_tools_ruby_protoc
s.add_development_dependency "grpc-tools", "~> 1.41.1"
# Constraint rake to properly handle deprecated method usage
# from within rspec
s.add_development_dependency "rake", "~> 13.0"