From 723992d15967f6a1746da7ed5dead607d67aad28 Mon Sep 17 00:00:00 2001 From: Astro Date: Mon, 7 Oct 2019 00:33:44 +0200 Subject: [PATCH] nixify --- default.nix | 13 +++++++++++++ shell.nix | 15 +++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 default.nix create mode 100644 shell.nix diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..42e71e2 --- /dev/null +++ b/default.nix @@ -0,0 +1,13 @@ +{ pkgs ? import {} }: + +with pkgs; + +rustPlatform.buildRustPackage { + name = "ticker"; + src = ./.; + buildInputs = [ + pkg-config openssl + cargo rustc + ]; + cargoSha256 = "008404j5k9qgz5xcfg5d4q97lzhiqx5ljmi7jh1kmp9286669ix7"; +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..ec1532c --- /dev/null +++ b/shell.nix @@ -0,0 +1,15 @@ +{ pkgs ? import {} }: + +with pkgs; + +stdenv.mkDerivation { + name = "env"; + buildInputs = [ + pkg-config openssl + cargo rustc + ]; + + shellHook = '' + echo "Run 'cargo build --release'" + ''; +}