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 }: {
|
||||
templates = {
|
||||
hello = {
|
||||
path = ./hello;
|
||||
description = "Template including hello in shell packages";
|
||||
};
|
||||
rust = {
|
||||
path = ./rust;
|
||||
description = "Rust template, using oxalica/rust-overlay";
|
||||
path = ./rust;
|
||||
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";
|
||||
|
||||
inputs = {
|
||||
# nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
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, ... }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
overlays = [ (import rust-overlay) ];
|
||||
pkgs = import nixpkgs {
|
||||
inherit system overlays;
|
||||
};
|
||||
in
|
||||
with pkgs;
|
||||
{
|
||||
pkgs = import nixpkgs { inherit system overlays; };
|
||||
in with pkgs; {
|
||||
devShells.default = mkShell {
|
||||
buildInputs = [
|
||||
rust-bin.stable.latest.default
|
||||
];
|
||||
packages = [
|
||||
rust-analyzer
|
||||
];
|
||||
buildInputs = [ rust-bin.stable.latest.default ];
|
||||
packages = [ rust-analyzer ];
|
||||
};
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue