34 lines
840 B
Nix
34 lines
840 B
Nix
|
{
|
||
|
inputs.nixpkgs.url = github:nixOS/nixpkgs/nixpkgs-unstable;
|
||
|
inputs.flake-utils.url = github:numtide/flake-utils;
|
||
|
|
||
|
outputs = { self, nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system:
|
||
|
let
|
||
|
pkgs = import nixpkgs { inherit system; };
|
||
|
lib = pkgs.lib;
|
||
|
in
|
||
|
{
|
||
|
packages.default = pkgs.buildNpmPackage {
|
||
|
pname = "phanpy";
|
||
|
version = "0.1.0";
|
||
|
|
||
|
buildInputs = with pkgs; [ git ];
|
||
|
|
||
|
src = lib.cleanSource ./.;
|
||
|
|
||
|
npmDepsHash = "sha256-1c6ZyWIfV4rBnZA7mSNH7ikCbJvbTRS3SacIjBW3yhc=";
|
||
|
|
||
|
installPhase = ''
|
||
|
runHook preInstall
|
||
|
mkdir -p $out/lib
|
||
|
cp -r dist $out/lib/phanpy
|
||
|
runHook postInstall
|
||
|
'';
|
||
|
};
|
||
|
|
||
|
devShells.default = pkgs.mkShell {
|
||
|
buildInputs = with pkgs; [ nodejs ];
|
||
|
};
|
||
|
});
|
||
|
}
|