From 9f78dd4a1cb4b20c820ed98c7a69e9c6534fff71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 5 Apr 2021 03:40:16 +0200 Subject: [PATCH 1/3] fetchzip: accept urls Required after 9bbfb268540e0cc0404a6b9ef33ea3bf160066ed --- pkgs/build-support/fetchzip/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/build-support/fetchzip/default.nix b/pkgs/build-support/fetchzip/default.nix index b00983772e4b..cde4d4f579f4 100644 --- a/pkgs/build-support/fetchzip/default.nix +++ b/pkgs/build-support/fetchzip/default.nix @@ -5,16 +5,19 @@ # (e.g. due to minor changes in the compression algorithm, or changes # in timestamps). -{ fetchurl, unzip }: +{ lib, fetchurl, unzip }: { # Optionally move the contents of the unpacked tree up one level. stripRoot ? true -, url +, url ? "" +, urls ? [] , extraPostFetch ? "" , name ? "source" , ... } @ args: -(fetchurl ({ +(fetchurl (let + basename = baseNameOf (if url != "" then url else builtins.head urls); +in { inherit name; recursiveHash = true; @@ -27,7 +30,7 @@ mkdir "$unpackDir" cd "$unpackDir" - renamed="$TMPDIR/${baseNameOf url}" + renamed="$TMPDIR/${basename}" mv "$downloadedFile" "$renamed" unpackFile "$renamed" '' From 36c50a6f48127c1847b0bfb84006b034a851d3fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 5 Apr 2021 03:40:27 +0200 Subject: [PATCH 2/3] paratype-pt-*: convert url -> urls Fixes eval after 9bbfb268540e0cc0404a6b9ef33ea3bf160066ed --- pkgs/data/fonts/paratype-pt/mono.nix | 2 +- pkgs/data/fonts/paratype-pt/sans.nix | 2 +- pkgs/data/fonts/paratype-pt/serif.nix | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/data/fonts/paratype-pt/mono.nix b/pkgs/data/fonts/paratype-pt/mono.nix index 6b1cd370241b..4dd6093922cc 100644 --- a/pkgs/data/fonts/paratype-pt/mono.nix +++ b/pkgs/data/fonts/paratype-pt/mono.nix @@ -3,7 +3,7 @@ fetchzip { name = "paratype-pt-mono"; - url = [ + urls = [ "https://company.paratype.com/system/attachments/631/original/ptmono.zip" "http://rus.paratype.ru/system/attachments/631/original/ptmono.zip" ]; diff --git a/pkgs/data/fonts/paratype-pt/sans.nix b/pkgs/data/fonts/paratype-pt/sans.nix index d6b783ebe4c7..8b47dd9ee1fb 100644 --- a/pkgs/data/fonts/paratype-pt/sans.nix +++ b/pkgs/data/fonts/paratype-pt/sans.nix @@ -3,7 +3,7 @@ fetchzip { name = "paratype-pt-sans"; - url = [ + urls = [ "https://company.paratype.com/system/attachments/629/original/ptsans.zip" "http://rus.paratype.ru/system/attachments/629/original/ptsans.zip" ]; diff --git a/pkgs/data/fonts/paratype-pt/serif.nix b/pkgs/data/fonts/paratype-pt/serif.nix index 2b5eeafd09b9..a4142f757fcc 100644 --- a/pkgs/data/fonts/paratype-pt/serif.nix +++ b/pkgs/data/fonts/paratype-pt/serif.nix @@ -3,7 +3,7 @@ fetchzip { name = "paratype-pt-serif"; - url = [ + urls = [ "https://company.paratype.com/system/attachments/634/original/ptserif.zip" "http://rus.paratype.ru/system/attachments/634/original/ptserif.zip" ]; From 435fe3dab21326a4cd1aeb500672becc6c0b8a74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 5 Apr 2021 03:41:37 +0200 Subject: [PATCH 3/3] sublime: url => urls Fixes eval after 9bbfb268540e0cc0404a6b9ef33ea3bf160066ed --- pkgs/applications/editors/sublime/2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/sublime/2/default.nix b/pkgs/applications/editors/sublime/2/default.nix index e46d6ef97e4c..7102d6951390 100644 --- a/pkgs/applications/editors/sublime/2/default.nix +++ b/pkgs/applications/editors/sublime/2/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { if stdenv.hostPlatform.system == "i686-linux" then fetchurl { name = "sublimetext-2.0.2.tar.bz2"; - url = [ + urls = [ "http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2.tar.bz2" "https://download.sublimetext.com/Sublime%20Text%202.0.2.tar.bz2" ]; @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { else fetchurl { name = "sublimetext-2.0.2.tar.bz2"; - url = [ + urls = [ "http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2.tar.bz2" "https://download.sublimetext.com/Sublime%20Text%202.0.2%20x64.tar.bz2" ];