Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,45 @@ 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)
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
```

### 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`
Expand Down
1 change: 1 addition & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
}
18 changes: 17 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#
# config.allowUnfree = true;
};

vsdfPkg = pkgs.callPackage ./default.nix { };
in
{
devShells.default =
Expand Down Expand Up @@ -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";
};
};
});
}