feat: added nix flake #5
2 changed files with 2 additions and 31 deletions
15
flake.lock
15
flake.lock
|
@ -134,8 +134,7 @@
|
|||
"crane": "crane",
|
||||
"fenix": "fenix",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"test-directory": "test-directory"
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
|
@ -192,18 +191,6 @@
|
|||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"test-directory": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-d6xi4mKdjkX2JFicDIv5niSzpyI0m/Hnm8GGAIU04kY=",
|
||||
"type": "file",
|
||||
"url": "file:///home/ces/org/src/git/gg"
|
||||
},
|
||||
"original": {
|
||||
"type": "file",
|
||||
"url": "file:///home/ces/org/src/git/gg"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
18
flake.nix
18
flake.nix
|
@ -21,14 +21,9 @@
|
|||
url = "github:rustsec/advisory-db";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
test-directory = {
|
||||
url = "file:///home/ces/org/src/git/gg";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, crane, fenix, flake-utils, advisory-db, test-directory, ... }:
|
||||
outputs = { self, nixpkgs, crane, fenix, flake-utils, advisory-db, ... }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
|
@ -39,8 +34,6 @@
|
|||
|
||||
craneLib = crane.lib.${system};
|
||||
|
||||
#src = craneLib.cleanCargoSource (craneLib.path ./.);
|
||||
|
||||
# When filtering sources, we want to allow assets other than .rs files
|
||||
src = lib.cleanSourceWith {
|
||||
src = ./.; # The original, unfiltered source
|
||||
|
@ -54,13 +47,6 @@
|
|||
;
|
||||
};
|
||||
|
||||
# src = pkgs.lib.cleanSourceWith {
|
||||
# src = craneLib.path ./.; # original, unfiltered source
|
||||
# filter = path: type:
|
||||
# (builtins.match ".*yaml" path != null) # include JSONC files
|
||||
# || (craneLib.filterCargoSources path type);
|
||||
# };
|
||||
|
||||
# Common arguments can be set here to avoid repeating them later
|
||||
commonArgs = {
|
||||
inherit src;
|
||||
|
@ -93,7 +79,6 @@
|
|||
# artifacts from above.
|
||||
my-crate = craneLib.buildPackage (commonArgs // {
|
||||
inherit cargoArtifacts;
|
||||
# doCheck = false; # NOTE remove me
|
||||
});
|
||||
in
|
||||
{
|
||||
|
@ -129,7 +114,6 @@
|
|||
# Run tests with cargo-nextest
|
||||
# Consider setting `doCheck = false` on `my-crate` if you do not want
|
||||
# the tests to run twice
|
||||
# NOTE enable this part
|
||||
my-crate-nextest = craneLib.cargoNextest (commonArgs // {
|
||||
inherit cargoArtifacts;
|
||||
partitions = 1;
|
||||
|
|
Loading…
Reference in a new issue