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
|
||||
/.direnv
|
||||
/result
|
||||
|
|
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -3,5 +3,5 @@
|
|||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "learn-rust-in-a-month-of-lunches"
|
||||
name = "learnrust"
|
||||
version = "0.1.0"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "learn-rust-in-a-month-of-lunches"
|
||||
name = "learnrust"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
|
|
19
flake.lock
19
flake.lock
|
@ -2,7 +2,9 @@
|
|||
"nodes": {
|
||||
"naersk": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1698153314,
|
||||
|
@ -20,19 +22,6 @@
|
|||
}
|
||||
},
|
||||
"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": {
|
||||
"lastModified": 1697915759,
|
||||
"narHash": "sha256-WyMj5jGcecD+KC8gEs+wFth1J1wjisZf8kVZH13f1Zo=",
|
||||
|
@ -51,7 +40,7 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"naersk": "naersk",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"utils": "utils"
|
||||
}
|
||||
},
|
||||
|
|
13
flake.nix
13
flake.nix
|
@ -1,7 +1,12 @@
|
|||
{
|
||||
inputs = {
|
||||
naersk.url = "github:nix-community/naersk/master";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
|
||||
naersk = {
|
||||
url = "github:nix-community/naersk/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
|
@ -15,7 +20,11 @@
|
|||
pkgs = import nixpkgs {inherit system;};
|
||||
naersk-lib = pkgs.callPackage naersk {};
|
||||
in {
|
||||
defaultPackage = naersk-lib.buildPackage ./.;
|
||||
packages.default = naersk-lib.buildPackage ./.;
|
||||
formatter = nixpkgs.legacyPackages.${system}.alejandra;
|
||||
checks = {
|
||||
inherit (self.packages.${system}) default;
|
||||
};
|
||||
devShell = with pkgs;
|
||||
mkShell {
|
||||
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() {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue