From 75438474c28e5ee3509c518383bbb7490703e334 Mon Sep 17 00:00:00 2001 From: jamylak Date: Sun, 1 Feb 2026 00:25:07 +1100 Subject: [PATCH 1/3] allow flake to run --- default.nix | 1 + flake.nix | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/default.nix b/default.nix index 0f5e0d7..b6b9e83 100644 --- a/default.nix +++ b/default.nix @@ -63,6 +63,7 @@ stdenv.mkDerivation { description = "Vulkan SDF Renderer + Hot Reloader"; homepage = "https://github.com/jamylak/vsdf"; license = licenses.mit; + mainProgram = "vsdf"; platforms = platforms.linux ++ platforms.darwin; }; } diff --git a/flake.nix b/flake.nix index 226ac2e..08491e7 100644 --- a/flake.nix +++ b/flake.nix @@ -29,6 +29,8 @@ # # config.allowUnfree = true; }; + + vsdfPkg = pkgs.callPackage ./default.nix { }; in { devShells.default = @@ -71,6 +73,20 @@ ''; }; - packages.default = pkgs.callPackage ./default.nix { }; + packages = { + default = vsdfPkg; + vsdf = vsdfPkg; + }; + + apps = { + default = { + type = "app"; + program = "${vsdfPkg}/bin/vsdf"; + }; + vsdf = { + type = "app"; + program = "${vsdfPkg}/bin/vsdf"; + }; + }; }); } From 400a45b8e562200d9ba9dce8606e96c856c147f7 Mon Sep 17 00:00:00 2001 From: jamylak Date: Sun, 1 Feb 2026 00:32:50 +1100 Subject: [PATCH 2/3] `nix` instructions --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 2747b52..d872837 100644 --- a/README.md +++ b/README.md @@ -223,6 +223,22 @@ cmake --build build --config Debug nix develop ``` +## Nix Run / Install (one command) +Run without installing (builds and runs): +```sh +nix run github:jamylak/vsdf +``` + +Install into your profile (then `vsdf` is on PATH): +```sh +nix profile install github:jamylak/vsdf +``` + +Open a one-off shell with `vsdf` available: +```sh +nix shell github:jamylak/vsdf +``` + ### Manually create your own vulkan compatible shader If you don't want any template prepended or you want to use a Vulkan shader directly you can copy `shaders/vulktemplate.frag` From 9ff02ca7db22dc809e92e3dfd5997e7731bf9717 Mon Sep 17 00:00:00 2001 From: jamylak Date: Sun, 1 Feb 2026 00:38:02 +1100 Subject: [PATCH 3/3] nix home manager install --- README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d872837..8656bc8 100644 --- a/README.md +++ b/README.md @@ -218,12 +218,13 @@ cmake --build build --config Debug .\build\tests\filewatcher\Debug\filewatcher_tests.exe ``` -## Nix Develop Shell +## Nix +### Nix Develop Shell ```sh nix develop ``` -## Nix Run / Install (one command) +### Nix Run / Install (one command) Run without installing (builds and runs): ```sh nix run github:jamylak/vsdf @@ -239,6 +240,23 @@ Open a one-off shell with `vsdf` available: nix shell github:jamylak/vsdf ``` +### Home Manager (flake) install +```nix +# flake.nix +{ + inputs.vsdf.url = "github:jamylak/vsdf"; +} +``` +```nix +# home.nix +{ inputs, pkgs, ... }: +{ + home.packages = [ + inputs.vsdf.packages.${pkgs.system}.default + ]; +} +``` + ### Manually create your own vulkan compatible shader If you don't want any template prepended or you want to use a Vulkan shader directly you can copy `shaders/vulktemplate.frag`