add flake

This commit is contained in:
Robin Appelman 2022-12-05 16:53:22 +01:00
commit d892adca58
4 changed files with 68 additions and 1 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

4
.gitignore vendored
View file

@ -3,4 +3,6 @@
*.obj *.obj
perf.data* perf.data*
flamegraph.svg flamegraph.svg
*.dem *.dem
.direnv
result

42
flake.lock generated Normal file
View file

@ -0,0 +1,42 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1670252560,
"narHash": "sha256-2RPet9AaoYBUDBk4DNApXFbCrEN9/X2Ajd7j1dbxTxc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "219b2fc946a59851cdfc59efdd11129e1cee2b44",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "release-22.11",
"type": "indirect"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"utils": "utils"
}
},
"utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

22
flake.nix Normal file
View file

@ -0,0 +1,22 @@
{
inputs = {
utils.url = "github:numtide/flake-utils";
nixpkgs.url = "nixpkgs/release-22.11";
};
outputs = {
self,
nixpkgs,
utils,
}:
utils.lib.eachDefaultSystem (system: let
pkgs = (import nixpkgs) {
inherit system;
};
in rec {
# `nix develop`
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [rustc cargo bacon cargo-edit cargo-outdated clippy cargo-audit cargo-msrv];
};
});
}