format flake with nixpkgs#nixfmt-rfc-style
This commit is contained in:
51
flake.nix
51
flake.nix
@@ -15,13 +15,21 @@
|
||||
flatland.url = "github:StardustXR/flatland";
|
||||
};
|
||||
outputs =
|
||||
inputs@{ self, flake-parts, nixpkgs, hercules-ci-effects, flatland, ... }:
|
||||
inputs@{
|
||||
self,
|
||||
flake-parts,
|
||||
nixpkgs,
|
||||
hercules-ci-effects,
|
||||
flatland,
|
||||
...
|
||||
}:
|
||||
let
|
||||
name = (builtins.fromTOML (builtins.readFile ./Cargo.toml)).package.name;
|
||||
src = builtins.path {
|
||||
name = "${name}-source";
|
||||
path = toString ./.;
|
||||
filter = path: type:
|
||||
filter =
|
||||
path: type:
|
||||
nixpkgs.lib.all (n: builtins.baseNameOf path != n) [
|
||||
"flake.nix"
|
||||
"flake.lock"
|
||||
@@ -29,17 +37,34 @@
|
||||
"README.md"
|
||||
];
|
||||
};
|
||||
in flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
in
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
imports = [ flake-parts.flakeModules.easyOverlay ];
|
||||
systems = [ "aarch64-linux" "x86_64-linux" "riscv64-linux" ];
|
||||
perSystem = { config, self', inputs', pkgs, system, ... }: {
|
||||
systems = [
|
||||
"aarch64-linux"
|
||||
"x86_64-linux"
|
||||
"riscv64-linux"
|
||||
];
|
||||
perSystem =
|
||||
{
|
||||
config,
|
||||
self',
|
||||
inputs',
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
{
|
||||
_module.args.pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ inputs.self.overlays.default ];
|
||||
};
|
||||
overlayAttrs = config.packages;
|
||||
packages = let sk_gpu = pkgs.callPackage ./nix/sk_gpu.nix { };
|
||||
in {
|
||||
packages =
|
||||
let
|
||||
sk_gpu = pkgs.callPackage ./nix/sk_gpu.nix { };
|
||||
in
|
||||
{
|
||||
default = self'.packages.${name};
|
||||
gnome-graphical-test = self'.checks.gnome-graphical-test;
|
||||
"${name}" = pkgs.callPackage ./nix/stardust-xr-server.nix {
|
||||
@@ -50,8 +75,9 @@
|
||||
type = "app";
|
||||
program = self'.packages.${name} + "/bin/stardust-xr-server";
|
||||
};
|
||||
checks.gnome-graphical-test = pkgs.nixosTest
|
||||
(import ./nix/gnome-graphical-test.nix { inherit pkgs self; });
|
||||
checks.gnome-graphical-test = pkgs.nixosTest (
|
||||
import ./nix/gnome-graphical-test.nix { inherit pkgs self; }
|
||||
);
|
||||
devShells.default = pkgs.mkShell {
|
||||
inputsFrom = [ self'.packages.default ];
|
||||
LIBCLANG_PATH = "${pkgs.libclang.lib}/lib";
|
||||
@@ -59,10 +85,13 @@
|
||||
};
|
||||
flake = {
|
||||
herculesCI.ciSystems = [ "x86_64-linux" ];
|
||||
effects = let
|
||||
effects =
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
hci-effects = hercules-ci-effects.lib.withPkgs pkgs;
|
||||
in { ref, rev, ... }: {
|
||||
in
|
||||
{ ref, rev, ... }:
|
||||
{
|
||||
gnome-graphical-test = hci-effects.mkEffect {
|
||||
secretsMap."stardustxrDiscord" = "stardustxrDiscord";
|
||||
secretsMap."stardustxrIpfs" = "stardustxrIpfs";
|
||||
|
||||
Reference in New Issue
Block a user