Merge pull request #118530 from SuperSandro2000/fetchzip-urls
This commit is contained in:
commit
add1a1cd6b
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
|
|||||||
if stdenv.hostPlatform.system == "i686-linux" then
|
if stdenv.hostPlatform.system == "i686-linux" then
|
||||||
fetchurl {
|
fetchurl {
|
||||||
name = "sublimetext-2.0.2.tar.bz2";
|
name = "sublimetext-2.0.2.tar.bz2";
|
||||||
url = [
|
urls = [
|
||||||
"http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2.tar.bz2"
|
"http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2.tar.bz2"
|
||||||
"https://download.sublimetext.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
|
else
|
||||||
fetchurl {
|
fetchurl {
|
||||||
name = "sublimetext-2.0.2.tar.bz2";
|
name = "sublimetext-2.0.2.tar.bz2";
|
||||||
url = [
|
urls = [
|
||||||
"http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2.tar.bz2"
|
"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"
|
"https://download.sublimetext.com/Sublime%20Text%202.0.2%20x64.tar.bz2"
|
||||||
];
|
];
|
||||||
|
@ -5,16 +5,19 @@
|
|||||||
# (e.g. due to minor changes in the compression algorithm, or changes
|
# (e.g. due to minor changes in the compression algorithm, or changes
|
||||||
# in timestamps).
|
# in timestamps).
|
||||||
|
|
||||||
{ fetchurl, unzip }:
|
{ lib, fetchurl, unzip }:
|
||||||
|
|
||||||
{ # Optionally move the contents of the unpacked tree up one level.
|
{ # Optionally move the contents of the unpacked tree up one level.
|
||||||
stripRoot ? true
|
stripRoot ? true
|
||||||
, url
|
, url ? ""
|
||||||
|
, urls ? []
|
||||||
, extraPostFetch ? ""
|
, extraPostFetch ? ""
|
||||||
, name ? "source"
|
, name ? "source"
|
||||||
, ... } @ args:
|
, ... } @ args:
|
||||||
|
|
||||||
(fetchurl ({
|
(fetchurl (let
|
||||||
|
basename = baseNameOf (if url != "" then url else builtins.head urls);
|
||||||
|
in {
|
||||||
inherit name;
|
inherit name;
|
||||||
|
|
||||||
recursiveHash = true;
|
recursiveHash = true;
|
||||||
@ -27,7 +30,7 @@
|
|||||||
mkdir "$unpackDir"
|
mkdir "$unpackDir"
|
||||||
cd "$unpackDir"
|
cd "$unpackDir"
|
||||||
|
|
||||||
renamed="$TMPDIR/${baseNameOf url}"
|
renamed="$TMPDIR/${basename}"
|
||||||
mv "$downloadedFile" "$renamed"
|
mv "$downloadedFile" "$renamed"
|
||||||
unpackFile "$renamed"
|
unpackFile "$renamed"
|
||||||
''
|
''
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
fetchzip {
|
fetchzip {
|
||||||
name = "paratype-pt-mono";
|
name = "paratype-pt-mono";
|
||||||
|
|
||||||
url = [
|
urls = [
|
||||||
"https://company.paratype.com/system/attachments/631/original/ptmono.zip"
|
"https://company.paratype.com/system/attachments/631/original/ptmono.zip"
|
||||||
"http://rus.paratype.ru/system/attachments/631/original/ptmono.zip"
|
"http://rus.paratype.ru/system/attachments/631/original/ptmono.zip"
|
||||||
];
|
];
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
fetchzip {
|
fetchzip {
|
||||||
name = "paratype-pt-sans";
|
name = "paratype-pt-sans";
|
||||||
|
|
||||||
url = [
|
urls = [
|
||||||
"https://company.paratype.com/system/attachments/629/original/ptsans.zip"
|
"https://company.paratype.com/system/attachments/629/original/ptsans.zip"
|
||||||
"http://rus.paratype.ru/system/attachments/629/original/ptsans.zip"
|
"http://rus.paratype.ru/system/attachments/629/original/ptsans.zip"
|
||||||
];
|
];
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
fetchzip {
|
fetchzip {
|
||||||
name = "paratype-pt-serif";
|
name = "paratype-pt-serif";
|
||||||
|
|
||||||
url = [
|
urls = [
|
||||||
"https://company.paratype.com/system/attachments/634/original/ptserif.zip"
|
"https://company.paratype.com/system/attachments/634/original/ptserif.zip"
|
||||||
"http://rus.paratype.ru/system/attachments/634/original/ptserif.zip"
|
"http://rus.paratype.ru/system/attachments/634/original/ptserif.zip"
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user