Update Nix flake, add readme
This commit is contained in:
parent
8767c85c2f
commit
3ff7bfa838
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
/target
|
/target
|
||||||
/.direnv
|
/.direnv
|
||||||
|
/result
|
||||||
|
|
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -3,5 +3,5 @@
|
||||||
version = 3
|
version = 3
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "learn-rust-in-a-month-of-lunches"
|
name = "learnrust"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "learn-rust-in-a-month-of-lunches"
|
name = "learnrust"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
|
19
flake.lock
19
flake.lock
|
@ -2,7 +2,9 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"naersk": {
|
"naersk": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698153314,
|
"lastModified": 1698153314,
|
||||||
|
@ -20,19 +22,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1697723726,
|
|
||||||
"narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=",
|
|
||||||
"path": "/nix/store/4jfc6vrkmq7z5pb651jh5b4kra5f1kwp-source",
|
|
||||||
"rev": "7c9cc5a6e5d38010801741ac830a3f8fd667a7a0",
|
|
||||||
"type": "path"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"id": "nixpkgs",
|
|
||||||
"type": "indirect"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1697915759,
|
"lastModified": 1697915759,
|
||||||
"narHash": "sha256-WyMj5jGcecD+KC8gEs+wFth1J1wjisZf8kVZH13f1Zo=",
|
"narHash": "sha256-WyMj5jGcecD+KC8gEs+wFth1J1wjisZf8kVZH13f1Zo=",
|
||||||
|
@ -51,7 +40,7 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"naersk": "naersk",
|
"naersk": "naersk",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs",
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
13
flake.nix
13
flake.nix
|
@ -1,7 +1,12 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
naersk.url = "github:nix-community/naersk/master";
|
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
|
||||||
|
naersk = {
|
||||||
|
url = "github:nix-community/naersk/master";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
utils.url = "github:numtide/flake-utils";
|
utils.url = "github:numtide/flake-utils";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -15,7 +20,11 @@
|
||||||
pkgs = import nixpkgs {inherit system;};
|
pkgs = import nixpkgs {inherit system;};
|
||||||
naersk-lib = pkgs.callPackage naersk {};
|
naersk-lib = pkgs.callPackage naersk {};
|
||||||
in {
|
in {
|
||||||
defaultPackage = naersk-lib.buildPackage ./.;
|
packages.default = naersk-lib.buildPackage ./.;
|
||||||
|
formatter = nixpkgs.legacyPackages.${system}.alejandra;
|
||||||
|
checks = {
|
||||||
|
inherit (self.packages.${system}) default;
|
||||||
|
};
|
||||||
devShell = with pkgs;
|
devShell = with pkgs;
|
||||||
mkShell {
|
mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
|
8
readme.md
Normal file
8
readme.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Learn Rust in a Month of Lunches
|
||||||
|
|
||||||
|
Bought [this book][book] and this code contains my musings and other stuff that
|
||||||
|
I write as I work through it.
|
||||||
|
|
||||||
|
Enjoy!
|
||||||
|
|
||||||
|
[book]: https://www.manning.com/books/learn-rust-in-a-month-of-lunches?ar=false&lpse=B
|
|
@ -1,3 +1,4 @@
|
||||||
|
/// a doc comment - use `cargo doc --open` to see it?
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("Hello, world!");
|
println!("Hello, world!");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue