nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

default.nix (1102B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchFromGitHub,
      5   nodejs_20,
      6   pnpm_9,
      7 }:
      8 
      9 stdenv.mkDerivation (finalAttrs: {
     10   pname = "headscale-webui";
     11   version = "0.0.5";
     12 
     13   src = fetchFromGitHub {
     14     owner = "jamebal";
     15     repo = "headscale-webui";
     16     tag = "v${finalAttrs.version}";
     17     hash = "sha256-IDWrGXJG18j4xpDxE/w/wmRrK6wY+ykV4aeshKboK8Q=";
     18   };
     19 
     20   patches = [ ./pnpm-lock.yaml.patch ];
     21 
     22   pnpmDeps = pnpm_9.fetchDeps {
     23     inherit (finalAttrs)
     24       pname
     25       version
     26       src
     27       patches
     28       ;
     29     hash = "sha256-2aERyYmvkRh9A8rCTYRcNccn7431+02amu5a/VMwKt4=";
     30   };
     31 
     32   nativeBuildInputs = [
     33     nodejs_20
     34     pnpm_9.configHook
     35   ];
     36 
     37   buildPhase = ''
     38     runHook preBuild
     39     pnpm run build:prod
     40     runHook postBuild
     41   '';
     42 
     43   installPhase = ''
     44     runHook preInstall
     45     mkdir $out
     46     cp -R dist $out
     47     runHook postInstall
     48   '';
     49 
     50   meta = {
     51     description = "Tailscale-compatible orchestration server web front-end for headscale";
     52     homepage = "https://github.com/jamebal/headscale-webui";
     53     license = lib.licenses.mit;
     54     maintainers = [ lib.maintainers.sikmir ];
     55     skip.ci = true;
     56   };
     57 })