Added hello template
This commit is contained in:
parent
cfb010fb36
commit
237d56ee0e
3 changed files with 25 additions and 18 deletions
|
|
@ -3,9 +3,13 @@
|
||||||
|
|
||||||
outputs = { self }: {
|
outputs = { self }: {
|
||||||
templates = {
|
templates = {
|
||||||
|
hello = {
|
||||||
|
path = ./hello;
|
||||||
|
description = "Template including hello in shell packages";
|
||||||
|
};
|
||||||
rust = {
|
rust = {
|
||||||
path = ./rust;
|
path = ./rust;
|
||||||
description = "Rust template, using oxalica/rust-overlay";
|
description = "Rust template, using oxalica/rust-overlay";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
12
hello/flake.nix
Normal file
12
hello/flake.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
description = "Flake template for a rust project";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, flake-utils, ... }:
|
||||||
|
flake-utils.lib.eachDefaultSystem
|
||||||
|
(system: { devShells.default = mkShell { packages = [ hello ]; }; });
|
||||||
|
}
|
||||||
|
|
@ -2,29 +2,20 @@
|
||||||
description = "Flake template for a rust project";
|
description = "Flake template for a rust project";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
# nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
|
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
overlays = [ (import rust-overlay) ];
|
overlays = [ (import rust-overlay) ];
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs { inherit system overlays; };
|
||||||
inherit system overlays;
|
in with pkgs; {
|
||||||
};
|
|
||||||
in
|
|
||||||
with pkgs;
|
|
||||||
{
|
|
||||||
devShells.default = mkShell {
|
devShells.default = mkShell {
|
||||||
buildInputs = [
|
buildInputs = [ rust-bin.stable.latest.default ];
|
||||||
rust-bin.stable.latest.default
|
packages = [ rust-analyzer ];
|
||||||
];
|
|
||||||
packages = [
|
|
||||||
rust-analyzer
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue