tracks lexicons and how many times they appeared on the jetstream
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

build: add nix flake

dusk 3a409f66 19a17895

+89
+89
flake.nix
··· 1 + { 2 + inputs.parts.url = "github:hercules-ci/flake-parts"; 3 + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; 4 + inputs.systems.url = "github:nix-systems/x86_64-linux"; 5 + inputs.naked-shell.url = "github:90-008/mk-naked-shell"; 6 + 7 + outputs = inp: 8 + inp.parts.lib.mkFlake {inputs = inp;} { 9 + systems = import inp.systems; 10 + imports = [ 11 + inp.naked-shell.flakeModule 12 + ]; 13 + perSystem = { 14 + config, 15 + system, 16 + ... 17 + }: let 18 + pkgs = inp.nixpkgs.legacyPackages.${system}; 19 + packageJson = builtins.fromJSON (builtins.readFile ./package.json); 20 + in { 21 + packages.nsid-tracker-modules = pkgs.stdenv.mkDerivation { 22 + pname = "${packageJson.name}-modules"; 23 + version = packageJson.version; 24 + 25 + src = ./.; 26 + 27 + outputHash = ""; 28 + outputHashAlgo = "sha256"; 29 + outputHashMode = "recursive"; 30 + 31 + nativeBuildInputs = with pkgs; [bun]; 32 + 33 + dontConfigure = true; 34 + 35 + buildPhase = "bun install --no-cache --no-progress --frozen-lockfile"; 36 + installPhase = '' 37 + mkdir -p $out 38 + 39 + # Do not copy .cache or .bin 40 + cp -R ./node_modules/* $out 41 + cp -R ./node_modules/.bin $out 42 + ls -la $out 43 + ''; 44 + dontFixup = true; 45 + dontPatchShebangs = true; 46 + }; 47 + packages.nsid-tracker = pkgs.stdenv.mkDerivation { 48 + pname = packageJson.name; 49 + version = packageJson.version; 50 + 51 + src = ./.; 52 + 53 + nativeBuildInputs = [pkgs.makeBinaryWrapper pkgs.rsync]; 54 + buildInputs = [pkgs.bun]; 55 + 56 + PUBLIC_BASE_URL="http://localhost:5173"; 57 + GUESTBOOK_BASE_URL="http://localhost:8080"; 58 + 59 + # dontConfigure = true; 60 + configurePhase = '' 61 + runHook preConfigure 62 + cp -R --no-preserve=ownership ${config.packages.nsid-tracker-modules} node_modules 63 + find node_modules -type d -exec chmod 755 {} \; 64 + substituteInPlace node_modules/.bin/vite \ 65 + --replace-fail "/usr/bin/env node" "${pkgs.nodejs-slim_latest}/bin/node" 66 + runHook postConfigure 67 + ''; 68 + buildPhase = '' 69 + runHook preBuild 70 + bun --prefer-offline run --bun build 71 + runHook postBuild 72 + ''; 73 + installPhase = '' 74 + runHook preInstall 75 + 76 + mkdir -p $out/bin 77 + cp -R ./build/* $out 78 + 79 + makeBinaryWrapper ${pkgs.bun}/bin/bun $out/bin/${packageJson.name} \ 80 + --prefix PATH : ${pkgs.lib.makeBinPath [ pkgs.bun ]} \ 81 + --add-flags "run --bun --no-install --cwd $out start" 82 + 83 + runHook postInstall 84 + ''; 85 + }; 86 + packages.default = config.packages.nsid-tracker; 87 + }; 88 + }; 89 + }