diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..9d9539c --- /dev/null +++ b/default.nix @@ -0,0 +1,6 @@ +{pkgs}: +pkgs.rustPlatform.buildRustPackage { + name = "kx"; + cargoHash = "sha256-SNV81sV9lTy/Hymy5xyve9asDIyW8ia/wHjx/JRGz2Q="; + src = ./.; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..9500977 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1713808258, + "narHash": "sha256-qARE+x3I/CbSXdLl0V6TQnqblSGDzw3zB0emAcFjpYM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "80368c5bef936a8229d62d8e5125e9d4f8c494a7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..c9a1ef3 --- /dev/null +++ b/flake.nix @@ -0,0 +1,21 @@ +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/master"; + flake-utils.url = "github:numtide/flake-utils"; + }; + outputs = { + self, + nixpkgs, + flake-utils, + }: + flake-utils.lib.eachSystem ["x86_64-linux"] (system: let + pkgs = nixpkgs.legacyPackages.${system}; + kx = import ./default.nix {inherit pkgs;}; + in { + packages.default = kx; + devShells.default = pkgs.mkShell { + name = "kx"; + packages = [kx]; + }; + }); +}