Update Nix flake, add readme

This commit is contained in:
Daniel Flanagan 2023-10-27 10:06:49 -05:00
parent 8767c85c2f
commit 3ff7bfa838
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
7 changed files with 27 additions and 19 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
/target /target
/.direnv /.direnv
/result

2
Cargo.lock generated
View file

@ -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"

View file

@ -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"

View file

@ -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"
} }
}, },

View file

@ -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
View 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

View file

@ -1,3 +1,4 @@
/// a doc comment - use `cargo doc --open` to see it?
fn main() { fn main() {
println!("Hello, world!"); println!("Hello, world!");
} }