diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-06-20 10:23:53 +0200 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-06-20 10:23:53 +0200 |
commit | 579e0ecd4bb5cd67debcfee10d69c7bfa37d630c (patch) | |
tree | 35d04bee3f773f2d54f70db4ae597a798d3366ae /.nix/derivation.nix | |
parent | 6c855f985c7c4d5217ff85382d4f62cdf808507a (diff) |
Adding basic nix files
Diffstat (limited to '.nix/derivation.nix')
-rw-r--r-- | .nix/derivation.nix | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/.nix/derivation.nix b/.nix/derivation.nix new file mode 100644 index 0000000..c3f76a3 --- /dev/null +++ b/.nix/derivation.nix @@ -0,0 +1,29 @@ +{ lib +, stdenv +}: + +stdenv.mkDerivation { + pname = "kel_lights_out"; + version = "0.0.0"; + + src = ./..; + + dontConfigure = true; + buildPhase = '' + HOME=$(pwd) + emcc c++/lights_out.cpp \ + -s WASM=1 \ + -s EXPORTED_FUNCTIONS='["_fake_main"]' \ + -s EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]' \ + -o lights_out.js + ''; + + # Silence the warnings for now + checkPhase = '' + ''; + + installPhase = '' + mkdir -p $out + cp lights_out.{wasm,js} $out/ + ''; +} |