mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
shanggu-fonts: make installPhase more readable
in https://github.com/NixOS/nixpkgs/pull/350296/files#r1809338555 I was scratching my head what is going on.
This commit is contained in:
parent
8e125ab277
commit
84a9c95794
@ -23,12 +23,14 @@ let
|
||||
Sans = "sha256-x5z6GYsfQ+8a8W0djJTY8iutuLNYvaemIpdYh94krk0=";
|
||||
Serif = "sha256-3WK7vty3zZFNKkwViEsozU3qa+5hymYwXk6ta9AxmNM=";
|
||||
};
|
||||
|
||||
extraOutputs = builtins.attrNames source;
|
||||
in
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "shanggu-fonts";
|
||||
inherit version;
|
||||
|
||||
outputs = [ "out" ] ++ builtins.attrNames source;
|
||||
outputs = [ "out" ] ++ extraOutputs;
|
||||
|
||||
nativeBuildInputs = [ p7zip ];
|
||||
|
||||
@ -49,13 +51,10 @@ stdenvNoCC.mkDerivation {
|
||||
mkdir -p $out/share/fonts/truetype
|
||||
''
|
||||
+ lib.strings.concatLines (
|
||||
lib.lists.forEach (builtins.attrNames source) (
|
||||
name: (''
|
||||
install -Dm444 ${name}/*.ttc -t $'' + name + ''/share/fonts/truetype
|
||||
ln -s $'' + name + ''/share/fonts/truetype/*.ttc $out/share/fonts/truetype
|
||||
''
|
||||
)
|
||||
)
|
||||
lib.lists.forEach extraOutputs (name: ''
|
||||
install -Dm444 ${name}/*.ttc -t ${placeholder name}/share/fonts/truetype
|
||||
ln -s "${placeholder name}" /share/fonts/truetype/*.ttc $out/share/fonts/truetype
|
||||
'')
|
||||
) + ''
|
||||
runHook postInstall
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user