fix: use unwrapped nix-index, patch it for https (for now)

This commit is contained in:
Ilya K 2024-04-17 11:10:51 +03:00
parent 0913471839
commit 3f72581cba
2 changed files with 15 additions and 1 deletions

View file

@ -6,6 +6,10 @@
outputs = { self, nixpkgs }: outputs = { self, nixpkgs }:
{ {
overlays.default = final: prev: { overlays.default = final: prev: {
nix-index-unwrapped = prev.nix-index-unwrapped.overrideAttrs(old: {
patches = [ ./nix-index-https.patch ];
});
nixos-channel-native-programs = with final; stdenv.mkDerivation { nixos-channel-native-programs = with final; stdenv.mkDerivation {
name = "nixos-channel-native-programs"; name = "nixos-channel-native-programs";
buildInputs = [ buildInputs = [
@ -48,7 +52,7 @@
brotli brotli
jq jq
nixos-channel-native-programs nixos-channel-native-programs
nix-index nix-index-unwrapped
]; ];
buildCommand = '' buildCommand = ''

10
nix-index-https.patch Normal file
View file

@ -0,0 +1,10 @@
diff --git a/src/lib.rs b/src/lib.rs
index 4393e4b..4a84fc0 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -23,4 +23,4 @@ pub mod workset;
/// The URL of the binary cache that we use to fetch file listings and references.
///
/// Hardcoded for now, but may be made a configurable option in the future.
-pub const CACHE_URL: &str = "http://cache.nixos.org";
+pub const CACHE_URL: &str = "https://cache.nixos.org";