Skip to content

Commit

Permalink
bump golang version to 1.22.7 (#74)
Browse files Browse the repository at this point in the history
* bump golang version to 1.22.7

* add README steps
  • Loading branch information
stehessel authored Sep 26, 2024
1 parent 53e4496 commit 15822aa
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,13 @@ To install the pre-commit hook, run `pre-commit install` from within the reposit
If you're getting error such as `error: attribute 'whatever_new_version'
missing` after bumping to a new version of a package, try running `nix flake
update`.

### Updating isolated packages

To only update an isolated package - for example, to bump the golang version without touching other packages - follow these steps:

1. Add a dedicated `nixpkgs-my-package` input based on `nixpkgs-unstable`.
2. Run `nix flake update nixpkgs-my-package`.
3. Import your package from `inputs.nixpkgs-my-package` in the package list.

For an explicit example, see this [pull request](https://github.com/stackrox/stackrox-env/pull/74).
17 changes: 17 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixpkgs-golang.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixpkgs-terraform.url = "github:stackbuilders/nixpkgs-terraform";
flake-parts.url = "github:hercules-ci/flake-parts";
};
Expand All @@ -39,6 +40,7 @@
let
# Pinned packages.
custom = import ./pkgs { inherit pkgs; };
golang = (import inputs.nixpkgs-golang { inherit system; }).go_1_22;
terraform = inputs.nixpkgs-terraform.packages.${system}."1.5.7";

# Add Darwin packages here.
Expand Down Expand Up @@ -123,7 +125,7 @@
prometheus
wget
;
go = pkgs.go_1_22;
go = golang;
helm = pkgs.kubernetes-helm;
jsonnet = pkgs.go-jsonnet;
python = pkgs.python3.withPackages python-pkgs;
Expand Down

0 comments on commit 15822aa

Please sign in to comment.