1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-17 21:11:34 +03:00
mobile-nixos/doc/_support/devices/default.nix
Edward Amsden c5a7112d9d doc: Fix release-tools use
Co-authored-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
Co-authored-by: Edward Amsden <edward@blackriversoft.com>
2021-02-02 01:58:41 -05:00

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}
''