mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-17 21:11:34 +03:00
c5a7112d9d
Co-authored-by: Samuel Dionne-Riel <samuel@dionne-riel.com> Co-authored-by: Edward Amsden <edward@blackriversoft.com>
34 lines
734 B
Nix
34 lines
734 B
Nix
{ pkgs
|
|
, stdenv
|
|
, glibcLocales
|
|
, runCommandNoCC
|
|
, symlinkJoin
|
|
, ruby
|
|
}:
|
|
|
|
let
|
|
# Release tools used to evaluate the devices metadata.
|
|
mobileReleaseTools = (import ../../../lib/release-tools.nix { inherit pkgs; });
|
|
inherit (mobileReleaseTools) all-devices;
|
|
inherit (mobileReleaseTools.withPkgs pkgs) evalFor;
|
|
|
|
devicesDir = ../../../devices;
|
|
devicesInfo = symlinkJoin {
|
|
name = "devices-metadata";
|
|
paths = (map (device: (evalFor device).build.device-metadata) all-devices);
|
|
};
|
|
in
|
|
|
|
runCommandNoCC "mobile-nixos-docs-devices" {
|
|
nativeBuildInputs = [
|
|
ruby
|
|
glibcLocales
|
|
];
|
|
inherit devicesDir devicesInfo;
|
|
}
|
|
''
|
|
mkdir -p $out/devices
|
|
export LC_CTYPE=en_US.UTF-8
|
|
ruby ${./generate-devices-listing.rb}
|
|
''
|