File tree Expand file tree Collapse file tree 3 files changed +53
-2
lines changed
Expand file tree Collapse file tree 3 files changed +53
-2
lines changed Original file line number Diff line number Diff line change @@ -218,11 +218,45 @@ cmake --build build --config Debug
218218.\build\tests\filewatcher\Debug\filewatcher_tests.exe
219219```
220220
221- ## Nix Develop Shell
221+ ## Nix
222+ ### Nix Develop Shell
222223``` sh
223224nix develop
224225```
225226
227+ ### Nix Run / Install (one command)
228+ Run without installing (builds and runs):
229+ ``` sh
230+ nix run github:jamylak/vsdf
231+ ```
232+
233+ Install into your profile (then ` vsdf ` is on PATH):
234+ ``` sh
235+ nix profile install github:jamylak/vsdf
236+ ```
237+
238+ Open a one-off shell with ` vsdf ` available:
239+ ``` sh
240+ nix shell github:jamylak/vsdf
241+ ```
242+
243+ ### Home Manager (flake) install
244+ ``` nix
245+ # flake.nix
246+ {
247+ inputs.vsdf.url = "github:jamylak/vsdf";
248+ }
249+ ```
250+ ``` nix
251+ # home.nix
252+ { inputs, pkgs, ... }:
253+ {
254+ home.packages = [
255+ inputs.vsdf.packages.${pkgs.system}.default
256+ ];
257+ }
258+ ```
259+
226260### Manually create your own vulkan compatible shader
227261If you don't want any template prepended or you want
228262to use a Vulkan shader directly you can copy ` shaders/vulktemplate.frag `
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ stdenv.mkDerivation {
6363 description = "Vulkan SDF Renderer + Hot Reloader" ;
6464 homepage = "https://github.com/jamylak/vsdf" ;
6565 license = licenses . mit ;
66+ mainProgram = "vsdf" ;
6667 platforms = platforms . linux ++ platforms . darwin ;
6768 } ;
6869}
Original file line number Diff line number Diff line change 2929 #
3030 # config.allowUnfree = true;
3131 } ;
32+
33+ vsdfPkg = pkgs . callPackage ./default.nix { } ;
3234 in
3335 {
3436 devShells . default =
7173 '' ;
7274 } ;
7375
74- packages . default = pkgs . callPackage ./default.nix { } ;
76+ packages = {
77+ default = vsdfPkg ;
78+ vsdf = vsdfPkg ;
79+ } ;
80+
81+ apps = {
82+ default = {
83+ type = "app" ;
84+ program = "${ vsdfPkg } /bin/vsdf" ;
85+ } ;
86+ vsdf = {
87+ type = "app" ;
88+ program = "${ vsdfPkg } /bin/vsdf" ;
89+ } ;
90+ } ;
7591 } ) ;
7692}
You can’t perform that action at this time.
0 commit comments