From 2facb849e8cda26adfdae7ed58ba135293256996 Mon Sep 17 00:00:00 2001 From: eatb33ts Date: Fri, 14 May 2021 01:06:46 -0700 Subject: [PATCH 1/2] add nix build shell --- README.md | 7 ++++++- shell.nix | 10 ++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 shell.nix diff --git a/README.md b/README.md index e723ed7..636764f 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,8 @@ You can download and run already built binaries from [releases](https://github.c You can build Alfis by issuing `cargo build` and `cargo run` commands in a directory of cloned repository. If you want to build release version you need to do `cargo build --release` as usual. +If you have the Nix package manager on Linux/Mac/Windows, an initial `shell.nix` is provided that provides build tools and dependencies. Run `nix-shell` to enter it, then run `cargo build` and `cargo run` as listed above. + ### ![Windows Logo](/img/windows.svg) On Windows You don't need any additional steps to build Alfis, just stick to the MSVC version of Rust. @@ -56,6 +58,9 @@ Install from available [AUR package](https://aur.archlinux.org/packages/alfis) c yay -S alfis ``` +### On NixOS +`nix-shell` in this repo and then run `cargo build` and `cargo install` after you have entered the shell + ## Installation ### Debian/Ubuntu (only blockchain DNS, without GUI) @@ -95,4 +100,4 @@ If you want it to load config from another file you can command it so: `alfis -c 1. Stabilize blockchain functions (domain transfer, info & contacts in UI), bug hunting and fixing. 2. Change DNS server/proxy to own resource saving implementation (using trust-dns-proto for RR parsing). 3. P2P traffic encryption (ECDH). -4. Web-GUI to manage you node from browser. \ No newline at end of file +4. Web-GUI to manage you node from browser. diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..5b6d584 --- /dev/null +++ b/shell.nix @@ -0,0 +1,10 @@ +let + # Pinned nixpkgs, deterministic. Last updated: 2/12/21. + pkgs = import (fetchTarball("https://github.com/NixOS/nixpkgs/archive/a58a0b5098f0c2a389ee70eb69422a052982d990.tar.gz")) {}; + + # Rolling updates, not deterministic. + # pkgs = import (fetchTarball("channel:nixpkgs-unstable")) {}; + +in pkgs.mkShell { + buildInputs = [ pkgs.cargo pkgs.rustc pkgs.webkitgtk pkgs.pkg-config pkgs.kdialog]; +} From 80fa103135dd41d01511b278905a6aad90b7d123 Mon Sep 17 00:00:00 2001 From: eatb33ts Date: Fri, 14 May 2021 01:36:18 -0700 Subject: [PATCH 2/2] README update --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 636764f..f824520 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,6 @@ You can download and run already built binaries from [releases](https://github.c You can build Alfis by issuing `cargo build` and `cargo run` commands in a directory of cloned repository. If you want to build release version you need to do `cargo build --release` as usual. -If you have the Nix package manager on Linux/Mac/Windows, an initial `shell.nix` is provided that provides build tools and dependencies. Run `nix-shell` to enter it, then run `cargo build` and `cargo run` as listed above. - ### ![Windows Logo](/img/windows.svg) On Windows You don't need any additional steps to build Alfis, just stick to the MSVC version of Rust. @@ -58,8 +56,8 @@ Install from available [AUR package](https://aur.archlinux.org/packages/alfis) c yay -S alfis ``` -### On NixOS -`nix-shell` in this repo and then run `cargo build` and `cargo install` after you have entered the shell +### On Nix/NixOS +`nix-shell` in this repo and then run `cargo build` and `cargo install` after you have entered the shell. ## Installation