Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
add nix build
Browse files Browse the repository at this point in the history
  • Loading branch information
manveru authored and cleverca22 committed Dec 2, 2020
1 parent 874d2c6 commit ea3befe
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
40 changes: 40 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions flake.nix
@@ -0,0 +1,37 @@
{
description = "Web interface for Mantis Faucet";

inputs.flake-utils.url = "github:numtide/flake-utils";

outputs = { self, nixpkgs, flake-utils }:
let
name = "mantis-faucet-web";
systems = [ "x86_64-linux" "x86_64-darwin" ];
overlay = final: prev: {
${name}.defaultPackage = final.mkYarnPackage {
src = ./.;

FAUCET_NODE_URL = "https://mantis-testnet-mantis-faucet.mantis.ws";

doCheck = false;
distPhase = "true";

buildPhase = ''
export HOME="$NIX_BUILD_TOP"
yarn run build
'';

installPhase = ''
mv deps/$pname/dist $out
'';
};
};

simpleFlake = flake-utils.lib.simpleFlake {
inherit name systems overlay self nixpkgs;
};
in simpleFlake // {
hydraJobs = self.packages;
inherit overlay;
};
}

0 comments on commit ea3befe

Please sign in to comment.