From 6afe4305b4061d42bf3d226914431d295b4bd5fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 27 Jun 2025 19:12:44 +0200 Subject: [PATCH] select: drop unused nixpkgs fallback --- pkgs/clan-cli/clan_lib/flake/flake.py | 16 +--------------- pkgs/clan-cli/default.nix | 1 - 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/pkgs/clan-cli/clan_lib/flake/flake.py b/pkgs/clan-cli/clan_lib/flake/flake.py index 4ed762e3e..f7cd1440b 100644 --- a/pkgs/clan-cli/clan_lib/flake/flake.py +++ b/pkgs/clan-cli/clan_lib/flake/flake.py @@ -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) diff --git a/pkgs/clan-cli/default.nix b/pkgs/clan-cli/default.nix index d35dd7a6c..a4c0c981a 100644 --- a/pkgs/clan-cli/default.nix +++ b/pkgs/clan-cli/default.nix @@ -70,7 +70,6 @@ let rm -f $out/clan_lib/select substituteInPlace $out/clan_lib/flake/flake.py \ - --replace-fail '@fallback_nixpkgs_hash@' "$(jq -r '.nodes.nixpkgs.locked.narHash' ${nixpkgs'}/flake.lock)" \ --replace-fail '@select_hash@' "$(jq -r '.nodes."nix-select".locked.narHash' ${../../flake.lock})" ln -sf ${nixpkgs'} $out/clan_lib/nixpkgs ln -sf ${nix-select} $out/clan_lib/select