diff --git a/.gitignore b/.gitignore index 45c5571..bf3e4ab 100644 --- a/.gitignore +++ b/.gitignore @@ -4,10 +4,6 @@ debug/ target/ -# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries -# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html -Cargo.lock - # These are backup files generated by rustfmt **/*.rs.bk diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..eda99a3 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "compiler-course" +version = "0.1.0" diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..33b6c26 --- /dev/null +++ b/default.nix @@ -0,0 +1,21 @@ +{ + lib, + fetchFromGitHub, + rustPlatform, +}: + +rustPlatform.buildRustPackage rec { + pname = "compiler-course"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "VSinerva"; + repo = pname; + ref = "main"; + hash = lib.fakeHash; # Use this to get the new hash + }; + + cargoLock = { + lockFile = ./Cargo.lock; + }; +}