-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathflake.nix
48 lines (43 loc) · 1.22 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
description = "Qovery Command Line Interface";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/22.05";
utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = { self, nixpkgs, utils, ... }:
utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs { inherit system; };
name = "qovery-cli";
version = "0.45.0"; # TODO: find a way to take the version from sources directly
vendorSha256 = "KHLknBymDAwr7OxS2Ysx6WU5KQ9kmw0bE2Hlp3CBW0c=";
in
rec {
# nix build
defaultPackage = pkgs.buildGoModule rec {
inherit version vendorSha256;
pname = name;
src = ./.;
};
# nix run
defaultApp = utils.lib.mkApp {
inherit name;
drv = defaultPackage;
};
# nix develop
devShell = pkgs.mkShell {
inputsFrom = builtins.attrValues self.defaultPackage;
nativeBuildInputs = with pkgs; [
# Nix LSP + formatter
rnix-lsp
nixpkgs-fmt
];
};
}
);
}