Skip to content

Commit 3106164

Browse files
unlsycnAvimitin
authored andcommitted
[nix] locked nixpkgs for VCS
1 parent f52b376 commit 3106164

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

templates/chisel/nix/pkgs/vcs-fhs-env.nix

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
11
# SPDX-License-Identifier: Apache-2.0
22
# SPDX-FileCopyrightText: 2024 Jiuyang Liu <[email protected]>
33

4-
{ buildFHSEnv
5-
, vcStaticHome
4+
# This is a bit dirty.
5+
# Since VCS are close source toolchains, we have no way to fix it for environment changes.
6+
# So here we have to lock the whole nixpkgs to a working version.
7+
#
8+
# For convenience, we still use the nixpkgs defined in flake to "callPackage" this derivation.
9+
# But the buildFHSEnv, targetPkgs is still from the locked nixpkgs.
10+
{ vcStaticHome
611
, snpslmdLicenseFile
12+
, fetchFromGitHub
713
}:
8-
buildFHSEnv {
14+
let
15+
nixpkgsSrcs = fetchFromGitHub {
16+
owner = "NixOS";
17+
repo = "nixpkgs";
18+
"rev" = "c374d94f1536013ca8e92341b540eba4c22f9c62";
19+
"hash" = "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=";
20+
};
21+
22+
# The vcs we have only support x86-64_linux
23+
lockedPkgs = import nixpkgsSrcs { system = "x86_64-linux"; };
24+
in
25+
lockedPkgs.buildFHSEnv {
926
name = "vcs-fhs-env";
1027

1128
profile = ''

0 commit comments

Comments
 (0)