mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-23 14:31:55 +03:00
ci: remove ./ci.nix
This commit is contained in:
parent
4eb5478fdd
commit
e913ec992b
24
ci.nix
24
ci.nix
@ -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;
|
|
||||||
}
|
|
19
flake.nix
19
flake.nix
@ -80,14 +80,17 @@
|
|||||||
dream2nix-shell = mkShell {
|
dream2nix-shell = mkShell {
|
||||||
devshell.name = "dream2nix-devshell";
|
devshell.name = "dream2nix-devshell";
|
||||||
|
|
||||||
packages = [
|
packages =
|
||||||
pkgs.alejandra
|
[
|
||||||
pkgs.mdbook
|
pkgs.alejandra
|
||||||
inputs'.nix-unit.packages.nix-unit
|
pkgs.mdbook
|
||||||
(pkgs.python3.withPackages (ps: [
|
(pkgs.python3.withPackages (ps: [
|
||||||
pkgs.python3.pkgs.black
|
pkgs.python3.pkgs.black
|
||||||
]))
|
]))
|
||||||
];
|
]
|
||||||
|
++ (l.optionals pkgs.stdenv.isLinux [
|
||||||
|
inputs'.nix-unit.packages.nix-unit
|
||||||
|
]);
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
[
|
[
|
||||||
|
@ -3,18 +3,21 @@
|
|||||||
perSystem = {
|
perSystem = {
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs',
|
inputs',
|
||||||
|
lib,
|
||||||
|
system,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
# map all modules in /examples to a package output in the flake.
|
lib.optionalAttrs (system == "x86_64-linux") {
|
||||||
checks.nix-unit = pkgs.runCommand "nix-unit-tests" {} ''
|
# map all modules in /examples to a package output in the flake.
|
||||||
export NIX_PATH=nixpkgs=${pkgs.path}
|
checks.nix-unit = pkgs.runCommand "nix-unit-tests" {} ''
|
||||||
for test in ${self}/tests/nix-unit/*; do
|
export NIX_PATH=nixpkgs=${pkgs.path}
|
||||||
echo -e "Executing tests from file $test"
|
for test in ${self}/tests/nix-unit/*; do
|
||||||
${inputs'.nix-unit.packages.nix-unit}/bin/nix-unit \
|
echo -e "Executing tests from file $test"
|
||||||
"$test" \
|
${inputs'.nix-unit.packages.nix-unit}/bin/nix-unit \
|
||||||
--eval-store $(realpath .)
|
"$test" \
|
||||||
done
|
--eval-store $(realpath .)
|
||||||
touch $out
|
done
|
||||||
'';
|
touch $out
|
||||||
};
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -105,16 +105,20 @@ in {
|
|||||||
in {
|
in {
|
||||||
# map all modules in /examples to a package output in the flake.
|
# map all modules in /examples to a package output in the flake.
|
||||||
checks =
|
checks =
|
||||||
(lib.mapAttrs (_: drvModules: makeDrv drvModules) allModules)
|
lib.optionalAttrs
|
||||||
// {
|
(system == "x86_64-linux")
|
||||||
example-repo =
|
(
|
||||||
(import (self + /examples/dream2nix-repo) {
|
(lib.mapAttrs (_: drvModules: makeDrv drvModules) allModules)
|
||||||
dream2nixSource = self;
|
// {
|
||||||
inherit pkgs;
|
example-repo =
|
||||||
})
|
(import (self + /examples/dream2nix-repo) {
|
||||||
.hello;
|
dream2nixSource = self;
|
||||||
example-repo-flake =
|
inherit pkgs;
|
||||||
(importFlake (self + /examples/dream2nix-repo-flake/flake.nix)).packages.${system}.hello;
|
})
|
||||||
};
|
.hello;
|
||||||
|
example-repo-flake =
|
||||||
|
(importFlake (self + /examples/dream2nix-repo-flake/flake.nix)).packages.${system}.hello;
|
||||||
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user