File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ { ...} : {
2+ perSystem = {
3+ pkgs ,
4+ config ,
5+ ...
6+ } : let
7+ # TODO: change this to your crate's name
8+ crateName = "freenet-scaffold" ;
9+ in {
10+ # declare projects
11+ # TODO: change this to your crate's path
12+ nci . projects . ${ crateName } . path = ./. ;
13+ # configure crates
14+ nci . crates . ${ crateName } = { } ;
15+ } ;
16+ }
Original file line number Diff line number Diff line change 1+ {
2+ inputs . nixpkgs . url = "github:nixos/nixpkgs/nixos-unstable" ;
3+ inputs . nci . url = "github:yusdacra/nix-cargo-integration" ;
4+ inputs . nci . inputs . nixpkgs . follows = "nixpkgs" ;
5+ inputs . parts . url = "github:hercules-ci/flake-parts" ;
6+ inputs . parts . inputs . nixpkgs-lib . follows = "nixpkgs" ;
7+
8+ outputs = inputs @ {
9+ parts ,
10+ nci ,
11+ ...
12+ } :
13+ parts . lib . mkFlake { inherit inputs ; } {
14+ systems = [ "x86_64-linux" ] ;
15+ imports = [
16+ nci . flakeModule
17+ ./crates.nix
18+ ] ;
19+ perSystem = {
20+ pkgs ,
21+ config ,
22+ ...
23+ } : let
24+ # shorthand for accessing this crate's outputs
25+ # you can access crate outputs under `config.nci.outputs.<crate name>` (see documentation)
26+ crateOutputs = config . nci . outputs . "freenet-scaffold" ;
27+ in {
28+ # export the crate devshell as the default devshell
29+ devShells . default = crateOutputs . devShell ;
30+ # export the release package of the crate as default package
31+ packages . default = crateOutputs . packages . release ;
32+ } ;
33+ } ;
34+ }
You can’t perform that action at this time.
0 commit comments