Frontend for Miracle TV
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.
 
 
 
 

55 lines
1.4 KiB

with import <nixpkgs> {};
let
artifactName = "miracle-tv-frontend";
version = "0.1.0";
src = ./.;
nodePkg = pkgs.nodejs-14_x;
yarnPkg = pkgs.yarn.override { nodejs = nodePkg; };
vueCliPkg = pkgs.nodePackages."@vue/cli".override { nodejs = nodePkg; };
in mkYarnPackage rec {
name = "miarcle-tv-frontend";
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
cp -R ./dist/* $out/dist/
chmod 755 $out
find $out/**/* -type d -print0|xargs -0 chmod 755
find $out/**/* -type f -print0|xargs -0 chmod 644
'';
distPhase = ''
mkdir -p $out/tarballs
tar -czvf $out/tarballs/${artifactName}.${version}.tar.gz $out/dist/*
'';
nativeBuildInputs = with pkgs; [
nodePkg yarnPkg vueCliPkg
makeWrapper yarn2nix
automake autoconf m4 git bash
libpng libGL gcc
];
}