about summary refs log tree commit diff
path: root/nix/fetchGoModule
diff options
context:
space:
mode:
Diffstat (limited to 'nix/fetchGoModule')
-rw-r--r--nix/fetchGoModule/default.nix16
1 files changed, 14 insertions, 2 deletions
diff --git a/nix/fetchGoModule/default.nix b/nix/fetchGoModule/default.nix
index e49a5e3a1c5e..3f0784ad8fe7 100644
--- a/nix/fetchGoModule/default.nix
+++ b/nix/fetchGoModule/default.nix
@@ -1,10 +1,22 @@
-{ pkgs, ... }:
+{ lib, pkgs, ... }:
+
+let
+
+  inherit (lib)
+    lowerChars
+    replaceStrings
+    upperChars
+  ;
+
+  caseFold = replaceStrings upperChars (map (c: "!" + c) lowerChars);
+
+in
 
 { path, version, sha256 }:
 
 (pkgs.fetchurl {
   name = "source";
-  url = "https://proxy.golang.org/${path}/@v/v${version}.zip";
+  url = "https://proxy.golang.org/${caseFold path}/@v/v${version}.zip";
   inherit sha256;
 
   recursiveHash = true;