summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.envrc1
-rw-r--r--.gitignore2
-rw-r--r--flake.lock27
-rw-r--r--flake.nix23
4 files changed, 53 insertions, 0 deletions
diff --git a/.envrc b/.envrc
new file mode 100644
index 0000000..c4b17d7
--- /dev/null
+++ b/.envrc
@@ -0,0 +1 @@
+use_flake
diff --git a/.gitignore b/.gitignore
index ea8c4bf..fdf11bc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
/target
+/.direnv
+/result
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000..f408e4a
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,27 @@
+{
+ "nodes": {
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1733392399,
+ "narHash": "sha256-kEsTJTUQfQFIJOcLYFt/RvNxIK653ZkTBIs4DG+cBns=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "d0797a04b81caeae77bcff10a9dde78bc17f5661",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "nixpkgs": "nixpkgs"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..2fdcd40
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,23 @@
+{
+ description = "Terminal Spreadsheet calculator";
+
+ inputs = {
+ nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
+ };
+
+ outputs = { self, nixpkgs }:
+ let
+ pkgs = import nixpkgs { system = "x86_64-linux"; };
+ in
+ {
+ packages.x86_64-linux.default = pkgs.rustPlatform.buildRustPackage rec {
+ pname = "neosheet";
+ version = "0.1.0";
+ src = ./.;
+ cargoLock.lockFile = ./Cargo.lock;
+ nativeBuildInputs = with pkgs; [ pkg-config luajit ];
+ buildInputs = with pkgs; [ luajit ];
+ RUST_BACKTRACE = 1;
+ };
+ };
+}