Merge pull request #70 from K900/https

fix: use unwrapped nix-index, patch it for https (for now)
This commit is contained in:
Martin Weinelt 2024-04-17 10:26:16 +02:00 committed by GitHub
commit 7b22f478d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 1 deletions

View file

@ -6,6 +6,10 @@
outputs = { self, nixpkgs }:
{
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 {
name = "nixos-channel-native-programs";
buildInputs = [
@ -48,7 +52,7 @@
brotli
jq
nixos-channel-native-programs
nix-index
nix-index-unwrapped
];
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";