-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
21 lines (21 loc) · 873 Bytes
/
Copy pathdefault.nix
File metadata and controls
21 lines (21 loc) · 873 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ pkgs ? import <nixpkgs> {}, allowDirty ? false }:
let
release = builtins.fromJSON (builtins.readFile ./release.json);
manifest = builtins.fromJSON (builtins.readFile ./web-artifact/manifest.json);
localArchive = ./web-artifact + "/${manifest.archive.file}";
archive = if builtins.pathExists localArchive then localArchive else pkgs.fetchurl {
inherit (manifest.archive) url sha256;
};
in pkgs.callPackage ./nix/package.nix {
src = pkgs.lib.cleanSourceWith {
src = ./.;
filter = path: type: pkgs.lib.cleanSourceFilter path type
&& !(pkgs.lib.hasPrefix (toString ./. + "/web/dist") path)
&& !(pkgs.lib.hasPrefix (toString ./. + "/web-artifact") path)
&& builtins.baseNameOf path != "result";
};
inherit (release) version vendorHash;
inherit allowDirty;
webManifest = ./web-artifact/manifest.json;
webArchive = archive;
}