Skip to content

Commit

Permalink
devshell: Use nix-fast-build from flake inputs
Browse files Browse the repository at this point in the history
Instead of using nix-fast-build from nixpkgs, use the nix-fast-build
from flake inputs in the nix devshell.

Signed-off-by: Henri Rosten <[email protected]>
  • Loading branch information
henrirosten committed Nov 20, 2024
1 parent 06bdb1f commit f176382
Showing 1 changed file with 53 additions and 52 deletions.
105 changes: 53 additions & 52 deletions nix/devshell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,61 @@
# SPDX-License-Identifier: Apache-2.0
{
perSystem =
{ pkgs, ... }:
{ pkgs, inputs', ... }:
{
devShells.default = pkgs.mkShell {
packages = with pkgs; [
azure-cli
git
jq
nix
nix-fast-build
nixfmt-rfc-style
nixos-rebuild
# parallel_env requires 'compgen' function, which is available
# in bashInteractive, but not bash
bashInteractive
parallel
python3.pkgs.black
python3.pkgs.colorlog
python3.pkgs.deploykit
python3.pkgs.invoke
python3.pkgs.pycodestyle
python3.pkgs.pylint
python3.pkgs.tabulate
reuse
sops
ssh-to-age
deploy-rs
wget
(terraform.withPlugins (p: [
# We need to override the azurerm version to fix the issue described
# in https://ssrc.atlassian.net/browse/SP-4926.
# TODO:
# Below override is no longer needed when the azurerm version we
# get from the nixpkgs pinned in ghaf-infra flake includes a fix for
# https://github.com/hashicorp/terraform-provider-azurerm/issues/24444.
# At the time of writing, ghaf-infra flake pins to
# nixos-24.05, that ships with azurerm v3.97.1 which is broken.
# For more information on the available azurerm versions, see:
# https://registry.terraform.io/providers/hashicorp/azurerm.
(p.azurerm.override {
owner = "hashicorp";
repo = "terraform-provider-azurerm";
rev = "v3.85.0";
hash = "sha256-YXVSApUnJlwxIldDoijl72rA9idKV/vGRf0tAiaH8cc=";
vendorHash = null;
})
p.external
p.local
p.null
p.random
p.secret
p.sops
p.tls
]))
];
packages =
(with pkgs; [
azure-cli
git
jq
nix
nixfmt-rfc-style
nixos-rebuild
# parallel_env requires 'compgen' function, which is available
# in bashInteractive, but not bash
bashInteractive
parallel
python3.pkgs.black
python3.pkgs.colorlog
python3.pkgs.deploykit
python3.pkgs.invoke
python3.pkgs.pycodestyle
python3.pkgs.pylint
python3.pkgs.tabulate
reuse
sops
ssh-to-age
deploy-rs
wget
(terraform.withPlugins (p: [
# We need to override the azurerm version to fix the issue described
# in https://ssrc.atlassian.net/browse/SP-4926.
# TODO:
# Below override is no longer needed when the azurerm version we
# get from the nixpkgs pinned in ghaf-infra flake includes a fix for
# https://github.com/hashicorp/terraform-provider-azurerm/issues/24444.
# At the time of writing, ghaf-infra flake pins to
# nixos-24.05, that ships with azurerm v3.97.1 which is broken.
# For more information on the available azurerm versions, see:
# https://registry.terraform.io/providers/hashicorp/azurerm.
(p.azurerm.override {
owner = "hashicorp";
repo = "terraform-provider-azurerm";
rev = "v3.85.0";
hash = "sha256-YXVSApUnJlwxIldDoijl72rA9idKV/vGRf0tAiaH8cc=";
vendorHash = null;
})
p.external
p.local
p.null
p.random
p.secret
p.sops
p.tls
]))
])
++ [ inputs'.nix-fast-build.packages.default ];
};
};
}

0 comments on commit f176382

Please sign in to comment.