mirror of
https://github.com/nix-community/disko.git
synced 2026-12-01 13:33:28 +01:00
lib: Fix jsonTypes evaluation
This will be very useful for generating documentation.
Backported from a5c646bd93 for #789
This commit is contained in:
1 parent
5fd852c415
commit
9f97bd0995
5 files changed
+90
-22
No files matched your search
@@ -19,13 +19,15 @@
|
||||
|
||||
versionInfo = import ./version.nix;
|
||||
version = versionInfo.version + (lib.optionalString (!versionInfo.released) "-dirty");
|
||||
|
||||
diskoLib = import ./lib {
|
||||
inherit (nixpkgs) lib;
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosModules.default = self.nixosModules.disko; # convention
|
||||
nixosModules.disko.imports = [ ./module.nix ];
|
||||
lib = import ./lib {
|
||||
inherit (nixpkgs) lib;
|
||||
};
|
||||
lib = diskoLib;
|
||||
packages = forAllSystems (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
@@ -64,11 +66,13 @@
|
||||
shellcheck disk-deactivate/disk-deactivate disko
|
||||
touch $out
|
||||
'';
|
||||
|
||||
jsonTypes = pkgs.writeTextFile { name = "jsonTypes"; text = (builtins.toJSON diskoLib.jsonTypes); };
|
||||
in
|
||||
# FIXME: aarch64-linux seems to hang on boot
|
||||
lib.optionalAttrs pkgs.stdenv.hostPlatform.isx86_64 (nixosTests // { inherit disko-install; }) //
|
||||
pkgs.lib.optionalAttrs (!pkgs.stdenv.buildPlatform.isRiscV64 && !pkgs.stdenv.hostPlatform.isx86_32) {
|
||||
inherit shellcheck;
|
||||
inherit shellcheck jsonTypes;
|
||||
inherit (self.packages.${system}) disko-doc;
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user