From f8b3f819adbb4649692314ffea91e17e9122712b Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Wed, 6 Sep 2023 06:59:40 +0300 Subject: [PATCH] Add flake.nix Signed-off-by: Ivan Bushchik --- flake.nix | 28 ++++++++++++++++++++++++++++ tea.yaml | 3 --- 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 flake.nix delete mode 100644 tea.yaml diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f43d28f --- /dev/null +++ b/flake.nix @@ -0,0 +1,28 @@ +{ + inputs = { + cargo2nix.url = "github:cargo2nix/cargo2nix/release-0.11.0"; + flake-utils.follows = "cargo2nix/flake-utils"; + nixpkgs.follows = "cargo2nix/nixpkgs"; + }; + + outputs = inputs: with inputs; + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + inherit system; + overlays = [cargo2nix.overlays.default]; + }; + + rustPkgs = pkgs.rustBuilder.makePackageSet { + rustVersion = "1.72.0"; + packageFun = import ./Cargo.nix; + }; + + in rec { + packages = { + webhookd = (rustPkgs.workspace.rust-template {}).bin; + default = packages.rust-template; + }; + } + ); +} \ No newline at end of file diff --git a/tea.yaml b/tea.yaml deleted file mode 100644 index 3ec75d3..0000000 --- a/tea.yaml +++ /dev/null @@ -1,3 +0,0 @@ -dependencies: - rust-lang.org: '>=1.70' - rust-lang.org/cargo: '*'