use makefile instead of script in flake.nix
This commit is contained in:
parent
39de71b40e
commit
32b5ab3135
3 changed files with 8 additions and 56 deletions
36
flake.lock
36
flake.lock
|
@ -1,40 +1,6 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1669045945,
|
||||
"narHash": "sha256-BQxzijvZpLQ7R+KuQzCPcFgIS6OK0Onb29pYFe2pzJo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6b5019a48f876f3288efc626fa8b70ad0c64eb46",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
"root": {}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
|
|
23
flake.nix
23
flake.nix
|
@ -1,24 +1,5 @@
|
|||
{
|
||||
inputs = {
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
inputs = { };
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
{
|
||||
lib = import ./lib.nix;
|
||||
}
|
||||
// flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
|
||||
runTests = pkgs.writeShellScript "runTests" ''
|
||||
nix eval --impure --expr 'import ./lib.test.nix {}'
|
||||
'';
|
||||
in
|
||||
{
|
||||
apps.tests = {
|
||||
type = "app";
|
||||
program = toString runTests;
|
||||
};
|
||||
});
|
||||
outputs = { ... }: { lib = import ./lib.nix; };
|
||||
}
|
||||
|
|
5
makefile
Normal file
5
makefile
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
# Run all tests
|
||||
test:
|
||||
nix eval --impure --expr 'import ./lib.test.nix {}'
|
||||
|
Loading…
Reference in a new issue