Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nix] locked nixpkgs for VCS #784

Merged
merged 1 commit into from
Sep 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions nix/pkgs/vcs-fhs-env.nix
Original file line number Diff line number Diff line change
@@ -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 = ''
Expand Down