From e9f9ea831c6f4f47e8fd155be25d348959754dbb Mon Sep 17 00:00:00 2001 From: Albert Chae Date: Sat, 2 Mar 2024 14:21:00 -0800 Subject: [PATCH] try adding pnpm2nix-nzbr --- flake.nix | 5 ++++- pkgs/by-name/atomic-browser/package.nix | 27 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 pkgs/by-name/atomic-browser/package.nix diff --git a/flake.nix b/flake.nix index e30d0c3b..1357f629 100644 --- a/flake.nix +++ b/flake.nix @@ -17,6 +17,8 @@ inputs.rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; inputs.dream2nix.url = "github:nix-community/dream2nix"; inputs.dream2nix.inputs.nixpkgs.follows = "nixpkgs"; + inputs.pnpm2nix-nzbr.url = "github:nzbr/pnpm2nix-nzbr"; + inputs.pnpm2nix-nzbr.inputs.nixpkgs.follows = "nixpkgs" outputs = { self, @@ -26,6 +28,7 @@ sops-nix, rust-overlay, dream2nix, + pnpm2nix-nzbr, ... }: let inherit @@ -72,7 +75,7 @@ pkgsByName = import ./pkgs/by-name { inherit (pkgs) lib; - inherit callPackage dream2nix pkgs; + inherit callPackage dream2nix pnpm2nix-nzbr pkgs; }; explicitPkgs = import ./pkgs { diff --git a/pkgs/by-name/atomic-browser/package.nix b/pkgs/by-name/atomic-browser/package.nix new file mode 100644 index 00000000..aa7c16f2 --- /dev/null +++ b/pkgs/by-name/atomic-browser/package.nix @@ -0,0 +1,27 @@ +{ pkgs, fetchFromGitHub, mkPnpmPackage, fetchYarnDeps, fetchpatch, ... }: +let + source = fetchFromGitHub { + owner = "atomicdata-dev"; + repo = "atomic-server"; + }; +in +mkPnpmPackage rec { + name = "atomic-web"; + version = "v0.34.5"; + src = "${source}/browser"; + + patches = [ + ./workspaces.patch + ]; + + installPhase = ""; + distPhase = ""; + + packageJSON = "${source}/browser/package.json"; + # Upstream does not contain a yarn.lock + yarnLock = ./yarn.lock; + offlineCache = fetchYarnDeps { + yarnLock = ./yarn.lock; + hash = "sha256-GK5Ehk82VQ5ajuBTQlPwTB0aaxhjAoD2Uis8wiam7Z0="; + }; +}