From 31ef98b1e89f0f35dcedf6e2f1f2a5761745c186 Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Fri, 1 Nov 2024 15:17:59 -0700 Subject: [PATCH] Add usage/install docs for nix-ecuflash Remove unused config dir (`.config/ecuflash`) --- projects/nix-ecuflash/README.md | 37 ++++++++++++++++++++++++++++-- projects/nix-ecuflash/ecuflash.nix | 3 --- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/projects/nix-ecuflash/README.md b/projects/nix-ecuflash/README.md index bbfc1eb4..ddee218f 100644 --- a/projects/nix-ecuflash/README.md +++ b/projects/nix-ecuflash/README.md @@ -5,6 +5,39 @@ This project attempts to create a reproducible package for running Tactrix' Windows-only software on Linux. -# Installation +# Usage +`nix-ecuflash` is a wine-wrapped Windows application. You can run it with: - \ No newline at end of file +```sh +nix shell "github:Jafner/Jafner.net?dir=projects/nix-ecuflash#ecuflash" +``` + +# Installation +In 2024, I assume you're using flakes. + + +Start by adding this flake as an input: +**Flake.nix** +```nix +inputs = { + nix-ecuflash.url = "github:Jafner/Jafner.net?dir=projects/nix-ecuflash"; +}; +``` + +And then reference the package in a package list: + +**home.nix** +```nix +home.packages = [ + inputs.nix-ecuflash.packages."x86_64-linux".ecuflash +]; +``` + +Or + +**configuration.nix** +```nix +environment.systemPackages = [ + inputs.nix-ecuflash.packages."x86_64-linux".ecuflash +]; +``` \ No newline at end of file diff --git a/projects/nix-ecuflash/ecuflash.nix b/projects/nix-ecuflash/ecuflash.nix index ab708953..7501e09e 100644 --- a/projects/nix-ecuflash/ecuflash.nix +++ b/projects/nix-ecuflash/ecuflash.nix @@ -25,13 +25,10 @@ nativeBuildInputs = [ copyDesktopItems ]; winAppInstall = '' d="$WINEPREFIX/drive_c/Program Files (x86)/OpenECU/${pname}/" - config_dir="$HOME/.config/ecuflash" mkdir -p "$d" cp ${src} "$d/${pname}_${version_raw}.exe" wine "$WINEPREFIX/drive_c/Program Files (x86)/OpenECU/${pname}/${pname}_${version_raw}.exe" - - mkdir -p "$config_dir" ''; winAppPreRun = '' '';