simple webpage to generate an argon2id hash for a given password

nix: add derivation for site

foxgirl.engineering 2c84eee8 24078299

verified
+71 -1
+2 -1
.gitignore
··· 25 25 *.sw? 26 26 27 27 .direnv 28 - .pre-commit-config.yaml 28 + .pre-commit-config.yaml 29 + result
+9
default.nix
··· 1 + let 2 + pins = import ./nix/npins; 3 + pkgs = import pins.nixpkgs { 4 + config = { }; 5 + overlays = [ ]; 6 + }; 7 + in 8 + 9 + pkgs.callPackage ./nix/package.nix { }
+60
nix/package.nix
··· 1 + { 2 + stdenv, 3 + lib, 4 + 5 + nodejs, 6 + pnpm_10, 7 + }: 8 + 9 + let 10 + fs = lib.fileset; 11 + sources = fs.intersection (fs.gitTracked ../.) ( 12 + fs.unions [ 13 + ../index.html 14 + ../package.json 15 + ../pnpm-lock.yaml 16 + ../public 17 + ../src 18 + ../tsconfig.json 19 + ../vite.config.js 20 + ] 21 + ); 22 + src = fs.toSource { 23 + root = ../.; 24 + fileset = sources; 25 + }; 26 + in 27 + 28 + stdenv.mkDerivation (finalAttrs: { 29 + pname = "password-hash-gen"; 30 + version = "1.0.0"; 31 + 32 + inherit src; 33 + 34 + pnpmDeps = pnpm_10.fetchDeps { 35 + inherit (finalAttrs) pname version src; 36 + fetcherVersion = 2; 37 + hash = "sha256-gW98ljBaFu88qIC/As0zEIWhe2MT7s0quv4hbI8P//Q="; 38 + }; 39 + 40 + nativeBuildInputs = [ 41 + nodejs 42 + pnpm_10.configHook 43 + ]; 44 + 45 + buildPhase = '' 46 + runHook preBuild 47 + 48 + pnpm build 49 + 50 + runHook postBuild 51 + ''; 52 + 53 + installPhase = '' 54 + runHook preInstall 55 + 56 + cp -r dist $out 57 + 58 + runHook postInstall 59 + ''; 60 + })