-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
31 lines (28 loc) · 864 Bytes
/
flake.nix
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
{
description = "Nix flake of the sourcegraph-app";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = {
self,
nixpkgs,
}: let
supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-darwin"];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;});
in rec {
packages = forAllSystems (system: let
pkgs = nixpkgsFor.${system};
in {
sourcegraph-app = pkgs.callPackage ./sourcegraph-app.nix {};
});
defaultPackage = forAllSystems (system: self.packages.${system}.sourcegraph-app);
apps = forAllSystems (system: rec {
sourcegraph-app = {
type = "app";
program = "${packages.${system}.sourcegraph-app}/bin/sourcegraph";
};
default = sourcegraph-app;
});
};
}