ci: remove ./ci.nix

This commit is contained in:
DavHau 2023-09-20 22:03:03 +02:00
parent 4eb5478fdd
commit e913ec992b
4 changed files with 42 additions and 56 deletions

24
ci.nix
View File

@ -1,24 +0,0 @@
let
b = builtins;
flakeCompatSrc = b.fetchurl "https://raw.githubusercontent.com/edolstra/flake-compat/12c64ca55c1014cdc1b16ed5a804aa8576601ff2/default.nix";
flake = (import flakeCompatSrc {src = ./.;}).defaultNix;
pkgs = import flake.inputs.nixpkgs {};
recurseIntoAll = b.mapAttrs (name: val: pkgs.recurseIntoAttrs val);
dream2nix-repo = import ./examples/dream2nix-repo {
dream2nixSource = ./.;
inherit pkgs;
};
dream2nix-repo-flake = (import ./examples/dream2nix-repo-flake/flake.nix).outputs {
self = dream2nix-repo-flake;
dream2nix = flake;
nixpkgs = flake.inputs.nixpkgs;
};
in
recurseIntoAll {
inherit dream2nix-repo dream2nix-repo-flake;
checks = flake.checks.x86_64-linux;
devShells = flake.devShells.x86_64-linux;
packages = flake.packages.x86_64-linux;
}

View File

@ -80,14 +80,17 @@
dream2nix-shell = mkShell {
devshell.name = "dream2nix-devshell";
packages = [
packages =
[
pkgs.alejandra
pkgs.mdbook
inputs'.nix-unit.packages.nix-unit
(pkgs.python3.withPackages (ps: [
pkgs.python3.pkgs.black
]))
];
]
++ (l.optionals pkgs.stdenv.isLinux [
inputs'.nix-unit.packages.nix-unit
]);
commands =
[

View File

@ -3,8 +3,11 @@
perSystem = {
pkgs,
inputs',
lib,
system,
...
}: {
}:
lib.optionalAttrs (system == "x86_64-linux") {
# map all modules in /examples to a package output in the flake.
checks.nix-unit = pkgs.runCommand "nix-unit-tests" {} ''
export NIX_PATH=nixpkgs=${pkgs.path}

View File

@ -105,6 +105,9 @@ in {
in {
# map all modules in /examples to a package output in the flake.
checks =
lib.optionalAttrs
(system == "x86_64-linux")
(
(lib.mapAttrs (_: drvModules: makeDrv drvModules) allModules)
// {
example-repo =
@ -115,6 +118,7 @@ in {
.hello;
example-repo-flake =
(importFlake (self + /examples/dream2nix-repo-flake/flake.nix)).packages.${system}.hello;
};
}
);
};
}