mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 12:29:02 +02:00
Merge pull request #213765 from wegank/data-mkderivation
treewide: data: convert to stdenvNoCC.mkDerivation
This commit is contained in:
commit
ee2db082ff
|
@ -1,18 +1,22 @@
|
|||
{ lib, fetchzip }:
|
||||
{ lib, stdenvNoCC, fetchzip }:
|
||||
|
||||
fetchzip rec {
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "freefont-ttf";
|
||||
version = "20120503";
|
||||
|
||||
url = "mirror://gnu/freefont/freefont-ttf-${version}.zip";
|
||||
src = fetchzip {
|
||||
url = "mirror://gnu/freefont/freefont-ttf-${version}.zip";
|
||||
hash = "sha256-K3kVHGcDTxQ7N7XqSdwRObriVkBoBYPKHbyYrYvm7VU=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
postFetch = ''
|
||||
mkdir -p $out/share/fonts/truetype
|
||||
mv $out/*.ttf $out/share/fonts/truetype
|
||||
find $out -maxdepth 1 ! -type d -exec rm {} +
|
||||
'';
|
||||
mv *.ttf $out/share/fonts/truetype
|
||||
|
||||
sha256 = "sha256-bdMZg/mHYc0N6HiR8uNl0CjeOwBou+OYj3LPkyEUHUA=";
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "GNU Free UCS Outline Fonts";
|
||||
|
@ -24,6 +28,6 @@ fetchzip rec {
|
|||
homepage = "https://www.gnu.org/software/freefont/";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
platforms = lib.platforms.all;
|
||||
maintainers = [];
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,14 +1,22 @@
|
|||
{ lib, fetchzip }:
|
||||
fetchzip rec {
|
||||
{ lib, stdenvNoCC, fetchzip }:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "capitaine-cursors-themed";
|
||||
version = "5";
|
||||
stripRoot = false;
|
||||
url = "https://github.com/sainnhe/capitaine-cursors/releases/download/r${version}/Linux.zip";
|
||||
sha256 = "jQNAXuR/OtvohWziGYgb5Ni2/tEIGaY9HIyUUW793EY=";
|
||||
|
||||
postFetch = ''
|
||||
src = fetchzip {
|
||||
url = "https://github.com/sainnhe/capitaine-cursors/releases/download/r${version}/Linux.zip";
|
||||
stripRoot = false;
|
||||
hash = "sha256-ipPpmZKU/xLA45fdOvxVbtFDCUsCYIvzeps/DjhFkNg=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share/icons
|
||||
cp -r ./ $out/share/icons
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -1,23 +1,24 @@
|
|||
{ lib, fetchzip }:
|
||||
{ lib, stdenvNoCC, fetchzip }:
|
||||
|
||||
fetchzip rec {
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "cldr-annotations";
|
||||
version = "42.0";
|
||||
|
||||
url = "https://unicode.org/Public/cldr/${lib.versions.major version}/cldr-common-${version}.zip";
|
||||
src = fetchzip {
|
||||
url = "https://unicode.org/Public/cldr/${lib.versions.major version}/cldr-common-${version}.zip";
|
||||
stripRoot = false;
|
||||
hash = "sha256-paRon3ecGXNp3ZDnN1DU9RVU2NDWTBiKjy0OP3vcPLE=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
stripRoot = false;
|
||||
postFetch = ''
|
||||
mkdir -p $out/share/unicode/cldr/common
|
||||
mv $out/common/annotations{,Derived} -t $out/share/unicode/cldr/common
|
||||
mv common/annotations{,Derived} -t $out/share/unicode/cldr/common
|
||||
|
||||
shopt -s extglob dotglob
|
||||
rm -rf $out/!(share)
|
||||
shopt -u extglob dotglob
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
hash = "sha256-9OOd69nBaDSt+ilL3PTGpcQgC60PnHqd8/CYa2LgeI0=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Names and keywords for Unicode characters from the Common Locale Data Repository";
|
||||
homepage = "https://cldr.unicode.org";
|
||||
|
|
|
@ -1,20 +1,24 @@
|
|||
{ lib, fetchFromGitHub }:
|
||||
{ lib, stdenvNoCC, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "publicsuffix-list";
|
||||
version = "2021-09-03";
|
||||
in fetchFromGitHub {
|
||||
name = "${pname}-${version}";
|
||||
owner = "publicsuffix";
|
||||
repo = "list";
|
||||
rev = "2533d032871e1ef1f410fc0754b848d4587c8021";
|
||||
sha256 = "sha256-Q8uIXM1CMu8dlWcVoL17M1XRGu3kG7Y7jpx0oHQh+2I=";
|
||||
version = "unstable-2021-09-03";
|
||||
|
||||
postFetch = ''
|
||||
install -Dm0444 $out/public_suffix_list.dat $out/tests/test_psl.txt -t $out/share/publicsuffix
|
||||
shopt -s extglob dotglob
|
||||
rm -rf $out/!(share)
|
||||
shopt -u extglob dotglob
|
||||
src = fetchFromGitHub {
|
||||
owner = "publicsuffix";
|
||||
repo = "list";
|
||||
rev = "2533d032871e1ef1f410fc0754b848d4587c8021";
|
||||
hash = "sha256-moibTN9KovABcg+ubKUgMXg4b8sMrTVo6Itmiati/Vk=";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm0444 public_suffix_list.dat tests/test_psl.txt -t $out/share/publicsuffix
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{ lib
|
||||
, stdenvNoCC
|
||||
, fetchurl
|
||||
, symlinkJoin
|
||||
}:
|
||||
|
@ -6,30 +7,40 @@
|
|||
let
|
||||
version = "15.0";
|
||||
|
||||
fetchData = { file, sha256 }: fetchurl {
|
||||
url = "https://www.unicode.org/Public/emoji/${version}/${file}";
|
||||
inherit sha256;
|
||||
downloadToTemp = true;
|
||||
recursiveHash = true;
|
||||
postFetch = ''
|
||||
fetchData = { suffix, hash }: stdenvNoCC.mkDerivation {
|
||||
pname = "unicode-emoji-${suffix}";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.unicode.org/Public/emoji/${version}/emoji-${suffix}.txt";
|
||||
inherit hash;
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
installDir="$out/share/unicode/emoji"
|
||||
mkdir -p "$installDir"
|
||||
mv "$downloadedFile" "$installDir/${file}"
|
||||
cp "$src" "$installDir/emoji-${suffix}.txt"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
srcs = {
|
||||
emoji-sequences = fetchData {
|
||||
file = "emoji-sequences.txt";
|
||||
sha256 = "sha256-vRpXHAcdY3arTnFwBH3WUW3DOh8B3L9+sRcecLHZ2lg=";
|
||||
suffix = "sequences";
|
||||
hash = "sha256-XCIi2KQy2JagMaaML1SwT79HsPzi5phT8euKPpRetW0=";
|
||||
};
|
||||
emoji-test = fetchData {
|
||||
file = "emoji-test.txt";
|
||||
sha256 = "sha256-3Rega6+ZJ5jXRhLFL/i/12V5IypEo5FaGG6Wf9Bj0UU=";
|
||||
suffix = "test";
|
||||
hash = "sha256-hEXyOsg4jglr4Z0CYuFPzv+Fb/Ugk/I1bciUhfGoU9s=";
|
||||
};
|
||||
emoji-zwj-sequences = fetchData {
|
||||
file = "emoji-zwj-sequences.txt";
|
||||
sha256 = "sha256-9AqrpyUCiBcR/fafa4VaH0pT5o1YzEZDVySsX4ja1u8=";
|
||||
suffix = "zwj-sequences";
|
||||
hash = "sha256-/jV/kRe3dGZ2Bjdl1YcTft+bJZA6eSvVSTW/CFZ5EYI=";
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
Loading…
Reference in a new issue