select: drop unused nixpkgs fallback

This commit is contained in:
Jörg Thalheim
2025-06-27 19:12:44 +02:00
parent 553d13b05a
commit 6afe4305b4
2 changed files with 1 additions and 16 deletions

View File

@@ -720,7 +720,7 @@ class Flake:
AssertionError: If the cache or flake cache path is not properly initialized.
"""
from clan_lib.cmd import Log, RunOpts, run
from clan_lib.dirs import nixpkgs_source, select_source
from clan_lib.dirs import select_source
from clan_lib.nix import (
nix_build,
nix_config,
@@ -739,20 +739,6 @@ class Flake:
config = nix_config()
# these hashes should be filled in by `nix build`
# if we run this Python code directly then we use a fallback
# method to getting the NAR hash
fallback_nixpkgs_hash = "@fallback_nixpkgs_hash@"
if not fallback_nixpkgs_hash.startswith("sha256-"):
fallback_nixpkgs = Flake(
str(nixpkgs_source()), nix_options=self.nix_options
)
fallback_nixpkgs.invalidate_cache()
assert fallback_nixpkgs.hash is not None, (
"this should be impossible as invalidate_cache() should always set `hash`"
)
fallback_nixpkgs_hash = fallback_nixpkgs.hash
select_hash = "@select_hash@"
if not select_hash.startswith("sha256-"):
select_flake = Flake(str(select_source()), nix_options=self.nix_options)