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.
 
 
 
 

51 lines
1.2 KiB

with import <nixpkgs> {};
let
artifactName = "discoteque";
version = "0.1.0";
src = ./.;
nodePkg = pkgs.nodejs-12_x;
yarnPkg = pkgs.yarn.override { nodejs = nodePkg; };
vueCliPkg = pkgs.nodePackages."@vue/cli".override { nodejs = nodePkg; };
in mkYarnPackage rec {
name = "discoteque";
inherit version src nodePkg yarnPkg;
packageJSON = "${src}/package.json";
yarnLock = "${src}/yarn.lock";
yarnNix = "${src}/yarn.nix";
shellHook = ''
rm -rf ./node_modules || true
export PATH="$PATH:$node_modules/.bin"
export NODE_PATH=$NODE_PATH:$node_modules
ln -s $node_modules ./node_modules
'';
configurePhase = ''
rm -rf ./node_modules || true
export PATH=$PATH:$node_modules/.bin
export NODE_PATH=$NODE_PATH:$node_modules
ln -s $node_modules ./node_modules
'';
buildPhase = ''
${yarnPkg}/bin/yarn --offline build
'';
installPhase = ''
mkdir -p $out/dist
ls $out
cp -R ./dist/* $out/dist/
'';
distPhase = ''
mkdir -p $out/tarballs
tar -czvf $out/tarballs/${artifactName}.${version}.tar.gz $out/dist/*
'';
nativeBuildInputs = with pkgs; [
nodePkg yarnPkg
makeWrapper yarn2nix
];
}