phanpy/flake.nix

40 lines
1 KiB
Nix
Raw Normal View History

2023-07-16 12:26:31 +00:00
{
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 {
2023-07-16 12:32:57 +00:00
pname = "dtth-phanpy";
2023-07-16 12:26:31 +00:00
version = "0.1.0";
buildInputs = with pkgs; [ git ];
src = lib.cleanSource ./.;
npmDepsHash = "sha256-tqR3YQ++nJmwDNKIm7uFLhJ5HlAqfeEmJVyynHx3Hzw=";
2023-07-23 00:24:20 +00:00
# npmDepsHash = lib.fakeHash;
2023-07-16 12:26:31 +00:00
2023-07-16 12:32:57 +00:00
# DTTH-specific env variables
VITE_CLIENT_NAME = "DTTH Phanpy";
VITE_CLIENT_ID = "ch.dtth.phanpy";
VITE_WEBSITE = "https://social.dtth.ch";
2023-07-16 12:26:31 +00:00
installPhase = ''
runHook preInstall
mkdir -p $out/lib
cp -r dist $out/lib/phanpy
runHook postInstall
'';
};
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ nodejs ];
};
});
}