-
-
Notifications
You must be signed in to change notification settings - Fork 109
Expand file tree
/
Copy pathflake.nix
More file actions
55 lines (50 loc) · 1.43 KB
/
Copy pathflake.nix
File metadata and controls
55 lines (50 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
description = "ZenNotes - Keyboard-first local Markdown notes";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { nixpkgs, ... }:
let
systems = nixpkgs.lib.platforms.linux ++ nixpkgs.lib.platforms.darwin;
forAllSystems = nixpkgs.lib.genAttrs systems;
in
{
packages = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
zennotes-server = pkgs.callPackage ./packaging/nix/package-server.nix { };
in
{ inherit zennotes-server; }
# The desktop package wraps the prebuilt linux-x64 release tarball, so it
# only exists on x86_64-linux; elsewhere the server is the default.
// (
if system == "x86_64-linux" then
let
zennotes-desktop = pkgs.callPackage ./packaging/nix/package-desktop.nix { };
in
{
inherit zennotes-desktop;
default = zennotes-desktop;
}
else
{ default = zennotes-server; }
)
);
devShell = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
pkgs.mkShell {
buildInputs = with pkgs; [
go
nodejs
electron
turbo
];
shellHook = ''
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
'';
}
);
};
}