Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ store_paths=$(echo "$nix_files" ./services/nginz/third_party/nginx-zauth-module/
layout_dir=$(direnv_layout_dir)
env_dir=./.env

export NIX_CONFIG='extra-experimental-features = nix-command'
export NIX_CONFIG='extra-experimental-features = nix-command flakes'

[[ -d "$layout_dir" ]] || mkdir -p "$layout_dir"

Expand All @@ -27,7 +27,7 @@ if [[ ! -d "$env_dir" || ! -f "$layout_dir/nix-rebuild" || "$store_paths" != $(<
fi
fi
echo "🔧 Building environment"
$bcmd build -f nix wireServer.devEnv -Lv --out-link ./.env --fallback
$bcmd build '.#wireServer.devEnv' -Lv --out-link ./.env --fallback
echo "$store_paths" >"$layout_dir/nix-rebuild"
fi

Expand Down
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ treefmt-check:

.PHONY: build-image-%
build-image-%:
nix-build ./nix -A wireServer.imagesNoDocs.$(*) && \
nix build '.#wireServer.imagesNoDocs.$(*)' && \
./result | docker load | tee /tmp/imageName-$(*) && \
imageName=$$(grep quay.io /tmp/imageName-$(*) | awk '{print $$3}') && \
echo 'You can run your image locally using' && \
Expand All @@ -319,8 +319,11 @@ upload-images:
upload-images-dev:
./hack/bin/upload-images.sh imagesUnoptimizedNoDocs

HOOGLE_IMAGE_DIR := $(shell mktemp -d -t wire-server-hoogle-image.XXXXXX)

upload-hoogle-image:
./hack/bin/upload-image.sh wireServer.hoogleImage
nix -v --show-trace -L build ".#wireServer.hoogleImage" --out-link $(HOOGLE_IMAGE_DIR)/image --fallback
./hack/bin/upload-image.sh $(HOOGLE_IMAGE_DIR)/image

#################################
## cassandra / postgres management
Expand Down Expand Up @@ -665,7 +668,7 @@ helm-template-%: clean-charts charts-integration
./hack/bin/helm-template.sh $(*)

sbom.json:
nix -Lv build -f nix wireServer.bomDependencies && \
nix -Lv build '.#wireServer.bomDependencies' && \
nix run 'github:wireapp/tom-bombadil#create-sbom' -- --root-package-name "wire-server"

# Ask the security team for the `DEPENDENCY_TRACK_API_KEY` (if you need it)
Expand Down
1 change: 1 addition & 0 deletions changelog.d/5-internal/flake
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use nix flakes instead of niv and manually pinned git dependencies
12 changes: 6 additions & 6 deletions docs/src/developer/developer/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,24 +99,24 @@ you may build each individual service by running

```bash
nix build -Lv \
--experimental-features 'nix-command' \
-f ./nix wireServer.<service>
--experimental-features 'nix-command flakes' \
'.#wireServer.<service>'
```

you may build all the libraries that exist locally or are in the closure of `wire-server` by running

```bash
nix build -Lv \
--experimental-features 'nix-command' \
-f ./nix wireServer.haskellPackages.<library>
--experimental-features 'nix-command flakes' \
'.#wireServer.haskellPackages.<library>'
```

you may build all the images that would be deployed by running

```bash
nix build -Lv \
--experimental-features 'nix-command' \
-f ./nix wireServer.allImages
--experimental-features 'nix-command flakes' \
'.#wireServer.allImages'
```

> ℹ️ Info
Expand Down
Loading