fixup! feat: add basic timer
This commit is contained in:
parent
b04ac3a2d7
commit
a0d9498e59
4
.gitignore
vendored
4
.gitignore
vendored
@ -3,10 +3,6 @@
|
|||||||
debug/
|
debug/
|
||||||
target/
|
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
|
# These are backup files generated by rustfmt
|
||||||
**/*.rs.bk
|
**/*.rs.bk
|
||||||
|
|
||||||
|
1145
Cargo.lock
generated
Normal file
1145
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
6
flake.lock
generated
6
flake.lock
generated
@ -33,11 +33,11 @@
|
|||||||
"pre-commit-hooks": "pre-commit-hooks_2"
|
"pre-commit-hooks": "pre-commit-hooks_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712579011,
|
"lastModified": 1712662014,
|
||||||
"narHash": "sha256-trHgFNW8CW85c1OuAPBI+OGous53KkVhMemvcq7syDo=",
|
"narHash": "sha256-VGQtjI5+lgtSMjYzt4lgKBLnSjdkmWT/1sMNHhDeMDY=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "devenv",
|
"repo": "devenv",
|
||||||
"rev": "a71323c618664a6b7a39bc183b0ce22ac8511cf9",
|
"rev": "3c84a0fc1afcff3a9e2d8a3a9a9fafcfb612e8f7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
32
flake.nix
32
flake.nix
@ -11,24 +11,38 @@
|
|||||||
extra-substituters = "https://devenv.cachix.org";
|
extra-substituters = "https://devenv.cachix.org";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ flake-parts, ... }:
|
outputs = inputs @ {flake-parts, ...}:
|
||||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.devenv.flakeModule
|
inputs.devenv.flakeModule
|
||||||
];
|
];
|
||||||
systems = [ "x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
systems = ["x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
|
||||||
|
|
||||||
perSystem = { config, self', inputs', pkgs, system, ... }: {
|
perSystem = {
|
||||||
|
config,
|
||||||
|
self',
|
||||||
|
inputs',
|
||||||
|
pkgs,
|
||||||
|
system,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
|
||||||
|
in {
|
||||||
# Per-system attributes can be defined here. The self' and inputs'
|
# Per-system attributes can be defined here. The self' and inputs'
|
||||||
# module parameters provide easy access to attributes of the same
|
# module parameters provide easy access to attributes of the same
|
||||||
# system.
|
# system.
|
||||||
|
|
||||||
|
# Rust package
|
||||||
|
packages.default = pkgs.rustPlatform.buildRustPackage {
|
||||||
|
inherit (cargoToml.package) name version;
|
||||||
|
src = ./.;
|
||||||
|
cargoLock.lockFile = ./Cargo.lock;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
# needed for devenv up
|
# needed for devenv up
|
||||||
packages.devenv-up = self'.devShells.default.config.procfileScript;
|
packages.devenv-up = self'.devShells.default.config.procfileScript;
|
||||||
|
|
||||||
# Equivalent to inputs'.nixpkgs.legacyPackages.hello;
|
|
||||||
packages.default = pkgs.hello;
|
|
||||||
|
|
||||||
devenv.shells.default = {
|
devenv.shells.default = {
|
||||||
name = "my-project";
|
name = "my-project";
|
||||||
|
|
||||||
@ -39,7 +53,7 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
# https://devenv.sh/reference/options/
|
# https://devenv.sh/reference/options/
|
||||||
packages = [ config.packages.default ];
|
packages = [config.packages.default];
|
||||||
|
|
||||||
languages.rust.enable = true;
|
languages.rust.enable = true;
|
||||||
|
|
||||||
@ -47,13 +61,11 @@
|
|||||||
hello
|
hello
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
flake = {
|
flake = {
|
||||||
# The usual flake attributes can be defined here, including system-
|
# The usual flake attributes can be defined here, including system-
|
||||||
# agnostic ones like nixosModule and system-enumerating ones, although
|
# agnostic ones like nixosModule and system-enumerating ones, although
|
||||||
# those are more easily expressed in perSystem.
|
# those are more easily expressed in perSystem.
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user