blob: 5c7a8c7b9c86d7b1c7a4fee2af5abf1e32f6e26d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
{
self,
pkgs,
}: let
inherit (builtins) removeAttrs concatStringsSep map attrValues;
packages = attrValues (removeAttrs self.packages.${pkgs.system} ["default" "docs" "gjs"]);
cp = pkg: ''
doc="${pkg.doc}/share/doc"
name=$(ls $doc)
mkdir -p "$out/$name"
cp -r "$doc/$name" $out
'';
in
pkgs.runCommand "docs" {} (concatStringsSep "" (map cp packages))
|