1
0
Fork 0

Minimal nix package definition for project

This commit is contained in:
Vili Sinervä 2025-01-15 15:21:35 +02:00
parent 33d279ef26
commit dd43867391
No known key found for this signature in database
GPG key ID: DF8FEAF54EFAC996
3 changed files with 28 additions and 4 deletions

4
.gitignore vendored
View file

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

7
Cargo.lock generated Normal file
View file

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

21
default.nix Normal file
View file

@ -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;
};
}