joypixels: Refactor to special-case darwin
Specifying the system-specific variables for x86_64-darwin and x86_64-linux is too restrictive, excluding for example i686-linux. Since macOS seems to be the odd one out we can special-case only x86_64-darwin.
This commit is contained in:
parent
25ca62c2a2
commit
c5249d1e9d
@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
let inherit (stdenv.hostPlatform) system;
|
let inherit (stdenv.hostPlatform) system;
|
||||||
|
|
||||||
throwSystem = throw "Unsupported system: ${system}";
|
|
||||||
|
|
||||||
systemSpecific = {
|
systemSpecific = {
|
||||||
x86_64-darwin = rec {
|
x86_64-darwin = rec {
|
||||||
systemTag = "nix-darwin";
|
systemTag = "nix-darwin";
|
||||||
@ -14,14 +12,13 @@ let inherit (stdenv.hostPlatform) system;
|
|||||||
fontFile = "Apple%20Color%20Emoji.ttc";
|
fontFile = "Apple%20Color%20Emoji.ttc";
|
||||||
name = "joypixels-apple-color-emoji.ttc";
|
name = "joypixels-apple-color-emoji.ttc";
|
||||||
};
|
};
|
||||||
x86_64-linux = rec {
|
}.${system} or rec {
|
||||||
systemTag = "nix-os";
|
systemTag = "nix-os";
|
||||||
capitalized = "NixOS";
|
capitalized = "NixOS";
|
||||||
ext = "ttf";
|
ext = "ttf";
|
||||||
fontFile = "joypixels-android.ttf";
|
fontFile = "joypixels-android.ttf";
|
||||||
name = fontFile;
|
name = fontFile;
|
||||||
};
|
};
|
||||||
}.${system} or throwSystem;
|
|
||||||
|
|
||||||
joypixels-free-license = with systemSpecific; {
|
joypixels-free-license = with systemSpecific; {
|
||||||
spdxId = "LicenseRef-JoyPixels-Free-6.0";
|
spdxId = "LicenseRef-JoyPixels-Free-6.0";
|
||||||
@ -59,8 +56,7 @@ stdenv.mkDerivation rec {
|
|||||||
url = "https://cdn.joypixels.com/distributions/${systemTag}/font/${version}/${fontFile}";
|
url = "https://cdn.joypixels.com/distributions/${systemTag}/font/${version}/${fontFile}";
|
||||||
sha256 = {
|
sha256 = {
|
||||||
x86_64-darwin = "043980g0dlp8vd4qkbx6298fwz8ns0iwbxm0f8czd9s7n2xm4npq";
|
x86_64-darwin = "043980g0dlp8vd4qkbx6298fwz8ns0iwbxm0f8czd9s7n2xm4npq";
|
||||||
x86_64-linux = "1vxqsqs93g4jyp01r47lrpcm0fmib2n1vysx32ksmfxmprimb75s";
|
}.${system} or "1vxqsqs93g4jyp01r47lrpcm0fmib2n1vysx32ksmfxmprimb75s";
|
||||||
}.${system} or throwSystem;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user