From fd8519482dabd992bbf4df1cdf0c32cdd4ca79d4 Mon Sep 17 00:00:00 2001 From: Kristian Krsnik Date: Sat, 27 Jan 2024 14:48:05 +0100 Subject: [PATCH] updated readme and automatically download appimage --- README.md | 10 +++++++--- flake.nix | 6 +++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b75c89e..93369b6 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,15 @@ nix build ```txt nix develop -nix run .#dev ``` -The `nix run .#dev` command will download the AppImage used for building. -It can then be inspected locally with tools like `file` and `appimage-run`, which are offered by the `nix develop` command. +This will put you in a shell with `appimage-run` and other useful utilities. +It will also download the AppImage that is currently being packaged. +To manually download the AppImage do: + +```txt +nix run .#dev +``` ### Resources diff --git a/flake.nix b/flake.nix index 90ee305..0c04b8b 100644 --- a/flake.nix +++ b/flake.nix @@ -44,7 +44,7 @@ apps.${system} = { dev = { program = "${pkgs.writeShellScript "download-appimage" '' - ${pkgs.curl}/bin/curl ${src.url} -Lo ${name}.AppImage + ${pkgs.curl}/bin/curl ${src.url} -C - -Lo ${name}.AppImage ''}"; type = "app"; }; @@ -56,6 +56,10 @@ appimage-run file ]; + + shellHook = '' + ${self.apps.${system}.dev.program} + ''; }; }; };