Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0cd5788

Browse files
committed
pin golangci-lint and shfmt
1 parent 6911dc1 commit 0cd5788

File tree

2 files changed

+35
-7
lines changed

2 files changed

+35
-7
lines changed

flake.lock

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
inputs = {
55
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
6+
nixpkgs-pinned.url = "github:nixos/nixpkgs/5deee6281831847857720668867729617629ef1f";
67
flake-utils.url = "github:numtide/flake-utils";
78
pnpm2nix = {
89
url = "github:nzbr/pnpm2nix-nzbr";
@@ -16,11 +17,21 @@
1617
};
1718
};
1819

19-
outputs = { self, nixpkgs, flake-utils, drpc, pnpm2nix }:
20+
outputs = { self, nixpkgs, nixpkgs-pinned, flake-utils, drpc, pnpm2nix }:
2021
flake-utils.lib.eachDefaultSystem (system:
2122
let
22-
# Workaround for: terraform has an unfree license (‘bsl11’), refusing to evaluate.
23-
pkgs = import nixpkgs { inherit system; config.allowUnfree = true; };
23+
pkgs = import nixpkgs {
24+
inherit system;
25+
# Workaround for: terraform has an unfree license (‘bsl11’), refusing to evaluate.
26+
config.allowUnfree = true;
27+
};
28+
29+
# pinnedPkgs is used to pin packages that need to stay in sync with CI.
30+
# Everything else uses unstable.
31+
pinnedPkgs = import nixpkgs-pinned {
32+
inherit system;
33+
};
34+
2435
nodejs = pkgs.nodejs-18_x;
2536
# Check in https://search.nixos.org/packages to find new packages.
2637
# Use `nix --extra-experimental-features nix-command --extra-experimental-features flakes flake update`
@@ -49,7 +60,7 @@
4960
gnused
5061
go_1_22
5162
go-migrate
52-
golangci-lint
63+
(pinnedPkgs.golangci-lint)
5364
gopls
5465
gotestsum
5566
jq
@@ -71,10 +82,10 @@
7182
protobuf
7283
protoc-gen-go
7384
ripgrep
74-
# This doesn't build on latest nixpkgs for me for some reason
75-
# sapling
85+
# This doesn't build on latest nixpkgs (July 10 2024)
86+
(pinnedPkgs.sapling)
7687
shellcheck
77-
shfmt
88+
(pinnedPkgs.shfmt)
7889
sqlc
7990
terraform
8091
typos

0 commit comments

Comments
 (0)