From d66819a5012c749820dd6d12dc33eecbd6f654cd Mon Sep 17 00:00:00 2001 From: Xorycode Date: Fri, 5 Apr 2024 17:42:54 +0300 Subject: [PATCH] Basic-ish Nix Derivaton & README.md updates --- README.md | 13 ++++--------- default.nix | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 default.nix diff --git a/README.md b/README.md index b5fc2a7..0160e59 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,14 @@ # mrfetch ![GitHub](https://img.shields.io/github/license/iVacon/mrfetch?style=flat-square) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/iVacon/mrfetch/rust.yml?style=flat-square) ![GitHub top language](https://img.shields.io/github/languages/top/iVacon/mrfetch?style=flat-square) - This is the repository for ``mrfetch``. ``mrfetch`` is a fetch utility created by iVacon as a nitch-inspired hobby project made in Rust. The ``mrfetch`` tool is in no way, shape, or form, endorsed by the Rust Foundation or Project. Disclaimers aside, this started as nothing more but a personal hobby project for me (iVacon) to practice Rust with. I don't expect this to get popular, and definitely not to replace nitch. Those projects are far, far greater and bigger and made by way smarter people. -![MrFetch Screenshot](https://vuran.cf/pics/mrfetch.png) - # Install guide This program works ONLY on Linux. No macOS, no Windows. Maybe you can run it on BSD but that's untested. -## 1. Dependencies: rustup and git. Optional: figlet +For NixOS, you just have to include the derivation in default.nix. +You use NixOS, so you know how to do that. + +## 1. Dependencies: rustup, git and figlet - Arch Linux: ```bash sudo pacman -S rustup git figlet @@ -18,11 +18,6 @@ sudo pacman -S rustup git figlet ```bash sudo apt install rustup git figlet ``` -- NixOS -```bash -sudo nix-env -iA nixos.rustup nixos.git nixos.figlet -``` -If you don't want to install figlet (for the ASCII logo) then you can remove "figlet" from the end of both commands. I'm working on removing figlet from the dependency list alltogether, and packaging the logos in the program, however that would require a lot of testing (likely involving VMs). ## 2. Clone the repository: ```bash diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..fd7df2d --- /dev/null +++ b/default.nix @@ -0,0 +1,17 @@ +{ pkgs ? import {} }: + +pkgs.rustPlatform.buildRustPackage { + pname = "mrfetch"; + version = "2.0.0"; + + src = builtins.fetchGit { + url = "https://git.xorycode.dev/Xorycode/mrfetch"; + }; + + cargoSha256 = "sha256-halN9q+8jKVRqBasewuVReAajs1FQ9ckbma4F6tB22Y="; + + meta = with pkgs.lib; { + description = "A small, light nitch-inspired fetch written in Rust."; + homepage = "https://git.xorycode.dev/Xorycode/mrfetch"; + }; +}