summaryrefslogtreecommitdiff
path: root/overlays/spm/frontend/default.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-05-26 13:58:07 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2022-05-26 13:58:07 +0200
commitfc6cf6169868e60c189e4b243330c3717ff159f3 (patch)
tree3f6dea9c1420e23756257b5abea27ec9ed92d58a /overlays/spm/frontend/default.nix
parent84f2affd66a0ff3947b91a30308cb8e6a8ff7594 (diff)
downloadnixos-fc6cf6169868e60c189e4b243330c3717ff159f3.tar
nixos-fc6cf6169868e60c189e4b243330c3717ff159f3.tar.gz
nixos-fc6cf6169868e60c189e4b243330c3717ff159f3.tar.bz2
nixos-fc6cf6169868e60c189e4b243330c3717ff159f3.tar.xz
nixos-fc6cf6169868e60c189e4b243330c3717ff159f3.zip
...
Diffstat (limited to 'overlays/spm/frontend/default.nix')
-rw-r--r--overlays/spm/frontend/default.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/overlays/spm/frontend/default.nix b/overlays/spm/frontend/default.nix
new file mode 100644
index 00000000..4470b90c
--- /dev/null
+++ b/overlays/spm/frontend/default.nix
@@ -0,0 +1,22 @@
1{ lib, nodejs, stdenv, fetchurl, writeText, git, cacert
2, python3
3, baseHref ? null
4}:
5
6let
7 project = import ./yarn-project.nix { inherit lib nodejs stdenv fetchurl writeText git cacert; } {
8 src = ./.;
9 };
10in project.overrideAttrs (oldAttrs: {
11 name = "spm-frontend";
12
13 buildInputs = (oldAttrs.buildInputs or []) ++ [ python3 ];
14
15 buildPhase = ''
16 yarn build ${lib.optionalString (baseHref != null) "--base-href ${baseHref}"}
17 '';
18
19 installPhase = ''
20 cp -r dist/spm-frontend $out
21 '';
22})