Sample game made on Discoteque engine https://deiru.moe/disco/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.2KB

  1. with import <nixpkgs> {};
  2. let
  3. artifactName = "discoteque";
  4. version = "0.1.0";
  5. src = ./.;
  6. nodePkg = pkgs.nodejs-12_x;
  7. yarnPkg = pkgs.yarn.override { nodejs = nodePkg; };
  8. vueCliPkg = pkgs.nodePackages."@vue/cli".override { nodejs = nodePkg; };
  9. in mkYarnPackage rec {
  10. name = "discoteque";
  11. inherit version src nodePkg yarnPkg;
  12. packageJSON = "${src}/package.json";
  13. yarnLock = "${src}/yarn.lock";
  14. yarnNix = "${src}/yarn.nix";
  15. shellHook = ''
  16. rm -rf ./node_modules || true
  17. export PATH="$PATH:$node_modules/.bin"
  18. export NODE_PATH=$NODE_PATH:$node_modules
  19. ln -s $node_modules ./node_modules
  20. '';
  21. configurePhase = ''
  22. rm -rf ./node_modules || true
  23. export PATH=$PATH:$node_modules/.bin
  24. export NODE_PATH=$NODE_PATH:$node_modules
  25. ln -s $node_modules ./node_modules
  26. '';
  27. buildPhase = ''
  28. ${yarnPkg}/bin/yarn --offline build
  29. '';
  30. installPhase = ''
  31. mkdir -p $out/dist
  32. ls $out
  33. cp -R ./dist/* $out/dist/
  34. '';
  35. distPhase = ''
  36. mkdir -p $out/tarballs
  37. tar -czvf $out/tarballs/${artifactName}.${version}.tar.gz $out/dist/*
  38. '';
  39. nativeBuildInputs = with pkgs; [
  40. nodePkg yarnPkg
  41. makeWrapper yarn2nix
  42. ];
  43. }