-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
47 lines (40 loc) · 1.34 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/31ffc50c";
flake-utils.url = "github:numtide/flake-utils/04c1b180862888302ddfb2e3ad9eaa63afc60cf8";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
rec {
packages = rec {
demoServer =
let
lib = pkgs.lib;
in
pkgs.buildGoModule {
pname = "ArdanLabsNixDemo";
version = "0.0.2";
modSha256 = lib.fakeSha256;
vendorSha256 = null;
src = ./.;
meta = {
description = "World's simplest HTTP server to demonstrate how to package Go applications with Nix";
homepage = "https://github.com/johnrichardrinehart/ArdanLabsNixDemo";
license = lib.licenses.mit;
maintainers = [ "johnrichardrinehart" ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
};
default = packages.demoServer;
};
apps = rec {
demoServer = flake-utils.lib.mkApp { drv = self.packages.${system}.demoServer; };
default = demoServer;
};
devShell = import ./shell.nix { inherit pkgs; };
}
);
}