From 1337624fc1bbcc59837205f3c02fbd971deea7ed Mon Sep 17 00:00:00 2001 From: Avimitin Date: Sat, 14 Sep 2024 14:40:56 +0800 Subject: [PATCH] [nix] locked nixpkgs for VCS Signed-off-by: Avimitin --- nix/pkgs/vcs-fhs-env.nix | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/nix/pkgs/vcs-fhs-env.nix b/nix/pkgs/vcs-fhs-env.nix index a21dd76d4..a9becb664 100644 --- a/nix/pkgs/vcs-fhs-env.nix +++ b/nix/pkgs/vcs-fhs-env.nix @@ -1,8 +1,25 @@ -{ buildFHSEnv -, vcStaticHome +# This is a bit dirty. +# Since VCS are close source toolchains, we have no way to fix it for environment changes. +# So here we have to lock the whole nixpkgs to a working version. +# +# For convenience, we still use the nixpkgs defined in flake to "callPackage" this derivation. +# But the buildFHSEnv, targetPkgs is still from the locked nixpkgs. +{ vcStaticHome , snpslmdLicenseFile +, fetchFromGitHub }: -buildFHSEnv { +let + nixpkgsSrcs = fetchFromGitHub { + owner = "NixOS"; + repo = "nixpkgs"; + "rev" = "574d1eac1c200690e27b8eb4e24887f8df7ac27c"; + "hash" = "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg="; + }; + + # The vcs we have only support x86-64_linux + lockedPkgs = import nixpkgsSrcs { system = "x86_64-linux"; }; +in +lockedPkgs.buildFHSEnv { name = "vcs-fhs-env"; profile = ''